4: Non-Volatile (Primary) Data Storage
- Page ID
- 432594
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)In the Raspberry Pi your "hard drive" is a micro SD card. This card also contains your operating system, which you must load when you boot up the pi. By loading different programs onto different SD cards you can actually change the functionality of a Pi by simply swapping micro SD cards. When you install the micro SD card the contacts should face the board. Instructions for installing the operating system will evolve over time and we will try and keep the Installing RPi OS page updated.

Raspberry Pi 4 Specs
- micro SD (Secure Digital) card
- Hard drive with image of operating system
- 50 MBps top transfer rate
- Twice speed of Pi 3
Micro SD Card Specs
Tom's Hardware, Android Central and PCguide have provided reviews of 2023 micro SD cards, and the size really depends on what you want to do, but 32 gigabytes will be plenty for most Applications
SD Card Labels
Speed Label
The problem with the "Speed Label" is this is for sequential reading (looking at an image or video", while when used as a general purpose computer you tend to pull lots of small files, with many read/write statements.
Minimum Sequential Write Speed | Speed Class | UHS Speed Class | Video Speed Class |
90MB/sec | V90 | ||
60MB/sec | V60 | ||
30MB/sec | U with 3 in it | V30 | |
10MB/sec | C with 10 in it | U with 1 in it | V10 |
6MB/sec | C with 6 in it | V6 | |
4MB/sec | C with 4 in it | ||
2.5MB/sec | C with 2.5 in it |
Performance Application Class
This gives the minimum number of Input/Output operations per second (IOPS). When using the micro SD card as a hard drive you want this to be as big as possible
Class (App Performance | Minimum Random Read | Minimum Random Write |
A1 | 1500 IOPS | 500 IOPS |
A2 | 4000 IOPS | 2000 IOPS |
There is evidence that the A1 cards are actually slower on the Raspberry Pi, and the verdict is still out (See Jeff Geerling's blog posts July 22, 2019 and July 22, 2019).
Bus Interface Label
These deals with how fast data can be transferred in and out of the card and uses a ROMAN Numeral. UHS means Ultra High Speed
Speed Designation | High Speed | UHS-I | UHS-II | UHS-III |
Label | no label | I | II | III |
Speed | 25 MB/s | 104 MB/s | 312 MB/s | 624 MB/s |
Note: High speed and UHS-I micro SD cards have a single row of connectors, while UHS-II and UHS-III have two rows of connectors. Since the fastest transfer rate of a Pi is 50 MB/s there is no reason to get a UHS-II micro SD card.
Formatting SD Cards
FAT stands for File Allocation Table and there are 3 FAT standards that SD cards use
Standard | FAT16 | FAT32 | exFAT |
Capacity | 128 MB to 2 GB | 4GB to 32GB | 64GB to 2 TB |
This section needs to be developed as there is a lot of conflicting information
Raspberry Pi Speed test
Instructions at https://www.raspberrypi.com/news/sd-card-speed-test/
in Command Line
sudo apt update sudo apt install agnostics
Once installed you will see new menu item under Accessories in main menu
Internet in a Box
It is actually rather amazing what you can put on a microSD card. Internet-in-a-box (iiab) is an organization devoted to making online content available in regions without internet access by capturing images of the web, and these images can be placed into a microSD card, and the Raspberry Pi is then used as an internet hotspot. This is really a fascinating use of the Raspberry Pi. I have an iiab with all of wikipedia, a map of the world with building level precision (think Google Maps), almost 10,000 Khan Academy videos and a ton of other stuff. It is absolutely amazing what you can put onto a micro SD card. The iiabFAQ is a good place to start and links can be found on their download site. Note, on an iiab you are typically only reading, that is, you are using it to read an image off the "web", and so the micro SD card usage is different than a normal Pi, where you are reading and writing all the time.