Oram/Pi5 Boot from NVMe?

I put: root=/dev/nvme0n1p2 rootfstype=ext4 fsck.repair=yes rootwait console=tty3 logo.nologo quiet splash vt.global_cursor_default=0 modules-load=dwc2,libcomposite
into custom boot options and the Zynthian started up ok but when I look at “dmesg | mounted” I only see the 2nd uSD partition but when I “df -h | grep firmware” it returns /dev/nvme0n1p1
Also I now realize it’s possible to boot from one device and set another as root and, just to be clear, my hope was to be able to boot from and have root on the NVMe drive.

Probably this would be enough.

Would not that require to have both SD card nad NVME disk at the same time?
Or am I missing something here? GUI is on the partiotion 2 so when I change the custom boot option it changes the cmdline.txt file on SD card’s partition 1 to point to NVME partition 2, but it wont boot without sd card.

I’m not sure this will work because the sdcard one will still be written to the file. You’ll end up with two root= stanzas.

If anyone wants to test you can use a usb drive instead.

My tip for today is to double check what you buy. Even though they have the same form factor and fit into the keyed slot, SATA drive is not the same as NVMe. :pensive:

I bought the right drive from my local second hand computer shop and now have Zynthian booting from NVMe. Here is what I did and what still needs to be done in Zynthian software:

  • Build a RPi5 *GB + active heatsink + Pimoroni NVMe Base + PC Specialist G930E 256GB M.2 NVMe
  • Add power - I got 4 long and 4 short green LED pulses indicating “Unsupported board type”. It needed a bootloader update…
  • Used Raspberry Pi Imager to flash USB+NVMe bootloader to a spare uSD card
  • Inserted the uSD with bootloader in RPi5 and powered - after a few seconds the green LED flashes continuously to indicate success
  • You could write the Zynthian OS directly to the NVMe - I didn’t have this facility so uses ZynthianOS do do so thus:
  • Used dd or Raspberry Pi Imager to flash 2024-05-22-zynthianos-bookworm-aarch64-oram-2405 to 32GB uSD
  • Booted RPi5 with ZynthianOS uSD
  • Waited for reboot - note, Zynthian will be in a restart loop due to no audio - don’t worry yet…
  • Connected network cable to RPi5
  • ssh to Rpi5 using ssh root@zynthian
  • Run raspi-config and select 6. Advanced Options, A4 Boot Order, B2 NVMe/USB Boot
  • wget https://os.zynthian.org/test/2024-05-22-zynthianos-bookworm-aarch64-oram-2405.zip
  • unzip 2024-05-22-zynthianos-bookworm-aarch64-oram-2405.zip
  • dd if=2024-05-22-zynthianos-bookworm-aarch64-oram-2405.img of=/dev/nvme0n1
  • mount /dev/nvme0n1p1 /media
  • nano /media/cmdline.txt - change root parameter to root=/dev/nvme0n1p2 then ctrl+x to exit (I prefer vim but most users won’t.)
  • reboot - should now boot to ZynthianOS from NVMe
  • Connect web browser to http:\zynthian and set audio to Dummies. (I didn’t do this earlier because it would have set it on the uSD and would need doing again.
  • Reboot

These steps have been written mostly from memory and with some modification from what I actually did, which is not good in an old codger like me so there maybe errors. Please report back so that we can update this guide.

[Edit] Removed info about issue editing root partition mount point - fixed.
[Edit] Fixed path to NVMe drive.


@riban I’ve seen this mentioned here before. Is it better to write to an Sd then transfer to NVME via dd?
I did wrote zynthian image straight to my NVME drive using a usb to NMVE adpater. I was able to boot but ran into all kinds of trouble which I was able to find answers for throughout the forum. Main issue is edit the cmdline.text file for the correct NVME partition names which sometimes works and sometimes it switches back.
I’ve read someone in here mentioning that writing straight to NVME caused a lot of issues but I found that’s a weird behavior.

I did not have a mechanism for writing directly to the NVMe, except for booting the RPi in an OS, hence I used Zynthian as that OS. You should be able to write the image to the NVMe any way you want / can and it should work. I outlined my approach but yes, that part of the guide could be updated to exlain that you just need to get the image on there.

I have now removed the uSD but need to remember to manually update /boot/firmware/cmdline.txt after each time I update via webconf. I am looking at this webconf issue now…

1 Like

Great! Thank you.

I have fixed the issue with updates and config changes, e.g. via webconf changing the root mount point. It will now reuse what is set in /boot/firmware/cmdline.txt so we should have a reliable NVMe boot environment. It may be nice to simplify / automate some of the steps.


That is very useful @riban, thank you for having spent time into unlocking this apparently troublesome startup of Oram from nvme on RPI 5.

I will try to replicate the listed steps, and see what happens with my Argon Neo Pi5 + Crucial nvme.

Nice, finally I can run it from a usb stick!

The dd command seems to be failing for me. I get:
dd writing to '/dev/nvme0" : Invalid argument


Thanks @harrylnorris. I had written the wrong path to NVMe drive. I have edited the post to correct this.

Just checking - were you able to boot and establish root with no SD card inserted?


Yes! My RPi5 has no uSD, only NMVe. I can reboot it and it boots to ZynthianOS and works fine. Root partition on the NMVe is used.

What is the boot time? How much faster is booting from NVME compared to your SD card?

1 Like

Boot time is just a few seconds faster, maybe 15s compared with 18s on a RPi5, so it is marginal. The boot time in Oram and on RPi5 has improved greatly so these few extra seconds are less of a concern. Some other operations are faster though, particularly disc access. I might expect better read/write performance such as recording / playback of multitrack audio, but that isn’t tested yet.



I thought NVMe would be faster than SD. So I will give Oram a try…

Hi @all!

FYI, i’ve been testing this NVMe expander for the RPi5:

It fits perfectly the V5 case! Like designed for it!! :nerd_face:

Off topic
BTW, note the new position of the SD-card connector in the main board. I had to short the distance and improve the wiring so the sdcard synchronous signal could travel the distance in less than half period at the faster frequencies supported by the Pi5. FYI, RPI5 supports SDR104 cards at full speed, what means the bus frequency is 208MHz, compared with the RPI4 that only supports DDR50 with the data bus running at 48MHz. If you do some calculations, you can see how close to the physical limit we are, so every mm counts and i had to deploy “best practices” for routing high frequency signals. Much fun when it finally worked! :sweat_smile:

This is the detail of routing:

Note the track-length matching, to keep the signal synced and the “big” separation between tracks to avoid cross-talking.