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 ?PineTab2, an open source tablet designed by Pine64 to run Linux distributions

Note: Mobian requires a handful of packages that are not part of Debian at the time of writing (2023-06).

Prerequisites

U-Boot is required to boot the images. If you have the factory image installed and updated to the latest version, you can boot Mobian from an SD card without installing U-Boot. If you want to install Mobian to the EMMC, you will have to install U-Boot to the SPI.

Installing U-Boot to the SPI

Warning: Flashing the SPI flash memory is a dangerous procedure because the SPI has the highest boot priority. Any bug or faulty installation in the SPI can prevent the device from booting, which means that there is a high risk of getting locked out of the device. The only way of restoring from that state is using a specialized UART adapter, which can disable the SPI flash memory at boot, as explained in the recovering the SPI section. DO NOT FLASH THE SPI unless you are an experienced developer with access to the UART adapter and you have confirmed that the adapter is functional.

To install U-Boot to your ?PineTab2's SPI, follow these steps:

  1. Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)

  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. Verify the integrity of the u-boot-rockchip-spi.bin file by running this command and checking for an "OK" (you have to be in same directory as the file): echo "41768fd15c1df7e329040b742e575b9fea82e2cfc676c77dd5fc1da0c49f7947 u-boot-rockchip-spi.bin" | sha256sum --check

  4. Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
  5. Run this command: sudo flashcp -v -p u-boot-rockchip-spi.bin /dev/mtd0

Obtain the image

Pre-built Mobian images for the ?PineTab2 can be downloaded from this link. Installer images are available in the same location. Same images and installers are available both under folders pinetab2 and rockchip of https://images.mobian-project.org. Effective 2024-01-25, pinephonepro and pinetab2 images have been replaced by rockchip ones: please refer to rockchip images for newer images targeting these devices.

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, the key can be imported with gpg --import mobian.gpg.

  2. Verify the signature with gpg --verify <downloaded file>.sha256sum.sig.

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

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

Flash the image

In order to flash the Mobian image, you need to identify the device attached to target. **Be careful not to write to the wrong device! Replace the "X" in /dev/mmcblkX or /dev/sdX or use /dev/disk/by-id/.**

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 flashing the installer image to an SD card which will then provide the option to install to 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

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

Example:

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

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:

Method 2: dd

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

Then flash with the following command:

(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 - please see ?changing password about the right way to do so. If you want to access your phone via ssh, you need to ?set it up to do so.

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.

Full disk encryption

When installing Mobian with full disk encryption and booting with the keyboard case connected, you will have to touch the screen or press a key to show the decryption screen. This is an upstream issue.

Uninstalling U-Boot from the SPI

Warning: If you uninstall U-Boot from the SPI, Mobian will no longer boot on your ?PineTab2.

If you would like to uninstall U-Boot from your ?PineTab2's SPI, follow these steps:

  1. Install the mtd-utils package on your ?PineTab2 (on the factory image or Mobian)

  2. Open a terminal and cd to the directory where the extracted u-boot-rockchip-spi.bin file is
  3. Run this command: sudo flash_erase /dev/mtd0 0 16

Recovering the SPI

If you installed U-Boot to the SPI and you cannot boot your ?PineTab2, you can recovery the SPI, by using the debug adaptor that came with the device and an SD card, and either reinstalling U-Boot the SPI or uninstalling U-Boot from it.

Reinstalling U-Boot to the SPI

To install U-Boot to the SPI by using the debug adaptor that came with the device and an SD card, follow these steps:

  1. Format an SD card and run this command, replacing /dev/mmcblk0 with the path to your SD card: sudo parted /dev/mmcblk0 mkpart ext4 16MB 100% && sudo mkfs.ext4 /dev/mmcblk0p1

  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. Verify the integrity of the u-boot-rockchip-spi.bin file by running this command and checking for an "OK" (you have to be in same directory as the file): echo "41768fd15c1df7e329040b742e575b9fea82e2cfc676c77dd5fc1da0c49f7947 u-boot-rockchip-spi.bin" | sha256sum --check

  4. Run this command, replacing /dev/mmcblk0 with the path to your SD card (you have to be in same directory as the file): sudo dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=32k seek=1 conv=fsync

  5. Copy the u-boot-rockchip-spi.bin file to the partition
  6. Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON

  7. Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)

  8. Press the power button to boot the device into the U-Boot that is on the SD card, then press a key to interrupt the boot process
  9. Set the SD boot switch on the adaptor to OFF
  10. Run these commands:
    • sf probe

    • load mmc 1:1 10000000 u-boot-rockchip-spi.bin

    • sf update $fileaddr 0 $filesize

Uninstalling U-Boot from the SPI

Warning: If you uninstall U-Boot from the SPI, Mobian will no longer boot on your ?PineTab2.

To uninstall U-Boot from the SPI by using the debug adaptor that came with the device and an SD card, follow these steps:

  1. Format an SD card
  2. Download the U-Boot build for the PineTab2 and extract the zip file.

  3. Run this command, replacing /dev/mmcblk0 with the path to your SD card (you have to be in same directory as the file): sudo dd if=u-boot-rockchip.bin of=/dev/mmcblk0 bs=32k seek=1 conv=fsync

  4. Insert the SD card and adaptor into your ?PineTab2, with the SD boot switch on the adaptor set to ON

  5. Connect the debug adaptor to your computer and run this command: sudo minicom -b 1500000 -D /dev/ttyUSB0 (this requires having minicom installed)

  6. Press the power button to boot the device into the U-Boot that is on the SD card, then press a key to interrupt the boot process
  7. Set the SD boot switch on the adaptor to OFF
  8. Run these commands:
    • sf probe

    • sf erase 0 +10000


CategoryDebianOn