Page 1 of 1

FAT12 Boot Sector

Posted: Mon Jan 02, 2006 1:50 am
by chiba
Hi all,

The FAT12 filesystem (unlike some others it appears) seems to specify the boot sector (first sector) in some manner. The first instruction jumps over this 62 (??) byte region into the code.

When writing a boot loader for a FAT12 filesystem, is the normal practice to skip this section (hence preserving it) or to just overwrite it and drop your own version of the same data there?

Thanks in advance!

Re:FAT12 Boot Sector

Posted: Mon Jan 02, 2006 7:00 am
by kataklinger
Those ~62 bytes ar BIOS PARAMETAR BLOCK or BPB which holds information about file system, you can overwrite it with your data but be sure what you are doing. If you put wrong data there maybe you won't be able to access file system.

Re:FAT12 Boot Sector

Posted: Mon Jan 02, 2006 8:25 am
by Candy
chiba wrote: Hi all,

The FAT12 filesystem (unlike some others it appears) seems to specify the boot sector (first sector) in some manner. The first instruction jumps over this 62 (??) byte region into the code.

When writing a boot loader for a FAT12 filesystem, is the normal practice to skip this section (hence preserving it) or to just overwrite it and drop your own version of the same data there?

Thanks in advance!

If you want to keep it FAT12, it's your own choice. Overwrite it with compatible values and other operating systems will recognise it, overwrite it with others and it might be a different filesystem altogether, so other OSes will refuse to recognise it. Windows is the only one cocky enough to say "I can't read it - it must be noise".

Re:FAT12 Boot Sector

Posted: Mon Jan 02, 2006 4:43 pm
by chiba
Thanks for the clarification. I'll take note of the existing values and will essentially duplicate them.

Re:FAT12 Boot Sector

Posted: Mon Jan 02, 2006 4:48 pm
by kataklinger
And before you start read FAT specification: http://www.microsoft.com/whdc/system/pl ... atgen.mspx