Orange Pi 5 - Boot from NVME

thanks for the quick reply and heads up!

I have booted from SD just now. How do I do the other steps? :sweat_smile:

dietpi-config > β€œAdvanced Options” > β€œUpdate SPI bootloader”
And this should copy SD card to NVMe Moving a running DietPi system to a USB stick/disk or an onboard eMMC – DietPi Blog

Thanks for getting back so quickly.

I had a look at what you shared and tried unsuccessfully.

For starters I don’t have the β€œUpdate SPI bootloader option”, only β€œUpdate MMC boot loader” and it gives me the option to flash to β€œ/dev/mmcb1k1” whereas my NVMe SSD is at β€œ/dev/nvme0n1”

I then ran as per the instructions on the link you shared, which failed

dietpi-services stop
swapoff -a
mount -o remount,ro /

I then ran as per the instructions, which rebooted the system

sed -i '\|[[:blank:]]/[[:blank:]]|s|,rw|,ro|' /etc/fstab
reboot

finally I ran the dd command but I got an error while it was copying. I made sure to update the locations as per the guide and my lsblk output

Not sure what I did wrong here…

Hmm looks like on issue with the SD card. Theoretically you could flash a new image instead.

And to flash this SPI, follow this

apt install patch
cd /boot
curl -sSf 'https://github.com/MichaIng/DietPi/commit/64af7e9.patch' | patch -p1
dietpi-config

awesome, the code worked and I got the β€œSPI” option.

weird, since I am able to run dietpi just fine with that SD card…

unfortunately I don’t have another handy right now, how can I flash a new image? :innocent:

cd /tmp 
curl -O https://dietpi.com/downloads/images/DietPi_NanoPi6-ARMv8-Bookworm.img.xz 
7zr x DietPi_NanoPi6-ARMv8-Bookworm.img.xz
dd if=DietPi_NanoPi6-ARMv8-Bookworm.img of=/dev/mmcblk2 bs=1M status=progress

got it, used the above. works now! :metal: :heart_eyes:

Ok good but you used the NanoPi6 image. Was this intended? Or did you adjust the command to fit OrangePi5? Because this topic is about OrangePi 5. So I assumed you device was an OPi5 as well :thinking:

yeah I changed the command to use the latest Orange Pi 5 image. Just copied here the command from the guide :sweat_smile:

Proper one would be:

cd /tmp 
curl -O https://dietpi.com/downloads/images/DietPi_OrangePi5-ARMv8-Bookworm.img.xz 
7zr x DietPi_OrangePi5-ARMv8-Bookworm.img.xz
dd if= DietPi_OrangePi5-ARMv8-Bookworm.img of=/dev/mmcblk2 bs=1M status=progress

in case anyone else might need it

Update on v9.8.0 works fine for me with OP5. The System reboots over nvme. :smile:

I someone brave enough to test the latest vendor kernel builds on an NVMe? Just keep in mind that you might need to repair it, booting e.g. via SD card, and install the functional kernel over the broken one: Orange Pi 5 - Boot from NVME - #77 by krisskross

Test would be this:

cd /tmp
wget https://dietpi.com/downloads/binaries/linux-{image,dtb}-vendor-rk35xx.deb
dpkg -i linux-{image,dtb}-vendor-rk35xx.deb
reboot

Armbian has the lock still in place, but I am not happy to keep keep outdated vendor kernel builds for too long, when they are developed actively. And Rockchip > Radxa > Armbian update their sources regularly.

Done. Rebooted, everything seems to be OK. Details below. Please let me know if you need anything else to test.

root@opi5:~# cd /tmp
root@opi5:/tmp# wget https://dietpi.com/downloads/binaries/linux-{image,dtb}-vendor-rk35xx.deb
--2024-12-14 15:04:34--  https://dietpi.com/downloads/binaries/linux-image-vendor-rk35xx.deb
Resolving dietpi.com (dietpi.com)... 2606:4700:3034::ac43:c1b7, 2606:4700:3035::6815:c41, 104.21.12.65, ...
Connecting to dietpi.com (dietpi.com)|2606:4700:3034::ac43:c1b7|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32963596 (31M) [application/vnd.debian.binary-package]
Saving to: β€˜linux-image-vendor-rk35xx.deb’

linux-image-vendor-rk35xx.deb    100%[==========================================================>]  31.44M  27.2MB/s    in 1.2s    

2024-12-14 15:04:36 (27.2 MB/s) - β€˜linux-image-vendor-rk35xx.deb’ saved [32963596/32963596]

--2024-12-14 15:04:36--  https://dietpi.com/downloads/binaries/linux-dtb-vendor-rk35xx.deb
Reusing existing connection to [dietpi.com]:443.
HTTP request sent, awaiting response... 200 OK
Length: 2254440 (2.1M) [application/vnd.debian.binary-package]
Saving to: β€˜linux-dtb-vendor-rk35xx.deb’

linux-dtb-vendor-rk35xx.deb      100%[==========================================================>]   2.15M  7.65MB/s    in 0.3s    

2024-12-14 15:04:36 (7.65 MB/s) - β€˜linux-dtb-vendor-rk35xx.deb’ saved [2254440/2254440]

