Page 1 of 1

How to tweak the installation initrd

Posted: 15. Jul 2009, 11:38
by gapan
Get the initrd.img file from slackware. Unpack it with:

Code: Select all

rm -rf /boot/initrd-tree
mkdir /boot/initrd-tree
cd /boot/initrd-tree
gzip -dc < /path/to/initrd.img | cpio -i
Edit (as root) the initrd to your liking. Repack it with:

Code: Select all

mkinitrd -o /path/to/new/initrd.img
and create a new iso by making the iso structure in a dir, cd into it and:

Code: Select all

mkisofs -o /path/to/new.iso -R -J -V "Volume ID" -hide-rr-moved -v -d -N -no-emul-boot -boot-load-size 4 -boot-info-table -sort isolinux/iso.sort -b isolinux/isolinux.bin -c isolinux/isolinux.boot -p "Preparer ID" -publisher "Publisher ID" -A "Application ID" .
(the "." in the end is necessary)

I'm going to tweak the absolute linux initrd with that, it's very close to what I have in mind, certainly sipler that the slackware initrd. Anyone can give it a try though. The files to tweak are basically usr/lib/setup/setup and usr/lib/setup/slackinstall I think.

Re: How to tweak the installation initrd

Posted: 6. Aug 2009, 13:00
by JRD
Thank you for the howto. I figure only recently how to do things like that, so that could be very good for others.

Re: How to tweak the installation initrd

Posted: 6. Aug 2009, 13:04
by gapan
For the last part (iso creation), it seems easier to me to just use isomaster and replace any files from a previous iso than having to create the iso structure in a directory first and run makeisofs on it.