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

Re: make-kpkg and initrd



On Tue, 23 Oct 2001 12:59, Just a friendly Jedi Knight wrote:
> On Tue, Oct 23, 2001 at 10:43:38AM +0200, Eduard Bloch wrote:
> > WTF? Would you please look how kernel-package works before answering?
> > The postinst of a kernel-image creates an initrd, symlinks /boot/initrd
> > to it, and OF COURSE sets /vmlinuz symlink to the SAME kernel version.
>
>  This somewhat screwed =o( Using LILO one can boot different kernel and if
> that other kernel is also using initrd then /boot/initrd points to wrong
> file (it points to initrd that corresponds only to default kernel image). I
> guess this might lead to various problem with booting other kernel than the
> default one.
>  Just came into my mind.....

You have /vmlinuz and /vmlinuz.old symlinks to the last and the second-last 
kernel you installed.
You have /boot/initrd and /boot/initrd-old symlinks to the initrd images 
which match.

Then you put the following in /etc/lilo.conf:
image=/vmlinuz
    initrd=/boot/initrd
    label=linux
image=/vmlinuz.old
    initrd=/boot/initrd.old
    label=old

No problems!

When you install a new kernel package it automatically changes the links 
appropriately after creating the initrd image.

On Tue, 23 Oct 2001 04:42, Norbert Veber wrote:
> On Mon, Oct 22, 2001 at 01:16:24PM -0700, Rupa Schomaker wrote:
> > If your root is on an LVM you need to use an initrd to kickstart the
> > LVM subsystem before mounting root.
>
> Oh.  I just have a separate, very small ext2 /boot filesystem, since I was
> experimention with various filesystems not supported by grub.  I dont use
> LVM though.
>
> How does the boot loader (whatever it may be) find the kernel to be loaded
> from an LVM system anyway?

Well LILO asks the kernel for the block addresses on the device.  I believe 
that there is a lilo patch to map the LV file system to the PV (hard drive 
partition) that it's stored on, this allows LILO to boot from an LVM.

However this does rely on the LV being stored on a single PV (and moving it 
to a different PV would require running "lilo" again).

Having a 20M ext2 format /boot partition isn't difficult, and is much less 
inconveniance than having a special setting for your root LV and a specially 
patched version of LILO.

Also the next version of LILO will have much better support for software RAID 
(IMHO everyone who uses LVM should run it on top of RAID devices - either 
software or hardware).  I'm not sure that this will work when doing LVM over 
software RAID so putting the boot fs on LVM may lose you that benefit.

-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page



Reply to: