Qnap Qhora-322 (iEi Puzzle-M902) boot from NVMe

Hello guys.

I have been using amd64 OpenWrt for a very long time. Recently, I bought an ARM-based device named Qnap Qhora-322. This device is very small but still with 10Gbps support.

  • it is more power-efficient
  • and easy to use

After tearing it down, I found that this device had an M.2 M-key socket inside. So I bought an NVMe SSD and installed it into this new router. However, I found it was very hard for me, an x86 user, to deal with U-Boot settings.

My concerns are:

  1. Now I can boot OpenWrt from a USB flash drive. But each time I boot the OS I would have to enter U-Boot CLI and run a boot selection command. If I do nothing during booting, Qhora-322 with enter its default OS. So how to make OpenWrt the default boot option?
  2. In OpenWrt OS, I can mount my NVMe drive. However, I don't know how to boot from an NVMe device. I didn't find any tutorials on the Internet.

I need help!

Usually this is controlled by the bootcmd variable in uboot.

What does printenv say, and which commands are you running to get it to boot from USB ?

Here's an example of automated usb recovery on the WRX36 - https://openwrt.org/toh/dynalink/dl-wrx36#usb_recovery

Are you sure the stock uboot supports NVMe booting ?

I appreciate your help.

  1. bootcmd=ext4load mmc 0:1 0x6500000 Image; ext4load mmc 0:1 0x6000000 cn9132-db-A.dtb; setenv bootargs $console cpuidle.off=1; booti 0x6500000 - 0x6000000
  2. My boot option is run bootusb command from U-Boot. The content of bootusb is attached.
setenv bootusb 'usb reset; ext4load usb 0:1 $kernel_addr_r Image;ext4load usb 0:1 $fdt_addr_r cn9132-puzzle-m902.dtb;setenv bootargs $console root=/dev/sda2 rw rootwait cpuidle.off=1 loglevel=8;booti $kernel_addr_r - $fdt_addr_r'

saveenv
run bootusb
  1. The version of my U-Boot is a little bit old. It does not support nvme command.

Then you probably can't boot directly from NVMe.

But you could perhaps trigger a 2nd boot loader located on the USB drive, then trigger the NVMe boot from it.

In worst case, store the kernel on the USB, and the roofs on the NVME.

Thank you for providing a potential solution.

If Qnap can release a newer version of U-Boot for this device, then I can boot from NVMe directly. I have notified Qnap of my requirement by E-mail and I hope they can hear my voice.

Hi littleNewton,

very interesting news (and thanks for these infos): I have 2 questions

  1. Can you explain how do you boot OpenWrt from USB drive?
  2. Can you share what did you use to connect the NVME drive?

I'm thinking to buy qhora 322 and I would like to use Openwrt without overwrite original QNAP OS: also to use NVME drive would allow many uses of this machine (without the need to boot).

Finally, I take this opportunity to ask you how the temperature is, especially during intensive use.

Thanks in advance

You can follow the instructions here: https://openwrt.org/toh/iei/puzzle-m902

Note: When you open this router chassis, you lose your device's warranty.

Your NVMe drive can be recognized directly once your OpenWrt supporting NVMe type block device. You can install it over opkg or compile it from scratch.

As for the temperature, I think this device is very hot.

I don't know whether OpenWrt has the module to adjust its fan speed automatically.

Qnap claim that once you open the box and install a third-party firmware, you do lose your warranty.