Reflashing the Librem 5, Up-to-Date Tutorial

This was one of my very first posts on the Purism community forums, and has lost its ability to edit a long time ago. Maybe the post edit window could be extended to a more generous duration or changed to indefinite.

The instructions have been unofficially disseminated since:

Not by me it can’t. I don’t have that level of administrative access. I would recommend just making an updated post in that topic.

1 Like

None of this worked for me!


Looking for librem5r4 luks byzantium image
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 462, in get_job_info
    response = self.jenkins_open(requests.Request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 564, in jenkins_open
    return self.jenkins_request(req, add_crumb, resolve_auth).text
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 580, in jenkins_request
    self.maybe_add_crumb(req)
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 369, in maybe_add_crumb
    response = self.jenkins_open(requests.Request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 564, in jenkins_open
    return self.jenkins_request(req, add_crumb, resolve_auth).text
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 583, in jenkins_request
    self._request(req))
    ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 557, in _request
    return self._session.send(r, **_settings)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 483, in send
    timeout = TimeoutSauce(connect=timeout, read=timeout)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/timeout.py", line 119, in __init__
    self._connect = self._validate_timeout(connect, "connect")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/urllib3/util/timeout.py", line 156, in _validate_timeout
    raise ValueError(
ValueError: Timeout value connect was <object object at 0x7c18af9444d0>, but it must be an int, float or None.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/librem5-flash-image/./scripts/librem5-flash-image", line 538, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/user/librem5-flash-image/./scripts/librem5-flash-image", line 464, in main
    image_ref = find_image(args.image_job, board, args.variant, args.dist, args.stable)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/librem5-flash-image/./scripts/librem5-flash-image", line 275, in find_image
    return find_image_jenkins(jobname, board, variant, dist)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/librem5-flash-image/./scripts/librem5-flash-image", line 224, in find_image_jenkins
    info = server.get_job_info(jobname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/jenkins/__init__.py", line 475, in get_job_info
    raise JenkinsException(
jenkins.JenkinsException: Could not parse JSON info for job[Images/Image Build]

If I use --stable it’s the same only preceded by:

Found disk image Build “stable” ‘Last stable librem5r4 build’ from Fri Jun 23 22:21:4
0 2023

before the output listed above. Even --skip-download and pointing to the home directory for manually installing the librem5r4.img alongside u-boot-librem5.imx and STILL yields the same results.

To note I am using Ubuntu but have also tried the suggested PureOS live USB option after much unrelated trouble getting balena-etcher to work only to find out there are no Wi-Fi drivers (not referenced in the suggested instructions) so that option is out the window (if it even makes a difference) unless I can figure out how to download/install drivers.

1 Like

What version?

I use Ubuntu and I have successfully reflashed my phone. At this exact moment I have Ubuntu 22.04 LTS but it is badgering me for the official upgrade jump to 24.04 LTS as of the last few days.

1 Like

Ubuntu Studio 24.04.1 LTS

2 Likes

Use Debian 12 ‘Bookworm’ instead on a USB drive and let us know if it makes any difference.

1 Like

Thank you! I had the ISO downloaded anticipating I could give it a go. I re-imaged the USB drive and it worked without a hitch!! I would note that in addition to the python3-jenkins and python3-tqdm uuu will also need to ensure python3-yaml is installed as well for anyone who needs to do the same.

Feels great to finally have my Librem 5 up and running again!

4 Likes