This appears to the the FAT16 variety. AFAIK, a valid boot signature is required for FAT32, but not for FAT16, so this indeed appears to be a problem in fstyp. I will file a bug and work on the fix.
-Artem. J?rgen Keil wrote: > In this thread, http://www.opensolaris.org/jive/thread.jspa?messageID=96829 > OpenSolaris user Stuart Biggar was complaining about a > fat filesystem that isn't mounted automatically any more by Tamarack / hald. > Mounting the media was automatic when vold was used in previous Solaris > releases. > > A manual pcfs mount on snv_57 is working just fine. But fstyp / libfstyp > is unable to identify the filesystem as "pcfs". > > Stuart has sent me the first few blocks from that fat media, and I found out > that the problem is that the fat filesystem doesn't have a valid "Extended > boot signature" BS_BootSig field; so there is no BS_VolID "Volume serial > number", no BS_VolLab "Volume Label" and no BS_FilSysType field. > (BS_FilSysType is present, actually, and filled with "FAT16", as > recommended by Microsofts fat32 spec) > > Apparently this is OK for a fat filesystem, and is documented by Microsoft's > FAT32 spec. And Solaris' pcfs filesystem module accepts it. > But Solaris' /usr/lib/fs/pcfs/fstyp.so.1 insists on seeing a > valid BS_BootSig field, without it a fat filesystem is not recognized: > > http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/pcfs/fstyp/fstyp.c#259 > > 263 if (h->bs16.f_bootsig == 0x29) { > > ... > > 270 } else if (h->bs32.f_bootsig == 0x29) { > > > > % adb /tmp/pcfs.img > 0t38?Bna4Cna11Cna8C > 0x26: 0 > 0x27: ^...@^@^...@^@ > 0x2b: ^...@^@^...@^@^...@^@^...@^@^...@^@^@ > 0x36: FAT16 > > % fstyp /tmp/pcfs.img > unknown_fstyp (no matches) > > > > After setting the expected BS_BootSig value to 0x29, > fstyp works just fine: > > % echo 0t38/w 0x29 | adb -w /tmp/pcfs.img > 0x26: 0 = 0x29 > > % fstyp -v /tmp/pcfs.img > pcfs > Bytes Per Sector 512 Sectors Per Cluster 16 > Reserved Sectors 1 Number of FATs 2 > Root Dir Entries 512 Number of Sectors 0 > Sectors Per FAT 245 Sectors Per Track 63 > Number of Heads 16 Number Hidden Sectors 63 > Volume ID: 0x0 > Volume Label: SD_512_U > Drive Number: 0x0 > Media Type: 0xf8 "Fixed" Disk > > > I think this needs to be fixed in usr/src/cmd/fs.d/pcfs/fstyp/fstyp.c > > I this issue already addressed by the pcfs rewrite? > > > This message posted from opensolaris.org > _______________________________________________ > ufs-discuss mailing list > ufs-discuss at opensolaris.org
