Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Similar documents
Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

XLink Kai Raspberry Pi Beginners Tutorial

RETROPIE INSTALLATION GUIDE

Experiments 1 How to set up Raspberry Pi B+ The little computer you can cook into DIY tech projects

Format Hard Drive After Install Ubuntu From Usb External

Raspberry Pi Setup Tutorial

Adafruit's Raspberry Pi Lesson 6. Using SSH

Manually Mount Usb Flash Drive Ubuntu Server Command Line

How to Install Ubuntu on VirtualBox

Raspberry Pi 2b PART 1. Table of Contents. Step by step guide. 1. Hardware (0:05) RS Online (ex-tax prices)... 3 MSY ebay...

Raspberry Pi Kernel-o-Matic

Pianoteq 6 Raspberry Pi 3 Station. By Edgar Bustamante

Lab E2: bypassing authentication and resetting passwords

Windows Method Using Linux Live CD and Gparted

Manual Format Flash Drive Ntfs Windows Xp

Manually Mount Usb Flash Drive Ubuntu Server 12.04

OS Installer. Installation Instructions

Setup: Scratch GPIO. What is Scratch? Introducing Scratch GPIO. How to install Scratch GPIO. Obtain Scratch GPIO

BeagleBone Black: Installing Operating Systems

RAK831 Pilot Gateway User Manual V1.0

How to Recover Data with Linux

How do I setup a Raspberry Pi?

Linux Manually Mounting External Hard Drive Mac Terminal

BCS Raspberry Pi Launch Events Getting started with Raspberry Pi

SPSS Tutorial - How to Perform an Offline License Activation on a Windows Computer

USB 2.0 Multi-Plus Card Reader/Writer. User s Manual

Manually Wipe Hard Drive Windows 7 Command Prompt Format

Lab 0: Intro to running Jupyter Notebook on a Raspberry Pi

CircuitPython with Jupyter Notebooks

OpenROV. Update Software Image From SD Card

Raspberry Pi NTP Clock Setup Guide

SIS offline. Getting Started

Computer Using A Flash Drive

Manually Mount External Hard Drive Win 7 Not Showing Up

Using a floppy emulator instead of normal old floppy drives: (This method works both for the d8b and the HDR.)

Writing and Running Programs

Revisiting PartedMagic By Dick Maybach, Member, Brookdale Computer Users Group, NJ February 2017 issue, BUG Bytes n2nd (at) att.

Manual Format Flash Drive Mac Os X Lion

Adafruit WebIDE. Created by Tyler Cooper. Last updated on :29:47 PM UTC

Adafruit's Raspberry Pi Lesson 2. First Time Configuration

Installing New External Hard Drive Windows 7 Upgrade Blank >>>CLICK HERE<<<

Get VirtualBox. VirtualBox/Ubuntu Setup. Go to and select Downloads.

Preparing SD card for Pi

Manual Format Flash Drive Mac And Pc Disk Utility

Getting Started Guide XC9010 Raspberry Pi Starter Kit

Lab: Setting up PL-App with a Raspberry Pi

Click Here to Begin OS X. Welcome to the OS X Basics Learning Module.

EV3Dev Lessons. Introduction to EV3Dev: Setup with Python

Sigma Tile Workshop Guide. This guide describes the initial configuration steps to get started with the Sigma Tile.

Experimental Procedure. Frequently Asked Questions (FAQ) Kit General Questions. Setting Up and Using Your Raspberry Pi Projects Kit

Adafruit Ultimate GPS on the Raspberry Pi

Optimizing Smart Phones

Usb Port On Manually Create Bootable Windows Xp Install Driver

Upgrading to the Raspberry Pi 3B or Pi 3B+ 1

Using the Android CircuitPython Editor

Manual Format Flash Drive Mac Os X Lion Bootable Usb

Format Hard Drive After Install Ubuntu From Usb

The Definitive Guide to Fractal Awesomeness with J-WildFire!

ELE409 SPRING2018 LAB0

Tutorial : Confguring a micro SD memory card as both swap and storage area for the DragonBoard 410c (DB410C)

How To Delete And Reinstall Mac Os X Mountain Lion Without Losing Data

How To Reinstall Grub In Windows 7 Without Losing Data And Programs

I Want To Wipe My Computer Clean And Start Over Windows 7

How to make a Work Profile for Windows 10

This is Lab Worksheet 7 - not an Assignment

