Quickly Set up an External Hard Drive on a Raspberry Pi Using a Script
If you want to use an external hard drive (or USB stick) as your primary storage on your Raspberry Pi, you’ll need to jump over a couple of hoops to set it up properly and make sure it boots on boot. Adafruit has made this process a little easier.
With just a couple of lines of code, the Adafruit script makes your external hard drive the new root hard drive and boots into it automatically. You will still need an SD card, but otherwise almost everything you do will happen on the external drive automatically. Visit Adafruit for a complete guide.
Using an External Drive as the Raspberry Pi Root File System | Adafrut