New Post: Reflashing the Librem 5

I hope that the final re-installation process for Evergreen is easy. I learned years ago that I can never learn much about installing and configuring software until after I can own the OS installation process also. If you live in fear of damaging the OS, you never learn much. All of your effort goes in to preserving the OS when you should be breaking many things many times over (including the OS) and re-installing the OS many times until you eventually know everything and can do what you need to do without breaking anything.

1 Like

Battery in or out?

Battery was in.

I don’t know. Maybe the documentation isn’t quite right. I think the main thing is that on the host if you do lsusb then the Librem 5 shows up as

Bus 999 Device 999: ID 1fc9:012b NXP Semiconductors i.MX 8M Dual/8M QuadLite/8M Quad Serial Downloader

where obviously the bus number and device number will be different on your host computer and obviously I am assuming that the host computer is running Linux.

Yup, there’s no other kind of feedback expected until uuu actually starts to boot u-boot over USB, at which point the green LED shines up (and the vibration motor does a short pulse with recent u-boots).

The red LED may shine up as well, but that’s completely unrelated to the flashing mode (it’s handled by the charging controller), and may not shine up for several reasons (for instance, when the battery is full).

1 Like

I run Pop!_OS 22.10 linux distro and had similar problem like @librem5user , tough with the image itself.
I don’t think git clone https://source.puri.sm/Librem5/librem5-devkit-tools.git does nowadays the trick.
Folllowing this: manual https://developer.puri.sm/Librem5/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.html
my sequence was:

  1. git clone https://source.puri.sm/Librem5/librem5-flash-image.git
  2. cd librem5-flash-image
  3. sudo apt install uuu
  4. sudo apt build-dep .
  5. sudo ./scripts/librem5-flash-image --udev
  6. ./scripts/librem5-flash-image
  7. then handling the phone, battery, and cable like in the video.

other than that, it worked like a charm. hope this helps, if someone else get’s stuck.
best, fagus

3 Likes

@david.hamner, thank you for the original post and video!

1 Like

This post need an update because git clone https://source.puri.sm/Librem5/librem5-devkit-tools.git does not contain the Burner script librem5-flash-image anymore so this script was moved to https://source.puri.sm/Librem5/librem5-flash-image.git or installing directly it on PureOS
sudo apt install librem5-flash-image uuu python3-jenkins python3-tqdm

udev rules: sudo librem5-flash-image --udev

librem5-flash-image --dist byzantium --variant luks

1 Like

Yes, this is my very first step (just right before I would be up to re-flash …):

$ git clone https://source.puri.sm/Librem5/librem5-flash-image.git

Next one (up to the method I use) for me would be:

cd librem5-flash-image

@carlosgonz, yesterday, after: uuu -lsusb, I typed following:

# ./scripts/librem5r4-flash-image --variant plain --dir /home/user-name/Documents/Build_11XXX/Download --skip-cleanup --skip-flash

And now can confirm that sudo uuu flash_librem5r4.lst method of flashing Librem 5 worked for me (actually on my phone) flawlessly: External battery charger for Librem5.

1 Like

Yeah there are many way to Rescue, can you share you emmc partition like the pics above?
I still confused what is the right luks resize need to looks like i know that @guido.gunther he did it some code to get automatic resize luks partitions on flash or after boot with uuu_scripts but i not sure how perform/apply this step or other easy. I will thankful to Guido if will help here.

Well … not quite sure. And I’m hoping I got this correctly: when flashing process comes to its end and you disconnects your Librem 5 from USB-C cable that is connected to your computer its (Librem 5) LED light shines constant green (before holding power button or taking its battery out)? And please do not dismiss method I proposed here completely (while less questions might arise/popup).

Secondly: battery load capacity is important (70% might be good starting state). Perhaps next time you would like to connect your Linux phone to power supply in order to expand related partition (as developers made into that feature) correctly/internally .

1 Like

So you resized partitions manually or was automatic with new install?

1 Like

Yes, expansion of the related partition, actually of the /home partition should happen automatically. Two main things I’m looking for are: not to disconnect used USB-C cable right away (give some minutes extra for writing data to eMMC) and while I’m not really sure of current battery capacity, I’m powering my Librem 5, after fresh install/flash, by connecting it to USB-DCP (BC1.2) power supply. Just please try provided method :pray:, or in other terms: re-flash your Linux phone again.

:worried: automatic partitions not happed to me.

I not sure if this it TRUE, if TRUE how many minutes.

Yes the Android phone and some Microwave it is Linux too. :joy:

1 Like

Up to 3 minutes for the USB2.0 high quality cable or up to 5 minutes for the ordinary USB3.0 cable (if it works well at all). Please do not take my advice here very seriously, but some.

Well i can leave it for 5 or 10 minutes after install, just to get out of doubt. But I doubt it.
What revision it is your L5? because revision 1.0.6.1 it already resized.

1 Like

It is about luks librem5r4 byzantium image and not abot hardware, I’m qute sure. Latest one without expanding issues would be Build #11619 (Jul 3, 2022 7:47:46 PM), just as an example here.

I wish I have one. It is just well functioning and probably older version of Evergreen.

Mmm maybe my install do not get resized because i used old flags like –dist byzantium --variant luks --variant plain it working pehaps… :woozy_face:

1 Like

You can resizze from the booted phone: https://source.puri.sm/Librem5/image-builder/-/issues/63#note_149941

3 Likes

Thank you Guido it worked fine!

As root

1 Like