Subscribe
Home » How to Boot a Raspberry Pi From SSD and Use It for Permanent Storage

How to Boot a Raspberry Pi From SSD and Use It for Permanent Storage

by Staff
0 comment

Using an SSD for your Raspberry Pi offers many advantages over a standard microSD card. To enable it, just follow our step-by-step instructions.

Both SSDs (solid-state drives) and SD cards use fundamentally similar flash storage technology to store data. However, SSDs offer faster controllers and more fault tolerance, making them much more reliable than SD cards. While most Raspberry Pis are still running on microSD cards, you may also use an external SSD to boot your Raspberry Pi.


In this guide, you will learn the steps to enable USB boot on Raspberry Pi, then use an external SSD as bootable media to boot Raspberry Pi OS and use the leftover space as permanent storage for your data.

Things You Will Need

You will need the following items to enable SSD boot on Raspberry Pi.

  • Raspberry Pi (4, 400, 3, Zero W, or Zero 2W model)
  • microSD card (1GB minimum, 64GB maximum)
  • microSD card reader
  • Keyboard and mouse (both wireless or wired will work)—not required if you want to enable SSD boot on a Raspberry Pi 4 or Pi 400
  • Any type of external SSD (such as M.2, SATA, or NVMe/PCIe)

Boot Raspberry Pi 4 or 400 from SSD

To boot Raspberry Pi 4 or Raspberry Pi 400 from SSD, you must enable USB boot by following these steps:

  1. Connect the microSD card to another computer using a card reader.
  2. Download, install, and launch the Raspberry Pi Imager tool on your Windows, Linux, or Mac system.
  3. Click the Choose OS button and then click Misc Utility Images > Bootloader > USB Boot.
  4. Click the Choose Storage button and select the microSD card connected to your system.
  5. Click Write and wait for the flash process to complete. It will take a few seconds only.
  6. After the flash process, the microSD card is auto-ejected. Disconnect the microSD card from the system and insert it into the microSD slot of your Raspberry Pi 4 or 400.
  7. Connect the power supply to the Raspberry Pi to turn it on. The Pi will automatically read and flash the USB bootloader from the connected microSD card. This takes a few seconds.
  8. When the flash is successful, the green LED light on the Raspberry Pi starts blinking steadily. To confirm further, connect the HDMI port to a display. If the display shows a green screen, it indicates that the flash process is complete.
  9. Turn off the Raspberry Pi and disconnect or remove the microSD card.


Boot Raspberry Pi 3 or Zero from SSD

To enable SSD boot on Raspberry Pi 3 or Zero W/2W, you need to flash the standard Raspberry Pi OS on the microSD card, boot the Raspberry Pi, and make a few changes to the configuration files to enable USB (SSD) boot.

The steps are as follows:

  1. Insert a microSD card into the system and launch the Raspberry Pi Imager tool.
  2. Click on Choose OS and then select Raspberry Pi OS (32-bit).
  3. Click Choose Storage and select the microSD card from the available storage devices.
  4. Optionally, you can click on the gear icon to bring up the advanced options, then enter your network’s Wi-Fi details and enable SSH.
  5. Click the Write button.
  6. After the flash process is complete, insert the microSD card into the Raspberry Pi and turn it on.
  7. Connect a keyboard and mouse to the Raspberry Pi.
  8. After it boots up, log in using the default username pi and password raspberry (unless you changed these in the Raspberry Pi Imager advanced options).
  9. Open the Terminal window and run the following commands.
    sudo apt update -y
    sudo apt upgrade -y
  10. After updating and upgrading the packages, run the following command in the Terminal window.
    echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
  11. This command enables the USB boot on Raspberry Pi 3 or Zero W/2W. After running the command, restart the Raspberry Pi and then run the following command to confirm if USB boot is enabled.
    vcgencmd otp_dump | grep 17
  12. If the output shown is 17:3020000a, USB boot is enabled. You can now remove the microSD card from the Raspberry Pi.


Prepare Bootable Raspberry Pi SSD

To boot the Raspberry Pi Zero, Raspberry Pi 3, Raspberry Pi 4, or Raspberry Pi 400 via SSD, you must install an operating system, such as Raspberry Pi OS on the SSD by using Raspberry Pi Imager (or the Balena Etcher tool). After writing the OS, you can connect the SSD to the Raspberry Pi via a USB port and boot the OS from the SSD.

To prepare the SSD for boot, follow these steps:

  1. Launch the Raspberry Pi Imager tool and connect your external SSD to the system via a USB port.
  2. Click Choose OS to select the desired OS from the list. If you want to flash a downloaded OS image, you can use the file by clicking on the Custom option and then selecting the OS file from your system.
  3. Click Choose Storage to select the connected SSD storage media.
  4. Click the Write button.
  5. After the OS is flashed on the SSD, dismount the drive and then connect the USB drive to one of the USB 3.0 or 2.0 ports on your Raspberry Pi 4/400, Raspberry Pi 3 (or to Zero W/2W’s micro-USB port via an adapter).
  6. Connect the power supply to turn on the Raspberry Pi.
  7. The Raspberry Pi will check for a bootable SSD connected to the USB port and boot the operating system.


Using an SSD as Permanent Storage for Raspberry Pi

After booting the operating system from the external SSD drive, you can use the leftover space in the SSD as permanent storage to store other data. To check the available storage space, run the following command in the Terminal app.

df -h

If you are using the Desktop version of Raspberry Pi OS, open File Manager and click on Filesystem Root at the top of the screen. You can see the available storage in the bottom-right corner.

Now that you have faster SSD storage, you can use it to build your own personal cloud storage accessible from anywhere or to host a secure website on Raspberry Pi.

More Storage With Faster Performance

Booting your Raspberry Pi with an SSD is highly recommended as it is much faster and more reliable than a microSD card. You can use any external SSD available on the market. This includes M.2, SATA, and NVMe/PCIe SSDs. While the process to enable boot is a bit complex on Raspberry Pi 3 and Raspberry Pi Zero W/2W, it’s much easier on Raspberry Pi 4 and Raspberry Pi 400.



Read the full article here

You may also like

Leave a Comment

Iman Hearts is one of the biggest lifestyle news and articles portals, we provide the latest news and articles about family, lifestyle, entertainment, and many more, follow us to get the latest news about what matters to you.

 

© 2022 Iman Hearts. All rights reserved. Sitemap