[Fedora-livecd-list] Custom initrd

Mads Kiilerich mads at kiilerich.com
Wed Mar 3 19:32:33 UTC 2010


Jeremy Katz wrote, On 08/15/2009 04:45 AM:
> %post runs after we've set up the boot loader bits.  Otherwise, it
> %wouldn't be the last thing run.  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
>
> Also note that all of this is subject to some amount of change in Fedora
> 12 with the move to using dracut instead of mkinitrd
>    

For the record, as a followup to the famours 
11dbd0bb5ba4b845e80109e990e4e780ca402218 quote, I now do something like 
this and it seems to work just fine:


%post
/usr/sbin/plymouth-set-default-theme script
/sbin/dracut -f /initrd0.img $(rpm -q kernel --qf 
'%{version}-%{release}.%{arch}')

%post --nochroot
mv $INSTALL_ROOT/initrd0.img $LIVE_ROOT/isolinux/


(at least as long as I don't use PAE kernels ;-) )

/Mads


More information about the livecd mailing list