Hi Francesco, Quoting Francesco Poli (2020-09-04 18:18:32) > > I am using the attached script to build my own autopkgtest qemu images and > > it > > works fine for me. Maybe you want to try again? > > I have just retried with my script (which seems to do the same things as > yours, except that it does set the unshare mode, since I have > kernel.unprivileged_userns_clone = 0). > > Unfortunately, I still see the same guestfish error: > > I: automatically chosen mode: fakechroot > I: chroot architecture amd64 is equal to the host's architecture > I: automatically chosen format: tar > I: using ${HOME}/Downloads/TEST/mmdebstrap.Cd9NV53RA7 as tempdir > [...] > I: creating tarball... > I: done > I: removing tempdir ${HOME}/Downloads/TEST/mmdebstrap.Cd9NV53RA7... > I: success in 107.2860 seconds > libguestfs: error: /usr/bin/supermin exited with error status 1. > To see full error messages you may need to enable debugging. > Do: > export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 > and run the command again. For further information, read: > http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs > You can also run 'libguestfs-test-tool' and post the *complete* output > into a bug report or message to the libguestfs mailing list. > > Once again, the .qcow2 image is tiny and the .img does not boot with > > $ qemu-system-x86_64 -enable-kvm -m 512 \ > -serial unix:/tmp/ttyS0,server,nowait -drive \ > "file=./debian-unstable.img,format=raw,cache=unsafe,if=virtio,index=0" > > After attempting all possible boot devices, including a network boot, > it bails out with "No bootable device" error message.
I have some more insights. After having gotten the mmdebstrap/guestfish thing running on salsaci, debci and jenkins I also happened to see stuff that looked very similar to the errors you are seeing. Going over my last emails to this thread, the guestfish command I told you about was indeed missing something: the installation of mbr.bin. So a better guestfish command is this one: guestfish -N debian-unstable.img=disk:8G -- \ part-disk /dev/sda mbr : \ mkfs ext2 /dev/sda1 : \ mount /dev/sda1 / : \ tar-in debian-unstable.tar / : \ copy-in "extlinux.conf" / : \ upload /usr/lib/SYSLINUX/mbr.bin /mbr.bin : \ copy-file-to-device /mbr.bin /dev/sda size:440 : \ rm /mbr.bin : \ extlinux / : \ sync : \ umount / : \ part-set-bootable /dev/sda 1 true : \ shutdown I have no idea why, but on my system, the disk boots even without writing mbr.bin to the first 440 byte of the disk. Just to make sure, here is my extlinux.conf: default linux timeout 0 label linux kernel /vmlinuz append initrd=/initrd.img root=/dev/vda1 rw net.ifnames=0 console=ttyS0 Also, you reported that the guestfish call fails for you and that if you set LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 then you get lots of lines like: guestfsd: receive_file: reading length word guestfsd: receive_file: got chunk: cancel = 0x0, len = 8192, buf = 0x560e1b866690 These lines come from the tar-in command. If it fails at that stage, maybe your disk size is not large enough for your tarball and that's why it fails? Thanks! cheers, josch
signature.asc
Description: signature