Getting started with the Raspberry Pi (RPi)

tumblr hit tracking tool


Who ate all the Pi's!


Do you have a Raspberry Pi yet?

Before you can do anything useful with your Raspberry Pi, you need to make an SD card which contains the boot files and the linux distribution.

Assuming you have a 2GB full size SD card or larger, you can create a bootable RPi SD card as follows:

1. Download your RPi image ZIP file - for instance the Debian download at http://www.element14.com/community/groups/raspberry-pi?ICID=hp_raspberry debian6-17-02-2012.img or debian6-19-04-2012.zip.
2. Unpack the ZIP file to get the .img file - this file is a complete binary image of the whole SD card.
3. Use RMPrepUSB and select your SD card - then use the File-->Disk button, select the .img file and then choose 0 - 0 - 0 for the file start, USB sector and USB length (meaning copy all contents of the file to the start of the SD card).
If you wish you can use the Win32DiskImager.exe utility instead of RMPrepUSB which you can download from here and select the win32diskimager-binary.zip. Both are about the same speed, Win32DiskImager is simpler to use and does show the MD5 hash value for the chosen file so that you can check it easily but it does not show much information about the drive letter you have selected (and so may cause you to format the wrong drive!) and has been known to fail to copy the image on occasion.

If you have any problems copying the img file to the SD card, try the RMPrepUSB 'CLEAN' button first.

That's it - now go try it! You can also make an image backup of the SD card at any time using RMPrepUSB Disk-->File or the Win32DiskImager - Read button.

The SD card contents of debian6-17-02-2012.img is shown below, notice that we have three partitions:
1st ptn 0075MB FAT32 partition (type 0C)
2nd ptn 1590MB linux partition (type 83)
3rd ptn 0192MB linux swap partition (type (82)

Also notice that there is no partition marked as Active (bootable). The RPi firmware is coded to look for the file bootcode.bin in the first FAT32 partition - the normal MBR - partition boot process is not followed.

The boot sequence for the RPi is:
  1. bootcode.bin: 2nd stage bootloader, starts with SDRAM disabled
  2. loader.bin: 3rd stage bootloader, starts with SDRAM enabled
  3. start.elf: The GPU binary firmware image, provided by the foundation.
  4. kernel.img: The OS kernel to load on the ARM processor. Normally this will be Linux.
  5. cmdline.txt: Parameters passed to the kernel on boot.

See the User Guide here for more details.

debian6-17-02-2012.img (obtained by using Drive Info button on RMPrepUSB)

USB Sector 0
============= SECTOR DATA ================
[Sector 0] 0MB
0000 FA B8 00 10 8E D0 BC 00 - B0 B8 00 00 8E D8 8E C0 ú¸..ŽÐ¼. °¸..ŽØŽÀ
0010 FB BE 00 7C BF 00 06 B9 - 00 02 F3 A4 EA 21 06 00 û¾.|¿..¹ ..ó¤ê!..
0020 00 BE BE 07 38 04 75 0B - 83 C6 10 81 FE FE 07 75 .¾¾.8.u. ƒÆ.þþ.u
0030 F3 EB 16 B4 02 B0 01 BB - 00 7C B2 80 8A 74 01 8B óë.´.°.» .|²€Št.‹
0040 4C 02 CD 13 EA 00 7C 00 - 00 EB FE 00 00 00 00 00 L.Í.ê.|. .ëþ.....
0050 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0060 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0070 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0080 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0090 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0100 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0110 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0120 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0130 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0140 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0150 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0160 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0170 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0180 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0190 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01B0 00 00 00 00 00 00 00 00 - ED CD 00 00 00 00 00 00 ........ íÍ......
01C0 01 10 0C 03 E0 FF 00 08 - 00 00 00 58 02 00 00 03 ....àÿ.. ...X....
01D0 E0 FF 83 03 E0 FF 00 68 - 02 00 00 B0 31 00 00 03 àÿƒ.àÿ.h ...°1...
01E0 E0 FF 82 03 E0 FF 00 20 - 34 00 00 F8 05 00 00 00 àÿ‚.àÿ. 4..ø....
01F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 55 AA ........ ......Uª

Disk Signature bytes (1B8h-1BBh) = ED CD 00 00

Partition 1 SIZE=75MiB Type: 0C FAT32LBA (2047GB max)
START POS = CYL:16 HD:0 SEC:1 END POS = CYL:1023 HD:3 SEC:32
START (LBA) = 2,048 (00000800) SIZE (LBA) = 153,600 (00025800)

Partition 2 SIZE=1590MiB Type: 83
START POS = CYL:1023 HD:3 SEC:32 END POS = CYL:1023 HD:3 SEC:32
START (LBA) = 157,696 (00026800) SIZE (LBA) = 3,256,320 (0031B000)

Partition 3 SIZE=191MiB Type: 82
START POS = CYL:1023 HD:3 SEC:32 END POS = CYL:1023 HD:3 SEC:32
START (LBA) = 3,416,064 (00342000) SIZE (LBA) = 391,168 (0005F800)

Partition 4 SIZE=0MiB Type: 00
START POS = CYL:0 HD:0 SEC:0 END POS = CYL:0 HD:0 SEC:0
START (LBA) = 0 (00000000) SIZE (LBA) = 0 (00000000)

P1 Start=2,048 (1,048,576 bytes) End=155,647 (79,691,264 bytes)
P2 Start=157,696 (80,740,352 bytes) End=3,414,015 (1,747,975,680 bytes)
P3 Start=3,416,064 (1,749,024,768 bytes) End=3,807,231 (1,949,302,272 bytes)

Partition Boot Record

[Sector 2048] 1MB
0000 EB 58 90 4D 53 57 49 4E - 34 2E 31 00 02 02 20 00 ëXMSWIN 4.1... .
0010 02 00 00 00 00 F8 00 00 - 20 00 04 00 00 08 00 00 .....ø.. .......
0020 00 58 02 00 56 02 00 00 - 00 00 00 00 02 00 00 00 .X..V... ........
0030 01 00 06 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0040 80 01 29 36 38 E1 EA 4E - 4F 20 4E 41 4D 45 20 20 €.)68áêN O NAME
0050 20 20 46 41 54 33 32 20 - 20 20 0E 1F BE 74 7E AC FAT32 ..¾t~¬
0060 22 C0 74 06 B4 0E CD 10 - EB F5 B4 00 CD 16 B4 00 "Àt.´.Í. ëõ´.Í.´.
0070 CD 19 EB FE 54 68 69 73 - 20 70 61 72 74 69 74 69 Í.ëþThis partiti
0080 6F 6E 20 64 6F 65 73 20 - 6E 6F 74 20 68 61 76 65 on does not have
0090 20 61 6E 20 6F 70 65 72 - 61 74 69 6E 67 20 73 79 an oper ating sy
00A0 73 74 65 6D 20 6C 6F 61 - 64 65 72 20 69 6E 73 74 stem loa der inst
00B0 61 6C 6C 65 64 20 6F 6E - 20 69 74 2E 0A 0D 50 72 alled on it...Pr
00C0 65 73 73 20 61 20 6B 65 - 79 20 74 6F 20 72 65 62 ess a ke y to reb
00D0 6F 6F 74 2E 2E 2E 00 00 - 00 00 00 00 00 00 00 00 oot..... ........
00E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
00F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0100 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0110 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0120 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0130 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0140 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0150 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0160 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0170 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0180 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
0190 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01A0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01B0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........