Difference between revisions of "Configure bootloader"
| Line 19: | Line 19: | ||
root (hd0,0) | root (hd0,0) | ||
kernel /boot/kernel | kernel /boot/kernel | ||
| − | You are welcome to change the title to whatever you like. The key values in this file are the '''root (hd0,0)''', telling grub to look for the kernel and root filesystem on the first hard drive it finds, and the '''kernel /boot/kernel''', which tells it the path of the kernel image file. | + | You are welcome to change the title and timeout values to whatever you like. The key values in this file are the '''root (hd0,0)''', telling grub to look for the kernel and root filesystem on the first hard drive it finds, and the '''kernel /boot/kernel''', which tells it the path of the kernel image file. |
Next, we need to create the ''/etc/mtab'' file, which lists all mounted filesystems. | Next, we need to create the ''/etc/mtab'' file, which lists all mounted filesystems. | ||
Revision as of 18:35, 1 December 2010
Installing Gentoo - Configure bootloader
In order to boot into your newly compiled kernel, you'll need to configure a bootloader and install it in the Master Boot Record (MBR) of your primary hard drive. Linux has two mainstream bootloaders: lilo and grub. This example focuses on grub; information on lilo may be added at a later date.
First we'll need to emerge grub.
# emerge -av grub
Once grub has been emerged, you need to create or edit grub.conf, the file that grub uses to load its settings. In the example below, hd0,0 implies the first hard drive detected by your system: mostlikely connected to the first SATA port on your motherboard, or the device designated as master on your first IDE channel in the case of and ATA drive.
/boot/grub/grub.conf
############################# # # gr0x0rd's grub.conf # ############################# default 0 timeout 5 splashimage=(hd0,0)/boot/grub/splash.xpm.gz title=Gentoo Linux root (hd0,0) kernel /boot/kernel
You are welcome to change the title and timeout values to whatever you like. The key values in this file are the root (hd0,0), telling grub to look for the kernel and root filesystem on the first hard drive it finds, and the kernel /boot/kernel, which tells it the path of the kernel image file.
Next, we need to create the /etc/mtab file, which lists all mounted filesystems.
# grep -v rootfs /proc/mounts > /etc/mtab
We are now ready to install grub on the master boot record of the primary hard disk. Remember to replace /dev/sda with your hard disk if different.
# grub-install --no-floppy /dev/sda