Skip to content

About

Ubuntu Imaging and Booting Order for the Orange Pi 5 Plus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Orange Pi 5 Plus: Imaging eMMC, USB-C SSD, and Boot Priority

This guide describes how to properly image the eMMC and USB-C SSD on the Orange Pi 5 Plus, and how the boot process is configured.
It assumes Ubuntu 24.04 with U-Boot and extlinux.conf bootloader configuration.


Device Map

From lsblk -f (example):


/dev/mmcblk0     → microSD card (233 GB)    UUID=50033b2c-...
/dev/mmcblk1p1   → onboard eMMC (119 GB)    UUID=2842043c-...
/dev/sda1        → USB-C SSD (7.3 TB)       UUID=43d74ec7-...

  • microSD: used for initial setup and as primary boot source.
  • eMMC: onboard flash storage, secondary boot source.
  • USB-C SSD: external storage, tertiary fallback boot.

Imaging the eMMC

⚠️ The eMMC is smaller (119 GB) than the microSD (233 GB). Do not use raw dd clone of the full card. Instead, use rsync to copy the filesystem.

1. Prepare the eMMC

sudo wipefs -a /dev/mmcblk1
sudo sgdisk --zap-all /dev/mmcblk1
sudo parted -s /dev/mmcblk1 mklabel gpt
sudo parted -s /dev/mmcblk1 mkpart primary ext4 4MiB 100%
sudo mkfs.ext4 -L rootfs_emmc /dev/mmcblk1p1

2. Mount source (microSD) and target (eMMC)

sudo mkdir -p /mnt/sdsrc /mnt/emmc
sudo mount -o ro /dev/mmcblk0p1 /mnt/sdsrc
sudo mount /dev/mmcblk1p1 /mnt/emmc

3. Copy filesystem via rsync

sudo rsync -aAXHv --info=progress2 \
  --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","lost+found"} \
  /mnt/sdsrc/ /mnt/emmc/

4. Update fstab on eMMC

Get the eMMC UUID:

sudo blkid /dev/mmcblk1p1

Edit /mnt/emmc/etc/fstab:

UUID=<emmc-uuid>  /  ext4  defaults,noatime  0  1

5. Update bootloader config (extlinux.conf)

Edit /mnt/emmc/boot/extlinux/extlinux.conf and ensure the root= parameter uses the eMMC UUID:

append root=UUID=<emmc-uuid> rootfstype=ext4 rootwait rw console=ttyS2,1500000 console=tty1

6. Copy bootloader to eMMC

sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=1M count=16 conv=fsync

Imaging the USB-C SSD

  1. Partition and format:
sudo parted -s /dev/sda mklabel gpt
sudo parted -s /dev/sda mkpart primary ext4 4MiB 100%
sudo mkfs.ext4 -L rootfs_usb /dev/sda1
  1. Mount and rsync (similar to eMMC):
sudo mkdir -p /mnt/usbroot
sudo mount /dev/sda1 /mnt/usbroot
sudo rsync -aAXHv /mnt/sdsrc/ /mnt/usbroot/
  1. Update /mnt/usbroot/etc/fstab with the USB SSD’s UUID.
  2. Edit /mnt/emmc/boot/extlinux/extlinux.conf to include a stanza for USB boot.

Boot Priority (Configured in extlinux.conf)

The system is configured with three boot stanzas:

  1. Primary (microSD)

    • UUID=50033b2c-9a05-4cac-97aa-dfc1ce971bd9
    • Boots first if card is present.
  2. Secondary (eMMC)

    • UUID=2842043c-357f-48eb-aaa9-94f8e1e94e6d
    • Boots if no SD is present.
  3. Tertiary (USB-C SSD)

    • UUID=43d74ec7-0ded-4794-813c-57774cb229c6
    • Boots only if neither SD nor eMMC are available.

Configured snippet from /boot/extlinux/extlinux.conf:

default l0
timeout 10

# microSD
label l0
  append root=UUID=50033b2c-... rootfstype=ext4 rootwait rw console=ttyS2,1500000 console=tty1

# eMMC
label l1
  append root=UUID=2842043c-... rootfstype=ext4 rootwait rw console=ttyS2,1500000 console=tty1

# USB-C SSD
label l2
  append root=UUID=43d74ec7-... rootfstype=ext4 rootwait rw console=ttyS2,1500000 console=tty1

Verifying Which Device Booted

After login:

lsblk -f
  • / should be mounted from one of:

    • /dev/mmcblk0p1 → microSD
    • /dev/mmcblk1p1 → eMMC
    • /dev/sda1 → USB-C SSD

Quick one-liner to print the root device:

findmnt -n -o SOURCE /

Troubleshooting

1. Board does not boot

  • Ensure the bootloader was written to eMMC:

    sudo dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=1M count=16 conv=fsync
  • Confirm extlinux.conf is present on /boot of the active device.

2. Boot drops into U-Boot prompt

  • Check that all root=UUID=... entries in extlinux.conf match actual UUIDs:

    lsblk -f
  • If mismatched, update UUIDs in /boot/extlinux/extlinux.conf.

3. Stuck at initramfs shell

  • Usually caused by a wrong fstab UUID.
  • Mount the root device manually, check /etc/fstab, and correct the UUID.

4. Always boots from SD even if eMMC present

  • That’s expected (SD is first priority). Remove SD to test eMMC boot.
  • To force eMMC boot by default, set default l1 in extlinux.conf.

5. USB-C SSD not booting

  • Verify SSD is partitioned with GPT and has a bootable rootfs.
  • Check that the stanza for USB boot in extlinux.conf matches its UUID.
  • Try unplugging/replugging SSD and running lsblk to confirm detection.

Notes

  • extlinux.conf shows a warning about being auto-generated. On Orange Pi, manual edits are safe unless you explicitly run u-boot-update.
  • Always copy only the first 16 MB of bootloader code (dd bs=1M count=16) — never overwrite full devices unless sizes match.
  • Use rsync instead of raw dd when migrating to a smaller device (eMMC < microSD).

About

Ubuntu Imaging and Booting Order for the Orange Pi 5 Plus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors