How to install Raspbian on the Raspberry Pi
Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares


⇐ BackPageNext ⇒

Boot Options

Recent improvements to the Raspberry Pi boot code have added the ability to boot directly from USB storage devices, and even from the network.

When a Raspberry Pi is powered on (or rebooted), it expects to find a file called bootcode.bin located in the root of an attached SD card, which is then loaded into memory and executed. The boot code loads basic device and file system support before determining where to find the main operating system.

Operating System search order:

  1. SD card (normal)
  2. USB storage device
  3. Ethernet

If no devices contain an valid operating system, the boot code will even attempt a PXE network boot as a final option.

We will cover Raspberry Pi network boot in a separate article – stay tuned!

The obvious advantages of using a USB storage device over an SD card are speed and reliability, especially when working with databases and other I/O intensive processes.

However, before you can boot directly from a USB storage device or over the network, there are some minor preparatory steps to be performed.

Raspberry Pi 1, Raspberry Pi 2 and Raspberry Pi Zero

The Raspberry Pi 1, Raspberry Pi 2 and Raspberry Pi Zero must all use a specially prepared SD card containing just the bootcode.bin file. You will only need a tiny SD card, as the current bootcode.bin is only 52KB.

Use the following steps to prepare the SD card:

  1. Format your SD card as FAT32.
  2. Download the current or next release of the bootcode.bin file from GitHub.
  3. Copy the downloaded bootcode.bin file onto your SD card.
  4. Insert the SD card into your Raspberry Pi.

This method can also be used with the Raspberry Pi 3, if so desired.

Raspberry Pi 3

The Raspberry Pi 3 comes with optimised bootcode.bin already loaded into the 32KB of Boot ROM included with the BCM2837 – however, it is disabled by default.

Use the following steps to enable the Boot ROM:

  1. Prepare an SD card using the standard installation instructions.
  2. Insert the SD card into your Raspberry Pi, power on and login.
  3. Set the Boot ROM to become enabled at next boot, using the following commands:
    echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt
  4. Reboot your Raspberry Pi, using the following command:
    sudo reboot
  5. Once rebooted, login and determine whether the Boot ROM is enabled, using the following command:
    vcgencmd otp_dump | grep 17:

    The command should return an value of 3020000a indicating the Boot ROM is enabled.

  6. Turn off your Raspberry Pi and remove the SD card.

Once you have completed these steps, the Boot ROM will allow your Raspberry Pi to boot directly to a USB storage device or network server, without even needing an SD card.

Now prepare your USB storage device using the standard installation instructions..

⇐ BackPageNext ⇒

How to install Raspbian on the Raspberry Pi

Please share with your friends...
  • 2
  • 1
  •  
  •  
  • 1
  • 1
  •  
  •  
  •  
  •  
    5
    Shares
Tagged on:                                 

Leave a Reply