Floppy Drive BootSector Problem

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
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Floppy Drive BootSector Problem

Post by 01000101 »

I put together a simple realmode bootloader, but when I try to put my kenel.bin onto the floppy drive it says "the disk in drive A is not formatted" and gives me that option to format it or not.

My bootsector ends with the standard

Code: Select all

times 510 - ($-$$) db 0 
dw 0xAA55
Why would the floppy not let me write to it anymore? is the bootloader messing up the FAT table or am I writing to many/to few zeros to the end of the bootsector image?
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

If you overwrite the first 512 bytes with a bootloader that isn't FAT-compatible.. It won't be recognized as FAT formatted.

This will make writing files to your disk in the "conventional" way very difficult.. ;)

http://en.wikipedia.org/wiki/File_Alloc ... oot_Sector

You can find more by searching the Forums/Wiki & Google.. Have fun 8)
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re: Floppy Drive BootSector Problem

Post by Candy »

01000101 wrote:Why would the floppy not let me write to it anymore?
Windows won't let you read the floppy as a FAT12 floppy because it isn't. Find the FAT12 spec and look for BPB.
Post Reply