2

I have read on the official Raspberry Pi website that it is possible, by adding a line, program_usb_boot_mode=1, to the /boot/config.txt file, to flash a Pi3 with the instruction to boot from USB instead of SD Card and - after it's done - a change to the One Time Programmable bit would cause the Pi not to require an SD Card at all anymore, being it able to boot directly off of a USB drive.

I'm interested in doing this though I wonder: since everyone on the Internet (Foundation included) says it's a permanent change that cannot be undone, if I may ever wish to revert this change on my Pi so I can boot from SD, would I be able to do it or would I have to purchase a new Raspberry Pi? And if it is possible what would I have to do? Would booting from a Mass Storage Device containing a config file with the same line except zero value suffice?

3
  • If the Foundation says this is a permanent change why do you doubt it? Commented Oct 28, 2017 at 18:27
  • @SteveRobillard because it said that "all changes are permanent", which could mean that there is no "restore-all" panic button but it might be possible to overwrite them applying other "permanent" changes on top of those.
    – Manchineel
    Commented Oct 29, 2017 at 15:30
  • That would kind of redefine the word permanent now wouldn't it. Commented Oct 29, 2017 at 15:49

1 Answer 1

5

I understand this is an old question, but happens that I knew how this is working trying to fix a similar problem (more on this later on).

Yes you can boot again from the sdcard, even with the (permanent) OTP bit set, simply because that bit says to the Pi to look further for the bootcode, after checking onto the sdcard, scanning also USB devices etc.

So, you have to move the boot files from the vfat boot partition on your USB drive towards the sdcard.

In your cmdline.txt now you can even set the root to be something as root=PARTUUID=01eg1a28-02 and enjoy leaving another USB drive inserted during boot (this is what I was trying to fix: if the boot is done completely from the USB drive, in cmdline.txt must be set root=/dev/sda2; don't ask me why).

More on the "bootflow" here:
https://github.com/raspberrypi/documentation/blob/master/hardware/raspberrypi/bootmodes/bootflow.md

4
  • In other words, if you don't have a bootable USB drive inserted, and you specify the correct boot media in the config file on the SD Card, you can still boot from the SD Card even with the OTPB flashed?
    – Manchineel
    Commented Oct 10, 2018 at 18:27
  • 2
    Yes, and since the sdcard is scanned first (searching for the bootcode) you can even leave the USB drive inserted.
    – dentex
    Commented Oct 10, 2018 at 18:32
  • Thanks. So basically setting the OTP is an addition, not a replacement. This answers my question
    – Manchineel
    Commented Oct 10, 2018 at 18:39
  • 1
    Yes. Did you try yourself? Is it working?
    – dentex
    Commented Oct 12, 2018 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.