How to boot from SD but run from USB?

Jan 23, 2025 Last reply: 1 year ago 21 Replies

Yes, it's in package inotify-tools and provides CLI commands like inotifywait and inotifywatch.

UEFI isn't x86 specific - Arm uses it as well.

Yes, although to note that there are typically several stages of booting. The UEFI / u-boot / etc is often the second or third stage of booting. They come after things like the ROM first-stage bootloader then the second stage bootloader loadered from flash, or similar. Sometimes boot is handled by a CPU that isn't the main one, such as a 'management' CPU or in the Pi

1/2/3's case the GPU.

In the classic Pi 1, the process is:

1st stage: ROM bootloader (enough to read SD card) 2nd stage: bootcode.bin on SD card (firmware for GPU) 3rd stage: start.elf on SD card (firmware for GPU) 4th stage: Linux kernel from SD card (for CPU)

In Pi 3 and later the ROM bootloader also knows enough to read USB sticks as well as SD cards. The early stage(s) also move to EEPROM on Pi 4 to make them easier to update.

It's possible to run another bootloader like u-boot or UEFI as your fourth stage, ie:

1st stage: ROM bootloader (GPU) 2nd stage: bootcode.bin on SD card (GPU) 3rd stage: start.elf on SD card (GPU) 4th stage: UEFI / u-boot on SD card (CPU) 5th stage: Linux kernel (CPU)

This is useful if you need more flexible booting than the regular boot process provides - eg you want to fetch the kernel from an NFS share, which is something not supported in the standard Pi firmware.

If the board vendor puts the firmware for stages 1-4 into EEPROM/flash, the board now supports UEFI but the boot process didn't change, it just hid the first four stages from you.

Theo

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required