A shell script for configuring an external USB drive as boot and root filesystems on a Raspberry Pi running Hassbian.
First, read the original tutorial as well as the instructions for booting from USB, here.
NOTE: This WILL update the firmware on your Raspberry Pi in order to boot from USB
On a Raspberry Pi running Hassbian, with a USB-connected storage device you wish to use for your boot and root filesystems:
git clone https://github.com/redlotusaustin/Hassbian-External-File-System-Helper.git
cd Hassbian-External-File-System-Helper/
sudo ./hassbian-externalfs-helper -d /dev/sda
...where /dev/sda
is the external USB you wish to use for a root filesystem.
This script is mostly an implementation of the process outlined in paulv's HOWTO: Move the filesystem to a USB stick on the Raspberry Pi forums, combined with Christian Cawley's article on USB booting and additional help from the following sources:
- The Arch Linux wiki, GUID Partition Table for what a GPT is and
some
parted
commands. - GUID Partition Table, Wikipedia
- Booting from an external USB drive, from the Raspberry Pi StackExchange.
- Booting a Raspberry Pi reliably from USB in the presence of multiple USB drives, by Stefan Krastanov.
- Speed up your Pi by booting to a USB flash drive, by Sam Hobbs.
- This comment on
root=
ininit/do_mounts.c
in the Linux source tree.
Along with manual / info pages for: