Boot from NVME M2

Hello,

i’ve got a 4b+ and installed armbian bullseye 22.11.0 on eMMC. As i want to use the 4b+ for home automation with mysql db, i’d like to change it to boot from nvme. I choose the gigabyte NVMe SSD M.2 2280 and it’s listet in lsblk.

rock@rockpi-4b:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk1 179:0 0 28,9G 0 disk
└─mmcblk1p1 179:1 0 28,6G 0 part /
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 252:0 0 1,9G 0 disk [SWAP]
zram1 252:1 0 50M 0 disk /var/log
nvme0n1 259:0 0 119,2G 0 disk

I don’t know what to do next. I read about u-boot and so on, but i really didn’t get, what to do. On armbian there should be a nand-sata-install tool that i can’t find on the system nor am i able to apt-get install this.

Any help is appreciated
Kind regard

What is Your idea behind that use case to move it to nvme? System may boot a little bit faster but You will probably just get better results using both eMMC and nvme (with this one for apps, and data).

U-boot and spi stuff update allows You to boot directly from nvme, that is useful for boards without eMMC and even sd card. You got eMMC soldered so it’s there all the time to be used. You could simply create ext4 partition and dd system there, then just update fstab. This was so many time covered here that You could easily find that, like here: Moving file system to NVME procedure?

For armbian script - try armbian-install.sh or armbian-config - they sometimes work.
Also test Your nvme for speed, depending on configuration You will get from 400MB/s to 1.2GB/s, full speed can be achieved with special pcie2 overlay (that also is rather untested on armbian or stopped to work on recent images). If everything is ok then do stability tests, sadly it’s not easy and often You will find board with kernel panic after some time :confused:

when running a system with a database on it from uSD card, the card will fail in less than a year. Booting from the card will be OK, but the system, data and apps should go on nvme, of course. Actually i want to recreate my home automation system running an a raspberry pi 3b+ (1GB Ram) to the rockpi 4b+ (4GB Ram). Good to know, that for achieving this, i doesn’t need to care about spi and u-boot and so on.

Only thing in your link is, that i’m not having the /boot/extlinux/extlinux.conf file to change the root.

armbian-config and option 1 (boot from SD system on nvme) doesn’t work.

I’m in energency mode now. i think the problem is, that there’s nothing in /media/mmcboot

Is it possible to fix this or do i’ve to flash the SD again?

You messed a bit and probably it worth to start over.

Option that you selected is useful for boards that dont have eMMC and are early to boot from anything else than sd card. Armbian already has some features to avoid excessive writes (mainly logs). EMMC in 4B+ is much more reliable than sd.

Dont use any sd card. Flash again system to eMMC, and just mount data partition from nvme.

i’m completely confused now. If not using any sd card, how should it be possible to flash to eMMC?

There is special maskroom mode which allows You to do that using rockchip utils. You need to have good data, rockchip drivers and You are connecting board to computer. Browse radxa wiki for details, it’s easy to find.

if anyone has this same problem with emergency mode:

please look here

in german i would say “ich fasse es nicht”.

So in emergency mode enter your root password and then edit your /etc/fstab to include the “UUID=” to the line where /media/mmcboot is in (nano -w /etc/fstab then edit the line and ctrl-x and type yes and then reboot)

correct (in my case)

UUID=cc5076f8-df76-4861-a274-193e1d343175 /media/mmcboot ext4 defaults,noatime,commit=600,errors=remount-ro,x-gvfs-hide 0 1

NOT correct (by armbian-install or armbian-config):

cc5076f8-df76-4861-a274-193e1d343175 /media/mmcboot ext4 defaults,noatime,commit=600,errors=remount-ro,x-gvfs-hide 0 1

I spend hours to find this. Hope that anybody find this useful.

Kind regards