Using an SSD for your Raspberry Pi offers galore advantages complete a modular microSD card. To alteration it, conscionable travel our step-by-step instructions.
Both SSDs (solid-state drives) and SD cards usage fundamentally akin flash retention exertion to shop data. However, SSDs connection faster controllers and much responsibility tolerance, making them overmuch much reliable than SD cards. While astir Raspberry Pis are still moving connected microSD cards, you whitethorn besides usage an outer SSD to footwear your Raspberry Pi.
Below, you'll study nan steps to alteration USB footwear connected Raspberry Pi, past usage an outer SSD arsenic bootable media to footwear Raspberry Pi OS and usage nan leftover abstraction arsenic imperishable retention for your data.
Things You Will Need
You will request nan pursuing items to alteration SSD footwear connected Raspberry Pi:
- Raspberry Pi (4, 400, 3B+, Zero W, aliases Zero 2 W)
- microSD paper (1GB minimum, 64GB maximum)
- microSD paper scholar
- Keyboard and a rodent (both wireless aliases wired will work)—not required if you want to alteration SSD footwear connected a Raspberry Pi 4 aliases Pi 400
- Any type of outer SSD (such arsenic M.2, SATA, aliases NVMe/PCIe)
- USB enclosure for nan SSD (if utilizing an soul SSD)
Boot Raspberry Pi 4 aliases 400 from SSD
Booting a Raspberry Pi from an SSD and utilizing it for imperishable retention tin supply important capacity improvements and reliability complete utilizing a microSD card. To footwear a Raspberry Pi 4 aliases Raspberry Pi 400 from SSD, you must alteration USB footwear by pursuing these steps:
- Connect nan microSD paper to different machine utilizing a paper reader.
- Download, install, and motorboat nan Raspberry Pi Imager instrumentality connected your Windows, Linux, aliases Mac system.
- Click nan Choose OS fastener and past take Misc Utility Images > Bootloader > USB Boot.
- Click nan Choose Storage fastener and prime nan microSD paper connected to your system.
- Click Write and hold for nan flash process to complete. It will return a fewer seconds only.
- After nan flash process, nan microSD paper is auto-ejected. Disconnect nan microSD paper from nan strategy and insert it into nan microSD slot of your Raspberry Pi 4 aliases 400.
- Connect nan powerfulness proviso to nan Raspberry Pi to move it on. The Pi will automatically publication and flash nan USB bootloader from nan connected microSD card. This takes a fewer seconds.
- When nan flash is successful, nan greenish LED ray connected nan Raspberry Pi starts blinking steadily. To corroborate further, link nan HDMI larboard to a display. If nan show shows a greenish screen, it indicates that nan flash process is complete.
- Turn disconnected nan Raspberry Pi and disconnect aliases region nan microSD card.
Boot Raspberry Pi 3 aliases Zero from SSD
To alteration SSD footwear connected Raspberry Pi 3, Zero W, aliases Zero 2 W, you request to flash nan modular Raspberry Pi OS connected nan microSD card, footwear nan Raspberry Pi, and make a fewer changes to nan configuration files to alteration USB (SSD) boot. The steps are arsenic follows:
- Insert a microSD paper into nan strategy and motorboat nan Raspberry Pi Imager tool.
- Click connected Choose OS and past prime Raspberry Pi OS (32-bit).
- Click Choose Storage and prime nan microSD paper from nan disposable retention devices.
- Optionally, you tin click connected nan gear icon to bring up nan precocious options, past participate your network’s Wi-Fi specifications and alteration SSH.
- Click nan Write button.
- After nan flash process is complete, eject nan representation paper from nan system, insert it into nan Raspberry Pi 3, Zero, aliases Zero 2 W, and move it on.
- Connect a keyboard and a rodent to nan Raspberry Pi.
- After it boots up, log successful utilizing nan default username pi and password raspberry (unless you changed these successful nan Raspberry Pi Imager precocious options).
- Open nan Terminal window and tally nan pursuing commands. sudo apt update -y
sudo apt full-upgrade -y
- After updating and upgrading nan packages, tally nan pursuing bid successful nan Terminal window. vcgencmd otp_dump | grep 17
- The output will show a code, 17:1020000a, showing that USB footwear is disabled. To alteration USB boot, we request to edit nan config.txt record by moving nan pursuing command. sudo nano config.txt
- Scroll to nan bottommost of nan file. For nan very past line, adhd nan pursuing code. program_usb_boot_mode=1 Press Ctrl + X, type Y and deed nan Enter cardinal to prevention nan changes. Alternatively, you whitethorn tally nan pursuing bid to adhd nan required codification to nan config.txt file and alteration USB footwear connected Raspberry Pi 3, Zero, aliases Zero 2 W. echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
- Restart nan Raspberry Pi and past tally nan pursuing bid to corroborate if USB footwear is enabled. vcgencmd otp_dump | grep 17
- If nan output shown is 17:3020000a, USB footwear is enabled. You tin now region nan microSD paper from nan Raspberry Pi 3, Zero, aliases Zero 2 W.
- Once USB footwear is enabled, you tin region nan codification from nan config.txt record utilizing nan nano editor aliases nan pursuing command. sudo sed -i 's/program_usb_boot_mode=1//g' /boot/config.txt
Learn much astir ways to edit nan boot/config.txt record connected Raspberry Pi.
Prepare Bootable Raspberry Pi SSD
To footwear nan Raspberry Pi Zero, Raspberry Pi 3, Raspberry Pi 4, aliases Raspberry Pi 400 via SSD, you must instal an operating strategy specified arsenic Raspberry Pi OS connected nan SSD by utilizing Raspberry Pi Imager (or nan Balena Etcher tool).
In lawsuit you are already moving an OS and services via microSD card, you tin clone nan SD paper to nan USB difficult thrust utilizing Balena Etcher.
After penning aliases cloning nan OS, you tin link nan SSD to nan Raspberry Pi via a USB larboard and tally connected nan Raspberry Pi. The Pi will automatically observe a USB thrust and footwear nan OS from nan SSD. If USB retention is not detected, nan Raspberry Pi will proceed to footwear from nan microSD paper (if connected).
To hole nan SSD for boot, travel these steps:
- Launch nan Raspberry Pi Imager instrumentality and link your outer SSD to your Windows, macOS, aliases Linux strategy via a USB port.
- Click Choose OS to prime nan desired OS from nan list. If you want to flash a downloaded OS image, you tin usage nan OS record by clicking connected nan Use Custom action and past selecting nan OS record from your system.
- Click Choose Storage to prime nan connected SSD retention media.
- Click nan Write button.
- After nan OS is flashed connected nan SSD, dismount nan SSD thrust from nan strategy safely and past link nan USB SSD thrust to 1 of nan USB 3.0 aliases 2.0 ports connected your Raspberry Pi 4/400, Raspberry Pi 3 (or to Zero W aliases 2 W’s micro-USB larboard via a USB OTG adapter).
- Connect nan powerfulness proviso to move connected nan Raspberry Pi.
- The Raspberry Pi will cheque for a bootable SSD connected to nan USB larboard and footwear nan operating system.
Using an SSD arsenic Permanent Storage for Raspberry Pi
After booting nan operating strategy from nan outer SSD drive, you tin usage nan leftover abstraction successful nan SSD arsenic imperishable retention to shop different data.
To cheque nan disposable retention space, tally nan pursuing bid successful nan Terminal app.df -h
If you are utilizing nan Desktop version of Raspberry Pi OS, unfastened File Manager and click connected Filesystem Root astatine nan apical of nan screen. You tin spot nan disposable retention successful nan bottom-right corner.
Expand nan Filesystem
If you don't spot nan afloat capacity of your SSD drive, you tin travel these steps to grow nan record strategy connected Raspberry Pi.
- Open Terminal, and tally nan pursuing bid to update and upgrade packages and repositories. sudo apt update -y
sudo apt upgrade -y
- Then type sudo raspi-config and property nan Enter key.
- Use nan down arrow keys to move nan action to Advanced Options and deed nan Enter key.
- Move nan action to Expand Filesystem and property nan Enter key.
- On nan adjacent screen, prime OK and property nan Enter key.
- After that, prime Finish and property nan Enter key.
- You will beryllium asked to reboot nan Raspberry Pi; prime Yes, and property nan Enter key to reboot.
- After rebooting, participate nan df -h bid to cheque nan disposable retention again. You should spot nan complete disposable SSD retention for usage connected your Raspberry Pi 3, 4, Zero W, aliases Zero 2 W.
Finally, usage nan rsync aliases cp command to move nan information (migrate data) from nan microSD paper to your SSD. Make judge to link nan microSD paper to nan Raspberry Pi.
Now that you person faster SSD storage, you tin usage it to build a individual unreality retention accessible from anywhere aliases to host a unafraid website connected Raspberry Pi.
You whitethorn besides build a Raspberry Pi NAS by installing Samba and usage nan SSD retention arsenic web retention successful your location aliases agency network.
More Storage With Faster Performance
Booting your Raspberry Pi pinch an SSD is highly recommended arsenic it is overmuch faster and much reliable than a microSD card. You tin usage immoderate outer SSD disposable connected nan market. This includes M.2, SATA, and NVMe/PCIe SSDs.
While nan process to alteration footwear is simply a spot analyzable connected Raspberry Pi 3 and Raspberry Pi Zero W / 2 W, it’s overmuch easier connected Raspberry Pi 4 and Raspberry Pi 400.