Permanently changing boot options

You can change the options that take effect each time you boot your computer by changing the GRUB configuration file. In Fedora, GRUB configuration centers around the /boot/grub/grub.conf file.

The /boot/grub/grub.conf file is created when you install Fedora. Here is an example of a grub.conf file:

# grub.conf generated by anaconda

# Note that you do not have to rerun grub after making

# changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# kernel /vmlinuz-version ro root=/dev/sda7

# initrd /initrd-version.img #boot=/dev/sda default=0 timeout=5

splashimage=(hd0,0)/boot/grub/splash.xpm.gz hiddenmenu title Fedora (2.6.27-0.382.rc8.git4.fc10.i686) root (hd0,0)

kernel /vmlinuz-2.6.27-0.3 82.rc8.git4.fc10.i6 86 ro root=UUID=866237bb-d845-4117-a1b2-e286d0f56f15 rhgb quiet initrd /initrd-2.6.27-0.382.rc8.git4.fc10.i686.img title Windows XP

rootnoverify (hd1,0) chainloader +1

The default=0 line indicates that the first partition in this list (in this case Fedora) will be the one that is booted by default. The line timeout=5 causes GRUB to pause for 5 seconds before booting the default partition. (Because of the hiddenmenu option, you won't even see the GRUB boot screen if you don't press Enter before 5 seconds.)

NOTE: GRUB indicates disk partitions using the following notation: (hd0,0). The first number represents the disk, and the second is the partition on that disk. So, (hd0,1) is the second partition (1) on the first disk (0). That would equate to /dev/sda2 in Linux.

The splashimage line looks in the second partition on the first disk (hd0,0) for the boot partition (in this case /dev/sda1, which is the /boot partition). GRUB loads splash.xpm.gz as the image on the splash screen (/boot/grub/splash.xpm.gz). The splash screen appears as the background of the boot screen.

NOTE: You can replace the splash screen with any image you like, provided that it meets certain specifications. Using GIMP or other image editor, save the image to 640x480 pixels, 14 colors, and xpm format. Next, use gzip to compress the file. Then copy that file to the /boot/grub directory. The last step is to edit the grub.conf file to have the splashimage value point to the new file.

The two bootable partitions in this example are Fedora and Windows XP. The title lines for each of those partitions are followed by the name that appears on the boot screen to represent each partition.

For the Fedora system, the root line indicates the location of the boot partition as the second partition on the first disk. So, to find the bootable kernel and the initrd initial RAM disk boot image that is loaded, GRUB looks in the root of hd0, 0 (which is represented by /dev/sda1 and is eventually mounted as /boot). Other options on the kernel line set the partition as read-only initially (ro) and set the root file system to LABEL=/1.

For the Windows XP partition, the rootnoverify line indicates that GRUB should not try to mount the partition. In this case, Windows XP is on the first partition of the second hard disk (hd1,0) or /dev/sdb1. Instead of mounting the partition and passing options to the new operating system, the chainloader +1 indicates to hand control the booting of the operating system to another boot loader. The +1 indicates that the first sector of the partition is used as the boot loader.

NOTE: Microsoft operating systems require that you use the chainloader to boot them from GRUB.

If you make any changes to the /boot/grub/grub.conf file, you do not need to load those changes. Those changes are automatically picked up by GRUB when you reboot your computer. If you are accustomed to using the LILO boot loader, this may confuse you at first, as LILO requires you to rerun the lilo command for the changes to take effect.

Was this article helpful?

0 0
Photoshop Secrets

Photoshop Secrets

Are You Frustrated Because Your Graphics Are Not Looking Professional? Have You Been Slaving Over Your Projects, But Find Yourself Not Getting What You Want From Your Generic Graphic Software? Well, youre about to learn some of the secrets and tips to enhance your images, photos and other projects that you are trying to create and make look professional.

Get My Free Ebook

Post a comment