Installing Bootloader on Flopy Image

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Stavros
Posts: 7
Joined: Wed Dec 31, 2008 11:40 am

Installing Bootloader on Flopy Image

Post 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!
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: Installing Bootloader on Flopy Image

Post by JohnnyTheDon »

Code: Select all

dd if=bootloader.bin of=floppy.img bs=512 count=1 conv=notrunc
Should do the trick.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Installing Bootloader on Flopy Image

Post by Combuster »

I sure hope you have a BPB stored in your bootloader, otherwise you'll lose the FAT formatting
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply