newfs-msdos and default fat32 parameters

Harald Schmalzbauer h.schmalzbauer at
Sat Aug 2 07:18:45 UTC 2008


lately I wanted to create some DOS bootable SD-Cards (for simply BIOS 
updates, disk diagnostic tools etc...)
After newfs_msdos -F32 -B VBR.bin (2.5G partition) the system just 
didn't continue booting after the MBR was loaded (VBR.bin is a 3 sectors 
dump of the DOS boot record which sys creates).
When I directly wrote the dump back to sectors 63-65 and 69-71 the 
system booted!
So I took my hex glasses and found some unfortunate default parameters 
of newfs_msdos.

- MediaType is f0 but probably should read f8 (fixed disk)
- The backup boot record should be located at offset 6, not 2.
- There should be defined 63 hidden sectors

With 'newfs_msdos -F32 -m 0xf8 -B VBR.bin -k 0x6 -o 63 -i 0x1 /dev/da6s1'
every thing was fine.
I'm no expert, I just found some FAT info. maybe the current defaults 
are wisley chosen. Maybe not?

Best regards,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-stable mailing list