I am reading this _HOW TO BOOT FROM A USB MASS STORAGE DEVICE ON A RASPBERRY PI 3_ guide from
It mentioned "Once this bit (OTP memory in the RPi SoC) has been set, the SD card is no longer required. Note that any change you make to the OTP is permanent and cannot be undone."
My question is, once this OTP bit is set to enable the USB Mass Storage Device boot, will this RPi lose the capacity to boot from SD card?
You can't make that conclusion just from the OTP-nes of that bit.
The question is rather valid :
Setting that bit :
1) changes the booting sequence to USB only (disabeling the booting from SD)
2) inserts an attempt to boot from USB before the default booting from SD
(creating a fall-back sequence)
Either of those has its use.
I'm sure you already know, but you don't have to do this to boot from a
USB device. You just need an SD card big enough to hold the DOS
partition containing the kernel, and the rest of the filing system is on
the USB drive.
Actually, I am not very versed in Linux, I need to learn how to do
this on the DOS partition. I suppose I need to modify the DOS
partition so that the root partition will be mounted from the USB mass
Yes, that is done in file /boot/cmdline.txt in the root= parameter.
dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1
root=PARTUUID=4d7e5657-02 rootfstype=ext4 elevator=deadline
(all on one line)
In this case the USB drive has 3 partitions :
pi@rp3:~ $ lsblk -o name,size,type,fstype,partuuid,mountpoint
NAME SIZE TYPE FSTYPE PARTUUID MOUNTPOINT
sda 931.5G disk
+-sda1 41.8M part vfat 4d7e5657-01
+-sda2 16G part ext4 4d7e5657-02 /
+-sda3 915.5G part ext4 4d7e5657-03 /extra
mmcblk0 7.4G disk
+-mmcblk0p1 41.8M part vfat caba7423-01 /boot
+-mmcblk0p2 7.4G part ext4 caba7423-02
sda1 is a copy of mmcblk0p1, for easy recovery if the SD card dies.
sda2 contains the os and /home/pi
sda3 contains homedirs for all other users
mmcblk0p2 is not used.
pi@rp3:~ $ cat /etc/fstab
# device mountpoint fstype options dump fschk
proc /proc proc defaults 0 0
PARTUUID=4d7e5657-01 /mnt/usbdsk/boot vfat defaults,noatime,noauto 0 0
PARTUUID=4d7e5657-02 / ext4 defaults,noatime 0 1
PARTUUID=4d7e5657-03 /extra ext4 defaults,noatime 0 2
PARTUUID=caba7423-01 /boot vfat defaults,noatime 0 2
PARTUUID=caba7423-02 /mnt/sdcard/root ext4 defaults,noatime,noauto 0 2
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
pi@rp3:~ uname -a
Linux rp3 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l
The initial cmdline.txt on a fresh raspbian image contains
a parameter that causes the root partition to be expanded:
That is not always what you want.