FINISHED --2024-12-14 15:04:36--
Total wall clock time: 2.2s
Downloaded: 2 files, 34M in 1.4s (23.4 MB/s)
root@opi5:/tmp# ll
-bash: ll: command not found
root@opi5:/tmp# ls -l
total 34396
-rw-r--r-- 1 root root  2254440 Dec  6 13:56 linux-dtb-vendor-rk35xx.deb
-rw-r--r-- 1 root root 32963596 Dec  6 13:58 linux-image-vendor-rk35xx.deb
root@opi5:/tmp# dpkg -i linux-{image,dtb}-vendor-rk35xx.deb
(Reading database ... 16491 files and directories currently installed.)
Preparing to unpack linux-image-vendor-rk35xx.deb ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' starting.
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'prerm' finishing.
Armbian 'linux-image-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'preinst' starting.
Armbian 'linux-image-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'preinst' finishing.
Unpacking linux-image-vendor-rk35xx (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi1) ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postrm' starting.
Removing obsolete initramfs images
Armbian 'linux-image-vendor-rk35xx' for '6.1.75-vendor-rk35xx': 'postrm' finishing.
Preparing to unpack linux-dtb-vendor-rk35xx.deb ...
Armbian 'linux-dtb-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'preinst' starting.
Armbian 'linux-dtb-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'preinst' finishing.
Unpacking linux-dtb-vendor-rk35xx (24.11.0-trunk-dietpi1) over (24.8.0-trunk-dietpi1) ...
Setting up linux-image-vendor-rk35xx (24.11.0-trunk-dietpi1) ...
Armbian 'linux-image-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'postinst' starting.
Removing obsolete initramfs images
removed '/boot/initrd.img-6.1.75-vendor-rk35xx'
removed '/boot/uInitrd-6.1.75-vendor-rk35xx'
update-initramfs: Generating /boot/initrd.img-6.1.84-vendor-rk35xx
update-initramfs: Converting to U-Boot format
Image Name:   uInitrd
Created:      Sat Dec 14 15:05:14 2024
Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)
Data Size:    8244727 Bytes = 8051.49 KiB = 7.86 MiB
Load Address: 00000000
Entry Point:  00000000
'/boot/uInitrd' -> 'uInitrd-6.1.84-vendor-rk35xx'
Armbian: update last-installed kernel symlink to 'Image'...
'/boot/Image' -> 'vmlinuz-6.1.84-vendor-rk35xx'
Armbian: Debian compat: linux-update-symlinks install 6.1.84-vendor-rk35xx boot/vmlinuz-6.1.84-vendor-rk35xx
Armbian 'linux-image-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'postinst' finishing.
Setting up linux-dtb-vendor-rk35xx (24.11.0-trunk-dietpi1) ...
Armbian 'linux-dtb-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'postinst' starting.
Armbian: DTB: symlinking /boot/dtb to /boot/dtb-6.1.84-vendor-rk35xx...
'dtb' -> 'dtb-6.1.84-vendor-rk35xx'
Armbian 'linux-dtb-vendor-rk35xx' for '6.1.84-vendor-rk35xx': 'postinst' finishing.
root@opi5:/tmp# reboot

 ─────────────────────────────────────────────────────
 DietPi v9.8.0 : 15:06 - Sat 12/14/2024
 ─────────────────────────────────────────────────────
 - Device model : Orange Pi 5 (aarch64)
 - CPU temp : 36 Β°C / 96 Β°F : Cool runnings
 - LAN IP : 192.168.1.151 (eth0)
 - MOTD : DietPi v9.8 is here. Check out all changes:
          https://dietpi.com/docs/releases/v9_8/
 ─────────────────────────────────────────────────────

 DietPi Team     : https://github.com/MichaIng/DietPi#the-dietpi-project-team
 Patreon Legends : Chris Gelatt, ADSB.im
 Website         : https://dietpi.com/ | https://twitter.com/DietPi_
 Contribute      : https://dietpi.com/contribute.html
 Web Hosting by  : https://myvirtualserver.com

 dietpi-launcher : All the DietPi programs in one place
 dietpi-config   : Feature rich configuration tool for your device
 dietpi-software : Select optimised software for installation
 htop            : Resource monitor
 cpu             : Shows CPU information and stats

root@opi5:~# uname -a
Linux opi5.home 6.1.84-vendor-rk35xx #1 SMP Thu Nov 28 03:16:27 UTC 2024 aarch64 GNU/Linux
root@opi5:~# lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0    31:0    0    16M  0 disk 
nvme0n1     259:0    0 476.9G  0 disk 
└─nvme0n1p1 259:1    0 476.9G  0 part /
root@opi5:~# 

Nice, many thanks for testing. That is great. I’ll probaly wait for another positive test, just to be super sure, but then we can unlock kernel releases for OPi 5.

1 Like

BTW, my SPI was imaged from OrangePi Debian (/usr/lib/linux-u-boot-legacy-orangepi5_1.2.0_arm64/rkspi_loader.img from vendor distro). Should I update SPI with the DietPi SPI image and repeat the test?

The bug was in the kernel, so I guess it should be fine. But if you find the time, to be sure it is not due to the combination of kernel and bootloader, testing that does not hurt :slight_smile:.

1 Like

OK, done! I just updated SPI via dietpi-config β†’ β€œUpdate SPI bootloader”, rebooted and it is still booting OK from NVMe with the updated vendor kernel.

1 Like

Does someone else find the time to test it, also on an OPi 5 Plus?

cd /tmp
wget https://dietpi.com/downloads/binaries/linux-{image,dtb}-vendor-rk35xx.deb
dpkg -i linux-{image,dtb}-vendor-rk35xx.deb
reboot

I can test the regular non-plus version only, if that helps

1 Like

Would be great, just to be sure.

done, seems to be working

root@DietPiOPi5:~# uname -a
Linux DietPiOPi5 6.1.84-vendor-rk35xx #1 SMP Thu Nov 28 03:16:27 UTC 2024 aarch64 GNU/Linux
root@DietPiOPi5:~#
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.