mkdir /mnt/future-root
mount /dev/sda1 /mnt/future-root
cp -ax / /mnt/future-root
Then edited the kernel params so that they don’t use the old “disk” (sdcard) but use the new one instead.
blkid
from which I noted the UUID
of sda1
, but also the old one of /dev/mmcblk1p2
(may be slightly different, it’s the sdcard).
I went with this to the kernel’s boot command line, in /boot/extlinux/extlinux.conf
and replaced the sdcard’s UUID with the one I’d noted for /dev/sda1/
in the root=UUID=00000000-1111-2222-3333-444444444444
directive.
Then I:
mkdir /mnt/mmcboot
and modified /etc/fstab
to mount the sdcard into /boot
, like Armbian do:
UUID=<the sdcard's> /mnt/mmcboot ext4 defaults,noatime,commit=600,errors=remount-ro,x-gvfs-hide 0 1
/mnt/mmcboot/boot /boot none bind 0 0