Video Instruction
How to change the boot order of the bootloader EEPROM to be able to boot from the NVMe drive?
- To make it work you have to just power on the CM4 board where there is currently Raspberry Pi OS installed and check the configuration using the command:
- Log into the CM4 Raspberry Pi OS through the SSH. Check the configuration in the command line:
|
|
- You can see the line:
BOOT_ORDER=
- Poweroff the operating system on CM4 board.
There is a good tutorial on the raspberry pi official website: Compute Module hardware - Datasheets and Schematics
See the section: Compute Module 4 Bootloader
Table below explains better the correct order.
Value | Mode | Description |
---|---|---|
0x0 | SD CARD DETECT | Try SD then wait for card-detect to indicate that the card has changed - deprecated now that Oxf (RESTART) is available. |
0x1 | SD CARD | SD card (or eMMC on Compute Module 4). |
0x2 | NETWORK | Network boot - See Network boot server tutorial |
0x3 | RPI BOOT | RPIBOOT - See usbboot |
0x4 | USB-MSD | USB mass storage boot - See USB mass storage boot |
0x5 | BCM-USB-MSD | USB 2.0 boot from USB Type C socket (CM4: USB type A socket on CM410 board). |
0x6 | NVME | CM4 only: boot from an NVMe SSD connected to the PCIe interface. See NVMe boot for more details. |
0x7 | HTTP | HTTP boot over ethernet. See HTTP boot for more details. |
0xe | STOP | Stop and display error pattern. A power cycle is required to exit this state. |
0xf | RESTART | Restart from the first boot-mode in the BOOT_ORDER field i.e. loop |
-
Log into the computer with Linux from which you were flashing EEMC drive, in my case it is my DELL laptop.
-
Here you can see that you have to use the recovery directory inside the usbboot software that allows flashing the EEPROM.
-
Using usbboot
If you need, you can clone the repository with the command:
|
|
And then enter the recovery directory
|
|
- You have to change the line in the file boot.conf
|
|
- Change the order according to the below example:
BOOT_ORDER=0xf25416
#above boot configuration
NVMe, SD card, USB, USB CM4, Network, Reboot
-
Connect the USB - micro USB cable between the computer from which you will flash EEPROM and a powered off CM4 board.
-
Then plug power cord into the CM4 board.
-
Run the below command inside /usbboot/recovery directory
|
|
- Then type the below commands to flash the bootloader
|
|
-
Unplugg the USB to mini USB cable and power plug and jumper (or female to female cable).
-
Connect then the power plug back and then you should see that the Raspberry Pi OS boots up from the EEMC storage.
-
Then connect through SSH or using your keyboard to the command line in Raspberry Pi OS.
-
After that you have to clone the content of the EEMC storage into NVMe drive using the below command:
|
|
- Then you have to delete existing partitions on the EEMC drive and create a one partition instead of two that were created previously (boot and /)
|
|
-
Then hit d twice on a keyboard to delete partitions.
-
After that hit keys on a keyboard in this order:
1. n - new partition
2. p - primary partition
3. 1 - partition number
4. hit Enter twice to use default first and last sector of the EEMC disk.
5. p - to print the partition table
6. w - to write changes
- Now reboot the Raspberry Pi OS
|
|
-
Check with the
lsblk
commmand partitions -
Then use the below command to resize the root partition and follow the video guide.
|
|
- Then reboot the CM4.
|
|
- Then check the size of the root filesystem
df -kTh /
- After that you can find out that dd did the job, by checking the partition UUID using below commands:
|
|
- Update the system
|
|
- You are done. Good job!