Is there a way to boot from an external hard drive connected to the device through the USB port (as opposed to booting from the SD card)?
It is not possible to boot RPi from USB directly in the true sense of the word. However there's nothing to stop someone from making a mini-distro which would contain /boot and some kind of a boot manager. This could then implement booting from USB or even a PXE style environment. This could fit on a tiny SD card - 64MB cards are now available for pennies. I'm expecting that someone will roll a distribution for this - but haven't found one to date.
In the meanwhile you can move your own root partition onto hard disk to get faster boot times, but it's somewhat involved as you'll need to get a kernel that supports USB storage. Good instructions on how to do this can be found at: http://mitchtech.net/raspberry-pi-root-fs-on-usb-drive/
From the Raspberry Pi FAQ:
Indeed, if you can live with just the SD MS-DOS partition (/boot) where the kernel reside, you can have /root and everything else on an external device. USB memory card or a physical hard drive are fine as secondary drive. The good thing is that unless you 'dd' to the wrong location, this is a non-destructive procedure: one edit and you go back to the original,
To setup this configuration is pretty easy. You configure your installation as usual and the move/copy the EXT4 partition to the external drive.
Find the partition name, in this sample, '/dev/sda5' however, this partition will depend on your configuration.
Copy the running partition (note: is not a good advisable to copy a running partition, some files are in 'unstable' or open state, however, work fine):
now, edit the following line on the /boot/cmdline.txt file and modify the 'root' location:
To this new line.
Note that the boot partition is MS-DOS, so if you have to fix you can mount the SD elsewhere and edit. If boot fails, the loader will show on your (HDMI) screen the available mounting points.
This setup is contingent to the mount order. The partition number may change if the device is mounted on another slot; you can make this location independent as follows.
Find the the device 'UUID'
or create a new one
and get the newly assigned name
then edit the previously modified cmdline.txt changing the root location to:
After booting the new configuration, edit the fstab, remove the old /mmcblk0p2
note: This is a file will be on the 'new' /root device
In raspbian, just change the
For details on how to get raspbian on your usb, etc, you can check here http://blog.krastanov.org/2014/01/30/booting-pi-reliably-from-usb/
I instead used windows for 100% of the creation.
I used (the free) 'MiniTool partition manager' and just transferred the boot to my smallest SD card, which can automatically be expanded with the partition manager. Open the
Same partition manager let me copy the ext4 to my portable 1TB (FYI remove all partitions from drives first so you have unpartitioned space before transferring). Vala - booted. I'm noticing with the standard HDD the access times are a bit lacking even though they have very fast R/W speeds compared to most SD cards.
Only issue I'm having now is expanding the ext4 (root) partition from the original 32GB (of my original SD card). So I only have 32GB of the 1TB currently. Hmm. I'm only a novice with the terminal and its commands so partitioning in linux is a bit flustering, but this guide helped VERY well.