Booting a Raspberry Pi from a regular disk, avoiding the flaky SD card

By: (plus.google.com) +David Herron; Date: August 7, 2017

Tags: Raspberry Pi

The Raspberry Pi is a cool little computer allowing you to do lots of crazy DIY projects interfaced through the GPIO port. While the Raspberry Pi is a small embeddable computer, because it runs Linux the Raspberry Pi is instantly approachable by any programmer. The biggest flaw in this picture is that it uses an SD card as the boot device. SD cards are not exactly fast nor reliable, preventing the Raspberry Pi from being used in serious production situations.

In April 2017 the Raspberry Pi foundation released the ability for the Raspberry Pi Model 3 to boot off a drive connected via USB. That instantly opens the door to using reliable regular disks rather than unreliable SD cards. The downside is that disks must connect via USB2 limiting disk throughput speed. As with anything there are plusses and minuses, but this is an interesting step forward.

For those seriously interested in using a Linux-Single-Board-Computer with a regular disk, some of the other devices will be a better choice. For example the Orange Pi Plus 2 has a SATA connector.

Updating Raspbian

First, update your copy of Raspbian to the latest version. The feature was enabled in April 2017. Either, set up a brand new copy of Raspbian on an SD card, or else type in these commands on your existing Raspbian:

$ sudo apt-get update
$ sudo apt-get upgrade

With an up-to-date Raspbian on your Raspberry Pi, you can go to the next step.

Setting the boot mode in firmware

What we're going to do is enable a Raspberry Pi boot mode enabling the ability to boot off a "Mass Storage Device"

See:

The first thing is to run:

$ vcgencmd otp_dump | grep 17:

This queries the hardware registers for the boot mode. It will print a number other than 0x3020000a.

Next, edit /boot/config.txt and at the end of the file insert this line:

program_usb_boot_mode=1

When the Rapberry Pi is rebooted, this line rewrites the register queried above so that now the command should output:

$ vcgencmd otp_dump | grep 17:
17:3020000a

This enables the USB Mass Storage Device boot mode on that Raspberry Pi. From now on, that particular machine will boot either from SD card or USB MSD.

For good measure, remove the line from config.txt or else any Raspberry Pi booted by this SD card will gain that boot mode.

Prepare a USB drive

Put together an external USB drive case along with a drive of your choice. I know from experience you can power a laptop SATA drive in an external 2.5" drive case off the power available on a Raspberry Pi USB port. I used that for awhile to drive a larger disk on a Raspberry Pi.

Go to the Raspberry Pi downloads page - (www.raspberrypi.org) https://www.raspberrypi.org/downloads/

Download a copy of Raspbian.

Use your favorite method to "etch" the Raspbian onto the disk. The instructions on the Raspberry Pi website describe writing the Raspbian image to an SD card. You'll have to adjust the instructions because you're instead writing to an USB disk.

