Getting Started with the Raspberry Pi


243 posts   Page 1 of 10   1, 2, 3, 4, 5 ... 10
by abishur » Sat Apr 14, 2012 4:15 pm
A guide to getting started with the Raspberry Pi. Begun by Abishur, post edited and expanded by Mahjongg and Lorna.

Getting started and general questions

If you would like to buy a Pi and/or accessories, and are looking for advice on this, you might like to consult the pictorial buying guide

You can find the latest quick start guide on the Raspberry Pi website. This start guide uses the NOOBS installation system: the latest version of this comes with the Raspbian OS as standard, but other OSes can be installed when you connect the PI to the internet via the ethernet port.

You can the find official documentation for the Raspberry Pi on the Documentation page.

If you have trouble getting your PI to boot, or have difficulty getting any video output, you might find it helpful to read the boot problems sticky.

If you have you Pi set up and working, and want some ideas for what to do next, you could check out our Resources page.

Getting to grips with your Pi

Image

Arrange your board to look like the photo and let's get connecting!

If you have the model B+, orient it like this:
Image

If you are working with the original model B, orient it like this:

Image

If you are using a model A+, orient it like this:

Image

In the centre of the bottom edge of the board, you will find the HDMI port. Connect an HDMI cable from the board to your TV or HDMI Monitor for video and audio output, or to a DVI-D monitor for video only.

If you don't have a TV or monitor with an HDMI or DVI-D port, there are alternative ways to get audiovisual output. On the models A and B, you can use the yellow RCA jack located in the centre of the top edge for video output. For audio output, you can use the 3.5 mm stereo headphone jack to the right of the RCA jack. The models A+ and B+ have a single connector for both audio and video: it is marked "A/V", and is located at the bottom of the board, to the right the HDMI port. You will need an A/V adapter cable, as detailed in the pictorial buying guide.

Plug a USB keyboard and mouse into the USB slots located on the right edge. You can also plug a WiFi adapter into the USB slot for wireless internet access. If you are using the older A or B models, you will probably wish to use and externally-powered USB hub to expand the number of available USB ports.

Just below the USB ports on the right edge of the board is the ethernet connector: this enables you to connect your Pi into a wired network.

On the underside of the board on the left edge is a slot for your SD card. You can buy a pre-imaged card with NOOBS already installed from our Swag Store, or you can make one yourself. You can find more information on NOOBS, and on installing your operating system, later in this post.

Finally, at the very bottom of the left edge is the micro USB power connector. Plug in a regulated power supply that is rated at 5V ±5% and at least 700mA (or 0.7A). Anything bigger than 700 mA (like 1000mA) will also work. Avoid using the smaller chargers used for small GSM phones, as these are often unregulated and unreliable. The model B+ and the Pi 2 can use adapters up to 2.5A, but they are actually more frugal with power than the older models, and will probably work with a 700mA adapter, or maybe even less (depending of how much current the USB and HDMI ports use). Please note, though, that using several USB devices or working on intensive tasks will draw much more current. If the PWR LED goes off, you are providing insufficient power.

If you are having problems with power to your Pi, you should not only check the supply itself, but also the cable from the power supply unit to the Pi: frequently, cables can lower the current/voltage going from the power supply unit to the Pi to below the level required for stability.

What if you are not sure if you have a micro USB power cable? This picture clearly shows the difference:

Image

The mini USB (on the left) is the wrong one. It’s thicker and looks like a trapezoid with its sides pinched in. The micro USB (on the right) is the correct one. It is thinner and also looks like a trapezoid except its sides are rounded outward. It is very important to buy a good-quality cable if you want to ensure that your Pi receives a stable supply of power. Use a short, reasonably thick cable, and be prepared to spend at least a few pounds (or the equivalent) on it. If you would prefer to buy the official Raspberry Pi Universal Power Supply, you can do so via our Swag Store.

Installing NOOBS

Visit our Downloads page to get hold of an OS to use with the Raspberry Pi, together with instructions for how to put upload it to your SD card. Raspbian is the preferred option, but don't be afraid to download all the available options, and test them out for yourself!

Before installing NOOBS on your SD card, you must first erase the card completely, and remove all partitions, using the SD Card Association’s formatting tool: https://www.sdcard.org/downloads/formatter_4/index.html. DO NOT use its quick format option, especially if the card has been used before, or the install might fail. NOOBS will partition and format the card as neccessary, but it needs to begin with a completely empty card. Please also ensure that you enable the resize option.

