The next step is to copy the image from your PC to your SD card.
Before I describe the process (all one command) it may proof useful to discuss what type of SD card to use.
Personally I don't like have a lump of SD sticking out of the side of my RPi, so one of my personal mod's is to get a Micro SD converter and use a Micro SD card instead.
These aren't that expensive and can be bought from ModMyPi. (I'd also suggest adding heatsinks, whist your in modification mode) ;-)
Now to the class of Micro SD... I have read in several forums that the class of SD make no difference when used with the Raspberry Pi. I tend to disagree. It is true that RPi's will work fine using the cheaper class 4 cards. It is also true that the class speeds listed refer to serial read\write speeds, and not the random nature of a RPi's file system. But with all that said, in my experience, and by only using two RPi's side by side I personally felt that using a class 10 Sandisk Micro SD was noticeably faster than using a cheap ADATA class 4 Micro SD card.(my only benchmarking test was to watch them booting. The hardware is the same, but each time I tried, the Sandisk RPi gave me the log on prompt first!)
This really falls down to personal choice, and I confess to buying several of the class 4 cards as my local Maplin's had them on offer. ;o) Annoyingly, there are now selling 32G class 10 cards for the same price; here.
You can check this with "pwd"
You can also check the file name of your image using the "ls" command.
We are now ready to transfer this image to our SD card (or MicroSD in my case).
First we need to identify the device name given to our card.
To do this, enter the "df" command, but instead of looking at the space being used, look at the volumes mounted. (df is a command to display the free disk space).
Adding the "-h" makes the results human readable.
If you run the command before inserting you SD card, and then again after what ever volumes are new are related to you SD card.
If you look at the second "df -h" you'll notice the highlighted is "/dev/mmcblk0".
This is the device name for your SD card. Sometimes if you have partitions on your SD card you may find it ends with "p0" or "p1". This is how Linux identifies partitions. We are only interested in the volumes device name as we have partitions within our image file.
You will need to unmount this partition before we start the transfer.
unmount /dev/mmcblk0
If you have multiply partitions, add p0 or p1 or whatever partions you have and unmount each partition.
You can check again with the "df -h" command
Now to the image transfer.
*********************************************************************************************************************************
Warning, you can damage you working PC if you get this command incorrect! be very very careful!
*********************************************************************************************************************************
The "dd" command follows the following format ;
dd if=<source> of=<target> bs=<byte size>
In my example I typed "sudo dd bs=1M if=/home/anon/RaspberryPi/2012-10-28-wheezy-raspbian.img of=/dev/mmcblk0"
If we break that down, it contains the following;
"sudo" This command should be run with root privileges.
"dd" Data Destroyer!! you have been warned! :-p Seriously, I have no idea why dd, probably because cc was already used in C. But for us, this is the command we're executing!
"bs-1M" this is the byte size. you could try 4M, or if you've lots of spare time try reducing the size. With the 4G file we're using, I find 1M chunks works fine, but does take a little while. (gives me time to write this blog) ;-)
"if=/home/anon/RaspberryPi/2012-10-28-wheezy-raspbian.img" is the location of your image file. it is important to get the absolute location. I've included my '/home/username/filedirectory' to make it easier to understand instead of using '~/filedirectory'
"of=/dev/mmcblk0" is the location we're copying our image file to... basically the volumes device name. we identified this earlier using the "df" command.
If you get your "if" and "of" the wrong way around, you will be copying the contents of your SD card onto your harddrive. (great for backing up your RPi, but risky if you get your absolute locations wrong!)
Once this process starts, be patient! transfering 4G in 1M chunks can take a while, so go do some light reading.
I suggest looking here as they do a much better job of explaining this than me.
My next blog will discuss that all important first boot!
No comments:
Post a Comment