I am using livecd-creator from livecd-tools-024-1.fc11.i586 and need to customize the initrd. But I have problems making it work and figuring out what is going on.

I have figured out that livecd-creator through imgcreate creates a /etc/sysconfig/mkinitrd. When rpms runs mkinitrd from their %post script then it will exec mkliveinitrd and use the configured module list. AFAICS livecd-creator then picks up the initrd from /boot, and the end result after having written the iso to usb with livecd-iso-to-disk is that it ends up in /syslinux/initrd0.img.

But if I overwrite the /boot/initrd* in %post like this:
/sbin/mkinitrd -f /boot/initrd-$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n').img $(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
then it won't be used.

What am I doing wrong? When is the initrd picked up? What is the code flow?

If I make %post preserve /etc/sysconfig/mkinitrd and boots from usb and restores /etc/sysconfig/mkinitrd and runs /sbin/mkinitrd -f /mnt/live/syslinux/initrd0.img $(rpm -q kernel --qf "%{version}-%{release}.%{arch}\n")
then it works as expected.

/Mads

--
Fedora-livecd-list mailing list
Fedora-livecd-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-livecd-list

Reply via email to