Yes you could. I gave the UUID example out of habit, I do this on VM's where the disks are /dev/sdX and I want to make sure I get exactly the partition I want on boot in case the kernel/udev is messing the device ordering. In your case /dev/nmve0n1p1 should be fine for example.
You are right, you will need to move anyway the old /var contents to the new partition. In case you are able to mount the SD card on a Linux PC/VM, you could do that too before first boot. But maybe better to follow the procedure I describe later.
Probably the easiest would be to use a Linux VM (eg. VirtualBox). You can then use a usb SD card reader and pass it through to the VM.
My distribution does it (Ubuntu).
Yes.
After flash the Armbian image, boot it. Allow it to reboot and expand the filesystem. Then:
- disable ram log (by editing the /etc/default/armbian-ramlog and setting ENABLED=false) then reboot
- make sure you have the root password (you can set one with "sudo passwd" if you don't have it)
- reboot in rescue mode (use the root password when prompted)
sudo init 1
- mount the NVME partition you want to use as /var in /mnt. FYI: This step is to move the existing /var data to the new location. You need rescue mode so no services run and write stuff in /var when you do the move. Examples below assume that the partition you want to use is /dev/nvme0n1p1.
mount /dev/nvme0n1p1 /mnt
- move the data
mv /var/* /mnt/
- edit /etc/fstab and add a line with the /var mount.
/dev/nvme0n1p1 /var ext4 defaults 0 2
If you want to use UUID's you can run "blkid" command and you will get the UUID's of all disks/partitions. You can then take the one of the nvme0n1p1 and use it with UUID=<your uuid> like I showed you in the first answer.
- Reboot
theoretically if you knew the UUID of the partition on the NVME disk that you want to use as /var partition, you could do the following:
- after flashing the SD card with the Armbian image, put it in a reader (or a usb card reader) connected to a Linux PC.
- the / partition on the SD card should be auto mounted
- you can go and then edit the etc/fstab file on the SD card and add a line like this:
UUID=<your UUID goes here> /var ext4 defaults 0 2
put the UUID of the partition you want to use as /var in the above line.
- boot your SD card
I am not sure how this will work with the ram logging, you should try it yourself.
If it does not work I can show you how to move the /var partition on the NVME disk after Armbian boots the first time (I have done this myself and it works). This involves
- ram log disabling
- reboot in rescue mode
- identify the UUID of your NVME partition for new /var
- move the contents of the /var/ to the new /var
- modify the /etc/fstab to mount the new /var on boot.