Adafruit Ultimate GPS on the Raspberry Pi

Formatting an External Hard Disk for Use with a Mac

By: Yushi Wang Partners: Shen Yue and Yubing Xu Group 6. How to Setup Pandaboard ES Software Environment for UAV Project

Manually Mount External Hard Drive Windows 7 Install

How To Install Windows Updates 8 From Usb

Full System Restore Manually Run Cmd Prompt

Applied ICT Skills MS Windows

Manual Format Flash Drive Mac Os X Lion Startup

Manually Mount External Hard Drive Windows 7 Install Wd

Itunes Manually Install Ios Beta 6 On Iphone 4s Without Udid >>>CLICK HERE<<<

Tutorial - How to upgrade firmware on Phison S9 controller MyDigitalSSD using a Windows PE environment

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES

BeagleBone Black: Installing Operating Systems

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

Tutorial How to upgrade firmware on Phison S8 controller MyDigitalSSD using a Windows PE environment

The Following steps are done on your normal desktop or laptop, which I refer to in this document later as the Remote Computer

Magic Sing ET-23KH. Copyright 2018 Karaoke Home Entertainment / /

CloudFleet Documentation

1 Start Ubuntu Privacy Remix

GV Director Restoring USB Image / Frame and Panel Installation

Section 6 Storage Space

Build your own NAS with OpenMediaVault

Getting started with Raspberry Pi (and WebIoPi framework)

Manually Mount External Hard Drive Windows 7 Not Showing In My Computer

JetFlash User s Manual

Setting Up a Linux Operating System

This is Lab Worksheet/Installation 7

ClamXav a free antivirus application for the Mac

10 cool tools in Windows 7

2. install windows vista

Manually Mount Usb Flash Drive Linux Command Line Fedora

10 cool tools in Windows 7

Mac Os X Manually Mounted Usb Drive Read Only

Windows 7 From Usb Without Boot Camp

How Do I Sync My Iphone To Another Computer Without Losing Everything

Transcription:

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi Created by Simon Monk Last updated on 2016-12-03 03:20:15 AM UTC

Guide Contents Guide Contents Overview You Will Need Downloading an Image Choose your Operating System Choose your Distribution Extract the Image File Making an SD Card Using Windows Step 1. Step 2. Step 3. Step 4. Step 5. Step 6. Faster writes Making an SD Card Using a Mac Step 1. Step 2. Step 3. Step 4. Step 5. Step 6. Faster Writes Test & Configure BONUS! Make a Backup Image! Back it up! What You'll Need Get the Script File Run the Script Problems? 2 3 5 7 7 7 8 9 9 9 10 10 11 12 13 14 14 14 15 15 16 17 19 20 22 22 22 22 23 26 Page 2 of 27

Overview When you buy a Raspberry Pi, it may or may not be sold with an SD card. The SD card is important because this is where the Raspberry Pi keeps its operating system and is also where you will store your documents and programs. Page 3 of 27

Even if your Pi came with an SD card with an operating system on, it is a good idea to update it to the latest version, as improvements and bug fixes are going in all the time. Since putting the operating system onto an SD card wipes everything else off the card, it is worth considering using a USB flash drive for your documents, so that when you install a new version of the operating system, you don't have the complication of copying them off somewhere safe before reformatting the SD card. If your Pi did not come with an SD card then the minimum size you should get is 4GB, but buy a bigger SD card if you think you will need the space. (If you're planning to store media files or work with other SD card images on your Pi, you probably need a bigger card.) This lesson shows you how to create an SD card for your Raspberry Pi. Page 4 of 27

