-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fsck not working in 360k images #41
Comments
I haven't tested this on ELKS yet, but IIRC the TLVC direct FD driver doesn't run the older-fashioned probe routine like the non-async driver does, and also operates differently with regards to auto-determining the floppy type. These may be contributors to the problem. To test, perhaps try running |
Hi @ghaerr - thanks for responding. Will look at it soon, having a real XT is fun - seem to have encountered a buffer issue. Another one, non fatal, speed related. |
A followup on this one. A different problem but I suspect they are related: Examples (notice that the auto detection of floppy size is always correct). This is one that works (mounts correctly automatically):
This is one that does not (it mounts as minix, shows empty). When mounted with the
An For the record, when mounting a 1.2M FAT image, it looks like this and works fine:
@ghaerr, knowing the inside of the FAT implementation, do the FAT numbers reported at mount time mean anything to you? |
Yep. The I would suggest the following debugging (is this on real hardware, or can it be duplicated on QEMU?): 1) test on BIOS FD driver, and 2) post My DF driver has some debug information that can be turned on for auto-detect. It would be useful to see some of that detail. Another issue is that the DF driver doesn't currently do any of the "ELKS" probing that the BIOS FD driver does, including trying to read the ELKS BPB or FAT BPB. Thus there is no secondary CHS checking occurring with the FAT BPB, for instance, nor ELKS signature CHS checking. I can explain each of the FAT numbers if you like. |
Thanks @ghaerr - much appreciated. Having taken another deep dive into what's actually in the boot sector (the drive is a physical 360k drive on a physical XT) I've concluded that the boot sector is somehow screwed up. I should have seen that before 'flagging' it. The question remaining is why |
The DF driver (unlike the BIOS FD driver) doesn't use the boot sector at all for disk CHS, correct?
I think the problem is the "auto-detect" feature of
Well, it can to a degree, but more verification code will be needed. Are you sure it is mounting a MINIX disk? When mounting, the fs/minix/inode.c::
The MINIX magic number is checked as well as the number of IMAP blocks. Frankly, I'm also a bit surprised as to how after checking these two numbers the image was accepted as MINIX? It might pay to ensure this is in fact what is happening with some debug statements. Another solution might be to add more kernel code to try to validate FAT when MINIX is rejected, or always use the -t option. |
After reading this whole issue all over again, I may have misunderstood what the problem is. If the issue is just that fsck reports perfectly valid minix file systems as not a minix file system, I would say the issue doesn't involve Given the issues we've seen with the DF driver, as well as it not using the proven probe code checking ELKS and FAT BPB for CHS etc, I would suggest always testing against the known-working BIOS FD driver to rule out DF driver issues before going to the higher level code. |
Thanks @ghaerr, and apologies for 'diverting' from the 'headline' issue, fsck fs detection. The DF driver is in the clear on this issues - not because it's bug free, it probably isn't, but it is correctly detecting the format in all cases tested. In the case at hand, there is no detection. This is an XT, the 360k format is the only one and hard wired. I'm having hardware problems on that system right now, otherwise this would be a good time to dive right into the reported |
what issues are you referring to? I don't know off hand about any issues with the DF driver, so an update would be good. |
Sorry for the confusion - I mean to write "Given the issues we've seen with I am not aware of any DF driver issues. I was thinking that perhaps, given the lack of attempting to read any BPB and EBP within the DF driver which does occur in the BIOS FD driver, this may bring more information to light on what is happening. For instance, the BIOS FD driver doesn't even attempt a hardware probe if sector 0 contains a BPB or EBP; in that case the CHS is taken directly from the BPB/EPB. This could in theory allow a 1440k disk image that was written onto a 360k floppy to be interpreted as 1440k, especially since the BIOS may also be doing additional CHS processing behind the scenes from the ELKS driver.
The middle FAT mount listing in your post above is very consistent with the BPB of a 1440k floppy. How that might have ended up on a 360k floppy is puzzling, unless the boot sector were replaced, and in that case the DF and FD drivers would likely treat the media differently. |
Like I said, the explanation for this was found. Indeed puzzling, but the boot sector was for some reason damaged (or replaced) and actually contained the data as shown by As to the original issue, BTW 1: Experience shows the direct fd driver to do a better job at reading 'weak' (barely readable old) floppies than the (XT) BIOS, probably thanks to the 'shaker' regime in the driver. BTW 2: Even the oldest of PCs have 765 floppy controllers, which make them physically capable of using higher density drives, at least 720k 3.5in. The BIOS prevents such use, while the direct driver enables it. In fact, if the FD controller is more recent, and XT may be able to use both 1.2 and 1.44 MB drive capacities, DMA speed being the real limitation. An area for experimentation now that the pieces are in place. Such 'non-native' densities would not be bootable though. |
fsck
reports perfectly valid minix file systems asnot a minix file system, perhaps DOS?
on 360k floppies.The text was updated successfully, but these errors were encountered: