Previous Section  < Day Day Up >  Next Section

Recipe 12.4. Installing GRUB with grub-install

12.4.1 Problem

Recipe Recipe 12.3 does not work on your Debian, Gentoo, or other Linux system, because the GRUB files are installed into /usr/lib/grub. Or maybe you just want a simpler method for installing GRUB without a floppy disk.

12.4.2 Solution

Use GRUB's built-in installation script, grub-install.

First, install GRUB, or upgrade to the latest version. To get the version number, use:

$ grub —version

grub (GNU GRUB 0.94)

Then run grub-install. When you have a separate /boot partition, you must specify it:

# grub-install —root-directory=/boot  /dev/hda

Otherwise, all you need is the device name for the drive:

# grub-install  /dev/hda

Then run:

# update-grub

This creates a new menu.lst. When you reboot, the GRUB menu will appear and your system will boot normally.

12.4.3 Discussion

update-grub probably won't create a complete menu.lst on a multiboot system, but it will enable you to boot into Linux. Then you can add your other operating systems to menu.lst.

12.4.4 See Also

    Previous Section  < Day Day Up >  Next Section