我试图提取casper/initrdUbuntu 18.10的 initrd并得到了一个意想不到的结果。我没有看到根文件系统和文件,而只是一个名为kernel.
首先我想知道我是应该解压 initrd 还是直接解压存档,所以我发出了这个命令:
$ file initrd
initrd: ASCII cpio archive (SVR4 with no CRC)
Run Code Online (Sandbox Code Playgroud)
根据输出,它应该是一个 cpio 存档,我用来cpio解压存档。
$ cpio -id < initrd
56 blocks
$ ls
initrd kernel
Run Code Online (Sandbox Code Playgroud)
如果我去看看目录kernel,我得到了
kernel/
??? x86
??? microcode
??? AuthenticAMD.bin
2 directories, 1 file
Run Code Online (Sandbox Code Playgroud)
应该有文件和文件夹,如init、etc、usr等。例如:
bin conf cryptroot etc init lib lib64 run sbin scripts usr var
Run Code Online (Sandbox Code Playgroud)