DebianOn is an effort to document how to install, configure and use Debian on some specific hardware. Therefore potential buyers would know if that hardware is supported and owners would know how get the best out of that hardware.

The purpose is not to duplicate the Debian Official Documentation, but to document how to install Debian on some specific hardware.

If you need help to get Debian running on your hardware, please have a look at our user support channels where you may find specific channels (mailing list, IRC channel) dedicated to certain types of hardware.

Support

If something isn't working for you, you can get in contact with Mobian developers and the Mobian community in various ways. All of them are listed here.

Installation

This document guides the user how to install Mobian on their !Librem5, an open source smartphone designed by Purism to run Linux distributions.

Obtain the image

Pre-built Mobian images for the Librem 5 can be downloaded from this link. Installer images are available here.

Verifying the images

Mobian images come with multiple files:

To verify the download, use the following steps:

  1. Import the Mobian signing key from here. Once downloaded, check the key's sha256sum - as of 30 June 2022, sha256sum mobian.gpg should give 4ab90ff82a88f11f681e5e857503833eb2108c9a77edaa9f64b7648c1b91c60a  mobian.gpg .

  2. Verify the signature of the .sha256sums file with gpg --verify <downloaded file>.sha256sums.sig, where <downloaded file> is the name without extensions such as .img.gz or .img.xz

  3. If the signature is valid, check the other files with shasum -c <downloaded file>.sha256sums

  4. If this prints OK for all files, then the download is verified.

Flash the image

In order to flash the Mobian image, you need to identify the device attached to target. You can also use device names by-id for increased safety, e.g. /dev/disk/by-id/mmc-SU16G_0x1d6654fd. Be careful not to write to the wrong device! Replace the "X" in /dev/mmcblkX or /dev/sdX or use /dev/disk/by-id/.

Follow the steps below on how to flash to eMMC. To flash an SD card, use another computer and bmaptool or dd, as below, checking and double-checking the device name /dev/XXXXXX very carefully before hitting <enter>.

Be advised that the first boot will take longer due to the automatic resizing of the filesystem.

Installation to eMMC

You can install the image to eMMC by using JumpDrive or by flashing the installer image to an SD card which will then provide the option to install to eMMC.

To use JumpDrive:

SUBSYSTEM!="usb", GOTO="librem5_devkit_rules_end"
# Devkit USB flash
ATTR{idVendor}=="1fc9", ATTR{idProduct}=="012b", GROUP+="plugdev", TAG+="uaccess"
ATTR{idVendor}=="0525", ATTR{idProduct}=="a4a5", GROUP+="plugdev", TAG+="uaccess"
ATTR{idVendor}=="0525", ATTR{idProduct}=="b4a4", GROUP+="plugdev", TAG+="uaccess"
ATTR{idVendor}=="316d", ATTR{idProduct}=="4c05", GROUP+="plugdev", TAG+="uaccess"
LABEL="librem5_devkit_rules_end"

Method 1a: bmaptool using an URL

bmaptool is a comfortable means to flash your image. It handles sparse files, so it can be considerably faster than plain dd. It also handles both .bmap and .gz files and can dowload them directly from an URL. Execute

sudo bmaptool copy https://images.mobian-project.org/librem5/CHANGEME $BLOCKDEVICE

with $BLOCKDEVICE the blockdevice to flash, e.g. /dev/mmcblkX, /dev/sdX [in the case of jumpdrive], or /dev/disk/by-id/XXXXXX).

Example:

sudo bmaptool copy https://images.mobian-project.org/librem5/nightly/mobian-librem5-20200517.img.gz /dev/disk/by-id/mmc-SU16G_0x1d6654fd

Method 1b: bmaptool with a local image file

You can also use bmaptool to flash a local image. As it handles sparse files, it can flash considerably faster than plain dd

sudo bmaptool copy $IMAGE $BLOCKDEVICE

with $IMAGE, the path to the compressed or uncompressed image file and $BLOCKDEVICE the blockdevice (/dev/mmcblkX or /dev/sdX - if you are using jumpdrive - or /dev/disk/by-id/).

Example:

sudo bmaptool copy mobian-librem5-20200801.img.gz /dev/disk/by-id/mmc-SU16G_0x1d6654fd

Method 3: dd

To use dd, you need to unzip the image using one of the following commands:

gunzip mobian-librem5-YYYYMMDD.img.gz
gzip -d mobian-librem5-YYYYMMDD.img.gz

Then flash with the following command:

sudo dd bs=64k if=mobian-librem5-YYYYMMDD.img of=/dev/mmcblkX status=progress

(the status= option will display some progress while flashing, dd is awfully silent otherwise)

Default pin and password

The default user is mobian and has the password: 1234. It is also used as PIN on the unlock screen.

The root-user is locked by default.

You should change the user password with

passwd

once you have terminal access. If you want to access your phone via ssh (recommended), you need to set it up, check that it works with a password, and then set up key access to remove password access from the ssh service.

Automatic resizing of your filesystem on first boot

After flashing the image and booting for the first time, Mobian will resize the root filesystem to take all possible space on the disk. This can take a while and will only happen on first boot. So grab a ${DRINK_OF_CHOICE} and be patient.

Updating the kernel for Wifi/Bluetooth Drivers

If flashing Bookworm, you may need to update the kernel to 6.1 in order to retrieve the Wifi/Bluetooth card drivers. This can be accomplished by tethering the Librem 5 to another device such as a laptop or desktop machine. The following steps are a rough outline of how to tether and upgrade the kernel:

  1. Connect the Librem 5 to another machine via USB-C cable.
  2. Select Automatic DHCP configuration for the network via: Settings->Network->Wired->Wired Settings (Cog/Gear icon)->IPv4->IPv4 Method-> Automatic

  3. On the other machine there should appear a Wired Connection, Under the settings Network->{Wired Connection}->IPv4->Method->Shared to other computers, this will share your connection with any connected machines

  4. On the Librem 5, open Console and run sudo apt update && sudo apt upgrade to install the latest kernel. After successful upgrade the networking wifi/bluetooth card should be available.