Difference between revisions of "PinePhone Installation Instructions"

Jump to navigation Jump to search
(→‎Using Tow-Boot: clarification about needing tow-boot to have been installed first)
Line 49: Line 49:
== Installation to the eMMC ==
== Installation to the eMMC ==


=== Using Tow-Boot ===
=== From the booted microSD OS ===
 
# Flash an OS to the microSD card (and optionally resize the partition, see below)
This method requires the tow-boot bootloader to be present on your boot device already, usually from an earlier OS install.
# Insert microSD card and boot the phone
 
# Download the desired OS' image on the booted OS or transfer it to the microSD card
The eMMC can be flashed by holding vol+ on startup to boot into USB Mass Storage mode.
# Extract the image file if it is archived
 
# Flash the image file to eMMC using <code>dd if='''IMAGE.img''' of=/dev/'''mmcblkX''' bs=1M status=progress conv=fsync</code> where X is the number label of the eMMC (of the disk, not the partition!). Use the command <code>lsblk</code> to check your devices: typically with the current kernel the microSD card is ''/dev/mmcblk0'' and the eMMC is ''/dev/mmcblk2'' but as always with ''dd'' be extremely cautious to get the devices correct.
The process of flashing an OS to the eMMC is identical to that of any other storage medium - e.g. a microSD card. You can use the <i>dd</i> command or a utility such as Etcher or Gnome Disks, etc.
# Turn off phone, remove microSD card and then turn on the phone.


=== Using JumpDrive ===
=== Using JumpDrive ===
Line 78: Line 78:
The Jumpdrive image is smaller than 50MB. You can keep an microSD card specifically for using Jumpdrive, and there are 64MB microSD cards sold cheaply that will suffice. Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!
The Jumpdrive image is smaller than 50MB. You can keep an microSD card specifically for using Jumpdrive, and there are 64MB microSD cards sold cheaply that will suffice. Jumpdrive also acts as a rescue image in case if you messed up your installation. To do so, you can telnet to '''172.16.42.1''', mount rootfs and fix it!


=== From the booted microSD OS ===
=== SD to eMMC via installer ===
# Flash an OS to the microSD card (and optionally resize the partition, see below)
 
# Insert microSD card and boot the phone
An special installer image booted from the microSD card can be used to flash the eMMC as well. Mobian and postmarketOS installer images booted from microSD card will simply ask the user if they want to install to eMMC. The feature lives in the distribution-agnostic calamares-extensions repository (see [https://github.com/calamares/calamares-extensions/pull/7 calamares-extensions#7]), so other distributions might adopt this in the future.
# Download the desired OS' image on the booted OS or transfer it to the microSD card
 
# Extract the image file if it is archived
=== Using Tow-Boot ===
# Flash the image file to eMMC using <code>dd if='''IMAGE.img''' of=/dev/'''mmcblkX''' bs=1M status=progress conv=fsync</code> where X is the number label of the eMMC (of the disk, not the partition!). Use the command <code>lsblk</code> to check your devices: typically with the current kernel the microSD card is ''/dev/mmcblk0'' and the eMMC is ''/dev/mmcblk2'' but as always with ''dd'' be extremely cautious to get the devices correct.
 
# Turn off phone, remove microSD card and then turn on the phone.
Tow-Boot is an opinionated distribution of the U-Boot bootloader. It includes an USB Mass Storage Mode, which exposes the flash drive(s) to a computer connected to the phone via USB-C. The Tow-Boot bootloader has to be installed if it is not pre-installed already. For instructions see the following links:
 
* '''PinePhone:''' https://tow-boot.org/devices/pine64-pinephoneA64.html
* '''PinePhone Pro:''' https://tow-boot.org/devices/pine64-pinephonePro.html


=== SD to eMMC via installer ===
If Tow-Boot is installed the phone can be started into USB Mass Storage Mode by holding the ''volume up'' key on startup.


postmarketOS and Mobian installer images booted from microSD card will simply ask the user, if they want to install to eMMC. The feature lives in the distribution-agnostic calamares-extensions repository (see [https://github.com/calamares/calamares-extensions/pull/7 calamares-extensions#7]), so other distributions might adopt this in the future.
The steps of flashing an operating system to the phone after booting Tow-Boot's USB Mass Storage Mode and connecting the phone to a computer is identical to that of any other storage medium - e.g. a microSD card. You can use the <i>dd</i> command or a utility such as Etcher or Gnome Disks from the computer the phone is connected to.


== Resize partition to fit disk space ==
== Resize partition to fit disk space ==