Re: Grub Manual

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

 



On Fri, 2007-10-19 at 06:25 -0600, Karl Larsen wrote:
> Michael Schwendt wrote:
> > On 18/10/2007, Robert P. J. Day <rpjday crashcourse ca> wrote:
> >   
> >> On Thu, 18 Oct 2007, Karl Larsen wrote:
> >>
> >>     
> >>>    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.
> >>>       
> >> no, they're not.  but don't let that stop you from disseminating yet
> >> more misinformation.  it's what you do best, karl.
> >>
> >> rday
> >>     
> >
> > There are only two "roots" when dealing with GRUB. First, the system's
> > root directory, which is located on the root partition. Second, GRUB's
> > root device, specified with the "root" command in GRUB. Let's stick to
> > the terminology and not confuse "root directory", "root device" and
> > "GRUB's root device". GRUB's root device is not a root directory. On
> > GRUB's root device, the files usually are located at the root of the
> > partition's file-system, but that's neither mandatory nor relevant.
> >
> > P.S. Concerning some of the off-topic msgs about Karl still opening
> > too many new threads for every tiny change in topic, yes, it's
> > tiresome. Simply adjust the "Subject" a little bit and keep the
> > messages in the old thread until the thread ends due to a period of
> > inactivity.
> >
> >   
>     Yes the problem is we and I have too many root directories. Grub has 
> at least 2 and I am still trying to figure out what to call the 
> directory you form when you install ext3 in a new partition. It appears 
> you do not want to call it another root :-)  But I simply do not know 
> what to call it. Maybe the first directory?

It's even worse than that.  Not only is the term "root" overloaded, the
term "filesystem" is overloaded.  There's *the* filesystem for a running
system.  That starts at / (the root directory of what I'll call The
Filesystem) and is organized as a tree of directories, where some
subtrees might be filesystems in themselves (inserted in the hierarchy
by the mount command).  Those other filesystems are created when we
format a partition on a disk: mkfs is shorthand for "make filesystem".
Each of those filesystems is organized as a tree of directories and has
a root directory of its own.

Grub needs to know two things: the partition (filesystem) containing the
pieces of Grub and the kernel, and the partition (filesystem) that is to
serve as The Filesystem.  The former ("Grub's root") is typically one of
two things: (1) the filesystem that is treated as The Filesystem,
where--by convention, not by any Natural Law--the kernel and grub
components are placed in subdirectories called /boot/ and /boot/grub/,
or (2) a separate partition (filesystem), where--by convention--the
kernel and Grub components are placed in the root directory and a
subdirectory called grub/.  Once the system is booted--in order to
conform to the convention in (1)--the boot partition is mounted
over /boot/, so to a running system, the two arrangements appear
identical in The Filesystem.

In case (1), Grub's root and system root are the same partition
(filesystem) and grub must be told that the kernel and Grub components
are in a subdirectory.  In case (2), Grub's root and system root are
different partitions (filesystems) and Grub must be told that the kernel
and Grub components are in the root of that filesystem.

For example, consider this stanza from grub.conf (illustrating case
(2)):

1. title Fedora (2.6.23.1-4.fc7)
2.         root (hd0,2)
3.         kernel /vmlinuz-2.6.23.1-4.fc7 ro root=/dev/VolGroup00/LogVol00 
4.         initrd /initrd-2.6.23.1-4.fc7.img

Line 2 identifies Grub's root filesystem (after booting, this
is /dev/sda3), in this case a small partition that gets mounted
over /boot/ in The Filesystem.
Line 3 tells Grub (a) to find the kernel in the root directory of its
root filesystem and (b) that the system root filesystem (the root of The
Filesystem) is a logical volume.
Line 4 tells Grub that the initial RAMdisk is in the root directory of
Grub's root filesystem.

An alternative arrangement (case (1)) might be:

1. title Fedora (2.6.23.1-4.fc7)
2.         root (hd0,2)
3.         kernel /boot/vmlinuz-2.6.23.1-4.fc7 ro root=/dev/sda3 
4.         initrd /boot/initrd-2.6.23.1-4.fc7.img

Here, Grub's root and system's root are the same (/dev/sda3), but the
kernel and Grub components are in the /boot/ subdirectory of Grub's
root.

I *think* I've got that all correct (as far as it goes--I haven't
discussed installing Grub itself in the disk's boot record).  

Feel free to critique...

-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux