No tak moment, nic jsem si nevymyslel. Vzal jsem arm64 Ubuntu 21.10 a initrd.img-5.10.63-rockchip64 má 12 MB, rozbalený má 43 MB, poměr 3,58. Jde o kompresi zstd -19.
Na amd64 Ubuntu 20.04 initrd.img-5.11.0-42-generic je to složitější. Jednak používá ještě lz4 a taky na začátku jsou přilepené cpio s mikrokódy procesorů, které se musí uříznout:
binwalk initrd.img-5.11.0-42-generic DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 0 0x0 ASCII cpio archive (SVR4 with no CRC), file name: ".", file name length: "0x00000002", file size: "0x00000000" 112 0x70 ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000" 232 0xE8 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86", file name length: "0x0000000B", file size: "0x00000000" 356 0x164 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode", file name length: "0x00000015", file size: "0x00000000" 488 0x1E8 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/AuthenticAMD.bin", file name length: "0x00000026", file size: "0x00007752" 31184 0x79D0 ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000" 31744 0x7C00 ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000" 31864 0x7C78 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86", file name length: "0x0000000B", file size: "0x00000000" 31988 0x7CF4 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode", file name length: "0x00000015", file size: "0x00000000" 32120 0x7D78 ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/.enuineIntel.align.0123456789abc", file name length: "0x00000036", file size: "0x00000000" 32284 0x7E1C ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/GenuineIntel.bin", file name length: "0x00000026", file size: "0x00465400" 4641456 0x46D2B0 ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000" 4641792 0x46D400 LZ4 compressed data, legacy ....
Samotný initrd zstd -19 je 34 MB, rozbalený 160 MB, poměr 4,71. Pro srovnání původní lz4 má 52 MB.
Takže 630 MB rozbalený initrd je opravdu nějaký divný. Úplně to nevylučuji, ale co tam jako máte přibalené? Stovky megabajtů nul? Na co to je?
Mimochodem jádro initrd rozbalí a celé dá do paměti, jak se těch 650 MB dostane do 512 MB RAM?