quick way to change rootfs(tested on rock64)

  1. prepare external drive, make separate partition with ext4 I used GPT table
  2. connect drive to the working board, and do next:
  • change existing disk LABEL by using: tune2fs /dev/mmcblk1p7 -L “linux-root1”
  • change existing PARTLABEL by : gdisk /dev/mmcblk1. Press c, and choose 7 number, after enter root1;
    3 do the reverse for your usb drive:
  • change disk LABEL by using: tune2fs /dev/sda1 -L “linux-root”
  • change PARTLABEL by : gdisk /dev/sda1. Press c, and choose 7 number, after enter root;
    4 mount drive, and move your existing root data : rsync -rav --info=progress2 / /mnt
  1. reboot

Many thanks for this! So on next boot, the USB drive will be used as rootfs, just because of disk label being linux-root?

This is really an easy solution which we could implement into dietpi-drive_manager.
But needs testing on which devices these steps only work.
E.g. I am pretty sure on RPi the rootfs entry in /boot/cmdline.txt will be always respected. Ordoids have their boot.ini. I will try it on VM (x86_84).

Have you been able to get this to work on the pine64?

I have been unable to get older methods to work to transfer the rootFS from the SD card to the USB. There have been some changes in how DietPi seems to reading the sd card and I am not linux savvy enough to be able to figure it out on my own.

This used to work on with my pine64, however I am unable to get it to work now.

I can tell that the rock64 uses a bit of a file system compared to the pine64 from what I’ve read here and else where but a lot of it is globl-d-gook to me. Any help would be great.

Thanks

  • Drew