On Fri, 12 Jan 2024 23:39:34 +0100 Johannes Schauer Marin Rodrigues wrote: [...] > could you try applying this patch and then try again: > > --%<--------------------------------------------------------------------- > --- a/mmdebstrap-autopkgtest-build-qemu > +++ b/mmdebstrap-autopkgtest-build-qemu > @@ -302,17 +302,12 @@ if test -n "$SCRIPT"; then > '--customize-hook=rm -f "$1/userscript"' > fi > > -EXT4_OFFSET_BYTES=$(( (FAT_OFFSET_SECTORS + FAT_SIZE_SECTORS) * 512)) > -EXT4_OPTIONS="offset=$EXT4_OFFSET_BYTES,assume_storage_prezeroed=1" > set -- "$@" \ > "--customize-hook=download vmlinuz '$WORKDIR/kernel'" \ > "--customize-hook=download initrd.img '$WORKDIR/initrd'" \ > - '--customize-hook=mount --bind "$1" "$1/mnt"' \ > - '--customize-hook=mount --bind "$1/mnt/mnt" "$1/mnt/dev"' \ > - '--customize-hook=/sbin/mkfs.ext4 -d "$1/mnt" -L autopkgtestvm -E > '"'$EXT4_OPTIONS' '$IMAGE' '$SIZE'" \ > - '--customize-hook=umount --lazy "$1/mnt"' \ > + --format=ext2 \ > "$RELEASE" \ > - /dev/null > + "$IMAGE" > > test -n "$MIRROR" && set -- "$@" "$MIRROR" > test -n "$KEYRING" && set -- "$@" "--keyring=$KEYRING" > @@ -320,6 +315,9 @@ test -n "$KEYRING" && set -- "$@" "--keyring=$KEYRING" > echo "mmdebstrap $*" > mmdebstrap "$@" || die "mmdebstrap failed" > > +EXT4_OFFSET_BYTES=$(( (FAT_OFFSET_SECTORS + FAT_SIZE_SECTORS) * 512)) > +fallocate --insert-range --offset=0 --length=$EXT4_OFFSET_BYTES "$IMAGE" > + > unshare -U -r --map-groups=auto chown 0:0 "$IMAGE" > chmod "$(printf %o "$(( 0666 - 0$(umask) ))")" "$IMAGE" > > -->%---------------------------------------------------------------------
I have just tried. But the result is not clear to me. The image generation seems to succeed: $ cd ~/Downloads $ TMPDIR=/dev/shm ./test/mmdebstrap-autopkgtest-build-qemu \ --size=2G --boot=efi sid sid_amd64.img [...] cp: warning: behavior of -n is non-portable and may change in future; use --update=none instead I: running special hook: download vmlinuz '/dev/shm/tmp.3NxJ7PeIpL/kernel' I: running special hook: download initrd.img '/dev/shm/tmp.3NxJ7PeIpL/initrd' I: cleaning package lists and apt cache... done done I: approximating disk usage... I: creating tarball... copying from tar archive - I: done I: removing tempdir /dev/shm/mmdebstrap.Dgp1UFANSi... I: success in 125.7682 seconds determined efi vma alignment as 0x0001000 determined minimum efi vma offset as 5603221504 mkfs.fat 4.2 (2021-01-31) Checking that no-one is using this disk right now ... OK Disk sid_amd64.img: 638.58 MiB, 669594624 bytes, 1307802 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes >>> Script header accepted. >>> Script header accepted. >>> Created a new GPT disklabel (GUID: EEDDF652-1EF3-4E3D-9994-1FD7E76B640A). sid_amd64.img1: Created a new partition 1 of type 'EFI System' and of size 127 MiB. sid_amd64.img2: Created a new partition 2 of type 'Linux filesystem' and of size 510 MiB. Partition #2 contains a ext2 signature. sid_amd64.img3: Done. New situation: Disklabel type: gpt Disk identifier: EEDDF652-1EF3-4E3D-9994-1FD7E76B640A Device Start End Sectors Size Type sid_amd64.img1 2048 262143 260096 127M EFI System sid_amd64.img2 262144 1306623 1044480 510M Linux filesystem The partition table has been altered. Syncing disks. $ echo $? 0 $ ls -lF --si sid_amd64.img -rw-r-xrwx 1 $USER $USER 670M Jan 14 17:21 sid_amd64.img* However, if I attempt to use the resulting image, autopkgtest fails: $ autopkgtest --output-dir ./${SRCPKG}_autopkgtest.out --summary ./${SRCPKG}_autopkgtest.summary --apt-upgrade -B ./${SRCPKG}_amd64.changes -- qemu --overlay-dir /dev/shm ~/Downloads/sid_amd64.img autopkgtest [17:27:29]: starting date and time: 2024-01-14 17:27:29+0100 autopkgtest [17:27:29]: version 5.32 autopkgtest [17:27:29]: host ${HOST}; command line: /usr/bin/autopkgtest --output-dir './${SRCPKG}_autopkgtest.out' --summary './${SRCPKG}_autopkgtest.summary' --apt-upgrade -B './${SRCPKG}_amd64.changes' -- qemu --overlay-dir /dev/shm ${HOME}/Downloads/sid_amd64.img qemu-system-x86_64: terminating on signal 15 from pid 115770 (/usr/bin/python3) <VirtSubproc>: failure: timed out waiting for 'login prompt on serial console' autopkgtest [17:28:29]: ERROR: testbed failure: unexpected eof from the testbed Was it just a test to investigate further? Or did it have a chance to produce a usable image? -- http://www.inventati.org/frx/ There's not a second to spare! To the laboratory! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
pgp3i3hxNJ1Ye.pgp
Description: PGP signature