How about setting a boot flag and writing it back to e.g. an USB stick?
~# dd if=/dev/zero of=image.img bs=1M count=100 ~# LODEVICE=$(losetup --find --show image.img) ~# fdisk $LODEVICE ~# losetup -d $LODEVICE
edit: this page explains using offsets for mke2fs and doesn't require losetup: https://superuser.com/questions/737072/userspace-manipulatio...
also, losetup can now scan the device for partition tables and make partition-specific loopbacks! https://stackoverflow.com/a/15200862
https://www.embeddedarm.com/products/TS-7800
That was before I found multistrap.
fallocate -l 1G disk.img parted ./disk.img
edit: this page explains using offsets for mke2fs and doesn't require losetup: https://superuser.com/questions/737072/userspace-manipulatio...
also, losetup can now scan the device for partition tables and make partition-specific loopbacks! https://stackoverflow.com/a/15200862