On Saturday, August 15 2009, Mads Kiilerich said:
Jeremy Katz wrote, On 08/15/2009 04:45 AM:
> On Saturday, August 15 2009, Mads Kiilerich said:
>> What am I doing wrong? When is the initrd picked up? What is the code flow?
>>
> %post runs after we've set up the boot loader bits. Otherwise, it
> %wouldn't be the last thing run.
I intuitively expected %post to be the last step in the kickstart
process, but to come before the "taking a snapshot of the chroot and
transforming it to something bootable" part. But no one size fits all.
Ok. Perhaps different %posts could make some things simpler.
Yep, it's unfortunate but either way makes someone unhappy :/ Being
consistent and saying "last means last" helps a lot there
> So if you want to do this, you have to
> do something like we did for Fedora 8 on the initial move of initramfs
> stuff into mkinitrd proper. See commit
> 11dbd0bb5ba4b845e80109e990e4e780ca402218
Oh yeah. livecd-creator thinks (knows) that it is creating a CD, and
thus the initrd is (has to be) in $LIVE_ROOT/isolinux/initrd0.img.
So
/sbin/mkinitrd -f $LIVE_ROOT/isolinux/initrd0.img $(rpm -q kernel
--qf "%{version}-%{release}.%{arch}")
in %post should do the trick? I will try that.
Nope -- really, look at the commit[1]. You need the two separate %post
sections as it shows you; you can't do just one
I tried and was looking for $LIVE_ROOT/syslinux/initrd0.img as it can
be
seen on running USB sticks, but that mangling is only done later by
livecd-iso-to-disk ...
Yep
I have had some problems with things copied to $LIVE_ROOT in
nonchrooted
%post not showing up on the final system, but that might be
livecd-iso-to-disk too - I will try harder.
Generally we don't copy most things from the CD to the usb stick because
we don't know which things matter and then also don't know how to clean
the stick, etc if you want to replace things. Other ideas welcome, but
probably best implemented in liveusb-creator rather than
livecd-iso-to-disk.
Jeremy
[1]
http://git.fedorahosted.org/git/livecd?p=livecd;a=commit;h=11dbd0bb5ba4b8...