https://wiki.osdev.org/Bootable_Disk
With the small difference that to copy files inside the image i use mcopy instead of loop because I'm on WSL.
It works fine and in can burn the image to a usb using Rufus until I add the bootloader with:
Code: Select all
dd if=./bin/boot/boot.bin of=diskimage.dd conv=notrunc bs=512 count=1
After adding the bootloader the if I burn the image to a USB windows can't read the usb contet just like it is corrupted. By now I'm loading a bootloader designed for a floppy but i removed the part of the disk read and just added a "hello world" print to check if the bootloader works, and it doesn't.
What am I doing wrong?
EDIT:
Also if i open the image with poweriso before adding the bootloader i can navigate the content, then i can't.
I also tried with a floppy img but the problem persist.
QEMU can boot the image evene if is "Broken"