The Raspberry Pi 5 supports USB booting, allowing you to boot directly from an external USB drive instead of the SD card. Hereβs how to configure and edit the boot settings for USB boot.
π οΈ 1. Prerequisites
- Raspberry Pi 5
- USB Bootable Drive (e.g., SSD or USB Flash Drive)
- MicroSD Card (for initial configuration, if required)
- Power Supply (official Raspberry Pi power supply recommended)
Ensure your Raspberry Pi 5 firmware is up to date.
`bash
sudo apt update
sudo apt full-upgrade`
Reboot after upgrading:
`bash
sudo reboot`
βοΈ 2. Accessing the Boot Configuration File
On the Raspberry Pi:
- Open the terminal.
- Edit the config.txt file on the boot partition:
`bash
sudo nano /boot/config.txt`
On Another Computer (if SD card is used):
- Insert the SD card into your computer.
- Locate the boot partition.
- Open the config.txt file in a text editor.
π 3. Enable USB Boot in Bootloader Configuration
The Raspberry Pi uses the BOOT_ORDER configuration in the EEPROM bootloader to define the boot sequence.
1.Edit the EEPROM bootloader settings:
`bash
sudo raspi-config`
2.Navigate to:
`mathematica
Advanced Options > Boot Order > USB Boot`
Select USB Boot and confirm.
3.Alternatively, manually edit the bootloader configuration:
`bash
sudo -E rpi-eeprom-config --edit`
4.Look for the line:
`makefile
BOOT_ORDER=0xf41`
- 0xf41 means:
- f: Try all devices.
- 4: USB devices.
- 1: SD card.
5.Save the file and reboot:
`bash
sudo reboot`
π 4. Verify Boot Settings
After rebooting, verify that the Raspberry Pi is set to boot from USB:
`bash
vcgencmd bootloader_config`
Check the BOOT_ORDER value. It should match the desired USB boot configuration (0xf41).
π 5. Copy Operating System to USB Drive
- Use the Raspberry Pi Imager tool.
- Select your USB Drive as the target.
- Write a Raspberry Pi OS image to the USB drive.
Alternatively, clone the SD card:
`bash
sudo dd if=/dev/mmcblk0 of=/dev/sda bs=4M status=progress`
Replace /dev/mmcblk0 (SD Card) and /dev/sda (USB drive) with your device paths.
β 6. Test USB Boot
- Remove the SD card.
- Connect the USB drive to the Raspberry Pi.
- Power on the Raspberry Pi.
If everything is configured correctly, the Raspberry Pi should boot from the USB drive.
π‘οΈ 7. Troubleshooting
- Stuck on Boot Screen: Verify the bootloader configuration (BOOT_ORDER).
- USB Drive Not Detected: Use a powered USB hub for external hard drives.
- Corrupted USB OS Installation: Re-flash the OS on the USB drive.
- Check Boot Logs: Review boot logs using:
`bash
dmesg | grep -i usb`
Top comments (0)