How to tweak the installation initrd

Old stuff that should not bother anyone anymore
Locked
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

How to tweak the installation initrd

Post 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.
Image
Image
User avatar
JRD
Salix Warrior
Posts: 950
Joined: 7. Jun 2009, 22:52
Location: Lyon, France

Re: How to tweak the installation initrd

Post 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.
Image
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: How to tweak the installation initrd

Post 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.
Image
Image
Locked