Radxa Rock 5B, nvme-boot… Need some help!

Hi there,
sorry, I am new to the forum and can’t find an answer for my problem.

I have an installed DietPi 8.19 on my sd card and wanted to transfer it to a nvme drive. So i googled, tried many things, but I was not able to boot from the nvme.

First I cleaned and formated the nvme. Than I make an exact copy from the sd card to the nvme with the “dd” command (disk:mmcblk1, part:mmcblk1p1 to disk:nvme0n1, part:nvme0n1p1). After that was done, i changed on the nvme in the “/etc/fstab” the ID of the drive to the nvme one. After all I use this → Rock5/install/spi - Radxa Wiki
to flash the SPI. I also checked the md5sum of the bootloader with the file, everything seems to be fine, shutdown, pull sd card and started again.
I don’t know what to do, it is not booting. Tried so many things and read so many documentations. Is this way possible to bring a running DietPi to a nvme drive?

Am I totally wrong with my idea?

Thanks for your help!
André

Saw this on the dietpi forum but I you would ask it here anyway. You need to figure out which bootloader dietpi uses: armbian-style or the “official” distro style. Then flash the corresponding SPI image. But it’s not easy to get nvme boot to work in general.

did you adjust /boot/extlinux/extlinux.conf to reflect the UUID of your nvme drive? If not, the kernel might just not find the root filesystem to boot into

1 Like

First I cleaned and formated the nvme. Than I make an exact copy from the sd card to the nvme with the “dd” command (disk:mmcblk1, part:mmcblk1p1 to disk:nvme0n1, part:nvme0n1p1).

Your dd should be from mmcblk1 to nvme0n1 not mmcblk1p1 to nvme0n1p1 ie you should be copying the whole sdcard. Once you boot from nvme you can expand the nvme0n1p2 partition

After you dd the UUID of the nvme should be the same as the SD card UUID.

1 Like

Thanks for all your answers!
I think, that the SPI-file is correct, but I found a strange thing.
I cloned with “dd” (now also with “mmcblk1” to “nvme0n1”), write the SPI and nothing work on the nvme.
Than I made “a mistake” in changing the UUID in the “/etc/fstab” and the system was botting. But with the wrong UUID, it can’t start completely.
There is also no “/boot/extlinux/extlinux.conf” in dietpi, only a “/boot/dietpiEnv.txt”, but with the dd command (as @mtx512rk said), the UUID is the same now.

I don’t know what technically can be the problem. Is it the SPI-file or some setting with the UUID in the “/etcfstab”, "/boot/dietpiEnv.txt " or something like that. Because with the wrong setup, the system was starting.

Or do someone know, that it is better to start the nvme drive over an usb port? Is that easier to start?

Thanks for all your help!
André

You need to dump of the contents of /boot/dietpiEnv.txt from your nvme. Dietpi implements there own uboot scripts to determine which boot device to use. So it is a case of determining what parameter drives that from the dietpiEnv file.

Also if have serial output from the nvme boot that it would give an indication of how far the boot flow progressed.

1 Like

For those who are interested, I have done it this way.
I copied everything with rsync to the nvme. But it was not possible to boot directly from the nvme.
So I edited the /boot/dietpiEnv.txt and the /etc/fstab and changed the UUID from the sd card to the nvme one.
Now the system starts up, checks the sd card for boot device, than the system switched to the nvme (because the rootdev is assigned there) and the system starts from nvme.
That was the only way for me to bring it up to start from nvme.
And the speed now is amazing :wink:

2 Likes