How to boot Raspberry Pi from SSD

Although most Raspberry Pis are still running on microSD cards, you can also use an external SSD to boot your Raspberry Pi.

Both SSD drives and SD cards use similar flash storage technology to store data. However, SSDs offer fast drivers and greater fault tolerance, making them much more reliable than SD cards. Although most Raspberry Pis are still running on microSD cards, you can also use an external SSD to boot your Raspberry Pi.

Below, you will learn the steps to enable USB booting on your Raspberry Pi, then use an external SSD as a medium to boot Raspberry Pi OS and use the remaining capacity as permanent storage for data. your material.

Things you will need

You will need the following to enable SSD booting on Raspberry Pi:

  1. Raspberry Pi (4, 400, 3B+, Zero W or Zero 2 W)
  2. microSD card (minimum 1GB, maximum 64GB)
  3. microSD card reader
  4. Keyboard and mouse (both wireless or wired work) - optional if you want to enable SSD booting on Raspberry Pi 4 or Pi 400
  5. Any type of external SSD (such as M.2, SATA or NVMe/PCIe)
  6. USB enclosure for SSD (if using internal SSD)

Boot Raspberry Pi 4 or 400 from SSD

Booting a Raspberry Pi from an SSD and using it for permanent storage can provide significant improvements in performance and reliability compared to using a microSD card. To boot Raspberry Pi 4 or Raspberry Pi 400 from SSD, you must enable USB boot feature 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 select Misc Utility Images > Bootloader > USB Boot.

How to boot Raspberry Pi from SSD Picture 1How to boot Raspberry Pi from SSD Picture 1

4. Click the Choose Storage button and select the microSD card connected to your system.

5. Click Write and wait for the flashing process to complete. It will only take a few seconds.

6. After the flashing process, the microSD card will automatically be ejected. Disconnect the microSD card from the system and insert it into the microSD card slot of the Raspberry Pi 4 or 400.

7. Connect power 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 flashing is successful, the green LED on the Raspberry Pi starts flashing steadily. For further confirmation, connect the HDMI port to the monitor. If the monitor shows a green screen, it indicates that the flashing 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 booting on the Raspberry Pi 3, Zero W or Zero 2 W, you need to flash the standard Raspberry Pi OS on a microSD card, boot the Raspberry Pi and make some changes to the configuration files to enable it. USB (SSD) boot. The steps are as follows:

1. Insert the microSD card into the system and launch the Raspberry Pi Imager tool.

2. Click Choose OS and then select Raspberry Pi OS (32-bit).

How to boot Raspberry Pi from SSD Picture 2How to boot Raspberry Pi from SSD Picture 2

3. Click Choose Storage and select the microSD card from the available storage devices.

4. Optionally, you can click the gear icon to display advanced options, then enter the network's WiFi details and enable SSH.

5. Click the Write button.

6. Once the flashing process is complete, remove the memory card from the system, insert it into the Raspberry Pi 3, Zero or Zero 2 W and turn it on.

7. Connect the keyboard and mouse to the Raspberry Pi.

8. After booting, log in with the default pi username and Raspberry password (unless you have changed these information in Raspberry Pi Imager advanced options).

9. Open a Terminal window and run the following commands.

sudo apt update -y sudo apt full-upgrade -y

10. After updating and upgrading packages, run the following command in a Terminal window.

vcgencmd otp_dump | grep 17

11. The output will display code 17:1020000a, indicating that USB booting has been disabled. To enable USB boot, we need to edit the config.txt file by running the following command.

sudo nano config.txt

12. Scroll to the bottom of the file. For the last line, add the following code.

program_usb_boot_mode=1

Press Ctrl + X, type Y and press the Enter key to save the changes. Additionally, you can run the following command to add the necessary code to the config.txt file and enable USB boot feature on Raspberry Pi 3, Zero or Zero 2 W.

echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt

How to boot Raspberry Pi from SSD Picture 3How to boot Raspberry Pi from SSD Picture 3

 

13. Restart the Raspberry Pi and then run the following command to confirm whether USB boot is enabled or not.

vcgencmd otp_dump | grep 17

14. If the output shows 17:3020000a, USB boot is enabled. You can now remove the microSD card from your Raspberry Pi 3, Zero or Zero 2 W.

How to boot Raspberry Pi from SSD Picture 4How to boot Raspberry Pi from SSD Picture 4

15. After enabling USB boot, you can delete the code from the config.txt file using the nano editor or the following command.

sudo sed -i 's/program_usb_boot_mode=1//g' /boot/config.txt

Prepare a bootable Raspberry Pi SSD

To boot 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 using Raspberry Pi Imager (or Balena Etcher tool).

In case you are running the operating system and services via microSD card, you can clone the SD card to a USB hard drive using Balena Etcher.

After burning or cloning the operating system, you can connect the SSD to the Raspberry Pi via USB and run it on the Raspberry Pi. Pi will automatically detect the USB and boot the operating system from the SSD. If the USB storage device is not detected, the Raspberry Pi will continue to boot from the microSD card (if connected).

To prepare to boot the SSD, follow these steps:

1. Launch the Raspberry Pi Imager tool and connect the external SSD to the Windows, macOS or Linux system via the USB port.

2. Click Choose OS to select the desired operating system from the list. If you want to flash the downloaded operating system image, you can use the operating system file by clicking on the Use Custom option and then selecting the operating system file from your system.

3. Click Choose Storage to select the connected SSD storage medium.

4. Click the Write button.

How to boot Raspberry Pi from SSD Picture 5How to boot Raspberry Pi from SSD Picture 5

5. Once the operating system is flashed on the SSD, safely remove the SSD from the system, then connect the USB SSD to one of the USB 3.0 or 2.0 ports on the Raspberry Pi 4/400, Raspberry Pi 3 (either with Zero W or 2 W via micro-USB port via USBOTG adapter).

6. Connect the power source to turn on the Raspberry Pi.

7. Raspberry Pi will check for a bootable SSD connected to the USB port and boot the operating system.

Use an SSD as permanent storage for your Raspberry Pi

After booting the operating system from the external SSD, you can use the remaining space in the SSD as permanent memory to store other data.

To check 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 Filesystem Root at the top of the screen. You can see the available storage in the lower right corner.

How to boot Raspberry Pi from SSD Picture 6How to boot Raspberry Pi from SSD Picture 6

Expand the file system

If you don't see all the SSD space, you can follow these steps to expand the file system on Raspberry Pi.

  1. Open Terminal and run the following command to update and upgrade packages and repositories.
    sudo apt update -y sudo apt upgrade -y
  2. Then type sudo raspi-config and press the Enter key.
  3. Use the down arrow keys to move the selection to Advanced Options and press the Enter key.
  4. Move the selection to Expand Filesystem and press the Enter key.
  5. On the next screen, select OK and press the Enter key.
  6. Then select Finish and press the Enter key.
  7. You will be asked to restart the Raspberry Pi; Select Yes and press Enter to reboot.
  8. After rebooting, enter the command df -h to check the available storage space again. You will find complete SSD storage available for use on Raspberry Pi 3, 4, Zero W or Zero 2 W.

Finally, use the rsync or cp command to move data from the microSD card to the SSD. Make sure to connect the microSD card to the Raspberry Pi.

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

You can also build a Raspberry Pi NAS by installing Samba and use the SSD as network storage in your home or office network.

4 ★ | 2 Vote