Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

repack initrd in the Live ISO Debian 11

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
NetRock
Posts: 1
Joined: 2022-10-18 02:12

repack initrd in the Live ISO Debian 11

#1 Post by NetRock »

Hi, :)

I need to recreate "initrd.img" in Debian 11 Live Boot. The compression type is zstd.
what is the best tool to use for uncompress/compress initrd.img.
How can I get the right compression level for "initrd.img" in Debian 11 Live Boot.

It seems "mkinitramfs" is a good tool to use for compression, but I do not know how to get the compression level of the original file "initrd.img" in Debian 11 Live Boot.


Thank you for your help.

madwebness
Posts: 3
Joined: 2022-12-13 17:40

Re: repack initrd in the Live ISO Debian 11

#2 Post by madwebness »

This might not be what you're looking for exactly, but I can tell you what worked for me when I needed to add preseed.cfg, done it just recently. Make sure the file (initrd.gz) is readable and accessible. I just copied the original and renamed it to initrd.original.gz. Here's the script:

Code: Select all

ISO_SRC_DIR=/path/to/writeable-iso-src/

gunzip -k initrd.original.gz
mv initrd.original initrd
echo preseed.cfg | cpio -H newc -o -A -F initrd
gzip initrd
rm $ISO_SRC_DIR/install.amd/gtk/initrd.gz
mv initrd.gz $ISO_SRC_DIR/install.amd/gtk/
(note, this is the one from the gtk dir, but, as you can imagine, you can do the same to other versions).

Then compile the dir into an ISO. But that is a different story, I will assume you know how to do it. I am also uncertain how to add something substantial to the archive, it seems weird to me how it's packed and the way the documentation suggests adding preseed.cfg into it is rather odd.
Last edited by madwebness on 2022-12-13 21:44, edited 2 times in total.

Post Reply