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

Re: Grub Manual



Robert P. J. Day wrote:
On Fri, 19 Oct 2007, Dean S. Messing wrote:

I hope you capitalise the initial letters of your sentences, &c., in
your documentation. ?:-)  Though what you say is worthy, I find it
hard to read because of the mental hiccups at the beginning of your
sentences.

Dean

P.S. I know it's faster to type w/o caps.

it also does a lot to alleviate carpal tunnel syndrome since you're
not constantly reaching for the shift key.

rday
Here is the new version of the Grub Manual. I think the caps are all there. And you will hate my definition of a root.

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 (2.6.22.1-41.fc7)
root (hd0,5)
kernel /boot/vmlinuz-2.6.22.1-41.fc7 ro root=LABEL=f7 rhgb quiet
initrd /boot/initrd-2.6.22.1-41.fc7.img

Figure 1 is a typical grub.conf entry from an actual working system. Root is used twice in this entry and so first what is meant by root? The root directory is the directory from which all other directories come from in a file system.

Many people keep the entire Linux in one partition and in that case both of the root point to the same partition. Others like to use more partitions and there is a root directory for each of them and the root calls point to different partitions.

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) written in grub form is the partition where the grub directory and kernel and initrd files are found. A typical one will look like root(hd0,3) which says a partition on the first hard drive and the 4th partition.

Kernel 3 tells grub where the files are in the root(2) partition.

Kernel 4 is the root= which is the partition where the kernel will find the system. The partition is shown in normal terms like /dev/sda5.

For example look at this working grub.conf entry:

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

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 of /dev/sda6.

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. 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]