Running PostmarketOS on My Librem 5

Last night I got PostmarketOS running Plasma Mobile Working on my Librem 5. I,ve always liked KDE’s more vibrant shiny icons, desktop backgrounds, and selection of many KDE apps. I’ve got a real Desktop again now, instead of only an app drawer. The polished, finished look makes it look and function much like my Samsung phone now. Unless I run in to some problems with it now (which I don’t anticipate), I can’t see a reason to ever go back to PureOS. And everything feels very solid and just works, no bugs and no patches needed.

Several other previous attempts at getting this working failed. The best I could get was an installation to the SD card that would not boot. The instructions on postmarketos.org website said that for most installations of postmarketos, the use of pmbootstrap weren’t needed. Then it gives instructions using a terminal window that don’t involve pmbootstrap and that don’t work. You will not only need pmbootstrap, but you’ll need an obscure, hard to find version of it. Version 3.10 wouldn’t work. Adding the python-3 tomli patch didn’t help either. I found a deb file on a bleeding-edge repository in Debian’s archives. I needed v3.4 or higher and found v3.5.2 on a website that I probably couldn’t find again now. The AI actually found it for me. Once you get pmbootsteap v3.4 or higher installed to your linux PC and verified, you’re on the right path.

There are about a dozen or so options when you specify to pmbootstrap what you want. I remember specifying the Librem 5 and Plasma Mobile, amongst several other choices. After building the image, you start the installation. I had an SD card waiting, plugged in via usb. I was all ready to select /dev/sdb at the appropriate time and knew that the pc could read the SD card because I had tested it. Pmbotstrap stayed hung-up on scanning for a USB device as I tried several times mounting and unmounting the SD card. The scanning for a usb device just kept going without discovering the SD card. So finally, I unplugged the SD card and plugged the Libem 5 in to the same usb port. Immediately, the scanning discovered the Librem 5 and started uploading to the eMMC. In retrospect, I am glad it worked out that way. I might install PureOS to an SD card later.

Up until now, I’ve always gone on to this forum using my older Samsung phone, because my Librem 5 always felt more like a science experiment than a daily driver. I am using my Librem 5 now though. I am pretty sure now that my Libem 5 is already my daily driver now with the apps I have opened and tested already.

9 Likes

This is simply incorrect. PostmarketOS provide number of pre-built images for the Librem5, simply download the image of your choice, decompress it and then write it to either the internal eMMC or uSD card if you prefer.

PostmarketOS provide 4 pre-built images of their current (v25.06) release, one for each ”Gnome Mobile”, “Phosh”, “Plasma Mobile” and “SXMO” desktop environments. They also provide images for the testing/development branch they call “Edge”, there they typically have the last 3 or so images for each of the four previously mention desktops.

Once you have the decompressed image you can dd it to either eMMC or uSD card either on the phone directly or through jumpdrive if using a PC, you also have the option of using the librem5-flash-image script which can be convenient if you have already installed.

There is also the option of flashing directly through uuu (with the appropriate commands).

pmbootstrap is only required if you want/need a custom image or there is no image available for your device. You also shouldn’t need some obscure, hard to find version, may be your system is not able to support more recent versions.

2 Likes

Exactly same here!! :handshake: @SteveR

Community 1 - Purism 0 for now

@carlosgonz using OpenRC instead of systemd + KDE highly personalising, the opposite of Gnome!

