How to Boot a Raspberry Pi From SSD and Use It for Permanent Storage
If you own a Raspberry Pi and are using it as a desktop computer, the limited storage space on the MicroSD card can be a major drawback. Fortunately, there’s a simple solution. By booting the Raspberry Pi from an SSD, you can use it for permanent storage and greatly increase the system’s performance. Here’s how you can do it:
Step 1: Prepare the SSD
Before you can use the SSD as the boot drive for your Raspberry Pi, it must be properly formatted in the Ext4 file system. To do this, connect the SSD to another Linux-based computer and use a disk utility to format the drive.
Step 2: Copy the boot partition
To boot from the SSD, you must have the boot partition of the MicroSD card copied onto the SSD. To do this, insert the MicroSD card into a card reader and copy the boot partition to your desktop. Then, eject the MicroSD card and insert the SSD into the card reader. Copy the boot partition from your desktop to the root directory of the SSD.
Step 3: Edit the boot configuration file
Next, you need to edit the boot configuration file to boot from the SSD instead of the MicroSD card. To do this, open the config.txt file in the boot partition of the MicroSD card and add the line “program_usb_boot_mode=1”. This enables USB boot mode on the Raspberry Pi. Save the file and eject the MicroSD card.
Step 4: Enable USB boot mode
To enable USB boot mode on the Raspberry Pi, connect a keyboard and monitor to the Pi and power it on. Press and hold the shift key until the Raspberry Pi configuration screen appears. Scroll down to “USB boot” and select “Enable”. Save your changes and exit the configuration screen.
Step 5: Boot from the SSD
With USB boot mode enabled, you can now power off the Raspberry Pi and remove the MicroSD card. Connect the SSD to the Raspberry Pi, power it on, and it will now boot from the SSD. Once booted, you can use the command “sudo fdisk -l” to find the path of the SSD and mount it for use.