Hi Francesco,

Quoting Francesco Poli (2020-05-06 19:40:37)
> > did you get any further with this problem?
> 
> Unfortunately, I failed to progress any further.

I uploaded a new mmdebstrap version.

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?

Thanks!

cheers, josch
#!/bin/sh

set -exu

#sudo vmdebootstrap --verbose --serial-console --distribution=sid --customize=/usr/share/autopkgtest/setup-commands/setup-testbed --user=test/test --size=2000000000 --grub --mirror=http://127.0.0.1:3142/httpredir.debian.org/debian/ --configure-apt --apt-mirror=http://10.0.2.2:3142/httpredir.debian.org/debian/ --image=autopkgtest-sid.raw
#qemu-img convert -O qcow2 autopkgtest-sid.raw autopkgtest-sid.img
#qemu-system-x86_64 -m 500M -enable-kvm /srv/qemu/unstable-amd64-autopkgtest.qcow2


mmdebstrap --mode=unshare --variant=important \
	--include=linux-image-amd64 \
	--customize-hook='chroot "$1" passwd --delete root' \
	--customize-hook='chroot "$1" useradd --home-dir /home/user --create-home user' \
	--customize-hook='chroot "$1" passwd --delete user' \
	--customize-hook='echo host > "$1/etc/hostname"' \
	--customize-hook='echo "127.0.0.1 localhost host" > "$1/etc/hosts"' \
	--customize-hook=/usr/share/autopkgtest/setup-commands/setup-testbed \
	unstable debian-unstable.tar
cat << END > extlinux.conf
default linux
timeout 0

label linux
kernel /vmlinuz
append initrd=/initrd.img root=/dev/vda1 rw console=ttyS0
END
guestfish -N debian-unstable.img=disk:8G -- \
	part-disk /dev/sda mbr : \
	part-set-bootable /dev/sda 1 true :  \
	mkfs ext2 /dev/sda1 : mount /dev/sda1 / : \
	tar-in debian-unstable.tar / \
	:  extlinux / : copy-in extlinux.conf / : \
	sync : umount / : shutdown
qemu-img convert -O qcow2 debian-unstable.img debian-unstable.qcow2
sudo mv debian-unstable.qcow2 /srv/qemu/unstable-amd64-autopkgtest.qcow2
rm debian-unstable.img debian-unstable.tar

Attachment: signature.asc
Description: signature

Reply via email to