Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Setting Windows bootloader... GParted unknown filesys

  • 26-12-2011 10:43PM
    #1
    Registered Users, Registered Users 2 Posts: 3,536 ✭✭✭


    Ok so long story short (sort of), I had a Windows 7/Ubuntu dualboot. I needed to remove Ubuntu so I thought it'd be an okay idea to just remove the Ubuntu partition using GParted. I did that and I merged the newly freed partition with my existing Windows partition.

    When I then rebooted my laptop, I just got a GRUB error saying "No such partition". I did a bit of Googling and found out that I needed to make sure my computer booted from the Windows bootloader. Most websites said I could do this simply enough using the Windows CD, but I don't have a Windows CD (the laptop is actually a friend's who got it from their college with Windows installed, which they loaned to me). I found a website saying I could do it with the Ubuntu CD either (which I did have):

    http://robert.penz.name/221/mini-howto-restore-windows-mbrbootloader-with-linux/

    So I ran the Ubuntu trial from the CD. I wasn't able to access the internet from that due to an issue with drivers, so I downloaded syslinux onto a USB stick from another computer and copied it onto the trial Ubuntu and installed.

    At this moment, the last time I ran GParted I had three partitions. One 1MB of unallocated space. One small partition "sda1" that had the boot flag set. And a partition "sda2" which was the biggest and had ~37GB of 'used' space. This corresponded with the space used by my files. Both sda1 and sda2 were of file system ntsf.

    I then ran the command suggested at the link above:

    "sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda1".
    (Put in "sda1" because I assumed that's what I should have put in, since that had the boot flag in GParted).

    The same "no such partition" error came up when I rebooted. Running GParted, I see sda1 is of file system "unknown" now.

    Then, perhaps foolishly, I re-ran the Ubuntu trial version and ran the above command but put in "sda2" instead. Now, both sda1 and sda2 are of file system "unknown" and under the 'used' column, they are both "--".
    I've included a screenshot.


    Anyone know what to do from here???

    I've back up all important files, however I really really don't want to lose the Windows install. It will cause a lot of hassle. I borrowed this laptop from a friend for a few months and the install was done by their college.

    Anyway, if there's anything I can do to get the install back (which must still be on the harddrive!) let me know.

    Or if I'm fecked and should just reformat the harddrive feel free to tell me that too.

    Any feedback at all would be great!!

    As mentioned I borrowed the laptop from a friend. The reason why I was uninstalling Ubuntu was that I need to return it asap.

    5mc043.jpg


Comments

  • Registered Users, Registered Users 2 Posts: 14,081 ✭✭✭✭Johnboy1951


    "sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda1".

    That wrote to the boot sector of the partition.

    The drive needs to have the information in its MBR ...... so the command would be ....

    "sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda"

    Restoring the MBR should allow the drive MBR call the boot manager on /dev/sda1.


  • Registered Users, Registered Users 2 Posts: 3,739 ✭✭✭Stuxnet


    boot into windows, use super grub disk if you cant boot into windows via a ubuntu live cd, when in windows download, install and run EasyBCD, it'll re-write the windows mbr, in 2 clicks ! http://neosmart.net/download.php?id=1

    in future, just run easybcd first, then use windows disk management to delete ubuntu partition and expand the c: partition


  • Registered Users, Registered Users 2 Posts: 3,536 ✭✭✭Mark200


    That wrote to the boot sector of the partition.

    The drive needs to have the information in its MBR ...... so the command would be ....

    "sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda"

    Restoring the MBR should allow the drive MBR call the boot manager on /dev/sda1.

    Yeah, I misread the instructions when running that command :(
    boot into windows, use super grub disk if you cant boot into windows via a ubuntu live cd, when in windows download, install and run EasyBCD, it'll re-write the windows mbr, in 2 clicks ! http://neosmart.net/download.php?id=1

    in future, just run easybcd first, then use windows disk management to delete ubuntu partition and expand the c: partition

    I think I may have corrupted the data though, judging from the screenshot. I've been told on another forum to try testdisk to try recover a backup of the partition. Another guy replied and said it was unlikely I'd get my Windows install back!

    Going throught testdisk atm anyway so we'll see how this goes...


  • Registered Users, Registered Users 2 Posts: 1,335 ✭✭✭Saganist


    Mark200 wrote: »
    so I thought it'd be an okay idea to just remove the Ubuntu partition using GParted. I did that and I merged the newly freed partition with my existing Windows partition.

    In doing this you basically screwed your Windows partition/filesystem.

    You could recover using dd. But really you should reinstall.. It will be less hassle.

    What data do you need to recover ? It may narrow it down.


Advertisement