User Tools

Site Tools


doc:appunti:linux:sa:if_rename

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:sa:if_rename [2024/06/21 17:49] – [Beware of initramfs image] niccolodoc:appunti:linux:sa:if_rename [2024/06/21 17:54] (current) – [Beware of initramfs image] niccolo
Line 41: Line 41:
 === How to unpack the iniramfs image to inspect its content === === How to unpack the iniramfs image to inspect its content ===
  
-In Debian 12 the iniramfs image is composed by cpio archive containing the Intel microcode followed by the Zstandard compressed cpio archive of the initramfs. To extract both, do the following:+In **Debian 12** the iniramfs image may be composed by two appended cpio archives. The first containing the Intel microcode in //ASCII cpio archive// format, and the second containing the actual initramfs as a //Zstandard compressed cpio archive//. To extract both, do the following:
  
- +Extract **the microcode part** (take note of the number of blocks printed on stderr):
-Extract the microcode (take note of the number of blocks printed on stderr):+
  
 <code> <code>
Line 51: Line 50:
 </code> </code>
  
-Make a copy of initramfs stripping the microcode and decompress it:+Make a copy of **the initramfs part** stripping the microcode and decompress it:
  
 <code> <code>
-dd if=/boot/initrd.img-6.1.0-21-amd64 of=initramfs.img.zstd bs=512 skip=14080 +dd if=/boot/initrd.img-6.1.0-21-amd64 of=initramfs.img.zst bs=512 skip=14080 
-unzstd initramfs.img.zstd --stdout | cpio --extract --make-directories  --no-absolute-filenames+unzstd initramfs.img.zst --stdout | cpio --extract --make-directories  --no-absolute-filenames
 </code> </code>
  
doc/appunti/linux/sa/if_rename.1718984940.txt.gz · Last modified: 2024/06/21 17:49 by niccolo