Installing armbian on Orange Pi
Some notes on getting started with Orange Pi PC Plus. I worked with slightly different model with 3 USB ports (See image).
Table of Contents
- Installing Armbian on SD card
- Installing Armbian on EMMC storage
- EMMC and SD card devices
- Using Armbian on EMMC with SD card
Installing Armbian on SD card
See also documentation on Armbian wiki for preparing SD card.
- Download appropriate system image from Armbian download page
- Unzip and write
.raw
file onto SD card. You could use Rufus tool if you’re on Windows - Insert SD card into TF card slot, attach all devices
- Plug power and wait ~3 min (first boot only, depends on card speed)
Installing Armbian on EMMC storage
See also documentation on Armbian wiki for installing to eMMC.
- Boot from SD card
- AS a
root
executenand-sata-install
script provided with Armbian image - Power off your Orange Pi
- Eject SD card from TF slot
- Plug power and wait for system to start
Resizing root partition on EMMC
By default nand-sata-install
installs system to EMMC creating 8GB partition. In order to create secondary partition:
- Insert SD card to start Armbian from SD
- Shrink filesystem to the minimum size:
sudo resize2fs -pM -d 30 /dev/mmcblk1p1
- Use
sudo fdisk /dev/mmcblk1
, delete the first partition - Create new partition (start address same as for old partition, size:
+2GB
) - Create additional partition(s)
- Expand filesystem:
sudo resize2fs -p -d 30 /dev/mmcblk1p1
- Format additional partitions (if any):
sudo mkfs.ext4 /dev/mmcblk1p2
- Reboot and start Armbian from EMMC (you may need to wait for a while)
EMMC and SD card devices
SD card and EMMC are visible as:
/dev/mmcblk0
/dev/mmcblk1
However, the names depend on how the system is started. If the Armbian is booted from SD card, then it is the first device (/dev/mmcblk0
) and the second (/dev/mmcblk1
) is for EMMC. But if the system boots from EMMC (after running nand-sata-install
script and without SD card), then the EMMC is /dev/mmcblk0
and the other device is not present.
Using Armbian on EMMC with SD card
See also this forum thread.
Armbian will always boot from SD card if present. Let the SD card forward boot to EMMC:
- Boot from SD card
- Go to
/boot
directory - Backup
boot.cmd
andboot.scr
files -
Update
boot.cmd
file: replaceroot=/dev/mcblk0
withroot=/dev/mmcblk1
- Run
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
- Boot Orange Pi from EMMC (with SD card inserted)
- I’m not sure which files on the inserted SD card are required to boot from EMMC. The setup works however with everything deleted except of
/boot
and/lib
folders. It is also possible then to shrink this partition - After all that the
/etc/fstab
file on EMMC filesystem may be updated to:### partitions on EMMC on EMMC /dev/mmcblk1p1 / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 /dev/mmcblk1p2 /mnt/emmc2 ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1 ### the sdcard --- which starts the system /dev/mmcblk0p1 /mnt/sdcard1 ext4 rw,suid,dev,exec,noauto,user,async,noatime,nodiratime,commit=600,errors=remount-ro 0 1 /dev/mmcblk0p2 /mnt/sdcard2 ext4 rw,suid,dev,exec,noauto,user,async,noatime,nodiratime,commit=600,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0 /var/swap none swap sw 0 0