How to boot the Raspberry Pi system from a USB Mass Storage Device All In One

2023-05-28 15:00:17

How to boot the Raspberry Pi system from a USB Mass Storage Device All In One

如何從 USB 啟動樹莓派引導系統 / 如何從 USB 大容量儲存裝置啟動 Raspberry Pi 系統

Raspberry Pi 4 Boot Flow

  1. First Stage Bootloader
  2. Second Stage Bootloader

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

# 檢視
$ rpi-eeprom-config
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0

[all]
BOOT_ORDER=0xf14
# 編輯
$ sudo -E rpi-eeprom-config --edit

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

BOOT_ORDER

0xf14 Try USB first, followed by SD then repeat ✅

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

Conditional filters [all]

https://www.raspberrypi.com/documentation/computers/config_txt.html

officail documents

USB Mass Storage Boot

This page explains how to boot your Raspberry Pi from a USB mass storage device such as a flash drive or a USB hard disk.
本頁介紹如何從 USB 大容量儲存裝置(例如快閃記憶體驅動器USB 硬碟)啟動 Raspberry Pi。

The bootloader in Raspberry Pi 400 and newer Raspberry Pi 4B boards support USB boot by default, although the BOOT_ORDER bootloader configuration may need to be modified.
Raspberry Pi 400 和較新的 Raspberry Pi 4B 板中的引導載入程式預設支援 USB 引導,但可能需要修改 BOOT_ORDER 引導載入程式設定。

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/raspberry-pi/boot-msd.adoc

EEPROM Configuration

$ rpi-eeprom-config
# OR
$ vcgencmd bootloader_config
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0

[all]
BOOT_ORDER=0xf14

$ sudo rpi-eeprom-update

$ sudo rpi-eeprom-update -a
$ sudo reboot
BOOTLOADER: up to date
   CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
    LATEST: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
   RELEASE: default (/lib/firmware/raspberrypi/bootloader/default)
            Use raspi-config to change the release.

  VL805_FW: Using bootloader EEPROM
     VL805: up to date
   CURRENT: 000138c0
    LATEST: 000138c0

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html

手動刷入系統映象,並修改組態檔