Bug 42617
Summary: | Unable to mount some old disk image files | ||
---|---|---|---|
Product: | File System | Reporter: | Mark (mark_k) |
Component: | FAT/VFAT/MSDOS | Assignee: | OGAWA Hirofumi (hirofumi) |
Status: | NEW --- | ||
Severity: | enhancement | CC: | cse.cem, szg00000 |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.0 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | Gzipped, MS-DOS 1.1-formatted 320k floppy image |
Description
Mark
2012-01-20 19:28:00 UTC
From Wikipedia http://en.wikipedia.org/wiki/File_Allocation_Table#BPB support for the BIOS Parameter Block was first implemented in MS-DOS 2.0. So disks written using early MS-DOS versions don't have valid values in the BPB fields. Ideally the Linux FAT/VFAT code would use sensible default values if the BPB fields are empty. Mark, can you provide an image file we can use for test purposes? I'm not sure I can make mkfs.fat spit out something similar to the pre-DOS 2.0 format (even with post-processing to zero 0x0b -> 0x17). Thanks! Created attachment 130931 [details]
Gzipped, MS-DOS 1.1-formatted 320k floppy image
Mark,
If you can provide a real image, that would be awesome, but meanwhile I have created a franken-floppy image from scratch.
I found an old "bochs" machine running MS-DOS 1.1, ran FORMAT on an old 5.25in 320k floppy (note: Bochs write track <-> FORMAT only seemed to accept 320k or other 8-sectors-per-track geometries, not 360k) that I had preformatted with mkfs.fat for some reason, and came up with the attached image. It seems to demonstrate the right header issues (lots of zeroes from 0x0B to 0x17).
The image should be empty; I haven't touched it since FORMAT. It may still have a mkfs.fat volume label in it since bochs crashed in the middle, but the header appears to demonstrate the issue.
Submitted: https://lkml.org/lkml/2014/3/28/467 (In reply to Conrad Meyer from comment #3) > Created attachment 130931 [details] > Gzipped, MS-DOS 1.1-formatted 320k floppy image For what it's worth, I'm not sure this test image is especially valid, given that it was initially created with mkfs.vfat, and I'm not sure how much FORMAT actually overwrote, and bochs did crash partway through. Mark's examples work well under the submitted patch. Well, latest version of the patch is here: https://lkml.org/lkml/2014/3/31/558 I think it addresses all issues brought up during review, but I haven't heard back from Hirofumi or anyone in over a week. I'll wait a week and re-send. In Andrew Morton's tree, slated for 3.16 via linux-next: http://ozlabs.org/~akpm/mmots/broken-out/fs-fat-add-support-for-dos-1x-formatted-volumes.patch |