Installation

This document guides the user how to install mobian on their phone (currently only Pinephone).

Obtain the image

You can download pre-built images from this link (recommended). In this case, the image file is named “mobian-pinephone-YYYYMMDD.img.gz”. Once you have obtained an image, you can flash it to a SD-card or to internal eMMC storage.

Note: If you decide to use bmaptool, you don't have to download the image manually (see below).

Note2: If you built the image yourself using debos recipes, the image file will be named “mobian-pinephone-YYYYMMDD.img” and there is no need to unzip it.

Flash the image

In order to flash the Mobian image, you need to identify the device attached to target. On the pinephone, it is /dev/mmcblk0 (for SD) or /dev/mmcblk2 (for eMMC, its size should be around 16GB or 32GB) 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 below steps on how to flash to emmc or see these pine64 wiki instructions for more ways on how to access emmc of the pinephone. To flash a SD card, simply use a computer of your choice.

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.

  1. Download the Jumpdrive image and flash the Jumpdrive image to a micro SD card
  2. Boot the PinePhone from the Jumpdrive micro SD card
  3. Connect the PinePhone to your computer using a USB cable
  4. The sdcard and the emmc will become available as block devices on your computer (in the form of /dev/sdX block devices).
  5. Flash the exposed (mounted) PinePhone drive with the Mobian image using one of the methods below.
  6. Disconnect the PinePhone from your computer and remove the Jumpdrive SD card
  7. Power in the PinePhone and boot Mobian from eMMC.

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/pinephone/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/pinephone/nightly/mobian-pinephone-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-pinephone-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-pinephone-YYYYMMDD.img.gz    
gzip -d mobian-pinephone-YYYYMMDD.img.gz

Then flash with the following command:

sudo dd bs=64k if=mobian-pinephone-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 with password: 1234. It is also used as PIN on the unlock screen. You should change it using the command:

passwd

and remember that you can currently only input numbers when authenticating. Also, if install the openssh-server you need to protect your ssh logins if you want to remain safe.

You can read about changing the default username here.

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. Depending on card sizes and file system type, this can take a while and will only happen on first boot. So grab a ${DRINK_OF_CHOICE} and be patient.

Accessing the SDcard

The sd card will be automatically mounted on demand, using the path /media/sdcard. There is no need to change fstab or anything else.