You can find information on how to use the NOOBS installer here:
https://github.com/raspberrypi/noobs/bl ... x-software

When you have loaded NOOBS onto the card, it should contain these files:

NOOBS.png
NOOBS.png (43.16 KiB) Viewed 106288 times


If you just need to install a single OS, and want to save download time and space on the SD card, you could consider using NOOBS LITE instead of NOOBS. NOOBS LITE doesn't come with any OSes included, but the OS to install is downloaded during the installation process. Please note that you will need your Pi to be connected to the internet for this to work.

Both NOOBS and NOOBS LITE can be found here as free downloads:
http://www.raspberrypi.org/downloads

Using your Raspberry Pi

Once you have finished setting up your Raspberry Pi, it's time to try powering it on and using it. Connect the micro-USB cable to your Pi and a power source. When the Pi begins to receive power, the red LED marked PWR will light. The green LED marked OK (or ACK in later version) will blink in an irregular pattern to show whenever the Pi reads from the SD card.

Please note that the BIOS for the Pi is stored on the SD card, so, if booting is unsuccessful, the Pi will show nothing on screen. If you have trouble getting your Pi to boot, read the guide to boot problems, which contains all the troubleshooting information available at this time.

If all goes well and the OS boots successfully, the Pi will show a rainbow screen: this is actually four pixels expanded and blended to full screen size by the GPU. Shortly afterwards, the ARM processor starts, and the installed OS begins to load. Raspbian starts by showing a long scrolling text that tells you exactly what the Pi is doing to get ready to work. If you have a Pi 2 which gets stuck at this point, you are probably using obsolete firmware: see below for updating and upgrading the version of the OS you are using.

Once the Pi finishes loading the OS, you'll need to put in your user name and password: the default username is "pi", and the default password is "raspberry". Note that, when you enter the password, nothing will be displayed on the screen: this is a security measure. It is possible that this step may be skipped the very first time you boot.

After that (but only the first time you boot) you will be presented with the "raspi-config" configuration menu.

Image
You should use this to expand the space on your SD-card to the full size of the card (otherwise not all of the space on the card will be actually used), to enable overscan for your monitor, and to set the keyboard configuration. You can also use this menu for other basic configuration options such as changing your password.
The menu won't be shown on later boots, but can be recalled at any time by using the following code:
Code: Select all
sudo raspi-config
To get into the familiar graphical user interface (GUI), after you have logged in, type
Code: Select all
startx
At the end of your session, when you wish to stop and turn off the Pi, first exit the GUI. In the text screen enter following text:
Code: Select all
sudo halt
or
Code: Select all
sudo shutdown -h now
This will shut the Pi down safely, after which you can turn it off by turning off the power supply. Please do not turn the power supply off without first shutting the Pi down: to do so might damage the SD card's file system.

Congratulations! You now have finished your first session!

How to get composite video working with NOOBS

It is important to note that, when you are using NOOBS, and are using a A/V (or composite RCA) video for a regular TV (or mini display with a composite input), you will not immediately get any picture: you need to press 3 (for PAL), or 4 (for NTSC) repeatedly to switch over from HDMI to composite. You should wait a couple of seconds or so before starting to press 3 or 4, as NOOBS need to boot before it can start listening to the keyboard. If you want to know if NOOBS is receiving input from the keyboard, press Caps Lock: if you can toggle the CAPs LED on and off, NOOBS has booted and is reading the keyboard.

Keep pressing the 3 or 4 key until video appears: it doesn't matter if you use numpad or regular number keys for this, but note that on a French keyboard you do not need to press shift for numbers, as the system assumes an UK keyboard. After you choose either PAL or NTSC, the system asks if it can make that choice permanent. Do that, and continue with the install. Note that this choice will be carried over onto the installed OS, because it will be written into config.txt, overriding the HDMI auto detection of the OS.

If the picture is monochrome, you are using the wrong TV standard: try changing from PAL to NTSC, or vice versa. If you are using a B+ A/V cable of unknown origin or type, please note that not all similar looking cables work: with some (camcorder) cables it is possible that the video may come out of the red plug instead of the yellow (video) plug.

If you are using a HDMI connection, NOOBS should give you a picture automatically, but if it does not, or the picture seems wrong, you can try switching between "safe" and "optimal" HDMI video settings by pressing 1 or 2.

