BLOG
2 August 2021

PinePhones

TTTThis

Suggestions for improvement, hardware:

Suggestions for improvement, software:


PINEPHONE - INSTALLING AN OS

https://wiki.mobian-project.org/doku.php?id=install-linux (this also shows how to check the .img is authentic)

Method1 (boot from microUSB): use a microSD and put an OS on it and boot from it on your PinePhone (PinePhones boot from microSDs inserted in them before they boot from the internal (eMMC) memory, so anytime there's a microSD in them they'll try to boot from that first.

Method2 (install on phone): use a microSD and put the 'jumpdrive' on it, which allows you to then plug in your PinePhone to your computer with a USB and treat the PinePhone internale (eMMC) memory as a drive (then you write an OS onto that drive).

Method2 directions:

If you make a folder in your Downloads folder and name it PinePhoneStuff (you can do it otherwise, but this will make it easier to follow the code below). When you enter lsblk you can see by the size of the 'drives' that sda is my PinePhone and sdb is the sd card inside my PinePhone right now (an 8gb microSD). Therefore, I'm going to target sda when I do the dd command below (to write the .img file to the drive.

Download the jumpdrive from the internet onto your computer (mine looks like mobian-installer-pinephone-phosh-20210516.img) and then unzip it into a folder on your computer (I used a folder inside Downloads called PinePhoneStuff, as you can see in the code below). Put your microSD into your computer, delete any partitions and content on it (using Disks), and use Disk Writer to write the mobian-installer-pinephone-phosh-20210516.img to the microSD (right click on mobian-installer-pinephone-phosh-20210516.img then select Disk Writer (program), then (BE CAREFUL YOU CAN DESTROY YOUR COMPUTER HERE IF YOU SELECT YOUR COMPUTER'S HARDDRIVE) select the microSD from the dropdown be looking at the size). It will take seconds to write because it's small. Now put the microSD into your PinePhone and start your PinePhone. You will see 'Jumpdrive is running' if everything is working so far.

Now you can plug your PinePhone into your computer with a USB. Open Gparted and select your PinePhone from the dropdown (select by size again BE CAREFUL YOU CAN DESTROY YOUR COMPUTER IF YOU SELECT THE WRONG ONE). You'll probably see 2 partitions now. Delete them each (you might have to unlock them first, which probably means just going to your folder view and right-click unmount them). Once deleted, you can proceed (because you have nothing on your PinePhone's internal (eMMC) memory now. So open Terminal and type lsblk. (Notice that I put 'computername' and 'username' but yours will say something specific to your computer.) ANOTHER TIME it showed a Fat32 partition which had no 'delete' option (greyed out), but I just wrote to it anyway with Disk Image Writer.

computername:~$ lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 14.5G 0 disk
sdb 8:16 1 7.5G 0 disk
└─sdb1 8:17 1 49M 0 part /media/username/SDNAME
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
├─nvme0n1p2 259:2 0 732M 0 part /boot
└─nvme0n1p3 259:3 0 237.3G 0 part
└─sda3_crypt 253:0 0 237.2G 0 crypt
├─vgubuntu--studio-root
│ 253:1 0 236.3G 0 lvm /
└─vgubuntu--studio-swap_1
253:2 0 976M 0 lvm [SWAP]

username@computername:~$ sudo dd bs=64k if=~/Downloads/PinePhoneStuff/mobian-installer-pinephone-phosh-20210516.img of=/dev/sda status=progress

(note that it might be sda, sdb, sdc, depending where your phone is mounted. Run lsblk without the phone plugged in, look at the sizes of the media, then plug in and do the same. Don't forget that your microSD that you have in your phone for JumpDrive will be found as yet another drive by lsblk.)

[sudo] password for username:

(wait a while, maybe 5 minutes ... then see:)

7997816832 bytes (8.0 GB, 7.4 GiB) copied, 404 s, 19.8 MB/s
122070+1 records in
122070+1 records out
8000000000 bytes (8.0 GB, 7.5 GiB) copied, 619.432 s, 12.9 MB/s

Then it'll return to the ready to accept a command state (Terminal will, I mean). Unplug your phone, remove the microSD, reboot the phone (by holding down the power button for several seconds each way). It should now bot into a Mobian screen (it might show a screen asking for a password, but just wait a bit and I think it'll just bypass that). You can select you install options. Then it will 'unpack' which takes about 15 or 20 minutes I think.


AFTER INSTALLATION of OS

Blinking blue light? Known issue. Turn it off:

echo '0' > /sys/class/leds/blue:indicator/brightness

(replace 0 with 1 to turn it on)

Install:


Instructions (more condensed). Put jumpdrive .img on microSD and Mobian OS .img file on computer. And open a text editor to paste the below code and edit it with your specific Mobian .img)

  1. microSD in computer. format it and write the jumpdrive .img onto it
  2. microSD into phone and start phone (it says 'Jumpdrive is running')
  3. format the phone's harddrive with Disks or Gparted. Actually, it didn't work for me with Disks but then it did with only using Gparted to delete the eMMC contents - I didn't format it)
  4. open Terminal and type in lsblk to double check which drive is your PinePhone (probably sda and sdb might be your 8gb microSD running Jumpdrive)
  5. Assuming it is sda and assuming you have a folder called 'PinePhoneStuff' in your Downloads folder, paste the below command in a text editor and replace mobian-pinephone-phosh-20210517.img with the one you have, then:

sudo dd bs=64k if=~/Downloads/PinePhoneStuff/mobian-pinephone-phosh-20210517.img of=/dev/sda status=progress

  1. Now it installs. Leave it for 5 minutes or whatever. Then Terminal will complete its task. Take the microSD out and restart your PinePhone by holding down the power and down-volume buttons for several seconds. Done.
  2. You might need to reboot the PinePhone, or you might need to give it time to boot up.
#Blogs
NewerPineTime Watch OlderStudies in Comparative Law