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 ........ ........
01C0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01D0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01E0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 ........ ........
01F0 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 55 AA ........ ......Uª

FAT32
000B Bytes Per Sector = 512 (0200h)
000D Sectors Per Cluster = 2 (02h)
000E Reserved Sectors before first FAT = 32 (0020h)
0010 Number of FATs = 2 (02h)
0011 Root Entries = 0 (0000h)
0013 Total Log Sectors (small) = 0 (0000h)
0015 Media Descriptor = 248 (F8h) HDD
0016 Sectors per FAT table = 0 (0000h)
0018 Sectors per Track = 32 (0020h)
001A Number of Heads per Cylinder = 4 (0004h)
001C Hidden Sectors preceding Partition = 2048 (00000800h)
0020 Total Log. Sectors (big) = 153600 (00025800h)
0024 Log. Sectors per FAT = 598 (00000256h)
0028 Mirroring Flags = 0 (0000h)
002A Version No. = 0 (0000h)
002C Cluster No. of Root Dir Start = 2 (00000002h)
0030 Log. Sector No. of FS Info Sector = 1 (0001h)
0032 First logical sector number of a copy of the three FAT32 boot sectors, typically 6 = 6 (0006h)
0040 Physical Drive Number = 128 (80h) First Fixed Disk
0042 Extended Boot Signature = 41 (29h)
0047 Volume Label = NO NAME
0052 FileSystem Type = FAT32

First FAT begins at LBA 2080
Second FAT begins at LBA 2678
Root Directory begins at LBA 3276
First file data (cluster 0) begins at LBA 3278


[Sector 3276] 1MB
0000 E5 6E 00 63 00 79 00 2E - 00 69 00 0F 00 1F 6D 00 ån.c.y.. .i....m.
0010 67 00 00 00 FF FF FF FF - FF FF 00 00 FF FF FF FF g...ÿÿÿÿ ÿÿ..ÿÿÿÿ
0020 E5 6B 00 65 00 72 00 6E - 00 65 00 0F 00 1F 6C 00 åk.e.r.n .e....l.
0030 5F 00 65 00 6D 00 65 00 - 72 00 00 00 67 00 65 00 _.e.m.e. r...g.e.
0040 E5 45 52 4E 45 4C 7E 31 - 49 4D 47 20 00 00 B2 96 åERNEL~1 IMG ..²–
0050 4D 40 21 00 00 00 B2 96 - 4D 40 03 00 E4 5F B0 00 M@!...²– M@..ä_°.
0060 E5 45 52 4E 45 4C 20 20 - 49 4D 47 20 18 65 C0 92 åERNEL IMG .eÀ’
0070 4E 40 4E 40 00 00 EE 95 - 4E 40 C9 62 74 6D FA 00 [email protected]@..î• [email protected]
0080 E5 45 52 4E 45 4C 20 20 - 49 4D 47 20 00 00 00 00 åERNEL IMG ....
0090 21 00 4E 40 00 00 F3 8E - 4E 40 C9 62 F4 EA 2B 02 !.N@..óŽ [email protected]+.
00A0 42 65 00 6C 00 66 00 00 - 00 FF FF 0F 00 40 FF FF Be.l.f.. .ÿÿ..@ÿÿ
00B0 FF FF FF FF FF FF FF FF - FF FF 00 00 FF FF FF FF ÿÿÿÿÿÿÿÿ ÿÿ..ÿÿÿÿ
00C0 01 61 00 72 00 6D 00 32 - 00 32 00 0F 00 40 34 00 .a.r.m.2 .2...@4.
00D0 5F 00 73 00 74 00 61 00 - 72 00 00 00 74 00 2E 00 _.s.t.a. r...t...
00E0 41 52 4D 32 32 34 7E 31 - 45 4C 46 20 00 64 41 60 ARM224~1 ELF .dA`
00F0 51 40 4D 40 00 00 41 60 - 51 40 37 CF 5C 89 1E 00 [email protected]@..A` [email protected]\‰..
0100 41 63 00 6D 00 64 00 6C - 00 69 00 0F 00 8F 6E 00 Ac.m.d.l .i...n.
0110 65 00 2E 00 74 00 78 00 - 74 00 00 00 00 00 FF FF e...t.x. t.....ÿÿ
0120 43 4D 44 4C 49 4E 45 20 - 54 58 54 20 00 00 B2 96 CMDLINE TXT ..²–
0130 4D 40 4E 40 00 00 93 96 - 4E 40 F7 42 7F 00 00 00 [email protected]@..“– [email protected]...
0140 42 65 00 6C 00 66 00 00 - 00 FF FF 0F 00 DA FF FF Be.l.f.. .ÿÿ..Úÿÿ
0150 FF FF FF FF FF FF FF FF - FF FF 00 00 FF FF FF FF ÿÿÿÿÿÿÿÿ ÿÿ..ÿÿÿÿ
0160 01 61 00 72 00 6D 00 31 - 00 39 00 0F 00 DA 32 00 .a.r.m.1 .9...Ú2.
0170 5F 00 73 00 74 00 61 00 - 72 00 00 00 74 00 2E 00 _.s.t.a. r...t...
0180 41 52 4D 31 39 32 7E 31 - 45 4C 46 20 00 64 41 60 ARM192~1 ELF .dA`
0190 51 40 4E 40 00 00 41 60 - 51 40 94 C7 5C 89 1E 00 [email protected]@..A` Q@"Ç\‰..
01A0 41 62 00 6F 00 6F 00 74 - 00 63 00 0F 00 05 6F 00 Ab.o.o.t .c....o.
01B0 64 00 65 00 2E 00 62 00 - 69 00 00 00 6E 00 00 00 d.e...b. i...n...
01C0 42 4F 4F 54 43 4F 44 45 - 42 49 4E 20 00 00 B2 96 BOOTCODE BIN ..²–
01D0 4D 40 4D 40 00 00 B2 96 - 4D 40 9B 4A 90 40 00 00 [email prote