Win7 Reinstall trashed Grub: how to fix?

Hi all,

I have Dell Latitude D630 which has been my primarily Linux laptop for about a year. It has been running Dual Boot OpenSuse 12.3 and Windows 7 pro (both 64 bit) just fine until Windows lunched itself, and needed a reinstall from DVD. During the reinstallation of Windows, it naturally overwrote the bootloader, and since then I can’t get back to OpenSuse.

How can I fix this?

On my SLES11 DVD media, there’s a third option just after starting the Installation process for ‘Recover installed system’ (As opposed to New Installation or Update existing system) which does a lot of fixing, including fixing up GRUB. I’ve used it many times when I’ve broken kernel modules (vmtools mostly :slight_smile: on my SLES 11 vm’s - but it’s not there on the OpenSuse media. Is there an equivalent? How can I do what this process does?

I downloaded the OpenSuse12.3 Rescue CD, but that just gives me a command prompt. Running the YaST Boot Loader module there gives me an error to the effect that partition types could not be detected, so the boot loader config could not be modified.

My filesystem layout is thus:

/dev/sda1 HPFS/NTFS System reserved
/dev/sda2 HPFS/NTFS (The windows partition)
/dev/sda6 ext4 OpenSuse12.3
/dev/sda7 Swap

Thanks in advance!

Have you read this article on the subject? http://forums.opensuse.org/content/128-re-install-grub2-dvd-rescue.html

Thank You,

You can use the Rescue-CD from software.opensuse.org: Download openSUSE 12.3. It has the Yast bootloader modul. It is the same as on install DVDs and as simple for reinstalling Grub.

Thanks for the link - I hadn’t seen it. Gets me further, but at the grub-mkconfig stage I get an error: “failed to get canonical path of /dev/sda6”

after I chrooted, fdisk -l /dev/sda returned no partition table.

fdisk /dev/sda returns another error: “Unable to open /dev/sda: No such file or directory”

This may be normal, given that I chrooted to /mnt - on which /dev/sda6 (the linux root partition) is temporarily mounted - or it may not. I’m googling now.

Cheers,
J

Already tried that (thought I’d said so in my original post) and the Yast Boot Loader module refused with an error.

Cheers,
James

My bad: I had missed the mount --bind /dev /mnt/dev line.

Fixed! Thankyou!