NanoPi R5S - Boot from NVMe

Hello @MichaIng and thanks for your work!

I recently acquired a Nanopi M6 that should have the same “issue” as the R5S in needing the SD Card/Emmc with the bootloader, so I think the answer would be generic for all the more recent Nanopi boards.

I did the first time setup (including the system update and the password setting) and my M6 now starts perfectly from the SD, and I’m able to login with ssh etc …

Now: I put an nvme inside the M6, and I’d like to run only the bare minimum from the SD Card while all the system should go in the nvme.
I don’t have the emmc on board, so SD card is the only boot option for me

This is the starting disk status, mmcblk1 being the SD Card

root@DietPi:/tmp# lsblk 
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk1     179:0    0   7.4G  0 disk 
└─mmcblk1p1 179:1    0   7.4G  0 part /
nvme0n1     259:0    0 931.5G  0 disk 

I followed the instructions (using the correct image for the M6) stopping before the last line

cd /tmp
wget https://dietpi.com/downloads/images/DietPi_NanoPiM6-ARMv8-Bookworm.img.xz
apt install xz-utils
xz -d DietPi_NanoPiM6-ARMv8-Bookworm.img.xz
dd if=DietPi_NanoPiM6-ARMv8-Bookworm.img of=/dev/nvme0n1 bs=1M status=progress

This is the disk status after the commands

root@DietPi:/tmp# lsblk 
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mmcblk1     179:0    0   7.4G  0 disk 
└─mmcblk1p1 179:1    0   7.4G  0 part /
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0   1.1G  0 part 
└─nvme0n1p2 259:2    0     1M  0 part 

Is it not clear how to proceed from here, as applying the last operation

parted /dev/mmcblk0 rm 1

changing mmcblk0 → mmcblk1 will delete the sd card partition, including the bootloader

Tried it and upon a reboot Nanopi is stuck with fixed red light, nothing happening (so I suspect that removing the sd card partition wasn’t a good idea)

Any help is really appreciated, Thanks!!!