run: qemu-system-x86_64 -monitor stdio -drive format=raw,file=disk.bin build: nasm -f bin -o boot0.bin boot0.s nasm -f bin -o boot1.bin boot1.s zero_disk: dd if=/dev/zero of=disk.bin bs=64K count=16 partition_disk: parted --script disk.bin mklabel gpt parted --script disk.bin mkpart dummy1 34s 47s parted --script disk.bin type 1 E3C9E316-0B5C-4DB8-817D-F92DF00215AE parted --script disk.bin mkpart dummy2 64s 65s parted --script disk.bin type 2 E3C9E316-0B5C-4DB8-817D-F92DF00215AE parted --script disk.bin mkpart dummy3 66s 67s parted --script disk.bin type 3 E3C9E316-0B5C-4DB8-817D-F92DF00215AE parted --script disk.bin mkpart dummy4 68s 69s parted --script disk.bin type 4 E3C9E316-0B5C-4DB8-817D-F92DF00215AE parted --script disk.bin mkpart dummy5 48s 63s parted --script disk.bin type 5 0FC63DAF-8483-4772-8E79-3D69D8477DE4 parted --script disk.bin mkpart stage2 70s 200s parted --script disk.bin type 6 fdffea69-3651-442f-a11d-88a09bf372dd write_stage1: dd if=/dev/zero of=disk.bin bs=440 count=1 conv=notrunc dd if=boot0.bin of=disk.bin conv=notrunc write_stage2: dd if=boot1.bin of=disk.bin bs=512 seek=70 conv=notrunc