[Fedora-livecd-list] Custom initrd

Jeremy Katz katzj at redhat.com
Sun Aug 16 21:25:21 UTC 2009


On Sunday, August 16 2009, Mads Kiilerich said:
> Jeremy Katz wrote, On 08/16/2009 02:14 AM:
>>>> 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
>
> Ok, thanks. I'm trying to understand which parts of that commit is  
> essential to me.

Basically all of it :)  eg, when testing mkliveinitrd changes (*sigh*),
I use roughly that snippet plus something which grabs my hacked up
mkliveinitrd

> So it is because LIVE_ROOT only is available in not in_chroot %post  
> scripts? And the initrd thus has to be created in a normal chrooted  
> %post and copied to the right location in a non-chrooted %post?

Correct.

> Is there any particular reason why LIVE_ROOT isn't available in chroots?  
> Couldn't the image always mounted under $INSTALL_ROOT/mnt/live? Or  
> bind-mounted?

As much as possible, we try to keep the environment consistent for %post
scripts so they can be transferred between real system kickstarts and
live image kickstarts.  Having things mounted differently like that
would impact that

Jeremy




More information about the Fedora-livecd-list mailing list