Difference between revisions of "PinePhone Installation Instructions"

Jump to navigation Jump to search
(→‎Safe With No Extra Tools, But Slower: dd: add "status=progress")
m (Changed command to dd the image from the SD card to eMMC)
Line 53: Line 53:
# Open terminal and <code>git clone [url]</code> your desired project OR: Open web browser and download the desired OS image file.  
# Open terminal and <code>git clone [url]</code> your desired project OR: Open web browser and download the desired OS image file.  
# Build the OS (Optional)
# Build the OS (Optional)
# Flash the resulting image file you got by downloading or by building, to eMMC, using <code>dd if=/dev/mmcblkX of=/dev/mmcblkY bs=1M status=progress</code> where X is the number label of the SD card, and Y is the number label of the eMMC. Use the command ''lsblk'' to check your devices: typically with the current kernel the SD card is /dev/mmcblk0 and the eMMC is /dev/mmcblk2 but as always with ''dd'' be extremely cautious to get the devices correct. Then, resize partition to fill up entire disk (see below).
# Flash the resulting image file you got by downloading or by building, to eMMC, using <code>dd if=new-pinephone-image.img of=/dev/mmcblkY bs=1M status=progress</code> where X is the number label of the SD card, and Y is the number label of the eMMC. Use the command ''lsblk'' to check your devices: typically with the current kernel the SD card is /dev/mmcblk0 and the eMMC is /dev/mmcblk2 but as always with ''dd'' be extremely cautious to get the devices correct. Then, resize partition to fill up entire disk (see below).
# Turn off phone, remove SD card. Turn on phone.
# Turn off phone, remove SD card. Turn on phone.


Line 72: Line 72:
=== Resize SD card's partition using computer ===
=== Resize SD card's partition using computer ===


For SD cards, insert the SD card and resize the partitions through the computer. For eMMC, insert the phone cable and use Jumpdrive to access the eMMC directly, and resize the partition after flashing the image.
For SD cards, insert the SD card and resize the partitions through the computer. For eMMC, insert the phone cable and use Jumpdrive to access the eMMC directly, and resize the partition after flashing the image. To do the flashing you have two options:


Using Growpart:  
====Using Growpart: ====
 
growpart /dev/sdX 1
resize2fs /dev/sdX 1


Locate growpart (<code>apt-cache search growpart</code> and install the package in the search results) and run:  
Locate growpart (<code>apt-cache search growpart</code> and install the package in the search results) and run:  
Line 86: Line 83:
If you get any errors about missing or unknown commands, use apt-cache search to find and install the needed software. Also don't forget to use sudo.
If you get any errors about missing or unknown commands, use apt-cache search to find and install the needed software. Also don't forget to use sudo.


Using Parted:  
====Using Parted: ====


Parted's interactive mode and resize work well together. Do this before you put your SD card into the PinePhone for the first time for best results.
Parted's interactive mode and resize work well together. Do this before you put your SD card into the PinePhone for the first time for best results.
Line 97: Line 94:
=== Resize from within PinePhone: ===
=== Resize from within PinePhone: ===


eMMC: you would need to resize the partition on eMMC (flashed with the operating system) by booting another image from the SD card: that way, the eMMC will be unmounted. It is '''not recommended''' to resize eMMC while booted from eMMC! Resizing a currently mounted partition can have weird results.  
eMMC: you would need to resize the partition on eMMC (flashed with the operating system) by booting another image from the SD card: that way, the eMMC will be unmounted. It is '''not recommended''' to resize eMMC while booted from eMMC! Resizing a currently mounted partition can have weird results. If you booted from the SD card, you can follow the above guidelines on how to resize from a computer.  


SD card: It is generally not possible to boot from eMMC to partition the unmounted SD card, because of the boot order -- you would have to write the image to the empty SD card first, then resize partition, all without rebooting. It is also '''not recommended''' to resize the SD card while booted from SD card! Resizing a currently mounted partition can have weird results.
SD card: It is generally not possible to boot from eMMC to partition the unmounted SD card, because of the boot order -- you would have to write the image to the empty SD card first, then resize partition, all without rebooting. It is also '''not recommended''' to resize the SD card while booted from SD card! Resizing a currently mounted partition can have weird results.