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
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigBBE19ADCDDD0C0B23DEE92E4
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: quoted-printable

Hello,

lately I wanted to create some DOS bootable SD-Cards (for simply BIOS=20
updates, disk diagnostic tools etc...)
After newfs_msdos -F32 -B VBR.bin (2.5G partition) the system just=20
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=20
system booted!
So I took my hex glasses and found some unfortunate default parameters=20
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=20
are wisley chosen. Maybe not?

Best regards,

-Harry


--------------enigBBE19ADCDDD0C0B23DEE92E4
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

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

--------------enigBBE19ADCDDD0C0B23DEE92E4--



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