OpenMediaVault (PINE A64(+)) 4.13.10 [Nov 21] | OpenMediaVault (A64-LTS / SOPINE) 4.13.10 [Nov 21] | Q4OS (PINE A64(+)) 2.4-r1 [Nov 10] | Volumio (ROCK64) 2.299 [Oct 30] | Q4OS (Pinebook) 2.4-r1 [Oct 30] | DietPi (ROCK64) v156 [Oct 24] | Armbian - Xenial Desktop (Pinebook) 5.34 [Oct 24] | motionEyeOS (PINE A64(+)) 20171003 [Oct 23] | Android Images (ROCK64) 20171012 [Oct 23]

Getting Started | Visit the WIKI | IRC Logs | Forum Rules/Policy


Beginners Guide: Migrating to SSD
#1
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.


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.
Reply
#2
There are several other ways to address the Linux root file system (rootfs) partition. One of the easiest way (but bad) is to use the partition name like “/dev/sda1” in your /boot/efi/extlinux/extlinux.conf file.
Code:
label kernel-4.4
   kernel /Image
   initrd /initrd.img
   fdt /dtb
   append earlycon=uart8250,mmio32,0xff130000 rw root=/dev/sda1 rootwait rootfstype=ext4 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#}

This is NOT a recommended way if you have more than one USB disk to be attached to your system since the name “/dev/sda1” can be grabbed by any other attached disk depending on how fast the disk first responds during boot time. Your linux rootfs partition may become “/dev/sda1”, “/dev/sdb1”,  “/dev/sdc1”, etc.

A good way would be to use UUID of the disk partition instead. Here is how:

To find out the UUID of your rootfs disk partition, run sudo lsblk –f command. 

Edit /boot/efi/extlinux/extlinux.conf to use UUID. For example:
Code:
label kernel-4.4
   kernel /Image
   initrd /initrd.img
   fdt /dtb
   append earlycon=uart8250,mmio32,0xff130000 rw root=UUID=f86f4f1d-a3bf-4b87-98d0-18f586c27723 rootwait rootfstype=ext4 init=/sbin/init coherent_pool=1M ethaddr=${ethaddr} eth1addr=${eth1addr} serial=${serial#}

Note: You will need external USB disk enclosure or USB3-SATA converter with its own dedicated power supply for the Rock64 to remain stable. If you have more than one disk, get a powered USB3.0 hub.
Reply
#3
Excellent, thanks for posting this.  I was just getting ready to sort this out, and thought someone must have posted this info.  A quick search found your post. Smile

My Rock64 seems to be eating 4GB micro SD cards, as I've gone through 3 of them.  I'm moving the root FS to the HD now.
Reply
#4
Fine tutorial. In a few days the wiki will be finished and there will be an extensive software tutorial section. For future tutorials, you can just log into wiki (your forum profile will work) and submit stuff on there. More info on this soon.
  If you manage to click this link you'll join in the IRC channel
Reply
#5
i also find this howto well written. i'm curious if anyone has had the opportunity to use a ssd drive as a boot /filesystem device and has also had the experience of using eemc card for boot/filesystem. both methods using the rock64 4GB as the sbc. i would like to know if the ssd setup is about the same as using eemc? thanks.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
Information Guide - Raid Array (Raid 0) Ptheven 0 143 10-07-2017, 09:22 AM
Last Post: Ptheven
Information Guide - Setting up a NFS Share Ptheven 0 172 09-26-2017, 04:44 AM
Last Post: Ptheven
  Guide - Setting up a SMB(Windows) file server Ptheven 0 412 08-21-2017, 08:54 AM
Last Post: Ptheven
Information Beginners Guide: Locating your board, connecting to it. Ptheven 5 1,047 08-21-2017, 04:12 AM
Last Post: Ptheven
Information Beginners Guide: Adding USB Storage, Linux Formatting and Permissions Ptheven 3 656 08-16-2017, 01:19 AM
Last Post: Ptheven

Forum Jump:


Users browsing this thread: 1 Guest(s)