RPi Noob Guide to the Pi image

From eLinux.org
Revision as of 10:55, 12 August 2012 by JimJKla (Talk | contribs)

Jump to: navigation, search

Page in development so far just layout

The intention of this page is to provide the detail of making a working SD card for a RaspberryPi keeping instructions and explanations jargon free as much as posible and explaining any neccessary jargon as it appears.


Getting an image

What is an image.

An image is a file you download that contains the bare minimum to setup a RaspberryPi SD card. The SD card is that bit of plastic you can put in your camera to store pictures and it is more than capable of acting as the primary disk for your RaspberryPi

The absolute minimum to load a Wheezy image is a 2 Gig (Gigabyte) SD card (there are images that will fit on a 1 Gig but not Wheezy) but you will not have much space so I reccomend a 4 Gig and as a noob have two if you can.

You can move to bigger ones later I started with a 2 Gig I extracted from an old camera and a 4 Gig I scrounged from an old MP3 player

If you have a camera that takes SD cards use the cameras format option its quick and usually works.

Ok most of this page will work around the Wheezy images but should work for any image but your going to need to get an image.

The Wheezy image at this time has two versions and each has two download methods

The older version Wheezy 2012-06-18 Beta is available here

The current one Wheezy-Raspbian-2012-07-15 is on the main download page here

Both give the option of a direct browser download or a download using Torrent.

Torrent is better for the community if you know how to use it but if you do not just let your browser do the work and take the Direct Download either way you will end up with a zip file.

Do not unzip yet you need to do a check on this zip file before you unpack (unzip) it.

The checksum and using it

On the download page you will see a long string with the name SHA-1 this is the checksum if you think any computer file is a sequence of numbers if you were to add all of those together you would get a result an answer.

Get one of the numbers wrong and the answer is wrong well the SHA-1 is a hexadecimal (base16) total for the zip file you downloaded.

This is actually a lie SHA1 is actually a fancy algorithim called a Secure Hash Algorithm but of which there are four. As a noob don't worry it is all done for you.

There is a little program SHA1SUM.exe that if you feed it your zip file will calculate an SHA-1 number and if that number is the same one on the download page you can be confident the download worked correctly.

A simple place to get sha1sum.exe this is cute because it comes with its own SHA1 checksum.

Highlight and copy the checksum create a new text file (I use wordpad) and paste the checksum into it, it may add some leading space so delete that highlight and copy it with the leading spaces removed save the file and when asked for the file name paste in the checksum followed by .txt

you now have a text file that has the checksum as the name and it contains the checksum this is slightly safer than writing it down. Also if you feel inclined it is easy to print a hard copy.

So you should now have copy of sha1sum.exe and a copy of its checksum

Double click sha1sum.exe you should get a pop-up window (you may get the unknown publisher one first and if you are running vista or Windows7 you will need to run as administrator)

The resuting window has two boxes and two buttons [select file] and [exist] (an unusual spelling of exit) click select file and browse to yor sh1sum.exe file and click. There should now be the file name in the top window and a value in the bottom window and because you used the checksum as a file name it will be fairly easy to compare the two if they are the same then you know sha1sum.exe is good.

So you now need to do the same for your downloaded image zip file. (NOTE the zip file not the extracted image file). it may be worth doing the little text file trick for your Wheezy image sha1 check value.

This is where this may sound patronising but remember each file has its own sha1 value.

If the values come out the same you can be confident the download was a sucess and it will be safe to unzip the downloaded file.

Unzipped you will end up with a file that ends .img this is the file you are going to build into your SD card but first you need a program to do this.

Image writers

Image writers are programs used to stuff a .img file onto an SD card or a pen drive.

There are two options in Linux

dd which is command line and not the easiest for the noob feel free to investigate but the following is the command line description for running dd

dd bs=1M if=[debian .img file] of=[path to your SD card]

and

