From 2be94c25d6472a168a26d76661fd021cdae3d9b1 Mon Sep 17 00:00:00 2001 From: Adrian Vladu Date: Wed, 18 Sep 2024 14:46:44 +0000 Subject: [PATCH] cpio: show all the rootfs found --- build_library/extract-initramfs-from-vmlinuz.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build_library/extract-initramfs-from-vmlinuz.sh b/build_library/extract-initramfs-from-vmlinuz.sh index 9c1ffb6952b..0552c89fecd 100755 --- a/build_library/extract-initramfs-from-vmlinuz.sh +++ b/build_library/extract-initramfs-from-vmlinuz.sh @@ -81,11 +81,9 @@ perform_round() { for rnd in "${round_prefix}"*; do if [[ $(file --brief "${rnd}") =~ 'cpio archive' ]]; then mkdir -p "${out}/rootfs-${ROOTFS_IDX}" - while cpio --quiet --extract --make-directories --directory="${out}/rootfs-${ROOTFS_IDX}" --nonmatching 'dev/*'; do - ROOTFS_IDX=$(( ROOTFS_IDX + 1 )) - mkdir -p "${out}/rootfs-${ROOTFS_IDX}" - done <${rnd} - rmdir "${out}/rootfs-${ROOTFS_IDX}" + # On Linux 6.10, the first rootfs is an extra ghost rootfs of 336K, that has a corrupted CPIO + cpio --quiet --extract --make-directories --directory="${out}/rootfs-${ROOTFS_IDX}" --nonmatching 'dev/*' < $rnd || true + ROOTFS_IDX=$(( ROOTFS_IDX + 1 )) fi done }