NanoPi R5S - Boot from NVMe

You are right. I was also confused by the /dev/mmcblk2boot* devices, on your’s and our images, but those are pointing to the /dev/mmcblk1p2 partition, and are added by the kernel as pseudo-devices, I guess. I mixed it up with the other RK35xx SBCs indeed.

If someone is ready to possibly break bootability without manually reverting the change, I would like to see whether it can boot from eMMC with all the files in its root instead of /boot subdirectory. Can be tested like this:

umount /boot
mv /media/mmcboot/boot/{,.??,.[^.]}* /media/mmcboot/
rmdir /media/mmcboot/boot
umount /media/mmcboot
sed -i '/[[:blank:]]\/boot[[:blank:]]/d' /etc/fstab
sed -i 's|/media/mmcboot|/boot|' /etc/fstab
systemctl daemon-reload
mount /boot

So the content on the eMMC is moved from the subdirectory into its root, the old boot mount is removed, and the eMMC directly mounted to /boot instead. The /etc/fstab should then contain only:

# ...
tmpfs ...    /tmp      ...
UUID=...     /boot     ...
UUID=...     /         ...

Looks like the NanoPi R5/6 are then another case where such mini images would be handy: USB boot | Provide tiny SD card image as USB boot relay · Issue #6186 · MichaIng/DietPi · GitHub
So even the content of /boot can remain on the rootfs drive and the eMMC (or SD card) contains only a tiny U-Boot to boot script which does nothing more than loading and running the boot script from the NVMe or USB drive.

1 Like