[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Grub Manual

There is nothing simple about what Grub does. It is the tiny software that let us boot our Linux or Windows operating systems. At first look at what it takes in the file /grub/grub.conf to boot a Linux system.

Figure 1:
title Fedora (
       root (hd0,5)
       kernel /boot/vmlinuz- ro root=LABEL=f7 rhgb quiet
       initrd /boot/initrd-

Figure 1 is a typical grub.conf entry from an actual working system. It is 4 lines and each are required and they need to be perfect. Below is taken from the above but actual things are replaced by numbers so we can talk to each.

Figure 2:
title 1
       root (2)
       kernel 3,4
       initrd 5,6

The title can be anything you want. Your computer often wants to use the name of the kernel.

The root(2) must be the location in grub form of where your going to find the kernel and initrd files. A typical one will look like root(hd0,3) which says a partition on the first hard drive and the 4th partition.

Kernel 3 refers to the directory in the root partition you will find the kernel. Typical is to show /boot/. Kernel 4 refers to the root= call that must exist and is the location of the system which may not be the same partition as shown in root(2). The partition is shown in normal terms like /dev/sda5.

   For example look at this working grub.conf entry:

Figure 3:
title Fedora (
       root (hd0,5)
       kernel /vmlinuz- ro root=/dev/sda5  quiet
       initrd /initrd-

From our work above we are not interested in the title but we want to figure out what the root is. It says hd0,5 which means in words hard drive 1, partition 6 which can be also written /dev/sda6.

Notice kernel and initrd and see they are just written as, for example kernel /vmlinuz... This means the two files are in the root directory.

The kernel line has root=/dev/sda5 which means the system to be boot is in the /dev/sda5 partition even though the grub and kernel files are in the /dev/sda6 partition.

So this example is one in which the boot and system partitions are different. Notice that they can be on different hard drives too.


	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]