Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nasm -f bin first_stage.asm -o first_stage.bin
- dd if=/dev/zero of=bootloader.img bs=512 count=131072
- # Place second stage at sector 1 (seek=0)
- dd if=first_stage.bin of=bootloader.img bs=512 seek=0 conv=notrunc
- # Place second stage at sector 2 (seek=1)
- nasm -f bin second_stage.asm -o second_stage.bin
- dd if=second_stage.bin of=bootloader.img bs=512 seek=1 conv=notrunc
- nasm -f bin kernel.asm -o kernel.bin
- # Place kernel at sector 5 (seek=4)
- dd if=kernel.bin of=bootloader.img bs=512 seek=4 conv=notrunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement