Closed mrkskwsnck closed 1 year ago
In the meanwhile I discovered the fact, that PiFlash needs the SD Card to have at least a partition table (sometimes called disk label) present. That's why blkid
script fails to get the fs type.
The fix will go into PiFlash 0.5.0.
I found what was causing this when I tripped over it myself and was finally able to duplicate the error. It only occurred when flashing a blank media without any kind of filesystem. We knew the blkid command was returning an error. Now we know why. But it should not have been a fatal error. A try-catch-block was placed around it to catch the exception and continue to the next fallback method of determining the filesystem type. This code to check the output device before writing is necessary to catch and prevent an accidental formatting of a user data drive instead of an SD card.
That's great news, indeed. When do you plan to make v0.5.0 public?
I was planning to post it soon after that. Tests on a RasPi 4 didn't make a bootable SD. That will need to be solved first.
I installed PiFlash v.0.4.3 via cpan inside my home folder on my Ubuntu 18.04 system. When I try to flash an zipped image to a blank SD Card, blkid fails to get the fs type, like that:
What did I get wrong? As far as I debugged it myself, the problem might be the following command:
I don't know, what the return code 2 means. However, below is my verbose output:
I'm looking forward to get this mystery solved :-)