The easiest method is to use Etcher ( (etcher.io) https://etcher.io) since that application made the process so danged easy. One picky detail is that Etcher won't, by default, let you choose a USB drive because it only shows removable drives. However, in the Etcher settings is a checkbox for an unsafe mode that WILL let you install Raspbian onto a non-removable drive. Set that setting, and now your USB drive should show up, and you can then copy Raspbian to that drive.

Once Raspbian is on your USB drive, simply connect it to the Raspberry Pi. Remove the SD card, and then boot the computer.

If all went right, Raspbian will boot even though you do not have an SD card.

Raspberry Pi 3 USB SSD Boot - YouTube

Source: (www.youtube.com) ExplainingComputers

Booting a Raspberry Pi 3 from an SSD connected via a USB adapter. Includes demo of the Etcher image writer, which is available at: https://etcher.io/ Please ...
« Where does MySQL/MariaDB store database data files on Linux or Unix? Create a Spring Boot REST API using Swagger/OpenAPI "Generate Swagger OpenAPI REST API documentation for Spring Boot application" »
2016 Election Acer C720 Ad block AkashaCMS Amazon Amazon Kindle Amiga Android Anti-Fascism Apple Apple Hardware History Apple iPhone Apple iPhone Hardware April 1st Arduino ARM Compilation Astronomy Asynchronous Programming Authoritarianism Automated Social Posting Ayo.JS Bells Law Big Brother Big Finish Black Holes Blade Runner Blogger Blogging Books Botnet Botnets Cassette Tapes Cellphones Christopher Eccleston Chrome Chrome Apps Chromebook Chromebooks Chromebox ChromeOS CIA CitiCards Citizen Journalism Civil Liberties Clinton Cluster Computing Command Line Tools Computer Hardware Computer Repair Computers Cross Compilation Crouton Cryptocurrency Curiosity Rover Cyber Security Cybermen Daleks Darth Vader Data backup Data Storage Database Database Backup Databases David Tenant DDoS Botnet Detect Adblocker Developers Editors Digital Photography DIY DIY Repair DNP3 Docker Doctor Who Doctor Who Paradox Drobo Drupal Drupal Themes DVD E-Books E-Readers Early Computers Election Hacks Electric Bicycles Electric Vehicles Electron Emdebian Energy Efficiency Enterprise Node EPUB ESP8266 Ethical Curation Eurovision Event Driven Asynchronous Express Facebook Fake News Fedora VirtualBox File transfer without iTunes FireFly Fraud Freedom of Speech Gallifrey git Gitlab GMAIL Google Google Chrome Google Gnome Google+ Government Spying Great Britain Heat Loss Hibernate Home Automation HTTPS I2C Protocol Image Analysis Image Conversion Image Processing ImageMagick InfluxDB Infrared Thermometers Insulation Internet Internet Advertising Internet Law Internet of Things Internet Policy Internet Privacy iOS Devices iPad iPhone iPhone hacking Iron Man Iternet of Things iTunes Java JavaScript JavaScript Injection JDBC John Simms Journalism Joyent Kindle Marketplace Lets Encrypt LibreOffice Linux Linux Hints Linux Single Board Computers Logging Mac OS Mac OS X MacOS X setup Make Money Online MariaDB Mars Matt Lucas MEADS Anti-Missile Mercurial Michele Gomez Micro Apartments Military Hardware Minification Minimized CSS Minimized HTML Minimized JavaScript Missy Mobile Applications MODBUS Mondas MongoDB Mongoose Monty Python MQTT Music Player Music Streaming MySQL NanoPi Nardole NASA Net Neutrality Node Web Development Node.js Node.js Database Node.js Testing Node.JS Web Development Node.x North Korea Online advertising Online Fraud Online Journalism Online Video Open Media Vault Open Source Governance Open Source Licenses Open Source Software OpenAPI OpenVPN Personal Flight Peter Capaldi Photography PHP Plex Plex Media Server Political Protest Postal Service Power Control Privacy Production use Public Violence Raspberry Pi Raspberry Pi 3 Raspberry Pi Zero Recycling Remote Desktop Republicans Retro-Technology Reviews Right to Repair River Song Robotics Rocket Ships RSS News Readers rsync Russia Russia Troll Factory SCADA Scheme Science Fiction Search Engine Ranking Season 1 Season 10 Season 11 Security Security Cameras Server-side JavaScript Shell Scripts Silence Simsimi Skype Social Media Warfare Social Networks Software Development Space Flight Space Ship Reuse Space Ships SpaceX Spear Phishing Spring Spring Boot SQLite3 SSD Drives SSD upgrade SSH SSH Key SSL Swagger Synchronizing Files Telescopes Terrorism The Cybermen The Daleks The Master Time-Series Database Torchwood Total Information Awareness Trump Trump Administration Ubuntu UDOO Virtual Private Networks VirtualBox VLC VNC VOIP Web Applications Web Developer Resources Web Development Web Development Tools Web Marketing Website Advertising Weeping Angels WhatsApp Window Insulation Wordpress YouTube YouTube Monetization