kernel things; strange things, really really strange things

Kevin Krumwiede krum at smyrnacable.net
Tue Nov 13 15:45:01 PST 2001


Actually, lilo doesn't know or care about partitions or filesystems.  When
you run /sbin/lilo to generate your bootsector, it records the physical
location of the kernel file on the disk.  (That's all a "file" really is --
a reference to a location on disk where the "contents" of the file are
stored.)  If you later delete that file, the contents are still there on the
disk and your bootsector can still boot it.  However, the filesystem
considers that space empty and will probably soon overwrite it.

As for having several /boot directories on different partitions... You'll
never have more than one /boot at any given time.  For example, if you're
running Red Hat, /boot will be the /boot from sda1.  If you mount sda3 on
/mnt/lfs, the /boot on sda3 will be called /mnt/lfs/boot, not /boot.
There's no way for lilo to confuse them.

As you mentioned, many people create a small partition of its own at the
beginning of the disk and mount it as /boot.  This ensures that the files in
/boot are physically located in the first 1024 sectors of the disk, which is
(was?) a requirement of lilo.  Another nice thing about this is that you can
easily share the same kernel(s) among all the different Linux installations
on the machine.  This makes sense because the kernel configuration is
dependent on the hardware, which obviously is common to all the
installations.

But this is not strictly necessary.  In your case, if you booted into Red
Hat and had LFS mounted on /mnt/lfs, you could have these entries in Red
Hat's /etc/lilo.conf:

image=/boot/vmlinuz
	label=RH
	root=/dev/sda1

image=/mnt/lfs/boot/vmlinuz
	label=LFS
	root=/dev/sda3

If you boot into LFS and mount Red Hat on /mnt/rh, you could have these
entries in LFS's /etc/lilo.conf:

image=/mnt/rh/boot/vmlinuz
	label=RH
	root=/dev/sda1

image=/boot/vmlinuz
	label=LFS
	root=/dev/sda3

Running lilo from either system would produce an identical bootsector.

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list