FAT32 being corrupted?
Chris Mahoney (1684) 2165 posts |
I’m running OS 5.24 on a Pi 3. I have a FAT32 SD card with the loader stuff on it, and everything else is on a USB-attached SSD. Yesterday I tried to update my ROM. I opened up the SD card (reported as SDFS in the title bar, although Fat32FS is also loaded), renamed RISCOS/IMG to RISCOS/524, dropped the new ROM in, and renamed it to RISCOS/IMG. Upon rebooting (by doing a normal shut down and clicking Restart) I was greeted with the Pi’s rainbow screen. I put the card into my Mac and found that I could read every file except for RISCOS.IMG; Finder reported something to the effect of “data cannot be read or written”. I reformatted the card (using the SD Association’s formatter) and copied a fresh 5.24 ROM onto it, which booted successfully. I then repeated the same steps under RISC OS to update the ROM, and got the same rainbow screen, and the same “cannot be read or written” error. The ROM file itself is fine; if I do the update on the Mac then the Pi boots correctly. I’m sure I’ve updated my ROM in this manner in the past, so I’m not sure what’s going wrong here. Any ideas? |
David Pitt (3386) 1248 posts |
It’s filename/ext, the extension is not part of the filename as it is in RISC OS. There are two files both with the filename RISCOS. That’s my take on this which may or may not be formally correct. I have found it entirely possible to go wrong when renaming an old ROM image to preserve it. RISC OS might see the card through SDFS but that is not how the Pi sees it at start up. HTH. |
John Sandgrounder (1650) 574 posts |
Strange. I used this technique 12 months ago to produce my current setup. I wanted to use the then newly released 5.24 ROM file but was plaqued with keyboard repeats, etc. When forum user Colin produced his modified 5.24 build on 11th May 2018, I grabbed it with open arms and have used it ever since on all of my RISCOS Raspberry Pi boards. (Pi 1, Pi 2.1 and Pi 2.2. I do not use Pi 3 for RISC OS because of the blank screen problem) To set it up I did what Chris has just described which results in there being three image files on each of the SD cards, named RISCOS/5-24, RISCOS/COLIN and RISCOS/IMG. In each case, I stated with a brand new (factory formatted) SD card and used RISC OS to copy the ‘loader’ fles on to it. The only other difference which I have noted is that my sidelined 5.24 image is called RISCOS/5-24 not RISCOS/524 and that I have an additional file for Colin’s build which I have called RISCOS/COLIN. |
Stuart Painting (5389) 714 posts |
This may be a Pi bootloader issue. John’s “extra” filenames are not in 8.3 format, so the bootloader may be ignoring them. Chris’s “extra” filename is in 8.3 format, so the bootloader is more likely to take notice of it. Failing that, it’s similar to a HostFS bug I saw at RO4.39. If you copied a file called FILE/JPG to a directory already containing a file called FILE/TXT, Filer would claim that both files existed but inspection of the files would show that only one of them contained the expected data. |
Chris Mahoney (1684) 2165 posts |
I tried using a long name (RISCOS/YEOLDE) when renaming the old ROM and it had the same issue. I haven’t tried making the “front” of the name different at this stage. |
Rick Murray (539) 13850 posts |
It might be worth noting, that for avoiding patent issues, entries with long filenames create bogus short filenames. It is for that reason that I always copy files to Loader, in an 8.3 capitals way, to avoid generating a long name. |
Chris Mahoney (1684) 2165 posts |
Hmm. It’s possible that in the past (when it worked) I’d renamed the new ROM to RISCOS/IMG before copying it to the card. I’ll give that a go in the morning. |
John Sandgrounder (1650) 574 posts |
Yes. That is the last action in my setup. I can swich between 5.24 and Colin’s ROM just by copying the appropriate file to RISCOS/IMG. Although I am not at all sure what is realy going on with the other two ‘RISCOS/????’ files and I do not worry about it as what I am trying to achieve works :) Mind you, it is along time since I used anything but Colin’s 11th May 2018 build. Thank You, Colin. |
Chris Mahoney (1684) 2165 posts |
Bingo! This works correctly, so apparently something doesn’t like the default name “cURZ00-00” which is 9 characters and contains lowercase. Good to know! Thinking back to the days of DOS 6.22 reading files from Win 95: If I’m understanding correctly, the file is being set to something like “CURZ00~1” behind the scenes and then when I rename it to RISCOS/IMG it’s actually setting it to something like RISCOS~1.IMG in the background. Therefore the loader doesn’t see it, and MacOS expects it to be RISCOS.IMG and gives me the “can’t be read” error. Am I on the right track? In any case, thanks for the help :) |
Matthew Phillips (473) 721 posts |
If I need to put new files into Loader, I create a subdirectory and move the old ones into that. Saves renaming anything. Also, easier to make a text file reminding me what the old ones were and why I updated them. |
Rick Murray (539) 13850 posts |
Using more than 8.3 or lower case would create a long filenames entry, which would (for patent reasons) create a bogus 8.3 filename. I doubt that renaming an LFN entry to an 8.3 form would recreate it as a SFN. However… Does this mean that as of yesterday the patent has expired? https://patents.google.com/patent/EP0618540B1/en |
Clive Semmens (2335) 3276 posts |
Yes, because it’s a patent issue, not a copyright one. There may be more recent patents covering extensions to the idea, but as long as you’re only using the original idea not any of the patented extensions, you’re fine. N.B. I’m not a lawyer, but I’ve been in relevant parts of the business for a long time, and I think I’m right! I’d happily go on this advice myself, but you shouldn’t take my word for it…don’t try to sue me if I’m wrong (I’m a man of straw anyway, so you’d be on to a loser…) |
Rick Murray (539) 13850 posts |
This is what is really stupid about software patents. I can understand wanting to protect an implementation, like Word or FontManager or the software that makes your car start reliably on a miserable February morning. What I don’t get is this obsession with protecting ideas. An idea is not an implementation, an idea is not even necessarily implemented. It’s just an idea, a concept, a thought of a way to do something (before somebody comes along with a better idea). I’m a programmer, not a lawyer. That sort of legal crap is the primary reason why I won’t touch GPL1 if I don’t have to. The idea of arbitrary2 software patents is an anathema. And as far as I’m concerned, if said idea happens to be copied by me whilst devising code in the comfort of my bedroom, it’s surely bleedin’ obvious and not something “special”. Not that that’s any help in the face of the organised protection racket…
And nobody bother trying to sue me if I happen to create an idea of my own that looks and feels like one of their precious ideas. Because that multi million dollar payola? Yeah. Good luck with that. Something about blood and rocks, and not Sisyphos. :-) 1 GPL is well known for its “tainting” of anything in proximity. This is sort of explained in the licence text, and sort of explained in the FAQ, but ultimately the GPLv2 FAQ finishes the explanation with What constitutes combining two parts into one program? This is a legal question, which ultimately judges will decide. No. Absolutely not. If the licence is so spectacularly badly written that a primary part of its behaviour apparently needs to be decided by judges, don’t expect me to be even remotely interested in using said licence. 2 The horribly broken American patent system seems to basically exist to make lawyers richer. Once upon a time granted patents would be existing ideas with “on a computer!” added. These days it’s probably “on the internet!”. How many are actual serious things that need any of the benefits of patents? And how many are simply exist in order to build a big portfolio with which to hit competitors over the head? Bonus points if the |
Clive Semmens (2335) 3276 posts |
That’s what I mean when I say I’m a man of straw.
In English Law, as I understand it, “obviousness” is sufficient reason for a patent to be overturned – and the question is whether it’s “obvious to a person skilled in the art,” it doesn’t have to be obvious to the man on the Clapham omnibus. So the whole patent was probably worthless from the beginning, if anyone had bothered to contest it. Still of course with the caveat of my not being a lawyer. (I wouldn’t really call myself a programmer, either – just someone who’s done a fair amount of programming over the years, by no stretch of the imagination a professional.) |
Steve Pampling (1551) 8172 posts |
I believe there’s at least one implementation that effectively says “I don’t recognise your professed right to this and my government agrees with me” |
Clive Semmens (2335) 3276 posts |
8~) |
Timothy Baldwin (184) 242 posts |
Posted to wrong thread by mistake – moved here |
Jeffrey Lee (213) 6048 posts |
Out-of-place reply to Timothy deleted. |