# Orange Pi 5 - Boot from NVME

**URL:** https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457
**Category:** General Discussion
**Created:** [2 April 2023 11:33 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457 "2023-04-02T11:33:47Z")
**Posts on this page:** 20
**Page:** 5

<div class="post-metadata">

### Author: ![Renoria](https://dietpi.com/forum/user_avatar/dietpi.com/renoria/32/8093_2.png) [@Renoria](https://dietpi.com/forum/u/Renoria)
#### Post date: [14 October 2024 15:36 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/83 "2024-10-14T15:36:10Z")

</div>

thanks for the quick reply and heads up!

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

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [14 October 2024 15:50 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/84 "2024-10-14T15:50:03Z")

</div>

`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](https://dietpi.com/blog/?p=1236)

---

<div class="post-metadata">

### Author: ![Renoria](https://dietpi.com/forum/user_avatar/dietpi.com/renoria/32/8093_2.png) [@Renoria](https://dietpi.com/forum/u/Renoria)
#### Post date: [14 October 2024 16:26 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/85 "2024-10-14T16:26:36Z")

</div>

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

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

```

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

```auto
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…

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [14 October 2024 16:39 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/86 "2024-10-14T16:39:14Z")

</div>

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

And to flash this SPI, follow this

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

```

---

<div class="post-metadata">

### Author: ![Renoria](https://dietpi.com/forum/user_avatar/dietpi.com/renoria/32/8093_2.png) [@Renoria](https://dietpi.com/forum/u/Renoria)
#### Post date: [14 October 2024 16:49 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/87 "2024-10-14T16:49:40Z")

</div>

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? 😇

---

<div class="post-metadata">

### Author: ![Renoria](https://dietpi.com/forum/user_avatar/dietpi.com/renoria/32/8093_2.png) [@Renoria](https://dietpi.com/forum/u/Renoria)
#### Post date: [14 October 2024 17:27 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/88 "2024-10-14T17:27:59Z")

</div>

```auto
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! 🤘 😍

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [14 October 2024 17:44 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/89 "2024-10-14T17:44:35Z")

</div>

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 🤔

---

<div class="post-metadata">

### Author: ![Renoria](https://dietpi.com/forum/user_avatar/dietpi.com/renoria/32/8093_2.png) [@Renoria](https://dietpi.com/forum/u/Renoria)
#### Post date: [14 October 2024 18:13 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/90 "2024-10-14T18:13:56Z")

</div>

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

Proper one would be:

```auto
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

---

<div class="post-metadata">

### Author: ![krisskross](https://dietpi.com/forum/user_avatar/dietpi.com/krisskross/32/7003_2.png) [@krisskross](https://dietpi.com/forum/u/krisskross)
#### Post date: [18 October 2024 20:31 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/91 "2024-10-18T20:31:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [12 December 2024 17:10 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/92 "2024-12-12T17:10:32Z")

</div>

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](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/77)

Test would be this:

```sh
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.

---

<div class="post-metadata">

### Author: ![dsouza](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/ac91a4/32.png) [@dsouza](https://dietpi.com/forum/u/dsouza)
#### Post date: [14 December 2024 18:07 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/93 "2024-12-14T18:07:41Z")

</div>

> [@MichaIng](#):
>
> `dpkg -i linux-{image,dtb}-vendor-rk35xx.deb`

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

```auto
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:~# 

```

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [14 December 2024 18:30 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/94 "2024-12-14T18:30:24Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dsouza](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/ac91a4/32.png) [@dsouza](https://dietpi.com/forum/u/dsouza)
#### Post date: [14 December 2024 20:18 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/95 "2024-12-14T20:18:40Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [16 December 2024 12:15 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/96 "2024-12-16T12:15:16Z")

</div>

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 🙂.

---

<div class="post-metadata">

### Author: ![dsouza](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/d/ac91a4/32.png) [@dsouza](https://dietpi.com/forum/u/dsouza)
#### Post date: [16 December 2024 13:52 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/97 "2024-12-16T13:52:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [23 December 2024 06:11 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/98 "2024-12-23T06:11:11Z")

</div>

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

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

```

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [23 December 2024 07:28 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/99 "2024-12-23T07:28:15Z")

</div>

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

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [23 December 2024 08:44 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/100 "2024-12-23T08:44:51Z")

</div>

Would be great, just to be sure.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [23 December 2024 09:48 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/101 "2024-12-23T09:48:05Z")

</div>

> [@MichaIng](#):
>
> Would be grea

done, seems to be working

```auto
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:~#

```

---

<div class="post-metadata">

### Author: ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)
#### Post date: [23 March 2025 09:48 UTC](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457/102 "2025-03-23T09:48:11Z")

</div>

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

[Previous page](https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457.md?page=4)
