How to move your filesystem to a USB drive

(and why you might want to do this)

So you have a Raspberry Pi.

You know all about how it uses an SD card (or micro SD for RP B V2) BUT you have heard that SD cards can be a bit flakey when making lots of little read and writes…

SD cards work well in cameras where there are big writes and reads because this is what a camera wants to do, write new photos you have taken to the SD and load up the photos you have taken and want to admire.

Using SD cards on a Raspberry Pi is a little different. As you use your Raspberry Pi it will be making lots of lttle reads and writes all over the disk. Now this is what makes some IT super users (geeks?) a bit edgy. There is the possibility of the SD card failing, corrupting or generally just not performing very well. (one post I saw on the RP forums suggested that the major issue with corrupting SD cards might be to do with overclocking and some forum posts suggest this issue might be cleared up now e.g. see here)

Corrupting SD cards is not the only factor and for some speed is another reason to make the switch to USB for the filesystem (e.g. see here).

So one thing to bear in mind is that your Raspberry Pi will always have to do an initial boot from an SD card. (see here for more on this)

And then look for the root on the USB drive storing the file system (so all the reading and writing of files will happen on the USB drive rather than the SD card).

So if you’re interested in taking this project on, as we have done for our Malawi 2015 project; here is a good post detailing how to format your USB drive and copy the files from your existing OS stored on an SD card to the USB drive:

https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177

Make sure you backup before you start this kind of advanced tinkering!

Malawi 2015:

We are taking out 5 Raspberry Pi setups to Malawi this August (more posts on this soon). Our plan is to set them up to boot from USB pen drives for the reasons mentioned above (speed and reliability) as we won’t be around to fix them if they go wrong. We also thought it would make things a lot easier if we could set up one Pi and USB drive, and then just clone the USB drives for the remaining Pi. This also means we can just send over new USB drives as needed. (Long term – it will be great to tap into local expertise or train up volounteers to take on some of these maintenance tasks.)

Tim Greenwood

Tim currently works for Living Systems. His background is in psychology, and he has been working as a psychologist within education and the community for the last ten years. He recently gained a Masters of Arts in Management, Learning, and Leadership from Lancaster Business school focusing on the use of Action Research to promote curious and evolving ways of working with individuals, groups and organisations.

More Posts - Website

Published by

Tim Greenwood

Tim currently works for Living Systems. His background is in psychology, and he has been working as a psychologist within education and the community for the last ten years. He recently gained a Masters of Arts in Management, Learning, and Leadership from Lancaster Business school focusing on the use of Action Research to promote curious and evolving ways of working with individuals, groups and organisations.