Reflash Error

The other day I thought I might try a complete reflash of crimson, so after backing up some items I wanted to keep and/or reapply, I attempted it, but the process errored out immediately every time:

Searching...
uuu (Universal Update Utility) for nxp imx chips -- libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Wait for Known USB Device Appear...

(Here, I hold volume-up, connect cable to Librem 5, and reinsert battery, then release volume-up.)

Error: Unknown Command:FB: reboot


Traceback (most recent call last):
  File "/home/xxxxxx/librem5-flash-image/./scripts/librem5-flash-image", line 630, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/xxxxxx/librem5-flash-image/./scripts/librem5-flash-image", line 613, in main
    flash_image(uuu_target, args.debug)
  File "/home/xxxxxx/librem5-flash-image/./scripts/librem5-flash-image", line 403, in flash_image
    subprocess.check_call(['uuu', uuu_target])
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['uuu', './Images/flash_librem5r4.lst']' returned non-zero exit status 255.

Anybody have any idea what might be wrong? I have the latest version of uuu and all the scripts were freshly dowloaded.

Entropy is real.

So buy i new sony usb data 1.5 max, meter cable for.

I just did a successful reflash from a different computer which I hadn’t used for flashing before, with newly downloaded Librem 5 scripts, and the USB-C-to-USB-C Librem 5 cable.

It all worked without error.

Before, I must have experienced some silly, hitherto unseen, and inexplicable “operator” error…
:person_facepalming:

If uuu doesn’t recognize that command, I have some doubts whether it’s really the latest version.

What’s the output of:

which uuu; uuu -h | head -n1

?

Computer that returned error (used previously for flashing):

uuu (Universal Update Utility) for nxp imx chips – libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

===

Computer that succeeded (newly set up for flashing):

uuu (Universal Update Utility) for nxp imx chips – lib1.5.141

By the way, I did check to see if my problem with USB drives not being recognized was fixed by this reflash, and no, it wasn’t. (Didn’t expect that to fix it, though.)

That’s a version from PureOS Amber :scream:

Interesting that when I was preparing to flash, I even followed the instructions to install uuu even though I knew it was already installed, and apt confirmed that I already had the “latest version.”

It is the latest version… in PureOS Amber.

What does apt show -a uuu say?

uuu want gdawn too as me to work…

And also output from lsb_release -c

i.e. are you actually running Amber still?

And also output from which uuu (as @‍dos already requested) - because if your setup is really really old, you might have built uuu from sources (or scrounged a binary from somewhere) and then left it in a directory in PATH that is masking the officially installed version.

Lol. No. I had already flashed crimson a couple of times. (As well as upgrading with the tool at least once.)

I might have actually installed that originally from the Librem Mint repo, or I might have built it from your guide in the old Tips & Tricks. I don’t really remember anymore.

To be clear though, those two questions are about the host computer, not the Librem 5.

Edit: Yes, I can see the version that I myself built from sources, no longer in the PATH, but still squirreled away, and it identifies as “libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8”. So I would say that which uuu will point at /usr/local/bin/uuu (and not /usr/bin/uuu), which will in turn explain where that host computer is falling down. If that is correct then

sudo mv /usr/local/bin/uuu /usr/local/bin/uuu.far-too-old

  :wink:

~$ apt show -a uuu
Package: uuu
Version: 1.5.141-1build2
Priority: optional
Section: universe/admin
Source: mfgtools
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: DebianOnMobile Maintainers <debian-on-mobile-maintainers@alioth-lists.debian.net>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 554 kB
Depends: libbz2-1.0, libc6 (>= 2.38), libgcc-s1 (>= 3.3.1), libssl3t64 (>= 3.0.0), libstdc++6 (>= 13.1), libusb-1.0-0 (>= 2:1.0.22), libzstd1 (>= 1.5.5), zlib1g (>= 1:1.1.4)
Homepage: https://github.com/NXPmicro/mfgtools
Download-Size: 191 kB
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages
Description: Freescale/NXP I.MX Chip image deploy tools
 Universal update utility for I.MX CPUs. It can be used to e.g. burn uboot or a
 rootfs into the emmc.

~$ which uuu
/usr/local/bin/uuu

Thanks. Or just delete it, eh?

Yes, you can just delete it because, after all, if that is a mistake, you can reinstall that package. However I like to be cautious, particularly when “messing with” someone else’s computer. So probably what I would recommend is: mv followed by testing that uuu now works on that computer followed by rm.

After my successful reflash, I applied updates, then immediately imaged the eMMC. I’ll be able to boot that from the microSD card to restore the OS by connecting to my laptop (if I need a more-or-less default install).

In preparation for duplicating my former crimson setup, I had collected files, app lists, scripts, my DIY apps, and configurations from the old install, and copied them into a dedicated folder on my microSD card.

I’ve now placed those into the new system in the appropriate places, restored all the services and permissions, installed the extra applications I had before (- the ones I still wanted, that is -), adjusted settings, and applied new updates.

Everything’s nice and fresh now, so I imaged this crimson install with all my personalizations included, too.

Now I’m compressing both .img files and backing them up on my network.

I used this as a general checklist, and added in some additional items I wanted to restore.

[Edited slightly.]