ikluft / piflash

Write ("flash") a Raspberry Pi boot image to an SD card, with features for power users (auto-unwrap archive files) or newbies (safety checks to avoid erasing wrong device)
Apache License 2.0
10 stars 1 forks source link

.img or .img.xz files #2

Closed michaelgraaf closed 1 year ago

michaelgraaf commented 5 years ago

Thanks Ian for those whose Linux machine somehow won't install the Etcher version. So Piflash installed fine, but when given a burn command with an .img or .img.xz file it just offers advice about usage. Format used by FreedomBox project.

ikluft commented 5 years ago

OK. FreedomBox obviously wasn't among my previous tests. But it was easy enough to find them with an online search. I'll download their image and fix PiFlash to handle that correctly ASAP.

ikluft commented 5 years ago

Hmmm... I tried it and it worked. So let's find out what's different between our environments. Undoubtedly others will also benefit from getting this right.

I've attached the output how it looked for me. Please try again on your end: I'll need to see the command line that was run and output with the "--verbose" flag added. (Check the verbose output and delete/fuzz-out any text you don't want visible in public, such as user & host names.)

piflash-issue-2-out-2019-03-16.txt

ikluft commented 5 years ago

OK, I have another idea - this problem may be simpler than I first read it as. Since you said PiFlash displayed usage info, it may have been missing an argument.

Or I also found that if I add a typo to the source file name (or the correct filename but it isn't in the current directory), it displays usage information and no useful error message. I will fix that. Check if it's the problem you experienced.

If that doesn't solve your problem, we'll keep working on it. For now, this should verify the problem...

  1. Try "piflash --sdsearch" to find the SD card on your system. If there isn't one, insert one and try again. Get the destination device name from that.
  2. Try again running "piflash source-file destination-device" and verify it works when the paths are correct. (for example "piflash freedombox-stable-free_2017-06-18_a20-olinuxino-lime2-armhf.img.xz /dev/sdb")
ikluft commented 5 years ago

PiFlash 0.4.0 was posted today, which changes all cases where the program prints usage instructions to also print the reason why it can't run. (It also adds test cases for the command line option processing. But writing those tests didn't turn up any new issues.) I'd like to know if that makes a difference or not for you on this issue. https://metacpan.org/release/IKLUFT/PiFlash-0.4.0

michaelgraaf commented 5 years ago

Thanks again,

I promise to get back to you after doing all you suggest, when I can get around to it. Amongst other things I'm in South Africa which is experiencing rolling power blackouts these days...

Cheers, M.

On Tuesday, March 19, 2019, Ian Kluft notifications@github.com wrote:

PiFlash 0.4.0 was posted today, which changes all cases where the program prints usage instructions to also print the reason why it can't run. (It also adds test cases for the command line option processing. But writing those tests didn't turn up any new issues.) I'd like to know if that makes a difference or not for you on this issue. https://metacpan.org/release/ IKLUFT/PiFlash-0.4.0

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ikluft/piflash/issues/2#issuecomment-474197258, or mute the thread https://github.com/notifications/unsubscribe-auth/AazSSoXhTgQkKEdqAasgj4mG41JgAmNVks5vYGxUgaJpZM4b33Kj .

-- Michael Graaf, M.I.T.(UCT)

Researcher, Editor & Community Informatics Practitioner

keybase.io/michaelgraaf +27795487242 WhatsApp +27647754342 ORCID 0000-0002-1951-5739

ikluft commented 5 years ago

OK. Thanks for the status. It helps a lot to know you saw my responses. This case will wait. Safe travels...

ikluft commented 1 year ago

Closing the issue with the assumption 0.4.0 solved the problem with better error messages.