I was reformating some USB drives to set up a PI cluster and one of the Raspberries wouldn’t boot. I took a look at it and realized that it was a Raspberry PI 3! RPis didn’t always boot from USB! We used to have to format SD cards and boot from them. But SD cards don’t like a lot of writes and will eventually fail. So, the nice people at Raspberry figured out how to get Pis to boot from USB and use them for their storage. If you want to upgrade your old Pis to boot from USB like the rest of your fleet, no worries, it’s easy.
First, you’ll need to install Raspberry Pi OS on an SD card and a USB drive. Then, you’ll make a (permanent) change to the OTP and reboot.
One Time Programmable Memory
Once you get the Pi to boot, enable the Raspberry Pi’s USB boot mode. This is done by setting a bit in the Raspberry Pi’s OTP (One Time Programmable) memory, allowing the device to be booted from a USB mass storage device. After that, we won’t need the SD card anymore. Open Terminal and run the following command:
echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
This adds the config option “program_usb_boot_mode=1” to the end of /boot/config.txt. Now, reboot the Pi. After the reboot, check that boot mode has been enabled with this command:
vcgencmd otp_dump | grep 17
The output should contain the value 3020000a.
pi@raspberrypi:~ $ vcgencmd otp_dump | grep 17 17:3020000a pi@raspberrypi:~ $
I really appreciate this, as I don’t have any raspis newer than the 3.
Thanks for the pointers but I’m having difficulty getting this acutally working.
I have this model:
Raspberry Pi 3 Model B Rev 1.2
And have programmed things as you suggest
$ vcgencmd otp_dump | grep 17
17:3020000a
I have copied everything from the flash to my ssd and there are two partitions:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 256M 0 part
└─sda2 8:2 0 1.7G 0 part
mmcblk0 179:0 0 29.8G 0 disk
├─mmcblk0p1 179:1 0 256M 0 part /boot
└─mmcblk0p2 179:2 0 29.6G 0 part /
However when I remove the SD card my machine doesn’t seem to boot at all. The drive does have power but no activity. I can mount both partitions on another machine and everything seems to be fine.
Is this 3B incapable of using the SSD?
Thanks,
Dave.