There are some bugs yet (eg: no shutdown, I’ve to force off hold-long button pressing, camera app doesn’t works at all,… but great impression!! No burning like PureOS, faster than PureOS, a lot of apps,.. I’m trying, finally, to use it as daily driver!

At the end, I’m considering to buy a second very basic Android smartphone with the minimum apps (bank, vacuum control,..) as my social/work phone with a new business number and L5 with all my data so privacy and security as personal phone with my personal number!

2 Likes

It,s not the image of postmarketos that had to be found and installed using obscure methods. It was the installation of pmbootstrap that was difficult to find and install. Maybe part of the issue had to do with the fact that I am using the most current installation of Kubuntu (25.04) on the PC and nut Ubuntu.

My original intent was to leave PureOS in-tact on the eMMC and to install PostmarketOS on to the SD card. You need pmbootstrap to prepare the SD card before you install PostmarketOS on to the SD card. Otherwise when you install postmarketos to the SD card and then attempt to boot in to it on the Librem 5, it,ll never boot. You get a boot screen showing the postmarketos logo and some bouncing balls. I left it booting that way when I fell asleep one night and in the morning it was still that way (in the boot screen). The instructions on the PostmarketOS website even says that you need to prepare the SD card using pmbootstrap. But I need to work with PM bootstrap more because the way I attempted to install to the SD card should have worked. But at the last step, pmbootstrap would only flash to the phone’s eMMC and never asked me where I wanted the image to be flashed to.

It might still be possible to flash the pre made image to the eMMC without using pmbootstrap. But the instructions on the PostmarketOS website wouldn’t work either when flashing to the SD card from the Librem 5, nor from my PC running Ubuntu 20.04. I tried all three methods in both places and got the same results (all bad). The common problem seemed to be that the dependencies were too old and couldn’t be upgraded. That’s when I decided to wipe my Ubuntu 20.04 PC and do a fresh install of Kubuntu 25.04 to it. I guessed that the KDE and plasma desktop found in Kubuntu for PC might be helpful with getting plasma mobile installed to the phone. But in retrospect, I don’t think that the Kubuntu was helpful and that an upgrade to a the latest version of Ubuntu would saved me some grief.

The recommended gitlab installation files referenced from the postmarketos website warned that they were not the correct versions for my operating system when I tried to install them. After that is when I found the obscure version of pmbootstrap in the form of a deb file and installed it using apt. After that’, everything started getting easier. Instead of crashes and warnings, things started to just work as they should work, for the most part. My guess (and I might be wrong on this), is that with the approaching release of Crimson, that the dependencies in the existing version of PureOS may not be staying current in Purism’s repos. So you need a later version of Python and pmbootstrap by switching to Kubuntu or better yet, to Ubuntu. I was relieved when the old Ubuntu 20.04 gave me the same errors and failures that I got on the Librem 5 as I knew that it wasn’t my failure to follow the instructions correctly that was the problem. The symlinks were set up differently in the older version of pmbootsreap, which seemed to break everything.

2 Likes

I went and double checked that nothing had change with PostmarketOS recently.

I have just now downloaded one of the pre-built images for Plasma Mobile for Librem5, decompressed it and flashed it to eMMC on Librem5, booted the phone and Plasma Mobile came up. I then, from Plasma Mobile, I downloaded one of the pre-built images for Gnome Mobile for the Librem5 while still in Plasma Mobile on the phone, I decompressed the Gnome Mobile image and dd’d the decompressed image to the uSD card (the uSD card was pre-formatted as exFAT, no preparation done), I then shutdown the phone then powered back up booting to the uSD card and Gnome Mobile came up.

So the claim that you must use pmbootstrap in order to get PostmarketOS loaded onto the phone remains incorrect.

2 Likes

I have been thinking about doing this for awhile. Thank you for sharing. I installed Postmarket OS on an older Chromebook Duet tablet. I like it quite a bit with Phosh. It just works. I might now have to try it on the Librem 5.

3 Likes

Thanks for doing all of that. I would rather be temporarily incorrect than to go through what I went through, every time I install a new image.

The biggest challenge seems to be that the PostmarketOS website has to give specific instructions to people with different phones that have different requirements. The Librem 5 area there didn’t seem to have everything that is needed.

can you please post links to the images and instructions that you used?

1 Like

For the purposes of testing I went with the stable release images, it’s not always the case but I find the bleeding edge releases of software is where things may not work as expected and more likely to run into issues. The URLs for the images I used are detailed in the rough guide below.

I didn’t reference any instructions, I work with image files quite often so just went in blindly poking at it with that previous experience of working disk images, it was reasonably painless.

I first flashed postmarketOS Plasma Mobile edition to the phone from PC, I’ve recreated the steps below. Note that it is assumed that uuu is installed on the PC, these steps also make use of the librem5-flash-image script again on the PC, while not strictly nesseccary, if you don’t have the required uuu command set and a copy of uboot knocking around on your system, librem5-flash-image is a conveient way of getting those files, far easier than the manual generation method is to document.

Flashing postmarketOS (Plasma Mobile) from PC to Librem5

From a terminal on the pc…

Create a working direcotry and cd into it

mkdir -p ~/Downloads/pmos-v25.06-plasma
cd ~/Downloads/pmos-v25.06-plasma 

Download the image, I would normally suggest wget for this as it’s more likely to be available on the PC but I’m currently on macOS and wget is not available so I’m using curl, if curl is not available on your PC substitute the next step with wget <URL>

curl --progress-bar -OJ https://images.postmarketos.org/bpo/v25.06/purism-librem5/plasma-mobile/20250919-0754/20250919-0754-postmarketOS-v25.06-plasma-mobile-5-purism-librem5.img.xz

Decompress the image

unxz 20250919-0754-postmarketOS-v25.06-plasma-mobile-5-purism-librem5.img.xz

Use librem5-flash-image to generate the uuu command set and download the latest available version of uboot, the script will also create a link to the image to be flashed. As mentioned previously, if you have these files already you can skip this step but you will want to make sure you link to the image file or ensure that the command set (.lst file) references the correct image file

librem5-flash-image --dir . --skip-flash --skip-cleanup --image 20250919-0754-postmarketOS-v25.06-plasma-mobile-5-purism-librem5.img

Flash the image to the Librem5 phone, you could probably combine this with the previous command, however I have split into a two step process because I’m on macOS and have yet to investigate if I can configure the system to allow standard users to write to this type of USB device, until then uuu requires elevated privilages and I like to limit the use of sudo to only when absolutely nesseccary so librem5-flash-image runs as a standard user and only uuu runs with elevated privileges. It is assumed here that you have connect the phone to the PC via USB and have put the phone into download mode, uuu does not provide any instructions for this on it’s output, if your phone is not in download mode uuu will just sit with a message that it’s waiting for a known device to show up.

uuu flash_librem5r4.lst

After uuu completes, your phone should automatically reboot into postmarketOS.

Flashing postmarketOS (Gnome Mobile) to uSD card in phone from postmarketOS (Plasma Mobile) on phone

From a terminal on the phone…

Create a working directory and cd into it

mkdir ~/Downloads/pmos-v25.06-gnome
cd ~/Downloads/pmos-v25.06-gnome/

Download the image

wget https://images.postmarketos.org/bpo/v25.06/purism-librem5/gnome-mobile/20250919-0751/20250919-0751-postmarketOS-v25.06-gnome-mobile-4-purism-librem5.img.xz

Write image to uSD card (this will take a good few minutes, no output is generated while this process is running)

xzcat 20250919-0751-postmarketOS-v25.06-gnome-mobile-4-purism-librem5.img.xz | sudo dd of=/dev/sda bs=64M

Reboot the phone into uSD card. It did take me a few attempts to get this step done, this particular phone has never been easy to get it to boot from uSD and knowing nothing about how postmarketOS works just adds to the challenge. Anyway, after a few attempts of various key combos and sequences I ended up at a postmerketOS debug console which instructed me to enter pmos_continue_boot to continue to boot normally. After entering the command, the phone continued to boot into postmarketOS Gnome Mobile from the uSD card. I am able to switch between the install on eMMC (by just powering up the phone normally) and the install on the uSD (via the debug console), I feel there must be a more elegant way of switching to the uSD card install but as I don’t intend to keep postmarketOS on the phone I didn’t investigate any further, I also suspect that much of it may be down to my phone and it’s general stubourness to boot from uSD in general.

7 Likes

I was under the impression that if you want FDE, you must use pmbootstrap to build build your own image. Is that not true any more?

Looks like they have a webUSB flashing option using chromium browsers - not for Librem 5 though.

1 Like

For FDE, pmbootstrap is probably the easiest route, assuming you don’t run into the same or similar issues as @SteveR describes.

However, it’s not too difficult to convert a plain install to FDE and pmbootstrap is not required to do so.

3 Likes

@Loki, Can you share some details on flashing from mac? Are you using an intel or apple silicon mac? I think this reflashing guide is the official guide but it is only for linux, is there a guide for mac?

1 Like

Can’t get a boot from uSD here. u_boot_version=2019.04-g17a6c2261c

Is that too old to boot from the card?

1 Like

Yes, you need a version that starts with 2022.10, rather than looking for some specific version I would just use the most recent.

1 Like

Everything I’m using is build from source, documenting that process is far outwith the scope of a forum post. Additionally, if all you want/need to do is flash the Librem 5, building everything from source would be quite an endevour and way too much for just this one task. There are however, easier and more conveient approaches.

The screenshot above was taken from a Macbook Pro M2 Max, however, Intel or Apple Silicon based, it makes no difference, the flashing scripts/tools can be run from macOS on either architecture.

For Intel based machines there is (probably) the added option of booting a Linux based live image to get the job done. I can’t say for certain that all Intel based Macs can boot Linux live images but I have a number of Macbook Pros and iMacs of the 2015-2018 era, all of which can boot the current Debian (Debain 13) live images, they have a few niggles but nothing that would affect the flashing process.

The guide you linked to I think is the official guide, it certainly forms part of the Librem 5 documentation hosted by Purism, I don’t think it’s of much use other than general reference. I’m not aware of any guide specific to macOS. Forget what the official guides says regarding requirements, there really is only two (apart from the obvious librem5-flash-image script), the script is a Python script, so you need a Python interpreter, the only other requirement is the uuu utility which handles the actual flashing to the Librem 5.

For both Intel and Apple Silicon based machines there are a few options…

(What I think is) The easiest option, Install Command Line Tools for Xcode which includes, among other things, a suitable Python interprter (and also git), then install Homebrew which is a popular third-party package manager that enables you to install a pre-built binary of uuu then you just need the librem5-flash-image script and it’s Python dependencies and you’re good to go. I’m over simplifying this a little, but not much, I could probably throw together a rough guide for this option.

Another option is to use virtulisation (a virtual machine) running an Arm64 based Linux distro, this is helpful if you need/want to do additional tasks, for example if you want to modify the image before flashing, macOS knows nothing of Linux file systems. I’ve only used QEMU on macOS so can’t comment on how possible it is under any other vitrual machine than QEMU. UTM is a popular choice and provides a graphical front end for QEMU on Mac but unfortunately it doesn’t work for flashing the phone, UTM handles USB redirection diffently from native QEMU, I spent a little time previously trying to disable the default handling of USB redirection and configure a more QEMU standard way of redirection but couldn’t get it to work so for the moment I’m saying it doesn’t appear possible to flash the phone with UTM, I haven’t tried it myself but I suspect UTM may be useable for other tasks outside of flashing (like modifying the image pre flash or connecting via the phones USB serial or ethernet interfaces). QEMU itself is a little picky about it and requires that you pass through the entire USB bus rather than just the Vendor ID (VID) and Product IDs (PID) of the USB devices (the Librem 5 presents itself with two different VID&PIDs during the flashing process). This option is a little bit more involved, I’m not aware of any pre-built binaries for macOS outside of the package managers and if you’re having to install package managers you may as well go with the first option.

The third option is building everything from source which as mentioned previously, it’s a bit much if your only goal is to flash the Librem 5 from macOS.

1 Like

I’ve downloaded the most recent, but I can’t find a comprehensive procedure to flash it to the phone on the forum. Would you know of a post or link? I asked Perplexity for a step-by-step, and of course it produced one, but I’m not 98% confident that I can vet it.

1 Like

I don’t know of any post, link or guide. What have you downloaded?

It’s been a while since I’ve used it, I assume it’s still the same process, you should have downloaded a u-boot-librem5_2022.10-librem5.1_arm64.deb file containg u-boot and the utility to install it, you need to install the .deb file. From a terminal in the same directory as the .deb file enter…

sudo apt-get install ./u-boot-librem5_2022.10-librem5.1_arm64.deb

then from a terminal, enter…

sudo u-boot-install-librem5 /dev/mmcblk0

Edited to correct .deb package file name.

1 Like

Hmmm… I downloaded this:

https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/lastSuccessfulBuild/artifact/output/uboot-librem5/u-boot-librem5.imx

…and installed uuu from the Linux Mint repository because the procedure I found used uuu to flash from another computer over USB. I assume the IMX is some sort of image (compressed?); Perplexity was referring to a script to flash it. I would prefer do do the whole thing interactively from the command line from the phone, which is what it looks like you did. Where did you download the .deb? I’m scouring the Purism repository, but not finding it. Shouldn’t I be able to just “sudo apt install librem5_2022.10-librem5.1_arm64.deb” from the phone?

Once I have the most recent PureOS Crimson on uSD and will also download the lastest PMOS to test from uSD boot. My old PinePhone boots PMOS from eMMC and Mobian from uSD, so I’m looking forward to trying the latest PMOS.

1 Like

You can download the required u-boot-librem5_2022.10-librem5.1_arm64.deb file from the page at the following link…

https://source.puri.sm/Librem5/uboot-imx/-/jobs/460422/artifacts/browse/debian/output/

Job 460422, is the latest as can be seen from the “jobs” page.

Nope, that .deb file is not in the repositories.

2 Likes

In an ideal world, this process would be simpler, yes.

apt has some quirks. In brief you have two choices:

  • install a package by package name
  • install a .deb file

For the former to work, the package has to be in the repos. (Don’t know why it isn’t.)

To distinguish between those two choices, a .deb file requires some kind of pathname, hence the seemingly redundant ./

For what it’s worth, when you reflash the phone it does also update uboot but I understand that that is not an option if all you want to do is update uboot but without the hassle of completely re-establishing the contents of your phone.

If you are really really keen, you can presumably, on a host computer, download a .imx file and then, with the phone in serial download mode, directly flash just that file using uuu but I would recommend against that unless you are fully prepared to reflash your phone if things go pear-shaped. :slight_smile: I am pretty sure that there is no documented procedure for doing it this way.

2 Likes

I saw that it would flash both uboot and a new OS image from the script, or just one or the other if you gamed it, but for testing new PureOS versions and other OSes on SD card, I’m happier just installing uboot from .deb.

Just downloaded the uboot .deb, so off I go to install. I already have Crimson on SD, so that’s first. After, I’ll try Mobian and PMOS… and maybe one or two others. The winner, if it is more useful than Byzantium as a daily driver, gets flashed to eMMC.

1 Like