stretch_%.squashfs: stretch_%_config/
rm "$@" || true
mksquashfs "$<" "$@" -comp xz
+
+/dev/sd%: partitions vmlinuz initrd.img syslinux.cfg .FORCE
+ mkdir mount
+ sfdisk ${@} <partitions
+ mkfs.ext3 -L SQUASHBOOT ${@}1
+ mkfs.btrfs -L SQUASHCLIENT ${@}2
+ dd of=${@} if=/usr/lib/syslinux/mbr/mbr.bin
+ mount -t ext3 ${@}1 mount
+ cp -L vmlinuz initrd.img *.squashfs syslinux.cfg mount/
+ cp $(addprefix /usr/lib/syslinux/modules/bios/, menu.c32 libutil.c32) mount/
+ extlinux -i mount/
+ umount mount/
+ mount -t btrfs ${@}2 mount
+ btrfs subvolume create mount/home
+ chmod 0755 mount/home
+ umount mount/
UI menu.c32
-DEFAULT stretch_i386
+DEFAULT stretch_squash
TIMEOUT 30
-LABEL stretch_i386
- MENU LABEL Debian Stretch 32bit
+LABEL stretch_squash
+ MENU LABEL Debian Stretch
KERNEL vmlinuz
INITRD initrd.img
APPEND boot=live live-media-path=/ quiet