Showing posts with label sd card. Show all posts
Showing posts with label sd card. Show all posts

September 3, 2014

How to back up a SD card image, i.e. Raspberry Pi OS

Setting up a Raspberry Pi to finally run how you want it, can take a while. And it is super annoying when, for whatever reason, the SD card becomes corrupt, and you need to reinstall everything. Lame. Luckily, there is a tool with which a SD card can be imaged and stored away in waiting, until its triumphant return; it isn't the backup image you need right now, but it is the image you deserve...

Enter Win32 Disk Imager. It is likely something you've used before anyways when setting up your RasPi, because the official documentation speaks highly of its use. For our purposes, we just need a simple backup image:
  1. In the Image File textbox, select your save path and file name
  2. Make sure the right Device (i.e. SD card's drive letter) is selected.
  3. Hit the "Read" button.
That's it! If you ever need to reload this image onto a blank SD card, just load the backed up image and hit the "Write" button instead.

Another related good read here, with suggestions for Mac/Linux.

September 2, 2014

Getting started with a Raspberry Pi: Some basics

These are some basic steps and resources for getting a Raspberry Pi up and running in very little time, while ironing out some annoyances.

You will need a SD/SDHC card (2-8 Gb is plenty of space) as well as a computer with a card reader, and a Raspberry Pi (duh).
  1. Prepare SD card: If running Windows or Mac, download the SD Association's SD Formatter tool. This tool is recommended by almost any RPi guide worth their salt, and is very lightweight and fast. Excerpts from the official RPi guide:
    • Windows
      1. Install and run the [SD Formatter] on your machine
      2. Set "FORMAT SIZE ADJUSTMENT" option to "On" in the "Options" menu
      3. Check that the SD card you inserted matches the one selected by the Tool
      4. Click the "Format" button
    • Mac
      1. Install and run the [SD Formatter] on your machine
      2. Select "Overwrite Format"
      3. Check that the SD card you inserted matches the one selected by the Tool
      4. Click the "Format" button
    • Linux
      1. We recommend using gparted (or the command line version parted)
      2. Format the entire disk as FAT
  2. Download the latest NOOBS image, or pick your preferred distro.
  3. Unzip the Raspberry Pi image, and copy those files to the formatted SD card.
  4. Insert the SD card into the Pi and connect networking, USB keyboard, HDMI TV/monitor, power etc.
  5. NOOBS will boot up, so select your desired operating system, and hit I to install.
  6. Go grab a drink, because this takes like 10 mins.
  7. Change font size: When it is finally done, you'll need a magnifying glass to see anything on the screen, which sucks. Firstly, you'll be greeted by the console-setup tool. Slog your way to the update command with your magnifying glass; when this is done, we will have the option to change font size.
  8. You may need to log in to your Raspberry Pi at this point, the default username/password is pi/raspberry.
  9. Reconfigure the console-setup tool with:
    sudo dpkg-reconfigure console-setup

  10. Follow the steps, and select a larger font (I personally like 16x32 on my 42" TV), but let's face it, we're gonna be SSH'ing into this puppy most of the time, so this is really just a backup solution, and that we won't get annoyed when we DO need to connect it to a TV.
  11. sudo reboot
  12. Change the default user's password: As in Unix systems, done via the passwd command, or create a new user altogether for better security.



In a following article, I will detail setting up SSH access, and use a Raspberry Pi as an example of how to do this. A few final notes, once you can access your Pi via SSH:

Set up some useful aliases: I usually just uncomment the ll, la and l aliases in the ~/.bashrc file. Reload your terminal profile to pull those aliases in:
su - pi //where pi is my username; substitute if you changed yours.

Proper shutdown: Don't be a dumbass and systematically wreck your Pi by just pulling the plug to turn it off. Power it down properly, either while SSH'ed in, or directly via your plugged-in keyboard:
sudo shutdown -h now