What is the proper way to unpack and repack the initramfs image if you want to do it by hand (for whatever reason)?
See unmkinitramfs(8) & mkinitramfs(8).
EDIT: this sounds like an XY-problem but I don't use encryption so I can't really advise better, sorry.
]]>Eventually I found a way to resolve the issue by using the "cryptopts=source=..." kernel parameter. Yet I would be interested in properly unpacking/repacking the initramfs in case I'd like to manually change something there.
Another workaround is to boot the target once, bail out to initramfs prompt, mount it from there and regenerate the initramfs while booted. However, this does not work nicely if you want to prepare images for headless machines.
]]>rolfie
Note: I have used VMs to explore new distros myself, makes sense to get some experience. I used to take notes what I did to achieve certain results, and then I went an made a fresh install on the real HW based on the notes.
]]>rolfie
]]>I am trying to port an encrypted devuan installation from system A (virtual) to system B (physical). I tried many things (e.g. using partlabels) but I can't convince the initramfs tools to generate the proper crypttab file for the initramfs.
To fix this manually, I tried to unpack and repack the initramfs as explained in this article: https://access.redhat.com/solutions/24029
It seems to work, but by just unpacking and repacking the initramfs it grows from ~27M to ~128M and fails to boot (kernel panic).
What is the proper way to unpack and repack the initramfs image if you want to do it by hand (for whatever reason)?
Thanks!
]]>