Booting from a USB device: Difference between revisions

From Global Meteor Network
Jump to navigation Jump to search
Line 62: Line 62:


=== How-to ===
=== How-to ===
Will be added after the test will be undergone.
=== Proven HW ===
=== Proven HW ===



Revision as of 15:21, 22 September 2022

This page is meant for the people who would like to boot a Raspberry Pi directly from the USB device and would like to avoid using a microSD card due to various reasons e.g. USB 3.X devices are faster, by some considered more reliable or simply some of them are available unused at your disposal. This page deals with and brings the how-to for the Raspberry Pi 4B only. In general Raspberry Pi 4B is able to boot from any USB device out of the box. Please see the caveats section for the possible issues you may encounter and how to solve them. As such Raspberry Pi 4B can be booted from a USB flash, USB-attached Solid State Disk (SSD) or USB-attached Hard Disk Drive (HDD) either 2.5” or 3.5”. The list of proven devices that are in use by other members will be provided in each section. The easiest setup with almost no caveats comes with a USB flash drive which is as easy as booting from a microSD card. By using a USB-attached SDD or HDD there are some things you need to consider.

USB flash disk

How-to

  1. Download the zipped Image for Raspberry Pi 4B here and save it on the PC somewhere.
  2. Unzip the zip file containing the image, which has a .img extension.
  3. Download the BalenaEtcher, if you haven’t done it yet.
  4. Insert a USB flash disk into your PC, and note the letter it was assigned.
  5. Run BalenaEtcher, make sure you run it as administrator and flash the image file onto your USB flash disk: Select Flash from file, find your unzipped .img file and select it. As Target select your USB flash disk. Normally the system disks are hidden but verify the name, letter and size of your USB flash disk to be sure you have the correct target. Click Flash, once again verify the target and confirm it. Wait for the process to finish.
  6. Eject the USB flash disk in windows if necessary and then remove your USB flash disk from your PC and insert it into your Raspberry Pi, which should be connected to a TV or Monitor, and have a keyboard and mouse connected. Power on a Raspberry Pi. Make sure that a microSD card is not inserted.
  7. Wait for the boot. If the boot takes too long to occur, please have a look at the next section. If it booted successfully, follow the on-screen instructions. You may return to the previous page as you are done with flashing the image onto a USB flash disk.

This is what the selection should look like:

BalenaEtcher selection.png

This is what the process should look like:

BalenaEtcher process.png

Pre-2021 Raspberry Pi 4 Bootloader update

If you encountered a problem booting Raspberry Pi 4 from a USB device (common for all USB devices, not only flash disks), the most probable reason is that your Raspberry Pi 4 is from an older batch and its bootloader has to be updated. The procedure is simple and you will need a blank small MicroSD card to continue. The process is nicely described in the raspberry pi official documentation.

Proven HW

HW Note
Kingston DataTraveler Kyson 256 GB Operated in 4 stations since Nov 2021, no issues

USB-atached SSD

What to consider

The first thing to consider is that raspberry Pi 4B provides approximately 1.2A to the USB ports combined, so you need to make sure that your SSD disk does not need more current. Also, it is advisable to not use any other hungry USB-powered devices in the live operation of a station. Although it has not been reported by the members using SSD disks it might happen that you may need a powered USB hub to be connected to a Raspberry Pi 4 to provide enough current during peak operations. Please note that Raspberry Pi 4 is under heavy writing during its night operation. Also due to the power requirements, it is highly advisable to use the official 3A power supply.

The second thing to consider is the mode that Linux will detect your SSD disk. Although in the majority of cases this won’t be an issue, it is almost impossible to get this information from the datasheet of an SSD. While it is cumbersome, the best approach is to connect the disk to a Raspberry Pi 4 already running the RMS image (from a microSD card) and issue the following command from the terminal “sudo dmesg | grep usb-storage” without quotes. If you see some lines returned, you are fine to proceed.

How-to

Will be added after the test will be undergone.

Proven HW

HW Note
Crucial BX500 240GB 3D NAND SATA 2.5-inch SSD Operated in 1 station since Aug 2021, without powered USB hub, no issues
Crucial MX500 250GB 3D NAND SATA 2.5-inch SSD Operated in 1 station since Aug 2021, without powered USB hub, no issues
ORICO 2.5 inch USB3.0 Hard Drive Enclosure Operated in 2 stations since Aug 2021, no issues

USB-attached HDD

What to consider

For the USB-attached HDD of size 2.5” applied the same things to consider as for the USB-attached SDD, please see above.

For the USB-attached HDD of size 3.5” the power requirements may be ignored, as by default these disks need 12V to be fed from the additional power supply bundled to the HDD enclosure.

How-to

Will be added after the test will be undergone.

Proven HW

There are two no-name refurbished HDDs used in two stations, however one had to be replaced, so at the moment no branded HDD is reported to be used in the station. The list will be updated as soon as someone starts using it.

Useful resources

More in-depth information about a Raspberry Pi 4B boot process and boot options can be found in the official documentation