Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by znpy on Saturday September 08, 2018 @07:42AM
(#17940484)
dd is also useful when working with initramfs files.
it took me a bit to discover that ubuntu's initramfs has cpu microcode prepended to it. if you try to cpio the initramfs directly it will only take out the microcode, spitting out something like "44 blocks extracted".
if you want to cut out only some part of a file, you can do something like:
it took me a bit to discover that ubuntu's initramfs has cpu microcode prepended to it. if you try to cpio the initramfs directly it will only take out the microcode, spitting out something like "44 blocks extracted".
if you want to cut out only some part of a file, you can do something like:
this will skim nblocksize bytes and then pull out mblocksize bytes.in the case of an initramfs, you would just want to skip the initial microcode blocks. for me, it was:
for the records, it turns out that ubuntu packs a lot of stuff in its initramfs, and playing with initramfs is quite a funny activity