Skip to content

Manual Install (like desktop Arch)

bgkillas edited this page Apr 26, 2022 · 4 revisions

This is not officially supported, but if you are crazy or just want a learning experience, it is possible to install Arch on the PinePhone akin to how it is done for Desktop Arch.

If you have never installed Arch on an x86 desktop computer, then I would not recommend trying this. The guide expects you to know somewhat of what you are doing, it may quickly gloss over steps. Not all of these steps have been tested. It is unlikely for this process to brick your device, but it is quite possible to completely wipe the wrong drive accidentally, proceed at your own risk!

This process is very similar to desktop Arch found at wiki.archlinux.org/title/Installation_guide: a few steps are not applicable, some are different, and a few additional steps are needed.

Currently Not Working or Missing

These instructions are missing a manual U-Boot setup, the instructions just have you copy the boot partition from the boot media.

Wifi is not working for some reason, still figuring out why.

Boot Media

Just like desktop Arch, you must create a boot media (on an SD card) to insert into the device to install Arch with. Follow the standard Arch ARM install process onto an SD card, and boot to it on your PinePhone.

(I recommend SSHing or plugging in a keyboard, there will be a lot of typing.)

After you are running the boot media on your PinePhone. Install arch-install-scripts with pacman -S arch-install-scripts.

Partitioning the Disk

Your will need two partitions on the drive, a 128M U-Boot partition, and the root partition.

The U-Boot should be formatted with FAT32, the root can be EXT4.

See Arch Wiki for how to partition the drive.

U-Boot Partition

I have not figured out how to create the U-Boot partition, I just copied the one from the prebuilt boot media.

dd if=/dev/mmcblk0p1 of=/dev/mmcblk2p1

Disk names may vary!

Root Partition

Thanks to "DrRac27", these steps are extracted from his work here.

Mount

Mount the root partition to /mnt or where ever you want to put it...

Install

Just like desktop arch, we will pacstrap to do the install.

pacstrap /mnt base sudo networkmanager pinephone

For PineTab replace pinephone with pinetab.

For Phosh include danctnix-phosh-ui-meta dialog kgx.

For Plasma include danctnix-pm-ui-meta.

For Barebone include danctnix-usb-tethering openssh.

Additional packages can be included now or after chrooting into it.

Config

Setup sudoers with visudo (which edits the /etc/sudoers file).

Install the appropriate pacman config install -Dm 644 "/etc/pacman.conf" "/mnt/etc/pacman.conf" should do the trick.

Create your hostname (echo $HOSTNAME > /mnt/etc/hostname).

Enable Systemd Stuff

arch-chroot /mnt
systemctl enable NetworkManager
systemctl enable ModemManager

# Phosh
systemctl enable phosh
# Plasma Mobile
systemctl enable lightdm
# Barebone
systemctl enable sshd
systemctl enable usb-tethering

Create User and Set Passwords

# In arch-chroot
useradd -m -G games,network,scanner,rfkill,video,storage,optical,lp,input,audio,wheel $USERNAME
password $USERNAME

Try it out

Reboot to the internal storage and cross you fingers!

These steps where created by Jonathan Levi after I figured out how to do it with help from "DrRac27". If you have questions you can contact me with my email JonathanILevi at GMail.