After installing (for example) Raspbian, the next reboot will start it rather than NOOBS: Raspbian has a slightly different way with coping with composite video. It will look to see if an HDMI device is connected; if it doesn't see one, it will automatically switch to (NTSC) composite (unless you have saved an overriding video setting into config.txt, as noted above).
If you are using an older PAL TV, you may only get a monochrome picture: you might want to change the entry in config.txt that says "sdtv_mode=0" to "sdtv_mode=2" for PAL. You can also do this from NOOBS: restart while holding down shift and the Pi will boot into NOOBS. Press 3 again for a composite picture and choose the option to edit config.txt, then edit, save, and reboot.

Updating and upgrading Raspbian

If you are using an older Rasbian distribution, especially on a pre-loaded card, you might want to upgrade and update Raspbian to the latest version. Ensure you are connected to the internet, reboot Rasbian, and enter the following code:
Code: Select all
sudo apt-get update
sudo apt-get upgrade
Wait a few minutes for the upgrade to finish, then restart your Pi.

Special instructions for upgrading and updating Raspbian for users of the Pi 2

Since the release of the second generation Pi 2, you need to ensure that you are using a distribution of NOOBS and Raspbian which was released after the launch of the Pi 2.

If you have a card with Raspbian that boots correctly on your old Pi, but doesn't boot on the Pi 2, or which gets stuck at the "rainbow screen", the following procedure should result in a card that also works on a Pi 2:
Code: Select all
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install raspberrypi-ui-mods


Other information

You may find it useful to consult the official Raspberry Pi User Guide, written by Eben Upton and Gareth Halfacree.

You can find the Raspberry Pi Education Manual (an educational guide with focus on learning to program, written by a team of UK teachers from Computing at School) in the Raspberry Pi Store, accessible from your Pi's desktop. Alternatively, you can download it from the link given in this post.
http://www.raspberrypi.org/archives/2965

Finally there is the free monthly magazine, The MagPi, which can be found here:
https://www.raspberrypi.org/magpi/

Last edit: 4 May 2015 by Lorna
User avatar
Forum Moderator
Forum Moderator
Posts: 4474
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by mahjongg » Sun Apr 15, 2012 1:19 am
P.S. I think the "programming the SD-Card" task might be underestimated, its not as simple as drag and drop contents to the card! What I have seen requires the use of the command line tool "DD", (or something similar) its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally). The PI doesn't have a BIOS ROM, so no video will be generated until the PI can boot from the SD-card.

There should be a simple GUI program created that does the task in a foolproof way, because "fools" (that is adults, I trust little kids to do this fine) will also try to do this.

Luckily some people are selling pre-programmed SD-cards.

with the invention of NOOBS this largely has become obsolete too, although you can still do it wrong!
User avatar
Forum Moderator
Forum Moderator
Posts: 7128
Joined: Sun Mar 11, 2012 12:19 am
by Tass » Sun Apr 15, 2012 9:47 am
mahjongg said:


P.S. I think the "programming the SD-Card" task might be underestimated, what I have seen requires the use of the command line tool "DD", its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally).


Take a look at this other beginners thread - I've posted a link to a DD tutorial of mine and the OP (itsonlyme) has provided a link to a great utility for managing SD card images:

http://www.raspberrypi.org/for.....e-software
User avatar
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am
by mahjongg » Sun Apr 15, 2012 1:58 pm
Tass said:


mahjongg said:


P.S. I think the "programming the SD-Card" task might be underestimated, what I have seen requires the use of the command line tool "DD", its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally).


Take a look at this other beginners thread - I've posted a link to a DD tutorial of mine and the OP (itsonlyme) has provided a link to a great utility for managing SD card images:

http://www.raspberrypi.org/for.....e-software


Reading that, and following the link to the tutorial, i'm even more convinced that its not a task for unexperienced users. I think a tool to create (and before that wipe the card) an image on an sd-card with a simple tool, requiring no more effort than selecting the image, and the card (with protection against selecting a hard-disk) is badly needed.
User avatar
Forum Moderator
Forum Moderator
Posts: 7128
Joined: Sun Mar 11, 2012 12:19 am
by abishur » Sun Apr 15, 2012 4:16 pm
I know that the win32disk whatever program linked on the downloads page is insanely easy to use.  I mean it's chose the img file you just downloaded, pick your SD drive and click write.  Of course, the limitation with that one is that it really only works once.  Once you write the img file windows can't read every partition on the card anymore, so before you can use it again you have to erase every partition via linux.  I had a devil of a time doing that last night as I don't have an external SD card reader and my linux VM wouldn't see the SD card reader on my laptop.  My final solution came via sticking the SD card in an unused blackberry phone and mounting *that* to my linux box.  Fun times.

