Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
fatdisk.img: mbr-bin bootfat-bin diskfat.mk
set -x && \
rm -f fatpart.img fatdisk.img && \
truncate --size=15360K fatpart.img && \
mkfs.vfat -R 16 fatpart.img && \
dd if=bootfat-bin of=fatpart.img \
bs=1 seek=90 skip=90 conv=notrunc && \
truncate --size=16M fatdisk.img && \
echo -e 'o\nn\np\n1\n2048\n\nt\nc\np\nw\n' | \
fdisk fatdisk.img && \
dd if=fatpart.img of=fatdisk.img \
bs=512 seek=2048 conv=notrunc && \
dd if=mbr-bin of=fatdisk.img \
bs=1 count=446 conv=notrunc && \
dd if=mbr-bin of=fatdisk.img \
bs=1 seek=510 skip=510 count=2 conv=notrunc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment