[kwlug-disc] How to unpack/repack Debian initrd.img?

William Park opengeometry at yahoo.ca
Fri Nov 7 23:50:19 EST 2025


(It's double posted.  So, reply to your mailing list). :-)

How do I

  * *unpack* an existing /boot/initrd.img-x.y.z  (Debian)
  * *repack* back.

Of course, I need to do some work in between... hence, the question.

To unpack, I can use 'unmkinitramfs'.

But, I can't seem to repack an initrd from *current* directory.  
'mkinitramfs' always takes stuffs from my system directory 
(/lib/modules/x.y.z/).  Current directory has many add-ons from the 
original initrd, that I don't have, so I don't want to lose it.

     mkinitramfs -v -r ./ -o ~/new_initrd.img x.y.z

According to manpage, "-r ./" should force the root directory as current 
directory, but it doesn't seem to.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20251107/22c26d95/attachment.htm>


More information about the kwlug-disc mailing list