New Guide: Using an External Drive as a Raspberry Pi Root Filesystem (And Some Related Musings)


I just finished up a quick guide and accompanying shell script for using an external USB drive to hold your Pi’s root directory:

One of the more noticeable limitations of the Raspberry Pi is using an SD card for its main storage. If you’ve been using a Pi for a while, you might be looking for more storage, faster access times, or media with a longer lifespan than many SD cards turn out to have.

For example, I’m working on a project to configure a set of custom Raspbian images to support some Adafruit hardware. I’d like to write a script to automate the process, but doing so will take quite a bit of storage space, and copying multi-gigabyte files can be pretty slow on an SD card.

One approach to this is to copy your root filesystem to an external drive, connected via USB, and tell the kernel to use this filesystem instead of one on the SD card.

This tutorial and its associated script borrow heavily from HOWTO: Move the filesystem to a USB stick, by paulv on the Raspberry Pi forums.

There’s a lot of thoughtfully composed documentation out there on doing just this (see the guide’s Further Reading section for a bunch of links), but as with most step-by-step processes culled from forums and blog posts, it took me a while to get the particulars right. Hopefully the shell script will alleviate some frustration if you’re looking for a similar setup.


Lately, as I work with little projects like this one,, custom kernel packages, and helper scripts for the PiTFT, I’ve been thinking about how the technical community approaches sharing our knowledge and making work reproducible for others.

There’s a staggering amount of work done every day – by people in the libre software community, engineers and tech support specialists at companies like this one, forum users, bloggers, tutorial authors, on down the line – to communicate what makes hardware and software work to other users and creators. Over the past few years I’ve seen a lot of how the sausage gets made (so to speak) at companies like SparkFun and Adafruit. I’ve followed a lot of conversations on mailing lists and groups like debian-devel and vim_use. I’ve spent a whole lot of my waking life for the last decade googling for the solution to some esoteric technical problem, and I’ve started to experiment with the problems of packaging, distributing, and documenting software for other people to use. (I’m not great at this yet, because it turns out to be way harder to do well than I ever knew.)

The thing I have realized is that, even when you’ve figured out how to solve a problem for yourself, it’s a lot of work to share what you’ve done with other people, especially if you want them to be able to actually use it. Oftentimes, it’s a lot more work to share your solution than it was to come up with the solution in the first place. What’s more, it’s often the kind of work that’s the least glamorous and shiny that makes the difference:

  • Writing thorough, clear documentation.
  • Keeping your stuff in public version control.
  • Keeping track of sources and referencing the things that helped you solve the problem.
  • Organizing your code to be understandable, even at the expense of cleverness and brevity.
  • Writing runnable scripts and Makefiles and so on in addition to prose instructions.
  • Packaging software for redistribution, complete with all the bureaucracy of licenses and changelogs and manual pages.
  • Fielding bug reports while maintaining composure and compassion for fellow users of things.

I don’t have any earthshaking revelations to share, but it’s on my mind that a lot of the problems most important to our community are about this kind of labor: The barely-visible work of scaffolding and infrastructure and communication. This is work that makes all the difference, even if it’s often thankless and unremarked by comparison to other things.

Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here:

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in!

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 36,000+ makers on Adafruit’s Discord channels and be part of the community!

CircuitPython – The easiest way to program microcontrollers –

Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !

1 Comment

  1. Great post. I completely agree on information hunting – I was on the Trinket forum for months finding out what issues folks had before writing one line of Getting Stared with Adafruit Trinket. That and writing good tutorials can be harder than finding the original solutions. Adafruit is a terrific company in their engineering. They are a truly great company for supporting their users (tutorials) and championing the greater ecosphere (DIYers from Art to STEM & more).

Sorry, the comment form is closed at this time.