Novell is now a part of Micro Focus

Recovering GRUB after being overwritten by Windows

Novell Cool Solutions: Tip
By Heinz Hartfiel

Digg This - Slashdot This

Posted: 5 Jan 2006

ENVIRONMENT: Novell Linux Desktop (SP1, SP2, SPx).
WindowsXP, Windows2000.
NLD/WinXP dual-boot installation on the same machine.

PROBLEM: How to recover NLD/WinXP dualboot installation if a subsequent WinXP setup has overwritten your grub loader with the Windows boat loader?

SOLUTION: Here are the details to put grub back in charge again instead of the Windows boot loader.

1. Start NLD installation from NLDSPx-CD

2. Choose your Yast2 language (e.g. English, US) --> Accept

3. Select your Default Desktop (e.g. Gnome) --> Accept

4. Write down your Linux Partitioning Information

In my case it was:

    /dev/hda6 8.9GB (for / with reiser)
    /dev/hda5 1.0GB (for swap)

5. Abort NLD Installation --> Abort

6. Reboot to the NLDSPx-CD and choose 'Rescue System' from the main NLD Installation Menu (Linux Kernel will be loaded).

7. Choose a keyboard map (e.g. English, US) --> OK

8. At the Rescue login prompt type: root

9. Mount linux partition to a temp dir, e.g.:

    mkdir /mnt/nld
    mount -t reiserfs /dev/hda6 /mnt/nld

10. change root to the system so paths from '/' are on your linux partition and not the rescue CD's ramdisk:

    cd /mnt/nld
    chroot /mnt/nld

11. Run grub-install now:

    grub-install /dev/hda
    (not hda6!!!)

12. Reboot

After this procedure the grub boot loader will be recovered and it will also have the original entry for booting Windows XP.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates