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.
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 (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.
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.
--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list