Flash CM5 eMMC by using rpiboot to expose it as a USB drive, then write Raspberry Pi OS with Imager. For NVMe boot, write an OS image to the SSD too, then flash the bootloader EEPROM with a BOOT_ORDER that tries NVMe first. Compute Module hardware · USB mass-storage gadget · Bootloader configuration
Prepare the CM5 IO Board
Use an eMMC-equipped Raspberry Pi Compute Module 5, the official Compute Module 5 IO Board, an M.2 M-key NVMe SSD, a USB-C data cable and a power supply for the board. The CM5 Lite has no eMMC. Compute Module hardware · NVMe boot
On a separate Raspberry Pi running Raspberry Pi OS with a desktop, install Raspberry Pi Imager and build rpiboot. Run these commands on the host. Raspberry Pi USB boot
sudo apt update
sudo apt install rpi-imager
sudo apt install git libusb-1.0-0-dev pkg-config build-essential
git clone --recurse-submodules --shallow-submodules --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
make
With the IO Board unpowered, seat the CM5 flat on the board. Fit the nRPI_BOOT jumper at J2, connect USB-C port J11 to the host, then power the board. The jumper puts the CM5 into USB boot mode. Compute Module hardware · Raspberry Pi USB boot
Flash the eMMC and NVMe SSD
Start with the SSD out so you can identify the eMMC. From the host’s usbboot directory, run the USB mass-storage gadget and list the disks. Compute Module hardware · Raspberry Pi USB boot · USB mass-storage gadget
sudo ./rpiboot -d mass-storage-gadget64
lsblk
In lsblk, look for a drive whose capacity matches the CM5’s eMMC. If you used a USB hub and the host does not detect the CM5, try connecting the board directly to the host. Compute Module hardware
Imager erases all data on the selected drive. Back up anything you need from the target and confirm its capacity before each write. Raspberry Pi Imager
- Open Imager. In Device, select your Raspberry Pi model. In OS, choose Raspberry Pi OS. Raspberry Pi Imager
- In Storage, select the exposed eMMC. Leave Exclude system drives selected. On the Writing tab, check the summary, select Write, then I understand, erase and write. Let verification finish and select Finish. Raspberry Pi Imager
- If automatic ejection is off in Imager, safely eject the eMMC from the host. Disconnect board power. Remove the J2 boot jumper, unplug J11, then restore power to check the eMMC boot. If the current boot order skips eMMC, continue to the SSD write. Raspberry Pi Imager · Compute Module hardware
- Shut down if Raspberry Pi OS is running, then disconnect board power. Fit the SSD in the IO Board’s M.2 slot. Follow the same J2 and J11 setup and rerun the mass-storage command. In Imager, repeat the write steps with the NVMe SSD selected in Storage. Compute Module hardware · USB mass-storage gadget · Raspberry Pi Imager
If both drives appear, use their capacities to identify them. If you cannot distinguish them, pause before writing. Compute Module hardware · Raspberry Pi Imager
Update the EEPROM for NVMe boot
Once Imager verifies the SSD, safely eject the exposed storage from the host if automatic ejection is off. Disconnect board power. Remove the J2 boot jumper and disconnect the J11 cable. Ensure EEPROM_nWP isn’t pulled low. Power the board and start Raspberry Pi OS from a drive the current boot order can reach. Raspberry Pi Imager · Compute Module hardware · Boot order reference
On the CM5, update Raspberry Pi OS to get the current rpi-eeprom package. Raspberry Pi bootloader and NVMe
sudo apt update && sudo apt full-upgrade
In /etc/default/rpi-eeprom-update, set RPI_EEPROM_IMMEDIATE_UPDATE=1. This lets the updater write the EEPROM while Raspberry Pi OS is running. On CM5, the updater uses rpi-eeprom-ab when A/B EEPROM is enabled. For an immediate update without A/B EEPROM, it requires the flashrom package. On the flashrom path, the updater falls back to staging the update if it cannot find flashrom on PATH or the SPI flash probe fails. Raspberry Pi EEPROM
Open the current bootloader configuration on the CM5. Raspberry Pi bootloader and NVMe
sudo rpi-eeprom-config --edit
Set BOOT_ORDER in the editor using the table. The bootloader reads the digits from right to left. Mode 6 tries NVMe and mode f restarts the sequence. The Compute Module guide gives 0xf1 for SD/eMMC boot. Compute Module hardware · Boot order reference
| Setting | Boot attempts on a CM5 with eMMC |
|---|---|
Append mode 6 to the right of the SD/eMMC setting 0xf1 | Try NVMe, then SD/eMMC if NVMe fails. Restart the sequence if neither boots. |
BOOT_ORDER=0xf6 | Try NVMe and repeat. |
BOOT_ORDER=0xf1 | Try eMMC and repeat. Use this to switch back to eMMC. |
Save your changes and close the editor. If the configuration changed, the tool applies it to the latest available bootloader release. Keep the CM5 powered while the EEPROM is being written. Raspberry Pi bootloader and NVMe · Raspberry Pi EEPROM
Boot normally and verify the drive
If the updater writes the EEPROM immediately, wait for it to finish. Then reboot the CM5. Raspberry Pi bootloader and NVMe · Raspberry Pi EEPROM
sudo reboot
Once Raspberry Pi OS starts, run these commands on the CM5. Raspberry Pi bootloader and NVMe
vcgencmd bootloader_version
rpi-eeprom-config
lsblk
Check that rpi-eeprom-config shows the BOOT_ORDER you selected. Compare your lsblk output with the NVMe boot example. It shows both /boot/firmware and / mounted on partitions under nvme0n1. Raspberry Pi bootloader and NVMe
If you chose eMMC fallback and the CM5 starts from eMMC, use the following command on the CM5 to check whether Linux can see the SSD. NVMe boot
ls -l /dev/nvme*
Evidence and limits. Based on Raspberry Pi’s Compute Module and Imager documentation and the usbboot and rpi-eeprom repositories’ master branches, checked on 2026-11-26. The steps were not run on hardware.