create disk image with gpt

This commit is contained in:
pantonshire committed 2024-07-01 08:31:16 +01:00
1 parent a33a21cde9
commit 87854597a1
2 files changed
+35 -36

No files matched your search

+11 -1
View File
@@ -1,6 +1,16 @@
run:
qemu-system-x86_64 -drive format=raw,file=boot0.bin
qemu-system-x86_64 -drive format=raw,file=disk.bin
build:
nasm -f bin -o boot0.bin boot0.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 test 34s 50%
parted --script disk.bin type 1 0fc63daf-8483-4772-8e79-3d69d8477de4
write_stage0:
dd if=boot0.bin of=disk.bin conv=notrunc