The next step is to move your rootfs to the SSD to unleash the extra SSD power.
Move the rootfs to a SATA DriveIt’s impossible to boot from a SATA drive without an SD card, you will still need a small SD card for the bootloader. However, it is possible to adjust the bootscript (which is similar to a bootloader) on the SD card so that it points directly to your SATA drive. This way your system will boot the OS right from the SATA drive.
Here’s what you have to do:Note: all this commands require root privileges.
sudo fdisk -land identify your SATA drive. In this example
/dev/sdarepresents the SATA disk.
- Prepare your disk
Delete all partitions using the “d” option
> sudo fdisk /dev/sda
Create a new primary partition using the “n” option (you can accept all the defaults)
Use the “w” option the apply the changes.
Format the partition for rootfs with EXT4 filesystem
> mkfs.ext4 /dev/sda1
Copying RootfsI still assume that
/dev/sdarepresent the SATA drive
Change the kernel parameters in order to boot from the SSD drive
> mkdir /tmp/source /tmp/target > sudo mount /dev/mmcblk0p2 /tmp/source > sudo mount /dev/sda1 /tmp/target > (cd /tmp/source; sudo tar --backup -c *) |sudo tar -C /tmp/target -xv
Change the last line to:
> mkdir /tmp/boot > sudo mount /dev/mmcblk0p1 /tmp/boot > sudo vim /tmp/boot/uEnv.txt
Sync to disk and reboot to your hard drive
.. root=/dev/sda1 ...
You can test the result with:
> sync > reboot