Skip to content

Instantly share code, notes, and snippets.

@lockness-Ko
Created December 14, 2021 03:53
Show Gist options
  • Save lockness-Ko/360eac3ef6058953d65a714afc615958 to your computer and use it in GitHub Desktop.
Save lockness-Ko/360eac3ef6058953d65a714afc615958 to your computer and use it in GitHub Desktop.
tutorial on USB booting on raspberry pi 4B with Raspberry Pi OS Bullseye

How to USB boot raspberry pi 4B

A tutorial on USB booting on raspberry pi 4B with Raspberry Pi OS Bullseye

Overview

It's a pretty easy process that involves:

> 1. Change bootloader

There are three ways to do this, none of them are better or worse just choose one and go with it

> 1a. Change bootloader with raspi imager (untested)

You will need

  • SD Card
  • Computer

Download the latest version of the official raspberry pi imager from https://www.raspberrypi.com/software/. Install it for your respective operating system.

Once it has installed click 'CHOOSE OS', scroll down to 'Misc utility images' -> 'Bootloader' and select 'USB Boot': image image image image

Click 'CHOOSE STORAGE' and select the SD card that you have in your computer then select 'WRITE' to flash the SD Card: image image image

Finally, insert the SD Card into your pi, power it on and wait till the green led flashes steadily or if you have a monitor plugged in, it will turn green when the installation completes. it will take ~10-20 seconds to complete

> 1b. Change bootloader with rpi-eeprom-update (untested)

You will need

  • SD Card with raspberr pi OS lite
  • monitor
  • keyboard

When you login to the pi, type the following commands

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

Once that has completed and you Pi is up to date, edit the rpi-eeprom-update file and change the word 'critical' or 'default' to 'stable'

sudo nano /etc/default/rpi-eeprom-update

Then, update the eeprom

sudo rpi-eeprom-update -a && sudo reboot

Now that we know the bootloader is up to date we can edit the eeprom config file to change the boot order

Run the following command to edit the config file and change the BOOT_ORDER code to 0xf14

Codes read from right to left: 1 = Check SD card 4 = Check USB drive f = Start again

sudo -E rpi-eeprom-config --edit

Then reboot to apply the change with

sudo reboot

NOTE: it will take a bit to reboot as it will check for USBs to boot from and then check the SD Card

> 1c. Change bootloader with raspi-config

You will need

  • SD Card with raspberr pi OS lite
  • monitor
  • keyboard

When you login to the pi, type the following commands

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

Once that has completed and you Pi is up to date, edit the rpi-eeprom-update file and change the word 'critical' or 'default' to 'stable'

sudo nano /etc/default/rpi-eeprom-update

Then, update the eeprom

sudo rpi-eeprom-update -a && sudo reboot

Now after the pi has rebooted we can change the boot order in raspi-config:

sudo raspi-config

Go to 'Advanced Options' -> 'Boot order' and select USB boot, click no when it asks to reboot then move onto the next step!

> 2. Download latest raspberry pi OS image and flash to USB

You will need

  • USB
  • keyboard
  • mouse
  • computer

Navigate to https://downloads.raspberrypi.org/raspios_arm64/images/ in your browser of choice and download the latest image Unzip the zip folder. Drag the .img file into the raspberry pi imager. Select your USB device as the storage and click 'WRITE'

After it has flashed you can plug the USB into your pi, reboot it, THEN you can unplug the SD Card and you should be golden!

Enjoy your faster PI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment