msdosfs header unification patch
Bruce Evans
brde at optusnet.com.au
Sat Jul 14 11:18:50 UTC 2007
On Fri, 13 Jul 2007, Bruce Evans wrote:
> On Fri, 13 Jul 2007, Brian Chu wrote:
> % ...
> % - /* Check backup FSInfo? XXX
> */
> % +
> % + /* Unnecessary to check the backup FSInfo because there isn't
> % + * an physical backup copy of the FSInfo block. There's only a
> % + * backup of the FSInfo block number, which was checked (bsBPB) above.
> % + */
> % }
>
> But there is a physical backup FSinfo.
>
> The normal layout is:
>
> main boot sector (sector 0)
> fsinfo (sector 1, but can be anywhere)
> second boot sector (next sector? -- no pointer to this)
> fsisig4 checks/clobbers here
> backup main boot sector (sector 3, but can be anywhere)
Actually, it is sector 6. Sectors 3-5 are unused. Microsoft docs say not
to use any other layout (for portability, since some utilities hard-code 6)
...
> backup fsinfo (next sector? -- no pointer to this, since backup
> main boot sector can't have a different pointer than main bs)
> backup second boot sector (next sector?)
> backup fsisig4 would check/clobber here
>
> newfs_msdos omits the second boot sector and creates the following layout:
>
> main boot sector (sector 0)
> fsinfo (sector 1)
> backup main boot sector (sector 2)
> fsisig4 checks/clobbers here
> backup fsinfo (sector 3)
> backup fsisig4 would check/clobber outside of all boot sectors
... so this is a very unusual layout and shouldn't be produced by default.
Bruce
More information about the freebsd-fs
mailing list