Boot TinyPilot from a USB drive
November 8, 2022
By default, TinyPilot boots from a microSD card, but a USB drive can be a fast and reliable alternative.
Why boot TinyPilot from a USB drive?
If you need to factory reset your TinyPilot device but you don't have a microSD drive or microSD card available, you can boot from a USB flash drive or SSD drive instead.
Booting from a USB SSD drive is an effective way to improve your device's reliability. USB SSDs are more durable than microSDs to frequent writes and unexpected power cuts, so booting from an SSD will reduce your TinyPilot device's risk of boot failures.
USB SSD drives are faster than microSDs. For the most part, disk speed does not limit TinyPilot's performance, but if your TinyPilot workflows involve frequently uploading virtual media images, you'll see improved performance on an SSD.
Pre-requisites
- A TinyPilot device
-
An 8 GB (or larger) USB drive
- e.g., a USB flash drive or USB SSD drive
-
- A free, open-source tool for writing microSD images
Flash TinyPilot's software onto your USB drive
To prepare your USB drive, insert it into your computer, and follow the instructions for flashing a microSD, except on Balena Etcher's "Select target" screen, select your USB drive as the target.
Boot from the USB drive
You're now ready to boot your TinyPilot device from the USB drive:
- If your TinyPilot device is running, shut it down (System -> Power -> Shutdown).
- Disconnect your TinyPilot device from power by removing the USB power cable. For PoE-enabled devices, disconnect the Ethernet cable as well.
- Remove the microSD card.
- Connect the USB drive to any of the USB-A ports on your TinyPilot device.
- Power on your TinyPilot device by reconnecting the USB power and/or Ethernet cables.
That's it! After a few minutes you should be able to access your TinyPilot device at https://tinypilot.
Troubleshooting
Upgrade your firmware
Booting TinyPilot from a USB drive requires a hardware-level firmware upgrade that was published in November 2020. Most TinyPilot devices run this firmware out of the box, but if you're having trouble, your device's firmware might be out of date.
To upgrade your TinyPilot's firmware, SSH in to your TinyPilot device and run the following commands:
sudo raspi-config nonint do_boot_rom E2 && \
sudo reboot
Update the boot order
If your TinyPilot device won't start from the USB drive but will start from the microSD card if you reinsert it, then you may need to update the boot order.
To set the correct boot order, SSH in to your TinyPilot device and run the following commands to configure the USB drive as the preferred boot option:
# "Boot from USB if available, otherwise boot from SD Card" (option B2).
sudo raspi-config nonint do_boot_order B2 && \
sudo reboot
Restoring your original boot settings
If you change your mind, you can go back to booting from a microSD card:
- If your TinyPilot device is running, shut it down (System -> Power -> Shutdown).
- Disconnect your TinyPilot device from power by removing the USB power cable. For PoE-enabled devices, disconnect the Ethernet cable as well.
- Disconnect the USB drive from your TinyPilot device.
- Insert your TinyPilot microSD into your TinyPilot device.
- Power on your TinyPilot device by reconnecting the USB power and/or Ethernet cables.
Your TinyPilot device will still look for a USB drive when it turns on, which might make it take longer to start up. To configure your TinyPilot device to boot from the microSD card before any USB drives, SSH in, and enter the following commands:
sudo raspi-config nonint do_boot_order B1 && \
sudo reboot
Written by Charles, TinyPilot Support Engineer