There is a gui tool under the Ubuntu banner called ImageWriter (To use this you will need to add this into Ubuntu and it can be found in the Ubuntu Software Centre under Accessories) This is intuitive compared to dd.

One easy one for Windows

This is Win32DiskImage there are a number of locations you can get this

Win32DiskImage Note this kicks off an automatic download of the zip.

This is the same download you will get by following the link on the RaspberryPi Download page. This should work for all versions of windows but you should note that as usual that in Vista and Windows7 you will need to run as administrator. I have been told there is a special version for 64bit instalations but there appears to be no obvious link for this.

Various Mac options you can find here

Link to image writer pages for the mac

I make no pretentions to know how to do this onna Mac I hope we can find a Mac punter to come and expand on the Mac options maybe even write its own dedicated wiki page for the Mac noob.

Linux dd

I am not going to pretend that the linux command line and the dd method is the easiest environment for a noob.

The following link to dd is the wikipedia page for dd this is a comprhensive page that has the answers but I would suggest that you save this for the time when your RPi is running and you can play with it there.

Ubuntu ImageWriter

The Ubuntu ImageWriter is as instinctive as it gets if you are working from a Linux Desktop I need to confifm other Distro's (Distributions = Flavours of Linux)

One thing to note with ImageWriter is that you cannot select the target till you have selected an image to write.

Win32DiskImage

This is the Windows tool used to write your .img file to your SD card this like the ubuntu tool is an instinctive in its use.

Unlike the Ubuntu tool you can select the SD card before you select your .img file some people have had issues with SD card readers particularly in built ones it has to be worth noting that good results have been achieved with the cheapest of card writers (for me poundland).

One advantage of the Win32DiskImage is that it can be easily used to read as well as write a disk image.

As a noob you may wonder what is the purpose of this?

Once you have installed your RPi image and done your customisation you can then use Win32DiskImage [Read] button to create your own image that you can use as a backup. But note you do need to give it a new name you do not want to overwrite your master image. (If you do there is nothing to stop you re-downloading if you do.

As a noob you can ignore the MD5 Hash option.

I am not suggesing you should ignore this forever but while you consider yourself still to be a noob just put it on the back burner.

Do not expect it to be a quick process and if you choose to backup your SD card after using something like the rsapi-config script and the the EXPAND-ROOTFS to use all of your SD card the image will be tailored to the size of card you have pulled it from.

If you want it to fit in a smaller card you will need to do some image reduction and to be fair thats not really a noob subject enough said it may be somthing for futher study once you gain confidence.

dd can also be used for backup but as I say dd is not for the faint hearted.

The .img file selection box has a browse button selecting your file may seem counterintutive for the noob because the actual select button says save its the way it is like a lot of Microsoft stuff. (Just think of the use of the start button to shut down in XP).

Live with it and click save then to write your SD card click write at this point you will be presented with a dialoge that you aregoing to overwrite everything on the card this is just a check to make sure you understand you are going to wipe your SD card. Then its a wait. Even for the smaller SD card images it will take a while one consideration is the job can be minimised to continue as a background operation.

When the program cfinishes you will get a popup Complete window with the message "Write sucessful."

Before you pull the SD card or the writer you should use your "safely remove hardware" option (This will probably not harm your SD card if you don't but it is considered good practice and if you dont and your SD get's corrupted you are only going to need to do it again.

There has been some comment about using up SD card write cycles but if you go and look at the wiki page for SD cards you will see that the usual number of write cycles for an SD card is about 100,000 even by a conservative estimate that is a fair life.

config.txt

Having completed an install of an image on your SD card of choice at any point you can insert the card in any reader now if you view the card from Linux you can see the Raspberry partition but from windows you can only see 12 files for the Wheezy Beta install

Cable connections

Power to the RPi

Ethernet

USB 1 & 2

HDMI

Composite

Sound

The SD Card slot

Hey look LED's

The tidy shutdown

Backup your work

Category:RaspberryPi