Need help setting up DietPi on NanoPi NEO3 with root on USB

Hello,

I’m relatively new to Linux and could use some guidance. I’m trying to set up DietPi on my NanoPi NEO3 (which has no eMMC and is forced to boot from SD card). According to the documentation, it should be possible to have /boot on the SD card and /root on an external USB drive for better performance.

I’ve been debugging via UART and tried the official NanoPi method, but it doesn’t work—the kernel detects the USB drive but fails to mount it. Since DietPi seems more flexible, I wanted to try it instead, but the tutorials I found appear outdated.

Could someone guide me through the process of configuring the system to mount /root on a USB drive.

Any advice or updated instructions would be greatly appreciated! Thank you in advance.

Can you share following

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

Yes, here is the output
The sda1 is the usb drive and mmcblk0 is the sdcard where the OS is installed and should boot from

root@DietPi:~# lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid
NAME FSTYPE LABEL   SIZE RO TYPE MOUNTPOINT PARTUUID                                                                                                                     UUID
sda               953.9G  0 disk                                                                                                                                        
└─sda1
     ext4   rootfs
                  953.9G  0 part            8f372bfe-3178-4d2c-bd9b-34b24d866cc9                                                                                         d984620a-01cc-4394-bbdb-8c73852545f5
mmcblk0
                   28.8G  0 disk                                                                                                                                        
└─mmcblk0p1
     ext4          28.8G  0 part /          bffe7164-01                                                                                                                  5022416c-c194-4106-b6a7-468aaf626950
root@DietPi:~#

Can you describe what you have done so far to move root folders to your USB drive?

Hi, sorry for the delay

I wanted to use dietpi-drive_manager, but the option to move the rootfs doesnt appear

After that I tried to build the img, modifying the dietpi-build to have a separated boot partition to make the ‘move the rootfs’ option appear. But the building process fails

Any ideas on how to achieve this?

Using the current image, it is not possible to move the rootFS to another drive, as it simply doesn’t exist in our image. It’s a single partition image.

Do you know which version(or year) was the last with separated rootfs partition?

nope. Maybe @MichaIng recalls.

This never worked on NanoPi NEO3, only on some legacy Odroid images which had a dedicated boot partition already, and on Raspberry Pi.

Having a /boot partition is one condition, but we explicitly allow it on (legacy) Odroids and RPi only, because the rootfs UUID needs to be adjusted in boot configs as well.

But we could theoretically add support for /boot/dietpiEnv.txt, i.e. remove the RPi/Odroid condition, and instead just check for the config files we know.

But there is a few more things to do, lets go through it. Here is how you should be able to add functional rootfs move for your NEO3:

Bookmarking this as starting point for implementing this into dietpi-drive_manager properly.