Still I kinda glossed over it in this (very basic) guide because of how complicated it is.  There are much more complete guides that can be followed on the downloads page, and I saw no need to re-invent the wheel.  Plus I'm expecting a better guide to come out (maybe one from someone who actually has the pi?), but I wanted a basic guide up to help the people who have already started getting the pi (lucky jerks! :-P )
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4474
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by mahjongg » Sun Apr 15, 2012 4:43 pm
perhaps booting a Live CD with Gparted on it will help people to remove the partitions.

Isn't there a simple windows app to remove all partitions on a SD-Card ?
User avatar
Forum Moderator
Forum Moderator
Posts: 7128
Joined: Sun Mar 11, 2012 12:19 am
by Chris.Rowland » Sun Apr 15, 2012 9:00 pm
Does Win32DiskImager really only work once?

I"ve just tried it with a SD card that"s already been written and it appears to write correctly a second (and third) time.

But I don"t have hardware to test on and maybe it"s fooling me.

This is W7 64 and a 4G SD card plugged into the PC"s SD card slot.

I"ve also got a full SD formatter called "SD Formatter V3.0.0.0" It seems to be able to restore SD cards that have had some propriety format applied.  I don"t recall where it came from other than at the end of a Google search.
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by Vindicator » Mon Apr 16, 2012 2:55 am
Try Easeus free home edition that is what I used to delete the partitions on mine, no need to switch to Linux if you do not want too.

http://www.partition-tool.com/.....wnload.htm

I even used this to recover a HDD from an Xbox 360 that had died on me.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.
User avatar
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
by itsonlyme » Mon Apr 16, 2012 8:24 am
Agree with Vindicator, this is a very useful and versatile program for any Windows user to have around. (Easeus if you happen to see this, how about a raspberry pi version?!)
Posts: 120
Joined: Sun Feb 12, 2012 12:43 pm
by mahjongg » Mon Apr 16, 2012 10:24 am
We already have a similar partitioning program for the raspi, it's called Gparted.
User avatar
Forum Moderator
Forum Moderator
Posts: 7128
Joined: Sun Mar 11, 2012 12:19 am
by Thorran » Tue Apr 17, 2012 3:02 pm
I've succesfully created my 2GB image (latest Debian Win7)  but have an 8GB SD card – how can I resize the partition to make available all my space, or would it be better to create another blank partition ?  I only have Windows and the one RaspberryPI – no other Linux machine to do this on,  which is how the Wiki details it.

Chris
Posts: 1
Joined: Tue Apr 17, 2012 1:52 pm
by frying_fish » Tue Apr 17, 2012 3:09 pm
Thorran said:


I've succesfully created my 2GB image (latest Debian Win7)  but have an 8GB SD card – how can I resize the partition to make available all my space, or would it be better to create another blank partition ?  I only have Windows and the one RaspberryPI – no other Linux machine to do this on,  which is how the Wiki details it.

Chris


The simple option (and I'm sure its detailed on the wiki as well) would be to boot a gparted live disk (on a usb key, or cd) and then use that to resize the partition of the sd card. So boot your windows computer with that disk instead it will go to a live linux, make sure the sd card is in the reader, pull it up in the options and away you go.
User avatar
Posts: 80
Joined: Mon Jan 23, 2012 3:26 pm
by n31l » Sun Apr 22, 2012 12:14 pm
I think the last poster has lost the plot, since when will motoGp help us fire up our pi's for the first time.

As i'm not currently a Linux user, window C++, C# & microchip pic's I need a single port of call that will have an img and programs that when run on a PC will fire up the PI to a known stable point. From here I can go on to learn my around Linux and the PI.

Every new user can't wait to see it running and a fool proof way of doing this would give a bost to every new user.

PS could the maths test be made a bit harder i'm starting to get it right first time now!!
Posts: 21
Joined: Fri Apr 06, 2012 8:27 pm
by Rory » Sun Apr 22, 2012 1:20 pm
I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)
Posts: 1
Joined: Sun Apr 22, 2012 12:10 pm
by JeremyF » Sun Apr 22, 2012 9:22 pm
SH4RK3Y said:


I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)



Pre-installed programs are few at the moment as far as I know, just a web browser, Python, and MIT Scratch.

