Recipe 12.13. Restoring GRUB to the MBR with a Knoppix CD

 < Day Day Up > 

12.13.1 Problem

When you installed Windows on your Linux/Windows dual-boot system, Windows overwrote the MBR (master boot record), so your GRUB menu was replaced with the Windows boot menu, and now you can't boot to Linux. The GRUB documentation tells how to restore GRUB to the MBR, but it seems to assume that you have a floppy drive. And you don't. How can you restore GRUB to the MBR when your system does not have a floppy drive?

12.13.2 Solution

Use a Knoppix CD. Boot it up, and open a command shell. su to root there is no password and run GRUB:

# grub Probing devices to guess BIOS drives. This may take a long time.     GNU GRUB  version 0.94  (640K lower / 3072K upper memory) [ Minimal BASH-like line editing is supported.  For the first word, TAB lists possible  command completions. Anywhere else TAB lists the possible completions of a  device/filename. ]     grub>

Then run these three commands:

grub> root (hd0,0) grub> setup (hd0) grub> quit

When you reboot, your GRUB menu will reappear.

12.13.3 Discussion

Floppy drives are disappearing from all kinds of systems, especially laptops. Even the "desktop replacement" notebooks are omitting the floppy drive, in favor of combination CD-ROM/DVD-ROM/CD-R/RW drives.

12.13.4 See Also

  • Knoppix home page (http://www.knopper.net/)

  • The GRUB Manual (http://www.gnu.org/software/grub/manual/grub.html)

  • info grub

     < Day Day Up > 


    Linux Cookbook
    Linux Cookbook
    ISBN: 0596006403
    EAN: 2147483647
    Year: 2004
    Pages: 434

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net