Friday, April 19, 2013

Raspberry Pi Basics: Setting Up the SD card


So BAM, you're super pumped about getting a Raspberry Pi (from here on I'm going to refer to it as a RPi), but you don't know where to start or what to do to set it up.

That's where I come in!

Things you'll need

There's some things you'll need before we start,

  • A Raspberry Pi Computer (RPi)
  • A standard size SD card (no cheap knockoff brands, buy a quality one!)
  • A computer that can read /write to SD cards (this guide uses a Windows PC)
  • A computer with internet access (if you have dial-up, UPGRADE! You'll thank me.)

Clearing the SD card


Lets get that SD card ready
Since the RPi doesn't require you to have a harddrive, they gave you a SD card slot on the bottom of the device. The SD card is where the RPi gets the OS (Operating System) that it will run.

Download & Install Easeus

The first piece of software we need to download is the Easeus Partition Master, CLICK HERE TO DOWNLOAD

This is the FREE home edition, and will be more than capable of what we need it to do.

Partitions, and why we need Easeus

Going off on a tangent to explain why we need this. With windows you normally just have your entire harddrive available to put data on. On other OS' they like to split up the data, for a multitude of reasons. They do this with partitions, which are basically just sections of your storage device that are meant to keep certain data seperate. Windows can ONLY SEE THE FIRST PARTITION. So since we are setting this SD card up to run a distro of Linux, we need to be able to see and work with all the partitions on the SD card.

Back to Business

So go ahead and install the Easeus Partition Master, insert your SD card into the computer, and run Easeus.

When you see this screen

Click on the sentence "Go to main screen". This will load up the main screen of the program.

Deleting/Resizing partitions


The program's main window will list all your storage devices, some information on them, and the partitions that they currently have. You have to find your SD card now, just look for one that has a size close to what the SD card is labeled as. Mine is Disk 4, drive H. If you don't see yours, click the Refresh button on the top left. 

If your SD card has more than 1 row under its "Disk" label, it has multiple partitions.

See, mine has 2

 Start with the last of the partitions on your card (or all of the ones that have asterisks "*" instead of a letter), right click each and click "Delete Partition". (Make sure you have your SD card selected, you could lose a lot/all of data if you did this to your computers main partition!)



It will prompt you if you REALLY want to delete it, click "Yes".

Once you have deleted all but the last partition (the named partition, mine was "H") you will be left with "unallocated" space. This is just space on the storage device that isn't assigned to any partition. Let's fix that! We will extend the named partition to take up all the space by right clicking the partition we have and clicking on "Resize/Move Partition".


Once the popup appears, stretch the sliders to take up the ENTIRE bar, where "Unallocated space before" and "Unallocated space after" are both 0.0, then click "Ok".


IMPORTANT: You must not click "Apply" in the top left of the program to actually apply all of these changes we've been making. If you don't, NOTHING will get changed!


It will prompt you to double check everything, click "Yes" and it will start applying the changes. This can take a while depending on the size and quality of the card, and how fast your computer is. It will send you a popup when it's done, telling you that the operations executed successfully!

Congratulations! We're halfway done with setting up the SD card!

Now to get the Operating System (OS) on that card!

Getting the Operating System on the card

The operating system we're installing isn't like a normal program you install. There's no one click and you're done. With it being a Linux OS, it will have multiple partitions it needs set up, so the developers take a digital screenshot of what a basic setup should look like. All we have to do is write this "image" of the basic OS setup to our storage device (SD card), and we're ready to boot it up!

Getting WinImage

The program we'll be using to write the image to the SD card is called WinImage. CLICK HERE TO DOWNLOAD

On that page, under the 8.5/8.10/8.0 section (this is as of 4/19/13, use the newest NON-beta version), if you have a 64-bit version of Windows, download that file "wima6485.exe". This file is an installer for EASY setup. If you're not sure if you have a 64-bit version of windows or not, download "winima85.exe". It's a 32-bit version which will work on all 32 AND 64 bit versions of windows. (If there is a newer version of winimage available, find the .exe that has in the description to the right either "64-bits" or "32-bits" depending if you KNOW you have 64-bit or not, and make sure at the bottom of its description it says, "This file contains a setup program for easy installations". If there are multiple .exe files that match this, the description should also say what versions of Windows they were made for. That should just about solve it.)

Run the .exe file you jsut downloaded to install WinImage and use all the default settings (unless you know what you're doing).

Now to download the Raspberry Pi's Operating System!

Downloading The RPi's OS

The Raspberry Pi foundations website has a list of operating systems that they know are quality, and made specifically for the RPi. The list (with download links) is available at http://www.raspberrypi.org/downloads

They have a custom OS called "wheezy". It's a RPi version of the popular Linux Debian system. There are actually 2 versions available on the website

  • Raspbian "wheezy"
  • Soft-float Debian "wheezy"
These are the first 2 OS' listed on the page I linked. They are actually EXACTLY the same, except for one tiny detail. The second option (Soft-float Debian "wheezy") uses a slightly slower, soft-float ABI.

Soft float, what the heck is that? 

Soft float is how the computer calculates floats (fancy computer jargon for numbers with decimal parts). With soft float, the computer calculates decimal parts of numbers with software, just like you would with pen and paper to figure out the floats (decimal numbers). It's slightly slower than having hardware to calculate floats. 

Why does this matter? Well, with the soft-float version you're able to install the Java Virtual Machine, which lets you write, compile, and run Java code and programs! This gives you another language you can use/learn on your RPi. Sweet, huh?

Needless to say, in this tutorial I will be installing the Soft-float Debian "wheezy".

You can download the zip folder by clicking on either torrent or direct download, though I would suggest the Torrent as it will usually be MUCH faster (unless you don't know what a Torrent download is, in that case just click direct download).

Once completed, find out ehere you downloaded the Zip, and extract/unzip it. Inside the created folder you will find a file that has a .img at the end of it (if you have that enabled, if not, dont worry). Remember where this is!

Writing the OS image to your SD card

Open your start menu, click the "Win Image(Administrator)" link from you start menu/programs list. If it prompts you, click "Yes" to give it admin access (it's necessary!).



Click on the "Disk" tab on the toolbar of the program window and select the disk that is the SD card. Mine was named H earlier, so I clicked on "use removable disk H". If you're not sure what drive letter it is, open up "My Computer" and see what letter your SD card is using under removable media. 



IMPORTANT: Make SURE you get the right drive letter, if you mess up you can completely wipe your computer!

Click on Disk, then on "restore virtual Hard disk image on physical drive"


When the popup appears, select the Disk that has the same size storage as your card, mine was a 16GB card, so I selected Disk 3.


When you click "OK", it will have you find where you unzipped/extracted the .img file we downloaded earlier. Navigate to that folder/location and select the file. You might need to click the drop down menu on the bottom right and click "all files".


It will prompt you one last time, letting you know that this is the last chance you have to double check what you're doing, so you don't mess up your harddrive. As long as you've check the drive letters, click "OK" and wait for it to complete!


Once it's finished, close WinImage, and remove your SD card from your computer, because it's done! The SD card is ready to be used. 

In the next tutorial we will go over the first time setup of your Raspberry Pi's operating System!

<< Previous: Raspberry Pi Basics: What the heck IS it?

No comments:

Post a Comment