RaspberryPi rootfs on USB HDD

It will speed up RaspberryPi noticeable!


Using image 2016-03-18-raspbian-jessie-lite.zip from https://www.raspberrypi.org/downloads/raspbian/

Copy image to USB HDD, the same way as to SD Card

sudo dd bs=32M if=./2016-03-18-raspbian-jessie-lite.img of=/dev/sd?

In SD Card, on 64MB FAT boot parttion, open file "cmdline.txt" and change "root=/dev/mmcblk0p2" to root=/dev/sda2

Change fstab accordingly

$ cat /etc/fstab 
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/sda2	/               ext4    defaults,noatime  0       1
/dev/mmcblk0p2	/media/sdcard	ext4	defaults,noatime  0	  1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that