Difference between revisions of "OrangePi5Plus"
(Created page with "This is notes on the [http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-5-plus-32GB.html Orange Pi 5 Plus] Arm mini PC I was given. = OS =...") |
(No difference)
|
Revision as of 11:18, 24 April 2025
This is notes on the Orange Pi 5 Plus Arm mini PC I was given.
Contents
OS
I went with armbian but using the vendor kernel. This is important or the 5120x2160 display won't work.
However 3d aceleration doesn't work in it, and further testing got it all messed up. I need to figure this out.
EMMC
I got the 256 GB EMMC card option, so I can used this rather than sdcard
moving data to the emmc with lvm
I wanted to use LVM thin on the emmc as I do with all my installs. This wasn't too bad, just not documented.
update the spi flash
armbian-config System > Storage > 7 Install/Update the bootloader on MTD Flash
Provision the EMMC
the following needs to be provisioned on the disk. the emmc is /dev/mmcblk0, but you need to verify this.
gdisk Disk /dev/mmcblk0: 488554496 sectors, 233.0 GiB Sector size (logical/physical): 512/512 bytes Disk identifier (GUID): 0ABE2288-4E11-4606-96A9-D9BDA03F4193 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 488554462 Partitions will be aligned on 2048-sector boundaries Total free space is 4029 sectors (2.0 MiB) Number Start (sector) End (sector) Size Code Name 1 2048 1050623 512.0 MiB 8300 Linux filesystem 2 1050624 68159487 32.0 GiB 8200 Linux swap 3 68159488 488552447 200.5 GiB 8E00 Linux LVM
Provision the LVM
install needed tools
apt install lvm2 zfs-initramfs lvm2 thin-provisioning-tools uuid-runtime
Make a physical volume for LVM
pvcreate /dev/mmcblk0p3
Make a emmc Volume Group
vgcreate emmc /dev/mmcblk0p3
Make a Thin Pool in the Volume Group
lvcreate -l 100%FREE -T emmc/thinpool
Make a Logical Volume in the Thin Pool
lvcreate -V128G emmc/thinpool -n root
Copy root of sdcard to emmc
fstrim time dd if=/dev/mmcblk1p1 of=/dev/mapper/emmc-root bs=1M conv=sparse
This will dd it, from a live system, so best to do this just after boot with nothing running.
Fix the file system
You need to fix up and change the filesystem on the emmc now since it was copied raw.
e2fsck -f /dev/mapper/emmc-root
Now expand it
resize2fs /dev/mapper/emmc-root
Now change the UUID
tune2fs -U $(uuidgen) /dev/mapper/emmc-root
Format the other disks
Boot needs to be ext2fs
mkfs.ext2 /dev/mmcblk0p1
Swap needs to be setup
mkswap /dev/mmcblk0p2
Verify the UUID's
These are the UUID's you'll need for the next part.
lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
mmcblk0
├─mmcblk0p1 ext2 1.0 fcaea592-6e1b-4380-9e41-8ec7f438965e
├─mmcblk0p2 swap 1 b56855cc-db23-434b-90bc-7f5f2fa97e89
└─mmcblk0p3 LVM2_member LVM2 001 tGRNcH-ptkf-R0rP-1JL1-w406-kmWE-qHmoJY
├─emmc-thinpool_tmeta
│ └─emmc-thinpool-tpool
│ ├─emmc-thinpool
│ └─emmc-root ext4 1.0 armbi_root de88d702-b9a9-4577-9d56-a46e557d0c6b 117.7G 5% /newroot
└─emmc-thinpool_tdata
└─emmc-thinpool-tpool
├─emmc-thinpool
└─emmc-root ext4 1.0 armbi_root de88d702-b9a9-4577-9d56-a46e557d0c6b 117.7G 5% /newroot
Summary
boot = fcaea592-6e1b-4380-9e41-8ec7f438965e rootfs = de88d702-b9a9-4577-9d56-a46e557d0c6b swap = b56855cc-db23-434b-90bc-7f5f2fa97e89
mount it and make changes
make a directory to mount the emmc to
mkdir /newroot
mount the emmc
mount UUID=1a409081-4de1-4995-bdb7-eabcf386e7fb /newroot
setup the various proc files to work when you change root
cd /newroot/ mount -t proc /proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/
Mount the boot device
mount /dev/mmcblk0p1 /newroot/boot/
Copy the boot to this new directory
cp -av /boot/ /newroot/
chroot to /newroot and make changes to make the system bootable
chroot /newroot/
edit /etc/fstab
vim /etc/fstab UUID=de88d702-b9a9-4577-9d56-a46e557d0c6b / ext4 defaults,noatime,commit=120,errors=remount-ro 0 1 UUID=b56855cc-db23-434b-90bc-7f5f2fa97e89 swap swap defaults 0 0 UUID=fcaea592-6e1b-4380-9e41-8ec7f438965e /boot ext2 defaults,noatime 0 1 tmpfs /tmp tmpfs defaults,nosuid 0 0
edit the armbianenv file in boot
vim /boot/armbianEnv.txt change the rootdev= to the UUID of the lvm on emmc rootdev=UUID=de88d702-b9a9-4577-9d56-a46e557d0c6b
Update initramfs
update-initramfs -u -k all
sync and reboot (remove the sdcard!)
sync reboot
Verify
the system should reboot and read the emmc now without an sdcard installed.