为什么我无法提取全部 ubuntu-20.04-live-server-amd64.iso initrd?

为什么我无法提取全部 ubuntu-20.04-live-server-amd64.iso initrd?

我可以下载服务器实时 CD:

$ wget http://releases.ubuntu.com/20.04/ubuntu-20.04-live-server-amd64.iso

我可以提取其内容:

$ 7z x -aoa -o./ubuntu-20.04-live-server-amd64.iso.d ubuntu-20.04-live-server-amd64.iso

我可以看看它的initrd

$ ls -nlah ubuntu-20.04-live-server-amd64.iso.d/casper/initrd
-rw-r--r-- 1 1000 1000 79M Apr 23 07:44 ubuntu-20.04-live-server-amd64.iso.d/casper/initrd

当我列出initrd内容时,我看到了以下内容:

$ cpio -it <ubuntu-20.04-live-server-amd64.iso.d/casper/initrd
.
kernel
kernel/x86
kernel/x86/microcode
kernel/x86/microcode/AuthenticAMD.bin
62 blocks

但是...

$ binwalk ubuntu-20.04-live-server-amd64.iso.d/casper/initrd

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: "0x002D2C00"
2992816       0x2DAAB0        ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
3540590       0x36066E        SHA256 hash constants, little endian
3733057       0x38F641        mcrypt 2.2 encrypted data, algorithm: RC2, mode: CBC, keymode: 8bit
3901283       0x3B8763        Copyright string: "Copyright (C) 2005-2007 Yura Pakhuchiy'"
3951592       0x3C4BE8        Copyright string: "Copyright (C) 1994 Ian Jackson,  "
4694154       0x47A08A        LZO compressed data
4694287       0x47A10F        xz compressed data
4810885       0x496885        Unix path: /projects/rcs/sw/ge/./nic/fw2/common/fwmain.c,v 1.1.2.45 1999/01/24 00:10:55 shuang Exp $
5014857       0x4C8549        Unix path: /lib/firmware/amdgpu/bonaire_uvd.bin
5191051       0x4F358B        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
5193266       0x4F3E32        Unix path: /lib/firmware/amdgpu/bonaire_vce.bin
5261800       0x5049E8        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
5305796       0x50F5C4        Unix path: /lib/firmware/amdgpu/carrizo_mec2.bin
5338154       0x51742A        Unix path: /lib/firmware/amdgpu/carrizo_pfp.bin
5549297       0x54ACF1        Unix path: /lib/firmware/amdgpu/carrizo_vce.bin
5708331       0x571A2B        Unix path: /lib/firmware/amdgpu/fiji_mec2.bin
5740703       0x57989F        Unix path: /lib/firmware/amdgpu/fiji_pfp.bin
5830457       0x58F739        Unix path: /lib/firmware/amdgpu/fiji_uvd.bin
6012340       0x5BBDB4        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6014555       0x5BC65B        Unix path: /lib/firmware/amdgpu/fiji_vce.bin
6121711       0x5D68EF        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6123926       0x5D7196        Unix path: /lib/firmware/amdgpu/hainan_ce.bin
6555029       0x640595        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6625777       0x6519F1        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6627992       0x652298        Unix path: /lib/firmware/amdgpu/kabini_ce.bin
6834574       0x68498E        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6905322       0x695DEA        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
6907537       0x696691        Unix path: /lib/firmware/amdgpu/kaveri_ce.bin
7118972       0x6CA07C        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
7189735       0x6DB4E7        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
7398590       0x70E4BE        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
7400805       0x70ED65        Unix path: /lib/firmware/amdgpu/mullins_vce.bin
7469339       0x71F91B        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
7511157       0x729C75        Unix path: /lib/firmware/amdgpu/navi10_ce.bin
7517046       0x72B376        Unix path: /lib/firmware/amdgpu/navi10_gpu_info.bin
7837091       0x7795A3        SHA256 hash constants, little endian
8279518       0x7E55DE        Unix path: /lib/firmware/amdgpu/navi14_ce.bin
8285398       0x7E6CD6        Unix path: /lib/firmware/amdgpu/navi14_ce_wks.bin
8291307       0x7E83EB        Unix path: /lib/firmware/amdgpu/navi14_gpu_info.bin
8302942       0x7EB15E        Unix path: /lib/firmware/amdgpu/navi14_me_wks.bin
8718323       0x8507F3        SHA256 hash constants, little endian
9124981       0x8B3C75        Unix path: /lib/firmware/amdgpu/oland_ce.bin
9304850       0x8DFB12        Unix path: /lib/firmware/amdgpu/picasso_mec2.bin
9425301       0x8FD195        MySQL ISAM index file Version 6
9836728       0x9618B8        Unix path: /lib/firmware/amdgpu/polaris10_k_mc.binq
9921861       0x976545        Unix path: /lib/firmware/amdgpu/polaris10_mc.bin
10015356      0x98D27C        Unix path: /lib/firmware/amdgpu/polaris10_mec2_2.bin
10049712      0x9958B0        Unix path: /lib/firmware/amdgpu/polaris10_mec_2.bin
10083955      0x99DE73        Unix path: /lib/firmware/amdgpu/polaris10_pfp.bin
10181648      0x9B5C10        Unix path: /lib/firmware/amdgpu/polaris10_smc_sk.bin
10246998      0x9C5B56        Unix path: /lib/firmware/amdgpu/polaris10_uvd.bin
10534735      0xA0BF4F        Unix path: /lib/firmware/amdgpu/polaris10_vce.bin
10643047      0xA26667        Unix path: /lib/firmware/amdgpu/polaris11_ce.bin
10713933      0xA37B4D        Unix path: /lib/firmware/amdgpu/polaris11_k_mc.binq
10797483      0xA4C1AB        Unix path: /lib/firmware/amdgpu/polaris11_mc.bin
10891143      0xA62F87        Unix path: /lib/firmware/amdgpu/polaris11_mec2_2.bin
10925438      0xA6B57E        Unix path: /lib/firmware/amdgpu/polaris11_mec_2.bin
10959625      0xA73B09        Unix path: /lib/firmware/amdgpu/polaris11_pfp.bin
11056472      0xA8B558        Unix path: /lib/firmware/amdgpu/polaris11_smc_sk.bin
11122418      0xA9B6F2        Unix path: /lib/firmware/amdgpu/polaris11_uvd.bin
11410135      0xAE1AD7        Unix path: /lib/firmware/amdgpu/polaris11_vce.bin
11518447      0xAFC1EF        Unix path: /lib/firmware/amdgpu/polaris12_ce.bin
11608077      0xB1200D        Unix path: /lib/firmware/amdgpu/polaris12_mc.bin
11701254      0xB28C06        Unix path: /lib/firmware/amdgpu/polaris12_mec2_2.bin
11735485      0xB311BD        Unix path: /lib/firmware/amdgpu/polaris12_mec_2.bin
11769606      0xB39706        Unix path: /lib/firmware/amdgpu/polaris12_pfp.bin
11863870      0xB5073E        Unix path: /lib/firmware/amdgpu/polaris12_uvd.bin
12151553      0xB96B01        Unix path: /lib/firmware/amdgpu/polaris12_vce.bin
12295682      0xBB9E02        Unix path: /lib/firmware/amdgpu/raven2_ce.bin
12344659      0xBC5D53        Unix path: /lib/firmware/amdgpu/raven2_mec2.bin
12460093      0xBE203D        MySQL ISAM index file Version 6
12702405      0xC1D2C5        Unix path: /lib/firmware/amdgpu/raven_asd.bin
12734952      0xC251E8        Unix path: /lib/firmware/amdgpu/raven_ce.bin
12852953      0xC41ED9        Unix path: /lib/firmware/amdgpu/raven_pfp.bin
12931578      0xC551FA        MySQL ISAM index file Version 6
13206441      0xC983A9        Unix path: /lib/firmware/amdgpu/renoir_ce.bin
13256074      0xCA458A        Unix path: /lib/firmware/amdgpu/renoir_mec2.bin
14202067      0xD8B4D3        Unix path: /lib/firmware/amdgpu/tonga_mc.bin
14290975      0xDA101F        Unix path: /lib/firmware/amdgpu/tonga_pfp.bin
14383917      0xDB7B2D        Unix path: /lib/firmware/amdgpu/tonga_uvd.bin
14625233      0xDF29D1        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
14627449      0xDF3279        Unix path: /lib/firmware/amdgpu/tonga_vce.bin
14731051      0xE0C72B        Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
14733265      0xE0CFD1        Unix path: /lib/firmware/amdgpu/topaz_ce.bin
14778539      0xE180AB        Unix path: /lib/firmware/amdgpu/topaz_mc.bin
14830130      0xE24A32        Unix path: /lib/firmware/amdgpu/topaz_pfp.bin
14998112      0xE4DA60        Unix path: /lib/firmware/amdgpu/vega10_ce.bin
15047816      0xE59C88        Unix path: /lib/firmware/amdgpu/vega10_mec2.bin
15801733      0xF11D85        Unix path: /lib/firmware/amdgpu/vega12_ce.bin
15850976      0xF1DDE0        Unix path: /lib/firmware/amdgpu/vega12_mec2.bin
16634982      0xFDD466        Unix path: /lib/firmware/amdgpu/vega20_ce.bin
16684441      0xFE9599        Unix path: /lib/firmware/amdgpu/vega20_mec2.bin
16921033      0x10231C9       SHA256 hash constants, little endian
17385072      0x1094670       Unix path: /lib/firmware/amdgpu/vegam_ce.bin
17462195      0x10A73B3       Unix path: /lib/firmware/amdgpu/vegam_pfp.bin
17553214      0x10BD73E       Unix path: /lib/firmware/amdgpu/vegam_uvd.bin
17840944      0x1103B30       Unix path: /lib/firmware/amdgpu/vegam_vce.bin
17978184      0x1125348       Cisco IOS microcode, for ""
21434976      0x1471260       Unix path: /lib/firmware/i915/cnl_dmc_ver1_07.bin
21540407      0x148AE37       Unix path: /lib/firmware/i915/glk_huc_ver03_01_2893.bin
21629683      0x14A0AF3       Unix path: /lib/firmware/i915/icl_dmc_ver1_07.bin
21776259      0x14C4783       Unix path: /lib/firmware/i915/icl_huc_ver8_4_3238.bin
21939569      0x14EC571       Unix path: /lib/firmware/i915/kbl_dmc_ver1_04.bin
22041231      0x150528F       Unix path: /lib/firmware/i915/kbl_huc_ver02_00_1810.bin
22127646      0x151A41E       Unix path: /lib/firmware/i915/skl_dmc_ver1_27.bin
22228855      0x1532F77       Unix path: /lib/firmware/i915/skl_huc_ver01_07_1398.bin
22301039      0x154496F       Unix path: /lib/firmware/i915/tgl_dmc_ver2_04.bin
22360890      0x155333A       ELF, 32-bit MSB processor-specific, ("!")
22825600      0x15C4A80       Unix path: /var/tmp/13115/liquidio-linux-driver-fwsrc-80eb6bfabf10c84cca6dd66fe57b56c77608818a/octeon/se/apps/nic/cvmcs-nic-main.c
22937245      0x15DFE9D       Unix path: /lib/firmware/liquidio/lio_210sv_nic.bin
23378753      0x164BB41       Unix path: /var/tmp/13115/liquidio-linux-driver-fwsrc-80eb6bfabf10c84cca6dd66fe57b56c77608818a/octeon/se/apps/nic/cvmcs-nic-main.c
23923223      0x16D0A17       Unix path: /var/tmp/13115/liquidio-linux-driver-fwsrc-80eb6bfabf10c84cca6dd66fe57b56c77608818a/octeon/se/apps/nic/cvmcs-nic-main.c
24043053      0x16EDE2D       Unix path: /lib/firmware/liquidio/lio_410nv_nic.bin
24507874      0x175F5E2       Unix path: /var/tmp/13115/liquidio-linux-driver-fwsrc-80eb6bfabf10c84cca6dd66fe57b56c77608818a/octeon/se/apps/nic/cvmcs-nic-main.c
24620829      0x177AF1D       xz compressed data
29383428      0x1C05B04       Unix path: /lib/firmware/nvidia/gp102/sec2/image.bin
29400353      0x1C09D21       Unix path: /lib/firmware/nvidia/gp102/sec2/sig-1.bin
29642107      0x1C44D7B       Zlib compressed data, best compression
30071359      0x1CADA3F       Zlib compressed data, best compression
30073563      0x1CAE2DB       Zlib compressed data, best compression
30079421      0x1CAF9BD       Zlib compressed data, best compression
30086689      0x1CB1621       Zlib compressed data, best compression
30089352      0x1CB2088       Zlib compressed data, best compression
30090123      0x1CB238B       Zlib compressed data, best compression
30103079      0x1CB5627       Zlib compressed data, best compression
30114729      0x1CB83A9       Zlib compressed data, best compression
30215846      0x1CD0EA6       Zlib compressed data, best compression
30224397      0x1CD300D       Zlib compressed data, best compression
30655050      0x1D3C24A       Zlib compressed data, best compression
30657248      0x1D3CAE0       Zlib compressed data, best compression
30663089      0x1D3E1B1       Zlib compressed data, best compression
30670399      0x1D3FE3F       Zlib compressed data, best compression
30673065      0x1D408A9       Zlib compressed data, best compression
30673837      0x1D40BAD       Zlib compressed data, best compression
30683662      0x1D4320E       Zlib compressed data, best compression
30686280      0x1D43C48       Zlib compressed data, best compression
30697961      0x1D469E9       Zlib compressed data, best compression
30798940      0x1D5F45C       Zlib compressed data, best compression
30879791      0x1D7302F       Zlib compressed data, default compression
31262527      0x1DD073F       Zlib compressed data, default compression
32453621      0x1EF33F5       Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
32689117      0x1F2CBDD       Unix path: /lib/firmware/radeon/HAINAN_ce.bin
33106942      0x1F92BFE       Unix path: /lib/firmware/radeon/R700_rlc.bin
33323018      0x1FC780A       Unix path: /lib/firmware/radeon/RV730_me.bin
33415364      0x1FDE0C4       Unix path: /lib/firmware/radeon/SUMO2_me.bin
33577843      0x2005B73       Unix path: /lib/firmware/radeon/TAHITI_ce.bin
34105672      0x2086948       Unix path: /lib/firmware/radeon/bonaire_uvd.bin
34281866      0x20B198A       Certificate in DER format (x509 v3), header length: 4, sequence length: 1417
34284081      0x20B2231       Unix path: /lib/firmware/radeon/hainan_ce.bin
34537985      0x20F0201       ASCII cpio archive (SVR4 with no CRC), file name: "x", file name length: "0xbin", file size: "0x26"
34538048      0x20F0240       Unix path: /lib/firmware/radeon/kabini_ce.bin
34882274      0x21442E2       Cisco IOS microcode, for ""
35003124      0x2161AF4       Unix path: /lib/firmware/slicoss/gbrcvucode.sys
35297591      0x21A9937       Zip archive data, encrypted at least v2.0 to extract, compressed size: 163, uncompressed size: 1024, name: T1:X3_101115_1_8_1_expROM_FW_uni_template_eeprom0.bin
35538819      0x21E4783       Zip archive data, encrypted at least v2.0 to extract, compressed size: 163, uncompressed size: 1024, name: T1A:X3_101115_1_8_1_expROM_FW_uni_template_eeprom0.bin
35718882      0x22106E2       Zip archive data, encrypted at least v2.0 to extract, compressed size: 158, uncompressed size: 1024, name: T1:X3_101025_1_8_1_expROM_FW_uni_template_eeprom0.bin
35898689      0x223C541       Zip archive data, encrypted at least v2.0 to extract, compressed size: 159, uncompressed size: 1024, name: T1A:X3_101025_1_8_1_expROM_FW_uni_template_eeprom0.bin
36099052      0x226D3EC       Unix path: /arch/x86/crypto/chacha-x86_64.ko
36213571      0x2289343       SHA256 hash constants, little endian
40559292      0x26AE2BC       gzip compressed data, ASCII, last modified: 2008-07-30 07:40:52
42384269      0x286BB8D       gzip compressed data, ASCII, from VM/CMS, last modified: 2034-02-10 07:36:36
44330863      0x2A46F6F       Unix path: /drivers/gpu/drm/sche2
44335047      0x2A47FC7       MySQL ISAM compressed data file Version 5
45809466      0x2BAFF3A       Unix path: /drivers/infiniband/core/iw_cm.ko
45993126      0x2BDCCA6       Unix path: /drivers/infiniband/hw/mlx5
48263042      0x2E06F82       Unix path: /drivers/net/dsa/qca8k.ko
50956643      0x3098963       PARity archive data - file number 17742
51185983      0x30D093F       Copyright string: "Copyright (c) 1999-2006 Intel Corporation.0"
51845468      0x317195C       Copyright string: "Copyright (c) 2018, Intel Corporation.@"
52146079      0x31BAF9F       Copyright string: "Copyright (c) 1999-2008 I"
54115009      0x339BAC1       Copyright string: "Copyright(c) 2002-2010 Exar Corp."
55930974      0x355705E       Cisco IOS microcode, for "`"
56371532      0x35C294C       Copyright string: "Copyright (c) 2015 FUJITSU LIMITED@"
59478771      0x38B92F3       Copyright string: "Copyright 2001-2013"
60709521      0x39E5A91       Unix path: /466/467/471/493/518/520/531/532(
63573383      0x3CA0D87       Unix path: /505V/F505/F707/F717/P8
67442020      0x4051564       Base64 standard index table
67839283      0x40B2533       Cisco IOS microcode, for ""
69103781      0x41E70A5       ELF, 64-bit LSB processor-specific, ("")
69108096      0x41E8180       Copyright string: "Copyright (C) 2009 Red Hat, Inc. All !"
70686211      0x4369603       SHA256 hash constants, little endian
72034364      0x44B283C       ELF, 64-bit LSB processor-specific, ("")
72820489      0x4572709       MySQL ISAM compressed data file Version 5
73836433      0x466A791       QEMU QCOW Image
74620003      0x4729C63       SHA256 hash constants, little endian
74831951      0x475D84F       Copyright string: "Copyright 2001-2019 g10 Code GmbH"
75172629      0x47B0B15       mcrypt 2.2 encrypted data, algorithm: RC2, mode: CBC, keymode: 8bit
75315969      0x47D3B01       xz compressed data
75332567      0x47D7BD7       SHA256 hash constants, little endian
75401079      0x47E8777       ELF, 64-bit LSB processor-specific,
77038967      0x4978577       Copyright string: "Copyright (C) 2020 Free Software Foundation, Inc."
77062150      0x497E006       ELF, 64-bit LSB processor-specific, ("d7>")
77186336      0x499C520       ELF, 64-bit LSB processor-specific,
77454257      0x49DDBB1       ELF, 64-bit LSB processor-specific, ("")
78936694      0x4B47A76       Copyright string: "Copyright 1995-2017 Jean-loup Gailly and Mark Adler "
79936758      0x4C3BCF6       Base64 standard index table
81431761      0x4DA8CD1       ELF, 64-bit LSB processor-specific, ("}7>")
82165616      0x4E5BF70       Base64 standard index table

答案1

我希望我能更好地解释这些步骤,但我通过使用当多个 cpio 档案连接在一起时如何跳过 cpio 档案

安装工具

apt-get install dracut liblz4-tool

提取文件

/usr/lib/dracut/skipcpio initrd > i1
/usr/lib/dracut/skipcpio i1 > i2
lz4cat i2 | cpio --extract --no-absolute-filenames --verbose

更新

更简单的解决方案是使用unmkinitramfs。该content目录将包含用于连接档案的 目录early和。还将适用于使用 Zstandard 压缩的较新的 initrd 映像以及使用 lz4 压缩的 initrd 映像。mainunmkinitramfs

apt-get -y install zstd
mkdir content
unmkinitramfs initrd content/

答案2

这是因为 initrd 文件中有三个不同的映像,第一个和第二个未压缩,并且引用 amd 内核和 intel 内核文件,但第三个使用 lz4 压缩,并且包含旧 initrd 文件的所有内容。我使用末尾 URL 中的页面解压所有映像,仅使用 dd、lz4cat 和 cpio -i。请阅读https://unix.stackexchange.com/questions/266089/extracting-concatenated-cpio-archives

相关内容