Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 2008 09:18:43 +0200
From:      Harald Schmalzbauer <h.schmalzbauer@OmniLAN.de>
To:        freebsd-stable@freebsd.org
Subject:   newfs-msdos and default fat32 parameters
Message-ID:  <48940A53.3000004@OmniLAN.de>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hello,

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,

-Harry


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkiUClMACgkQLDqVQ9VXb8gxpACgjQF431rTobR87z3zVVeD1e5T
XSYAn0dXMKFzPtY9wubfSGiJvyHnfnxr
=yy39
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48940A53.3000004>