meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
install [2021/05/16 19:30]
vazhnov Move upper the warning about dd
install [2021/05/16 22:55] (current)
a-wai Split out detailed guide to per-device page
Line 1: Line 1:
-~~TOC 2~~+~~TOC~~
 ===== Installing Mobian ===== ===== Installing Mobian =====
-This guide covers installing ​Mobian ​on the PinePhone, Librem5, or PineTab by flashing an image to an SD card or the device'​s eMMC. See the [[devices]] ​page for the full list of supported devices.+Mobian ​supports a growing range of [[devices]], with installation procedures varying depending on the operating system they were originally meant to runFollow the link corresponding to your device for detailed installation guides:
  
-==== Obtain the Image ====+  * [[install-linux|Linux-first devices]] (PinePhone, PineTab, Librem 5) 
 +  * [[install-android|Android devices]] (OnePlus 6/6T, Pocophone F1) 
 +  * [[install-x86|x86-based devices]] (PC, Surface Pro/Go)
  
-You can choose between downloading an installer or pre-built image or compiling the image yourself. +===== Post-installation ===== 
- +==== Default pin and password ​====
-=== Installer Images (Alpha) ​==+
- +
-In order to flash with full disk encryption (FDE), use the installer images here: +
-  * [[https://​images.mobian-project.org/​pinephone/​installer/​|PinePhone Installer]] +
-  * [[https://​images.mobian-project.org/​pinetab/​installer/​|PineTab Installer]] +
- +
-To use these installer images, flash them to the device using the steps below, boot and follow the on screen prompts. +
- +
-=== Pre-built Images === +
-We recommend downloading pre-built images for installation. The image file for your device will be named "​mobian-<​device>​-phosh-YYYYMMDD.img.gz"​ and can be found here: +
-  * [[http://​images.mobian-project.org/​pinephone/​|PinePhone]] +
-  * [[https://​images.mobian-project.org/​pinetab/​|Pinetab]] +
-  * [[https://​images.mobian-project.org/​librem5/​nightly/​|Librem 5]] +
- +
-The directory contains the latest image that we consider stable, after upgrading it will be quite the same as a nightly image (though "​*terms and conditions apply" (//what does this mean?//)). If no image exists in the directory, see the Nightly folder for nightly builds. +
- +
-=== Building from Debos Recipes ​==+
-You can build the image yourself using the [[https://​gitlab.com/​mobian1/​mobian-recipes/​|debos recipes]]. If you build the image yourself, the produced image file will be not be zipped (i.e. named "​mobian-<​device>​-phosh-YYYYMMDD.img"​) and there is no need to unzip the archive. +
- +
-==== Mounting the Target Storage Device ==== +
-=== Option 1: Mounting an SD card === +
- +
-To mount an SD card, simply insert the SD card into a computer of your choice. Use ''​lsblk''​ to find the name of the sd card, which should be something like "​sdb"​ or "​sdc"​. +
- +
-Be advised that the first boot of Mobian from the SD card will take longer due to the [[install#​automatic-resizing-of-your-filesystem-on-first-boot|automatic resizing]] of the filesystem. (//is this true just for SD cards or for all installs?//​) +
- +
-=== Option 2: Mounting the target device'​s eMMC using JumpDrive === +
-You can install the image to eMMC using the latest release of [[https://​github.com/​dreemurrs-embedded/​Jumpdrive/​releases/​|JumpDrive]]. For additional ways to access the device'​s eMMC, see[[https://​wiki.pine64.org/​index.php/​PinePhone_Installation_Instructions#​Installation_to_eMMC_.28Optional.29|these pine64 wiki instructions]]. +
- +
-You can either access your device through USB from a laptop and flash from there (recommended) or put the image file on the JumpDrive sdcard, log into the JumpDrive shell (using telnet) and flash from there (more difficult). If using the latter procedure, logging into the JumpDrive shell through telnet, the device should be exposed as /​dev/​mmcblk0 (for the JumpDrive SD card) or /​dev/​mmcblk2 (for eMMC, its size should be around 16GB or 32GB). +
- +
-If using the former (recommended) method of directly accessing your device from a computer, the device will be exposed as /dev/sdX devices. For instance, on my computer it assigned /dev/sdb1 to device'​​s eMMC/boot partition, /dev/sdb2 to eMMC/rootfs and /dev/sdc1 to the SD card (JumpDrive itself) (/dev/sda was already used for the laptop'​s own disk). In this case you would want to flash to /dev/sdb. Your naming can differ!)  +
- +
-These are the steps to follow: +
- +
-  - Download the JumpDrive image and flash the JumpDrive image to a micro SD card from your computer. (using ''​dd''​ a graphical app like [[https://​www.balena.io/​etcher|balenda etcher]],​...) +
-  - Boot the device from the JumpDrive micro SD card. +
-  - Connect the device to your computer using a USB cable. +
-  - The sdcard and the eMMC will become available as block devices on your computer (in the form of /dev/sdX block devices). +
- +
-==== Flashing the Image to the Target Storage Device === +
-**Be careful not to write to the wrong device! Identifying the right flashing target is the most difficult step and should be done with care, as you can easily wipe out the wrong disk by accident. You can also use device names by-id for increased safety, e.g. /​dev/​disk/​by-id/​mmc-SU16G_0x1d6654fd.** +
- +
-=== Method 1: A graphical flashing app === +
-You can use any graphical app to burn/​flash/​etch the images to your target. For example, a popular app is [[https://​www.balena.io/​etcher|balenaetcher]]. +
- +
-Select the downloaded image, then select the target storage device, and flash. +
- +
-=== Method 2a: bmaptool using an URL === +
-For faster flashing, [[https://​github.com/​intel/​bmap-tools|bmaptool]] is a comfortable means to flash your image (available in Debian as package ''​bmap-tools''​). ​ It handles sparse files, so it can be considerably faster than plain ''​dd''​. It also handles both .bmap and .gz files and can download 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 2b: bmaptool with a local image file === +
- +
-You can also use [[https://​github.com/​intel/​bmap-tools|bmaptool]] to flash a local image. As it handles sparse files, it can flash considerably faster than plain ''​dd''​. Be sure to also download the matching .bmap file for the image ("​mobian-<​device>​-phosh-YYYYMMDD.img.**bmap**"​). +
- +
-  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 === +
- +
-**Be very careful not to write to the wrong device! ''​dd''​ has earned the nickname "disk destroyer"​ for a reason! You can easily wipe out data on the wrong disk by picking the wrong device!** +
- +
-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/​TARGETSTORAGEDEVICE status=progress +
- +
-where ''​TARGETSTORAGEDEVICE''​ is the name of the target storage device (e.g. "​mmcblk0"​ or "​sdb"​). +
- +
-//Note: (the status= option will display some progress while flashing, as dd is awfully silent otherwise)//​ +
- +
-==== Post-installation ==== +
-=== JumpDrive === +
-If you flashed the image directly to the device'​s eMMC with JumpDrive, disconnect the PinePhone from your computer, turn off the device, and remove the JumpDrive SD card. Then, power up the device to boot Mobian from eMMC. +
- +
-=== Default pin and password ===+
  
 The default user is **mobian** with password: **1234** in the image. User ''​root''​ has a disabled login and cannot be logged in directly as by default (use ''​sudo -i ''​to become root). mobian'​s password is also used as PIN on the unlock screen. You should change it by opening the King's Cross terminal and using the command: The default user is **mobian** with password: **1234** in the image. User ''​root''​ has a disabled login and cannot be logged in directly as by default (use ''​sudo -i ''​to become root). mobian'​s password is also used as PIN on the unlock screen. You should change it by opening the King's Cross terminal and using the command:
Line 104: Line 16:
 and **remember that you can currently only input numbers on the lockscreen**,​ so choose your password wisely. ​ and **remember that you can currently only input numbers on the lockscreen**,​ so choose your password wisely. ​
  
-=== Automatic Resizing of the Filesystem on First Boot ===+==== Automatic Resizing of the 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. The screen may go to low power mode; you can rock the volume buttons to see the console output. 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. The screen may go to low power mode; you can rock the volume buttons to see the console output.
  
-=== Accessing the SD card ===+==== Accessing the SD card ====
  
 The SD card will be automatically mounted on demand, using the path /​media/​sdcard. There is no need to change fstab or anything else. The SD card will be automatically mounted on demand, using the path /​media/​sdcard. There is no need to change fstab or anything else.
  
-=== Connecting to Mobian ===+==== Connecting to Mobian ​====
  
 There are a few ways to connect to Mobian from another computer. To begin, install SSH server by opening up King's Cross from the main menu and install the SSH server by entering this into the terminal: ''​sudo apt install openssh-server''​. You should [[tweaks#​using-ssh-with-a-key-instead-of-password|protect]] your ssh server to not allow logins via the numeric password if you want to remain safe.  There are a few ways to connect to Mobian from another computer. To begin, install SSH server by opening up King's Cross from the main menu and install the SSH server by entering this into the terminal: ''​sudo apt install openssh-server''​. You should [[tweaks#​using-ssh-with-a-key-instead-of-password|protect]] your ssh server to not allow logins via the numeric password if you want to remain safe. 
  
 Next, you can [[howto:​networking#​connecting-to-the-mobian-device|connect to your Mobian device]] through an USB connection, or through a WiFi connection. Next, you can [[howto:​networking#​connecting-to-the-mobian-device|connect to your Mobian device]] through an USB connection, or through a WiFi connection.