Page 1 of 1

Installing Bootloader on Flopy Image

Posted: Tue Jan 13, 2009 7:22 pm
by Stavros
I created a FAT floppy image with the following linux commands:

Code: Select all

dd if=/dev/zero of=floppy.img bs=512 count=2880
sudo losetup /dev/loop0 floppy.img
sudo mkdosfs /dev/loop0
I have created my own bootloader. How can I copy my bootloader to the first 512 bytes of the floppy image.

Thanks!

Re: Installing Bootloader on Flopy Image

Posted: Tue Jan 13, 2009 8:57 pm
by JohnnyTheDon

Code: Select all

dd if=bootloader.bin of=floppy.img bs=512 count=1 conv=notrunc
Should do the trick.

Re: Installing Bootloader on Flopy Image

Posted: Wed Jan 14, 2009 1:50 pm
by Combuster
I sure hope you have a BPB stored in your bootloader, otherwise you'll lose the FAT formatting