Kadischi and initrds (was Re: [Fedora-livecd-list] Kadischi - Xen - patch)

Jeremy Katz katzj at redhat.com
Mon Mar 13 22:31:01 UTC 2006


On Mon, 2006-03-13 at 11:55 -0500, J. Hartline wrote:
> Jeremy Katz wrote:
> > > 2) The ramdisk_size= values specified at 10000   
> > 
> > This also shouldn't be needed as the "initrd" is actually an initramfs
> > and thus doesn't use the ramdisk code in the kernel at all.
> >   
> It isn't actually. It is a small gzipped ext2 filesystem. 
> I would like to see Kadischi move to more standard, and base
> procedures like using the same format as Fedora Core does, with what I
> understand as an initramfs being the gzipped cpio archive. I may be
> way off base, but to the best of my knowledge it isn't.

*sigh*  I had forgotten this :-/  This seriously needs fixing.  A lot of
the infrastructure to handle the live CD case nicely is actually in
mkinitrd now.  At one point, I sent some thoughts on ways to integrate
cleanly.

> I had been fiddling with the provided mkinitrd from Fedora Core stock
> and generated a few patches already
> that _could possibly_ make this happen. I'll provide the bugzilla
> reference here:
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=183566

This is a bit of a hacky approach.  Realistically, we want to move the
live CD case to be more like a "normal" system rather than adding hacks
on top.  cf how the nfsroot bits have now fallen into mkinitrd.  

> A brief explanation shows that:
[snip explanation of one way to do things]

My thoughts on how to do it in a way that moves the live CD case to be
more like the regular case are along the lines of the following
* mkinitrd (nash actually) now has support for overriding built-in
commands.  We can take advantage of this to have our own mkrootdev which
finds the root device and sets up /dev/root as it.  I started on the
code for this ~ 6 months ago.  I can probably dig it up on my old laptop
which is sitting at home
* The support for multiple initramfs's means that we could have kadischi
generate a /boot/initramfs-livecd.gz in its %post that contains our
mkrootdev.  We can then just tell isolinux to load both initramfs's
* We can place the set of modules that we want to include as MODULES
in /etc/sysconfig/mkinitrd.  This will make it so that we can include
support for certain sata chipsets or scsi or whatever
* As long as the fstab is correct, then the right filesystem modules
will get pulled in.  

If we populate the directory sanely before the install, then the
kernel's %post can even do all the hard stuff of running mkinitrd, etc
for us and things can just work. 

> Otherwise we always make an initrd for Live media duplicating the
> efforts of the existing Fedora Core mkinitrd.

This is always going to be a losing battle -- we really need/want to be
using stock stuff as much as we can or else it's going to be a constant
game of catch-up as the OS changes.

Jeremy




More information about the livecd mailing list