08-19-2017, 12:59 AM
This is for Rock 64 LINUX beginners who wants to migrate their Debian Jessie/Stretch minimal from the SD card to a much faster (SSD) and/or bigger drive.
Assuming the SSD has already been connected, partitioned, and formatted to EXT4, here are few simple steps to follow: :
1. Label the SSD partition where the root file systems will be migrated to.
Here, my SSD partition is /dev/sda1 (yours maybe different) and I use rootfs as the label. You can use whatever label of your choice but make sure you use the same label on step 4.
2. Mount the SSD drive
3. Copy (or move) the root file system from the SD card to the SSD partition.
4. Tell Linux where to find the root file system by editing the configuration file /boot/efi/extlinux/extlinux.conf
In the editor, you will see the text as follows:
Change LABEL=linux-root to LABEL=rootfs or whatever label you used on step 1.
Save the change and exit the editor.
5. Reboot
After reboot and login back, you can verify with lsblk -f command.
Have fun.
Assuming the SSD has already been connected, partitioned, and formatted to EXT4, here are few simple steps to follow: :
1. Label the SSD partition where the root file systems will be migrated to.
Quote:sudo e2label /dev/sda1 rootfs
Here, my SSD partition is /dev/sda1 (yours maybe different) and I use rootfs as the label. You can use whatever label of your choice but make sure you use the same label on step 4.
2. Mount the SSD drive
Quote:sudo mount /dev/sda1 /mnt
3. Copy (or move) the root file system from the SD card to the SSD partition.
Quote:sudo cp -avx / /mnt
4. Tell Linux where to find the root file system by editing the configuration file /boot/efi/extlinux/extlinux.conf
Quote:sudo nano /boot/efi/extlinux/extlinux.conf
In the editor, you will see the text as follows:
Quote:label kernel-4.4
kernel /Image
initrd /initrd.img
fdt /dtb
append earlycon=uart8250,mmio32,0xff130000 rw root=LABEL=linux-root rootwait rootfstype=ext4 init=/sbin/init coherent_pool=1M
Change LABEL=linux-root to LABEL=rootfs or whatever label you used on step 1.
Save the change and exit the editor.
5. Reboot
After reboot and login back, you can verify with lsblk -f command.
Quote:sudo lsblk -f
Have fun.