You Will Need To prepare an SD card for your computer, you will need: A 'regular' computer with a built-in SD card reader, or an add-on USB SD card reader. The instructions here are for Windows and Mac. You can pick up a tiny microsd card reader/writer that is nice and fast and works with all USB ports (http://adafru.it/939) at the Adafruit shop. An SD card at least 4GB in capacity. You can pick one up that is tested and guaranteed to work with the Raspberry Pi (http://adafru.it/102) at the Adafruit shop. (If buying elsewhere, remember that for the Pi 2, you'll need microsd.) Page 5 of 27

Page 6 of 27

Downloading an Image The operating system that will be installed onto the SD card must be downloaded from the Internet. This will usually be a zip file that then extracts to a file of type.img an image file. Whatever image file you download, the actual installation process is the same. Choose your Operating System There are a bewildering number of operating systems that you can install on your Raspberry Pi. If you are a beginner, you'll probably want to stick with one of the Linux distributions. Choose your Distribution Having decided you want to install Linux, that is not the end of the story. You now have to decide which distribution or 'distro' of Linux you want to install. Being an Open Source operating system, anyone can take one of the existing distributions an add things to it or configure it in a certain way before packaging it up as another distribution option for anyone to use. This is how the most common Raspberry Pi distribution, 'Raspbian', came into existence. The existing 'Debian' distribution was configured and kitted out with useful things like IDLE (a python-programming language development editor) and Scratch (a learn-toprogram gaming system) to make it suitable for the Pi. All of the Adafruit tutorials (and nearly every other tutorial online) will work with Raspbian, and nearly every Pi out there runs it. Raspbian Download http://adafru.it/dpb Additionally, Adafruit offers a growing set of tools for working with Raspbian installations, including the Adafruit Raspberry Pi Finder (http://adafru.it/je2), a GUI for configuring your Pi over the network, and Occidentalis (http://adafru.it/atc), a collection of utilities for hardware support and hacking. Previous versions of Occidentalis were built as standalone images, but we've since turned it into a set of packages (http://adafru.it/je3) for Raspbian. (Incidentally, the name Occidentalis comes from the Latin name for the raspberry, Rubus Page 7 of 27

Occidentalis.) Extract the Image File Whatever distribution you're installing, you'll probably have a zip file that looks something like one of these:...open the.zip and extract the.img to your desktop. Page 8 of 27

Making an SD Card Using Windows We really like using Etcher for burning SD cards. Works great on any version of Windows, won't over-write your backup disk drive, and can handle compressed images so you dont need to unzip them! Step 1. Download Etcher from: https://etcher.io/ (http://adafru.it/snf) Download Etcher http://adafru.it/snf Step 2. Run the downloaded app to install! Page 9 of 27

You can start immediately, doubleclick the Etcher desktop icon, or select it from the Start menu Step 3. Eject any external storage devices such as USB flash drives and backup hard disks. This makes it easier to identify the SD card. Then insert the SD card into the slot on your computer or into the reader. Step 4. Run the Etcher program Page 10 of 27

This will launch the following application. Step 5. Select the image file by clicking Select Image you can select a compressed file such as a.zip or.gz Page 11 of 27

Step 6. Etcher will automatically try to detect the SD drive, check the size to make sure its the right one Then click Flash! Check that you have the right device, as it will be reformatted, and then click Install. Page 12 of 27

It will take a few minutes to install, but once the SD card is ready, you will see the following. That's all there is to it. Your SD card is ready for use in your Raspberry Pi. Faster writes If you burn a lot of cards, speed it up by turning off Validate write on success Page 13 of 27

Making an SD Card Using a Mac We really like using Etcher for burning SD cards. Works great on Mac OS X 10.9 or later, won't over-write your backup disk drive, and can handle compressed images so you dont need to unzip them! Step 1. Download Etcher from https://etcher.io (http://adafru.it/soe) Download Etcher http://adafru.it/snf Step 2. Open the downloaded disk image and drag the Etcher application to the Applications folder. You can then eject the disk image. Page 14 of 27

Step 3. Eject any external storage devices such as USB flash drives and backup hard disks. This makes it easier to identify the SD card. Then insert the SD card into the slot on your computer or into the reader. Step 4. Run the Etcher application. Page 15 of 27

The first time you run Etcher you ll be asked to confirm the download. Click Open to continue. This will launch the Etcher application Step 5. Page 16 of 27

Step 5. Select the SD card image file by clicking Select Image. You can choose a compressed SD image file such as a.zip or.gz or an uncompressed.img, it s all good! Step 6. Etcher will automatically try to detect the SD drive. If you don t have an SD card currently inserted, you ll be prompted to connect one. Page 17 of 27

Check the disk size to make sure its the right one, that it s not overwriting your main drive or anything nasty. Then click Flash! A-ah! Etcher will work for a few minutes to burn the SD image to the card. You ll see a progress bar as it works. This is about the time you ll wish you d splurged on a high-speed card. Once the SD card is ready, you will see the following: Page 18 of 27

The card will be unmounted automatically, so you can pull it out now and use it in your Raspberry Pi. Faster Writes If you find yourself burning a lot of SD cards, you can speed things up by clicking the gear icon at the top-right, then turn off the Validate write option. I ve written hundreds of cards and only had one fail validation. Page 19 of 27

Test & Configure If you plan to use multiple SD cards, it is not a bad idea to label the card, or for microsd cards label the little plastic case they usually come in. Testing the card is easy - insert it into your Pi, then connect a keyboard to the USB port and a NTSC/PAL TV to the composite port or an HDMI monitor to the HDMI Port. Then power it by connecting a Micro USB cable to the Pi and powering it via a computer or a USB wall charger. For Raspbian, you should see something like the following, an Adafruit/Raspberry logo in the top left, and a ton of text filling up the screen: Page 20 of 27

In the next tutorial, you will find out how to configure your Raspberry Pi the first time you boot it up. Click Here for the Next Lesson http://adafru.it/aua Page 21 of 27

BONUS! Make a Backup Image! It took a while to get your SD card set up, didn't it? Bet you don't want to have to do that again, do you? Well, Back it up! Forum user, Mac user, and Adafruit Customer phil.drummond took it upon himself to find the best way to back up his system image. And he found a fast and easy way - a script which quickly creates a clone of your running Raspberry Pi system, ON THE PI ITSELF! Note: This script only works with occidentalis 0.2 and older versions of Raspbian The script comes to us by way of Pastebin user BILLW (http://adafru.it/ccg). Click to get BILLW's Cloning Script http://adafru.it/cch What You'll Need USB SD Card Reader Blank SD Card Booted and Running Raspberry Pi Get the Script File First, get a copy of the script file onto your Pi. You can do that in any one of several ways: Then......Or... First, download the file to your computer Use ssh or vnc to transfer the file from the computer to the Pi Page 22 of 27

...Or... Pop the blank SD into your USB Card Reader Plug the Card Reader into your computer Copy the file to the blank SD Move the Card Reader to the Pi Copy the file from the SD to the Pi Use the Pi's Web Browser to navigate to this page and download the script file directly Run the Script 1. Put the blank SD card into your USB Card Reader, and plug it into one of the PI's USB ports. 2. Open a Terminal window on the Pi 3. Navigate to the folder where you stored the script file. (If you stored the file on the Pi's Desktop, simply type 'cd Desktop') When you run the script, you will have to specify the name of your SD card. Raspbian and occidentalis assign the names 'sda', sdb', etc. to SD cards found on USB. If you only have one USB card reader attached, the name of your new SD card will be 'sda'. If you're not sure that sda is the right card, you can run this command to list the cards connected to your Pi. sudo fdisk -l Page 23 of 27

The SD card slot with your running Pi system will show up as /dev/mmcblk0. Your blank card will be listed as /dev/sda1 (or possibly /dev/sdb1, if you have more than one USB card readers attached to the Pi). Note that you don't enter the '1' - if your card is listed as '/dev/sda1', then you would still enter 'sda' when you run the script ('sda' is the name of the card, 'sda1' is the name of the first partition on the card). Ok, so now you should be ready to run the commands chmod +x rpi-clone.sh sudo./rpi_clone sda -f As noted earlier, the first parameter passed to the script is is the name of the target SD card, in this case 'sda'. The -f tells the script to entirely re-format the card. The script will ask you if you're sure you want to initialize the destination card. Type 'y', and hit the return key. If you see an error message instead, check below for solutions! Next, the script will ask you if you want to give your new backup a label. It's not necessary to do this - just hit the return key. Page 24 of 27

Finally, the script will ask you if you're sure you really want to do this, before it begins creating the backup. Type 'y', and hit the return key. Now it's time to wait - the process will take a little while. Page 25 of 27

When the process is complete, the script will ask if it should unmount the card with your new system clone/ Reply with 'y', and you're done! Now you can shutdown the Pi, swap the clone into the Pi's SD Card Slot, and restart - Bingo! a fully-operational clone of your Raspberry Pi system! Problems? If you see an error message like this:...it means that your SD card is mounted in the file system. You have to unmount it before you can proceed. In the picture, I'm writing over an earlier clone of my system, which has Page 26 of 27

two partitions: /dev/sda2 and /dev/sda1. You might only have one partition. In any case, issue the umount command for each mounted partition on your destination SD card: sudo umount /dev/sda1 Now try to run the script again! Last Updated: 2016-12-03 03:20:14 AM UTC Page 27 of 27