Live booting an SD card

I want to put a live image on an SD card to boot my L5 to see if that fixes some of my issues. However, I cannot find a conclusive way to do this. Could someone explain to me how to do this as concisely as possible?
Edit: And possibly try Crimson as well

4 Likes

The Librem 5 wiki has instructions on booting from an SD card for your convenience. Beware that if you put the same image into eMMC and SD, you’ll end up with partitions with duplicated UUIDs, which may cause unexpected behavior during mounting.

The last stable Crimson build for the Librem 5 can be found here in landing: https://arm01.puri.sm/job/Images/job/Image%20Builds%20landing/lastStableBuild/. The librem5r4.img.xz file is the one you want.

I’ve not tried this with a Crimson image so take these instructions with a grain of salt.

Edit: The instructions should be done on a separate host computer (not on the Librem 5, though it can be done).

  1. Typically the image will be compressed in an archive file to reduce the download size (such as .gz or .xz). Extract the image from its archive file to get the file with the file extension .img.
    xz --decompress "$HOME/Downloads/librem5r4.img.xz
    
  2. Write the image to your microSD card using your preferred method, for example dd:
    sudo dd if=$HOME/Downloads/librem5r4.img of=/dev/<DEVICE> bs=1M status=progress conv=fsync
    
  3. During boot, hold volume down.
3 Likes

Additional comments:

  • I would carry out those instructions (in the previous post) on a host computer. However it is not impossible to do them on the Librem 5 itself.
  • If you don’t particularly need crimson (which may not be recommended for troubleshooting issues that you currently have) then you can just use the .img file that you could already have lying around on your host computer if you reflashed your Librem 5. Effectively then this is like going back to the pristine state immediately after you reflashed your Librem 5, but without actually reflashing it.
  • There is discussion elsewhere in the forum (untested) that if you change the UUID, you also have to change it in initramfs. The easiest approach may be just not to use the eMMC drive while you are booted from the µSD card - so that the UUIDs shouldn’t matter.
  • As always, shut down your Librem 5 before inserting or removing a µSD card.
  • Bear in mind that if you normally use the µSD card slot on the Librem 5 for some other purpose then you will temporarily be without whatever that relates to.
3 Likes

Crimson itself is not stable and may produce more issues than what you currently have.

If you still want to try it anyways, and assuming that the Jenkins API is not currently broken, I have provided instructions using librem5-flash-image below:

Crimson will probably not solve your GNOME Contacts calling issue, but I am confident reflashing Byzantium will.

1 Like

I want to try Byzantium first, Crimson is just out there as an option
I need to get to town and buy myself a micro SD card and then I will try it out.
Thanks all for your help and I may ask for more when I am actually ready :grin:

2 Likes

Are you suggesting to do it on the phone through the computer?
I don’t yet have a host computer. I may buy a USB stick and try live booting it at the same time and maybe do it from there.

1 Like

I personally would be preparing the µSD card on a host computer.

If you have no big computer that runs Linux and don’t feel like attempting to do it with a computer that normally runs Windows but instead on this occasion would be Live Booted into an appropriate Linux distro (e.g. Ubuntu or PureOS) … then you can do those commands on the Librem 5 (and that is the beauty of running Linux everywhere) … with the following constraints that I can think of:

  • You will be tying up over 8GB of the eMMC, at least temporarily, so you need that much free space + margin. (With more handstands, you can probably reduce that disk space requirement to over 4GB.)
  • If you are currently using the µSD card slot on the Librem 5 for some other purpose then you must first reconfigure in order to free up the slot (and of course shut down in order to remove the existing card).
3 Likes

So I am trying this and am coming up with this:

sudo dd if=$HOME/Downloads/librem5r4.img of=/media/ubuntu/4221-724F/ bs=1M status=progress conv=fsync
dd: failed to open '/media/ubuntu/4221-724F/': Is a directory

Edit:
Q: What am I doing wrong?
A: I had the wrong device ID.
The image is now writing slowly to the disk

1 Like

(I need detailed instructions on how to write the .img to my uSD card. I am completely new to these types of things. If I know the the commands a can do it, otherwise I am sunk.)

1 Like

So I tried booting it and all it does is turn the green led on and then just stays in the black phase.
What should I do?

1 Like

Use my instructions:

1 Like

But I don’t want to reflash, I just want to test out a new image :grimacing:

1 Like

Okay, well you may want to follow the instructions you were using earlier, but this time using the correct device ID instead.

1 Like

How big of an SD card do I need?
I have an 8GB card on hand and and 64 full of information in my L5.

1 Like

The uncompressed image is under 8 GB. I vaguely recall it being 6.7 GB.

1 Like

How would find my uboot version?
Edit: Never mind. I found it.

1 Like

So I updated uboot but cat /proc/cmdline still shows the old uboot version

1 Like

Did you reboot the Librem 5?

1 Like

multiple times

1 Like

Okay, to confirm, this is the process to update uboot:

  1. Download the .deb
  2. Install it
  3. Then execute this command:
sudo u-boot-install-librem5 /dev/mmcblk0
  1. Reboot the Librem 5
1 Like