FAT16 or FAT32 boot sector doesn't matter???

L

Lucvdv

An experience I thought I should share:

Some time ago I wrote a small VB6 program to save and restore disk boot
sectors, so I don't have to go through DOS every time to format and
bootprep them. Now when I start using a new CompactFlash, I just install a
copy of the bootsector BOOTPREP created on another one of the same type,
without leaving windows and looking for a DOS floppy.


Now I just found out that, by mistake, I formatted a Sandisk 1GB CF to
FAT32, put an XPe target onto it, and installed a FAT16 boot sector.


That's not a typo: a FAT16 boot sector on a FAT32 disk.


Plugged the CF into the target board, powered it on, and it just boots and
works as if nothing's wrong.

Connect it to a CF reader, look at its properties in explorer: it says
FAT32, but the bootsector (saved to a new file to make absolutely sure)
says FAT16.
 
C

crus

When you format a CF inside an XP environment you don't need anymore
BOOTPREP. ( the CF or hd should be connected to a IDE port, not by USB
adapter )
Bootprep is necessary only if you are unable to put the XPE disk in the XP
pro PC.
The XP PRO format utility does the full job.
I understand that you have formatted the CF then overvritten the boot sector
with your utility.
I bet that the boot sector is the same for all formats, even NTFS, if you
like try it and tell us.
 
L

Lucvdv

When you format a CF inside an XP environment you don't need anymore
BOOTPREP. ( the CF or hd should be connected to a IDE port, not by USB
adapter )

That is correct, but the only way I can connect them to my development
machine is through USB. No IDE ports available to connect an IDE CF
adapter to.

Besides, using USB saves me a shutdown/reboot cycle each time the CF has to
be replaced.

I used to have another solution: use a 'real' harddisk on the target board,
install a plain Win2000 in an extra partition, and use that to format the
XPe partition and fill it over the network.


I bet that the boot sector is the same for all formats, even NTFS, if you
like try it and tell us.

No, the boot sectors are always different for different file systems.

An OS is supposed to detect what file system it has in front of it by
examining the boot sector, but it seems that XP(e) is ignoring this, and
doing the detection somewhere else.


The boot sector also contains code to locate the startup files (in this
case NTLDR) on disk, the way this is done is very different for NTFS and
FAT, and because a boot sector is only 512 bytes long it's probably
impossible to write a universal loader that can handle all thee systems.

I guess they did manage to create one that can handle both FAT varieties
and still fits in a single sector, so between FAT and FAT32 maybe only the
data part is different (that includes the file system type and type
dependent data, such as the size of the root directory on the disk if it's
FAT).


Even between FAT and FAT32 there are differences in the data part of the
boot sector (the BPB = BIOS parameter block on FAT is 25 bytes long, on
FAT32 it's 53 bytes).

That's why it was such a surprise to me that this thing boots with the
wrong boot sector in place.
 
S

Stuart Langley

By boot sector do you meam MBR (first sector of the disk), or the BPB (first
sector of a partition).

If you are refering to MBR, then it has little to do with what flavour of
file system you are using (besides recording the file system ID). i.e. the
same MBR should boot into whatever file system you want.

If you are talking the BPB then that is a different story.

Ciao
 
L

Lucvdv

I'm talking BPB.


By boot sector do you meam MBR (first sector of the disk), or the BPB (first
sector of a partition).

If you are refering to MBR, then it has little to do with what flavour of
file system you are using (besides recording the file system ID). i.e. the
same MBR should boot into whatever file system you want.

If you are talking the BPB then that is a different story.

Ciao
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top