Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
boot_usb_rpi_only [2021/08/27 14:12] – created atariboot_usb_rpi_only [2022/01/04 07:16] (current) – added section about argon one ssd slot atari
Line 7: Line 7:
   * Ensure that the Pi can read the drive first before attempting to boot off of it.   * Ensure that the Pi can read the drive first before attempting to boot off of it.
   * USB hard drives take up a lot of power, much more so than standard USB sticks. You probably won't be able to use a full sized mechanical hard drive. But if you are using a 2.5" mechanical or solid-state drive, ensure that you are using the official power supply appropriate to your Pi model. Even on non-official supplies that are otherwise "high enough", the booting procedure takes the most power of all and a non-official power supply may stutter, causing boot issues (or possibly even data corruption!)   * USB hard drives take up a lot of power, much more so than standard USB sticks. You probably won't be able to use a full sized mechanical hard drive. But if you are using a 2.5" mechanical or solid-state drive, ensure that you are using the official power supply appropriate to your Pi model. Even on non-official supplies that are otherwise "high enough", the booting procedure takes the most power of all and a non-official power supply may stutter, causing boot issues (or possibly even data corruption!)
-  * The Raspberry Pi can only boot on devices up to USB 2.0. You cannot boot off of a USB 3.0 drive.+  * The Raspberry Pi can only boot on devices up to USB 2.0. Some USB 3.0 drives have been reported as bootable, but the official statement is "the Pi cannot boot with USB 3.0 drives".
   * The default timeout for checking bootable USB devices is 2 seconds. Some flash drives and hard disks power up too slowly.   * The default timeout for checking bootable USB devices is 2 seconds. Some flash drives and hard disks power up too slowly.
   * Some flash drives have a very specific protocol requirement that is not handled by the bootcode and may thus be incompatible.   * Some flash drives have a very specific protocol requirement that is not handled by the bootcode and may thus be incompatible.
Line 17: Line 17:
 </WRAP> </WRAP>
  
-===== Raspberry Pi 3/2/1/Zero ===== +<WRAP center round alert 60%> 
- +Changes made to the OTP bit **cannot be undone**. Be absolutely sure that you want to do this. This is **not necessary** to boot from USB, this just makes the Pi check the USB drive //first//.
-<WRAP center round todo 60%> +
-I dunno man I gotta work this out first.+
 </WRAP> </WRAP>
  
-===== Raspberry Pi 4 =====+===== Raspberry Zero/CM1/CM3/1A/1A+ ===== 
 + 
 +There is no way to make the Pi check the USB device first, it will always check the SD card followed by the USB. 
 + 
 +===== Raspberry Pi 2B(v1.2)/3A+/3B ===== 
 + 
 +These instructions are abbreviated from [[https://www.raspberrypi.org/documentation/computers/raspberry-pi.html#raspberry-pi-2b-3a-3b-cm-3-3|this guide]] and assume you're running Raspberry Pi OS on the device (though it should work with Batocera running as well). 
 + 
 +  - Add the line ''program_usb_boot_mode=1'' to your ''/boot/config.txt'' on the SD card and boot your Pi. 
 +     - To do this in an amazing one-liner: ''echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt'' 
 +  - Once booted, you can check that the correct bit has been set by running ''vcgencmd otp_dump | grep 17:''. If the output is<code>17:3020000a</code> then you're all set to go. 
 +  - You can remove the ''program_usb_boot_mode=1'' line from ''/boot/config.txt'' to prevent the bit from being set every boot (it only needs to be done once). 
 +     - To do this in an amazing one-liner: ''%%sudo sed -i 's/program_usb_boot_mode=1//g' /boot/config.txt%%'' 
 + 
 +===== Raspberry Pi 3B+ ===== 
 + 
 +This is its default behavior. In fact, you'd have to go out of your way to make it check the SD card first. 
 + 
 +===== Raspberry Pi 4/400 ===== 
 + 
 +==== The recommended way ==== 
 + 
 +  - Boot up Raspberry Pi OS on the Pi 4/400 and access it [[access_the_batocera_via_ssh|via SSH]] or use its local terminal emulator (if you don't have Raspberry Pi OS or can't install it, use the [[#the_alternative_way|below instructions instead]]). 
 +  - Upgrade your system by running ''sudo apt update'', ''sudo apt full-upgrade'' and then reboot. 
 +  - Run ''sudo rpi-eeprom-update -a'' to update the EEPROM and reboot again. 
 +  - Run ''sudo raspi-config'' to open up the interactive configuration tool, navigate with the arrow keys and ''[Enter]''. {{ hardware:raspi-config.png?nolink |The raspi-config command line tool, should be familiar to Raspberry Pi users.}} 
 +  - Navigate to **6 Advanced options** -> **A6 Boot Order** and choose "B2 USB Boot". {{ hardware:raspi-config_usb_boot.png?nolink |}} 
 +  - Confirm that the screen says "USB is default boot device" and exit the to the main menu with ''[Esc]''
 +  - Select **<Finish>**, you can use the ''[Tab]'' key. {{ hardware:raspi-config_finish.png?nolink |At the bottom right.}} 
 +  - Let it reboot. 
 +  - The Raspberry Pi 4/400 will now always check the USB first when booting. You can shut down Raspberry Pi OS and boot into Batocera on your USB. 
 + 
 +These actions are reversible by selecting the SD card instead of the USB. The OTP bit will still be set, however. 
 + 
 +==== The alternative way ==== 
 + 
 +An alternate way is by flashing your bootloader. You will need a spare SD-card to do it (its data will be wiped in the process!) 
 + 
 +<WRAP center round alert 60%> 
 +If the power is interrupted during this process (such as from using a non-official power supply) your Raspberry Pi might be bricked! 
 +</WRAP>
  
   - Download the [[https://www.raspberrypi.org/software/|Raspberry Pi Imager]] and run it.   - Download the [[https://www.raspberrypi.org/software/|Raspberry Pi Imager]] and run it.
Line 36: Line 74:
  
 Your Pi should now boot from the USB drive first. Your Pi should now boot from the USB drive first.
 +
 +==== Argon One SSD slot ====
 +
 +The Argon One case offers the ability to use an SSD in its special compartment, which connects to the Raspberry Pi via USB. This USB-to-SATA connections seems to be a bit picky about what it will respond to, so some extra steps are required should you want to install Batocera onto an SSD connected via this method (for reference, booting Batocera off of an SD card still works completely fine, this is for only if you explicitly want Batocera to boot from the SSD).
 +
 +<WRAP center round important>
 +This only works for standard SATA 3 SSDs. NVME and PCIe drives will not work.
 +</WRAP>
 +
 +  - If already assembled, disassemble the case
 +  - Download and run the latest Raspberry Pi OS on the Pi 4
 +  - Open a terminal and type ''sudo nano /etc/default/rpi-eeprom-update''
 +  - Change the word ''critical'' to ''stable'' and save the file with ''[Ctrl]'' + ''[S]''
 +  - Then run ''sudo rpi-eeprom-update'' to update the EEPROM
 +  - Continue the steps from 3 in the [[#the_recommended_way|recommended way]] section above
 +  - Turn off the Pi 4
 +  - Flash Batocera to your intended SSD
 +  - Reassemble the case with the SSD attached
 +
  • boot_usb_rpi_only.1630066374.txt.gz
  • Last modified: 3 years ago
  • by atari