When you get your Pi, to make a new user (as far as I know)

sudo useradd NAME

sudo mkdir /home/NAME

chown NAME:users /home/NAME



{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
by jonboy » Tue May 08, 2012 8:52 pm
I simply reformatted the SD card in a digital camera and started again when I wanted to change from Arch to Dabien.
Posts: 4
Joined: Sat Dec 24, 2011 9:47 am
by SN » Tue May 08, 2012 9:27 pm
JeremyF said:


SH4RK3Y said:


I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)


Pre-installed programs are few at the moment as far as I know, just a web browser, Python, and MIT Scratch.

When you get your Pi, to make a new user (as far as I know)

sudo useradd NAME

sudo mkdir /home/NAME

chown NAME:users /home/NAME




Don't forget to add your NAME to the sudoers list too (if you want to sudo with it) - there is a post elsewhere on the forums for this, can't see it at the moment
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?
User avatar
Posts: 1009
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
by pyramid21 » Mon May 28, 2012 1:03 pm
So I flashed a 16gb scandisk x10 card with the debian image(ran the check image program)
Plugged in all the items then the power supply.
Monitor worked but debian seems to get stuck on
'input Genius optical mouse......'
'mmc0: Time out waiting for hardware interrupt.'

I have unplugged the mouse restarted(disconnected power)
It then get stuck on
'input USB keyboard......'
'mmc0: Timeout .....'
I have tried disconnecting everything and still get the same problem
Please help as I would love to move to the next stage
Posts: 3
Joined: Mon May 28, 2012 12:41 pm
by dukla2000 » Mon May 28, 2012 5:23 pm
pyramid21 wrote:Please help as I would love to move to the next stage
Sounds like an SD card problem to me - have you got another one you can try? Most importantly check through the troubleshooting page on the wiki but would also check your specific card on the list of known working/not working hardware which is here.
Posts: 109
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU
by pyramid21 » Mon May 28, 2012 5:34 pm
Have tried 2 SD cards now both x 10 will try tomorrow with a x4. WIll also check wiki

Have re flashed the sd card with debian6 19-04-12. Connected every thing and re powered.
All five leds are on.
1.OK=green
2.PWR=red
3.FDX=green
4.lnk=green flickering
5. 10M=yellow
Boot stuck on 'Kernel panic-not syncing:No init found. Try .....'
Have tried 2 SD cards now both x 10 will try tomorrow with a x4.
Could I have a faulty PI? I noticed a loose piece of metal(shaped like an L) where the SD slot connects to the board.
Posts: 3
Joined: Mon May 28, 2012 12:41 pm
by bigsi111 » Tue May 29, 2012 10:18 am
Have you tried booting without the Keyboard and Mouse.

The reason to do this is that you could have a power supply problem which will be apparent if you get to the password/login screen without the peripherasl plugged in.
User avatar
Posts: 66
Joined: Thu Apr 19, 2012 8:50 am
by pyramid21 » Tue May 29, 2012 10:48 am
Yes with no luck
Posts: 3
Joined: Mon May 28, 2012 12:41 pm
by bigsi111 » Tue May 29, 2012 1:48 pm
It's sounding more like a hardware problem. I'd contact the supplier if the $GB SD card does not work.
User avatar
Posts: 66
Joined: Thu Apr 19, 2012 8:50 am
by abishur » Tue May 29, 2012 7:08 pm
pyramid21 wrote:Have tried 2 SD cards now both x 10 will try tomorrow with a x4. WIll also check wiki

Have re flashed the sd card with debian6 19-04-12. Connected every thing and re powered.
All five leds are on.
1.OK=green
2.PWR=red
3.FDX=green
4.lnk=green flickering
5. 10M=yellow
Boot stuck on 'Kernel panic-not syncing:No init found. Try .....'
Have tried 2 SD cards now both x 10 will try tomorrow with a x4.
Could I have a faulty PI? I noticed a loose piece of metal(shaped like an L) where the SD slot connects to the board.


There are a couple threads discussing this error (try searching the forum for your No init ;-)) but it boils down to the SD card or the keyboard :-)
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4474
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
by Sharky » Tue May 29, 2012 8:46 pm
Thanks, Abishur - that was really helpful.
'startx' to get LXDE started is a command easily missed for Newbies.

Cool - thanks.
User avatar
Posts: 1
Joined: Mon Apr 23, 2012 10:50 am