Quick GRUB

This is a brief howto to install and configure GRUB bootloader. It's taken from the old Gentoo Wiki Archives.

This page is on grub-1, a.k.a. "legacy" grub. See also grub2 page.

Step 1: Install GRUB
Install grub:

Step 2: The GRUB Prompt
A user may decided to use or they can set up grub manually. After it finishes installing then run the GRUB prompt:

Once you're in the prompt type the following in order:

Of course, don't actually put in (hdx,y). Replace x and y with the hard drive number and partition number respectively.

hda is the common device for an IDE disk, a subsequent drive will be hdb, or sda if you have no IDE hard disk. ID numbering starts at 0 for the "first" hard-disk.

The mapping of device against grub number is listed in, so can very well end up in (hd2,0).

You can use grubs auto-complete feature to discover what partitions/drives it sees. When you type in the root command, hit the tab key twice:

If the drive does not show up in the map file and you deal with dynamically attached devices such as USB memory, do the following: delete and invoke grub like this. This will re-generate the map file considering all dynamic drives.

Step 3: The GRUB Configuration File
After this you need to edit the grub configuration file, which is located in, using your favorite editor.

If this comes up blank, your boot partion is probably not mounted. Try:

This is a sample configuration:

Gentoo also permits run level to be set using text names, not the standard numbers (although the names to map to numbers). To do this, use the softlevel variable. e.g. to boot to runlevel user;

To see the services that will be started for each level, at the console, you may enter: