Developing Debian 9 Stretch based minimal (under 400mb zipped) raw image
With Wayland/Weston interface
Image is Grub 2 bootable
Network enabled
DD write direct to device (usb, sda ect)
Mounted locally read/write in chroot environment
Mounted with Qemu.
Download ext4fs-weston-img.zip
First unzip
(These instruction are appropriate for Fedora 27, please adjust accordingly)
$su -c "qemu-kvm -m 2048 -name deb-min -drive format=raw,file=/path/to/ext4fs.img -vga std -usbdevice tablet"
Login: user password: user
Login: root password: root
$weston-launch
$su -c "dd if=/path/to/ext4fs.img of=/dev/sdX bs=8M status=progress oflag=direct"
$mkdir tmp
$su
#mount -t ext4 -o loop,rw ./ext4fs.img ./tmp
#mount --bind /dev ./tmp/dev
#mount --bind /dev/pts ./tmp/dev/pts
#mount --bind /proc ./tmp/proc
#mount --bind /sys ./tmp/sys
#mount --bind /etc/resolv.conf ./tmp/etc/resolv.conf
#chroot ./tmp
#exit
#umount ./tmp/dev
#umount ./tmp/dev/pts
#umount ./tmp/proc
#umount ./tmp/sys
#umount ./tmp/etc/resolv.conf
#umount ./tmp