Skip to content
Baptiste Wicht edited this page Nov 5, 2013 · 2 revisions

These commands create a FAT32 image that can be used with Qemu/Bochs:

dd if=/dev/zero of=hdd.img bs=516096c count=1000
sudo fdisk -u -C1000 -S63 -H16 hdd.img
n,t(c),a(1),w
sudo losetup -o1048576 /dev/loop0 hdd.img
sudo mkdosfs -F32 /dev/loop0 502976

The image can then be mounted to be manipulated:

sudo mount -tvfat /dev/loop0 /mnt/somewhere
...
sudo umount /mnt/somewhere
Clone this wiki locally