Please make *CheckMap do something USEFUL!
Rick Murray (539) 13840 posts |
So I wrote a little program to try to extract the CVS files and strip off the rubbish – essentially to take files unpacked by !UnTarBZ2 to there and write the files here – with the idea of “there” being a temporary place and “here” being the place where the sources go. It was progressing well, but the file copy can be a bit slow for larger files, so I thought I’d drop in some Hourglass action so you know the thing hasn’t, you know, crashed. Press F3 in Zap to save the code when… Now, while I have never experienced this on the Pi, I recall from days of old that once you finish swearing, you do not switch off. I used DiscKnight (the check-only version) told me the cross-check for map #1 was wrong, but map #2 was good. If this can be easily determined, why can’t *CheckMap fix this? This wouldn’t be a problem re. DiscKnight, for there is a lot more stuff DiscKnight can fix. *CheckMap should, at the very least, try to recover the situation to a state where you can at least mount the filesystem for data recovery. I was able to recover everything1 (that I checked) by the tortuous process of:
It took a while, but it is working. Everything appears to be present. To make things a little simpler in the future, I am currently making an image of the working card, so I’ll have a snapshot of it as it is today. As for the old card? Useless. RISC OS will boot, but attempting to access the filesystem via SDFS will tell me that the disc drive is empty. Attempting to open the filesystem via SCSI hangs the machine with an hourglass (hang as in ^Break won’t even work). At this point, it would be safe to consider – without access to external products – the data on this SD card would be “lost”. DiscKnight might be able to fix it. Really, at the very least, By the way – while it may be that there was an existing problem with the disc structure (files not in directory or the like), the machine worked and booted and was happy to save files to the disc. The problem occurred between pressing F3 to save a BASIC file in !Zap, typing three Hourglass SWIs, and pressing F3 again. A taskwindow was open, doing nothing, and several filer windows were open. No file accesses other than that described, and no other applications were running. 1 The sources and stuff was backed up, the problem is the major amounts of hassle involved in recreating/reinstalling everything. |
William Harden (2174) 244 posts |
Which is why my answer to Steve P re ‘how many SD interfaces do you need’ a week or so back was ‘2’. RISC OS still FUBARs it’s filesystem with alarming frequency. Keeping a regular mirror of your SD card is really the only safe way forward. Also helps if swapping your ROM image fails (as it did for me this morning). In answer to your question: is this something Druck or Sprow (the only people I know with good enough knowledge of the filesystem) could be persuaded to do; or an extension of the filesystem bounty? I think ‘is it useful’ is a no-brainer – ‘can someone do it?’ Is a much more challenging question! |
Rick Murray (539) 13840 posts |
Looking (briefly) at the source, it looks like CheckMap won’t offer to fix the map if it is inconsistent with the directory tree – though one might wonder which copy of the map is being looked at, at this time? Certainly, I was not asked if I wanted to fix the map…? |
Sprow (202) 1158 posts |
Checkmap will already try to recover the map (see *HELP CheckMap) if it can, but it will only do so if it’s confident that wont make things worse. What it does is
In your situation it has loaded the map off the disc, found it to have good checksums, but found it doesn’t match the directory layout. There’s nothing to be gained by copying the 2nd copy of the map over, since the 1st copy is has good checksums already. DiscKnight is a tenner and well worth having in your armoury.
Is that not what a CVS client is for? That wheel was already invented. |
Rick Murray (539) 13840 posts |
That’s not what the check-only version of DiscKnight says. Copy #1 cross check was wrong. I believe there is something to be gained – namely that the device can be mounted and ‘seen’ by RISC OS. Yes there is a problem, but wouldn’t it be better to allow the user to gain access?
I would agree – if only the SDFS filer didn’t report “Drive empty”, making things a little more complicated. It’s moot now, anyway, I imaged the older SD card from the newer one; so don’t have the damaged filesystem any more.
Yup.
Only partly. This Pi is not, ordinarily, connected to the Internet. That’ll change if/when RISC OS can talk to WiFi devices. But until then it is a sort of messy arrangement using a way-too-short patch cable and Windows’ connection sharing. As you can imagine, I don’t do this as a matter of course. |
Chris Evans (457) 1614 posts |
Sprow: I may have miss-understood things but if Checkmap finds Map1 is good, map2 is not checked and could be bad. If so couldn’t CheckMap if it finds Map1 good but Map2 bad, copy Map1 over Map2? |
Sprow (202) 1158 posts |
Correct.
If it finds Map1 to be good it wont have even looked at Map2. It only allocates enough RAM to hold one copy of the map, and stops as soon as possible whether a good or bad outcome.
In normal use the map in RAM is read/written to, the copies on disc aren’t touched. On dismount the RAM copy is written twice to disc. |
Steve Revill (20) 1361 posts |
I just had Andrew complaining to me on Skype this morning that CheckMap really should have an option to not output every file it finds (that’s not actually broken) because that just massively increases its runtime. :) |
Chris Evans (457) 1614 posts |
That seems absolute madness, it would probably add less than 1% to the time of a checkdisc and make the system much more robust. I’d have thought it worth comparing maps for incongruity every time a disc is mounted. I’d go as far as to call it a bug.
That doesn’t sound like it could be correct unless I’m still missundestanding things. I just created a directory and copied a small text file into it and the root directory on an RO3.71 A7000+ and then turned off at the wall, on rebooting everything was there!
Sounds a great idea, but it needs to put something on the screen every few seconds, say as DiscKnight does. |
Rick Murray (539) 13840 posts |
Funny Chris writes about this. I was thinking about this at work today.
In which case, I think if it is true, it implies that
Can I call you on that? The only system I have seen where that would make any sort of sense is the SJ MDFS that built its map from the disc structure at power-up (and take a fair while doing so).
Weren’t we talking about I think RISC OS does, as a matter of course, look at both maps. Nothing else would explain the message at the top of this thread…
You could perhaps mimic the look and feel of the old CheckMap without spitting out thousands of files… just print directories. |