https://elinux.org/api.php?action=feedcontributions&user=Crazyskeggy&feedformat=atomeLinux.org - User contributions [en]2024-03-19T04:54:56ZUser contributionsMediaWiki 1.31.0https://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=299438RPi Easy SD Card Setup2013-11-10T17:00:15Z<p>Crazyskeggy: /* Create your own */ Update NOOBS instructions, ensure that instructions for flashing the card are obviously different to using NOOBS.</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official NOOBS installer: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This makes the process of installing an operating system as easy as copying a few files in a zip archive to your SD card. This contains the reccomended Raspbian distribution, as well as various other distributions, all of which are available as individual images from the downloads page, if you prefer not to use NOOBS.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right, and NOOBS makes it impossible to go wrong). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above), or use NOOBS, which has all the . Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using NOOBS ==<br />
Recently, the Raspberry Pi Foundation have released a really easy way to set up your SD Card. It's called the New Out Of Box Software (or NOOBS for short) and provides a really easy way to install Raspberry Pi distributions. Be warned, however, that it is a 1GB download - if you have a limit on what you are allowed to download, follow the instructions below, as the other images are around 500MB.<br />
<br />
# Download NOOBS from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page]<br />
# Insert a (4GB+) SD Card into your computer<br />
#* If you want to save space on the SD Card, you can delete some of the images inside the os folder in the NOOBS zip file that you don't want to use.<br />
# Format the disk<br />
#* '''Windows'''<br />
## Download and install the SD Association's Formatting tool from https://www.sdcard.org/downloads/formatter_4/eula_windows/<br />
## Open the Application you have just installed<br />
## Set "FORMAT SIZE ADJUSTMENT" to ON in the Options menu.<br />
## Make sure you have selected the Drive your SD Card is inserted in<br />
## Click "Format"<br />
#* '''Mac'''<br />
## Download and install the SD Association's Formatting tools from https://www.sdcard.org/downloads/formatter_4/eula_mac/<br />
## Select "Overwrite format"<br />
## Make sure you have selected your SD Card, and not something else<br />
## Click "Format"<br />
#* '''Linux'''<br />
## Use gparted (or the command-line version parted if you prefer), if you don't have it, install it as you usually would.<br />
## Format the entire disk as FAT32 (FAT16 will not work! Make sure you select the correct disk!)<br />
# Extract the file you downloaded in Step 1<br />
# Copy the files you just extracted to your SD Card<br />
<br />
Not all monitors work with NOOBS straight away. If your monitor is one of those that doesn't work, press the Number buttons 1-4 until you see what you want.<br />
# Default HDMI Mode<br />
# HDMI Safe Mode - Use this if Default (1) doesn't work and you cannot see anything<br />
# Composite PAL Mode - Use this or 4. if you are using the yellow and black outputs on the opposite side to the HDMI output<br />
# Composite NTSC Mode<br />
<br />
== Flashing the SD Card using Windows ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use an SD Card slot in your computer (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
Where C:/flashnul/flashnul.exe is the location of the flashnul program; E: is the drive you want to overwrite, and C:/temp/distribution-name.img is the location of the .img file.<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Flashing the SD card using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Flashing the SD Card using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To see the progress of the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root). The progress will be displayed (perhaps not immediately, due to buffering) in the original window, not the window with the '''pkill''' command.<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, [http://en.wiktionary.org/wiki/your_mileage_may_vary ymmv]:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table:<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=299432RPi Easy SD Card Setup2013-11-10T16:51:50Z<p>Crazyskeggy: /* SD card setup */ Change note to reflect official recommendation of using NOOBS, rather than flashing the SD card.</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official NOOBS installer: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This makes the process of installing an operating system as easy as copying a few files in a zip archive to your SD card. This contains the reccomended Raspbian distribution, as well as various other distributions, all of which are available as individual images from the downloads page, if you prefer not to use NOOBS.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using NOOBS ==<br />
Recently, the Raspberry Pi Foundation have released a really easy way to set up your SD Card. It's called the New Out Of Box Software (or NOOBS for short) and provides a really easy way to install Raspberry Pi distributions. Be warned, however, that it is a 1GB download - if you have a limit on what you are allowed to download, follow the instructions below, as the other images are around 500MB.<br />
<br />
# Download NOOBS from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page]<br />
# Insert a (4GB+) SD Card into your computer<br />
#* If you want to save space on the SD Card, you can delete some of the images inside the images folder in the NOOBS zip file that you don't want to use.<br />
# Format the disk<br />
#* '''Windows'''<br />
## Download and install the SD Association's Formatting tool from https://www.sdcard.org/downloads/formatter_4/eula_windows/<br />
## Open the Application you have just installed<br />
## Set "FORMAT SIZE ADJUSTMENT" to ON in the Options menu.<br />
## Make sure you have selected the Drive your SD Card is inserted in<br />
## Click "Format"<br />
#* '''Mac'''<br />
## Download and install the SD Association's Formatting tools from https://www.sdcard.org/downloads/formatter_4/eula_mac/<br />
## Select "Overwrite format"<br />
## Make sure you have selected your SD Card, and not something else<br />
## Click "Format"<br />
#* '''Linux'''<br />
## Use gparted (or the command-line version parted if you prefer), if you don't have it, install it as you usually would.<br />
## Format the entire disk as FAT32 (FAT16 will not work! Make sure you select the correct disk!)<br />
# Extract the file you downloaded in Step 1<br />
# Copy the files you just extracted to your SD Card<br />
<br />
Not all monitors work with NOOBS straight away. If your monitor is one of those that doesn't work, press the Number buttons 1-4 until you see what you want.<br />
# Default HDMI Mode<br />
# HDMI Safe Mode - Use this if Default (1) doesn't work and you cannot see anything<br />
# Composite PAL Mode - Use this or 4. if you are using the yellow and black outputs on the opposite side to the HDMI output<br />
# Composite NTSC Mode<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use an SD Card slot in your computer (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
Where C:/flashnul/flashnul.exe is the location of the flashnul program; E: is the drive you want to overwrite, and C:/temp/distribution-name.img is the location of the .img file.<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To see the progress of the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root). The progress will be displayed (perhaps not immediately, due to buffering) in the original window, not the window with the '''pkill''' command.<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, [http://en.wiktionary.org/wiki/your_mileage_may_vary ymmv]:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table:<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299426RPi Beginners2013-11-10T16:18:13Z<p>Crazyskeggy: /* Living Without RPi */ Correct Grammar and Capitalisation</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the setup screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [[CLI_Spells|Command Line Interface "Must Have" Commands]]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your RPi with only the network attached. Provided you know which IP address it has. With appropriate software installed on your Windows, Mac or Linux PC, you can also run a GUI remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about Linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and on many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299420RPi Beginners2013-11-10T16:13:42Z<p>Crazyskeggy: /* Remote Access */ Correct Capitalization and Spelling</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the setup screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [[CLI_Spells|Command Line Interface "Must Have" Commands]]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your RPi with only the network attached. Provided you know which IP address it has. With appropriate software installed on your Windows, Mac or Linux PC, you can also run a GUI remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299414RPi Beginners2013-11-10T16:12:26Z<p>Crazyskeggy: /* Basic Raspbian Setup */ Correct "menu screen" to "setup screen"</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the setup screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [[CLI_Spells|Command Line Interface "Must Have" Commands]]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299408RPi Beginners2013-11-10T16:11:37Z<p>Crazyskeggy: /* Intro to the CLI (Command Line Interface) */ correct bad formatting of link</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the menu screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [[CLI_Spells|Command Line Interface "Must Have" Commands]]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299402RPi Beginners2013-11-10T16:10:48Z<p>Crazyskeggy: /* Intro to the CLI (Command Line Interface) */ Change external link to an internal one</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the menu screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [[CLI_Spells Command Line Interface "Must Have" Commands]]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=299396RPi Beginners2013-11-10T16:09:46Z<p>Crazyskeggy: /* Basic Debian RPi Setup */ Change Debian (armel) setup instructions to Raspbian (armhf) instructions, which are all inside raspi-config</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Raspbian Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings. Luckily, there's a tool called [[RPi_raspi-config|raspi-config]] which makes everything super-easy to set up. This automatically launches when you first boot Raspbian up, and (for the most part) it is in plain English.<br />
<br />
If you want to access the menu screen again, just type:<br />
<br />
sudo raspi-config<br />
<br />
in the terminal (LXTerminal in the desktop UI).<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [http://elinux.org/CLI_Spells Command Line Interface "Must Have" Commands]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_VNC_Server&diff=286982RPi VNC Server2013-09-18T18:36:09Z<p>Crazyskeggy: /* Instructions */ Change "run at boot" to heading 3</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
Back to [[RPi Guides]].<br />
==What does it do?==<br />
<br />
Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it but from another computer by remote control. You can do this and the remote computer can even be anywhere in the world over the internet. This tutorial shows how you can view and control the raspberry pi desktop from your computer's desktop by using special software.<br />
<br />
==What do you need?==<br />
<br />
*A Raspberry Pi<br />
*A boot SD card for the Raspberry Pi<br />
*A network connection (Ethernet or WiFi)<br />
*Special software on both the Raspberry Pi and the remote, controlling computer<br />
<br />
==What skill level is required?==<br />
<br />
This project does not require any coding or compilation. Very basic Linux and networking knowledge would be useful, but not essential.<br />
<br />
You need to...<br />
*Install software<br />
*Enter basic Linux commands<br />
*Use standard software tools (Windows/Linux/Mac) to add software to your PC<br />
*Connect computers using ethernet cables (or to the same Wi-Fi network)<br />
<br />
==How does it work?==<br />
<br />
The commands described below start a "virtual" graphical session. Instead of using a hardware framebuffer, this uses RAM for a framebuffer. It also opens a network channel or port that allows programs on other computers (if they provide the password) to show the framebuffer and provide mouse and keyboard events. <br />
<br />
This way you can run a desktop session on the Raspberry Pi, but display and control it elsewhere. <br />
<br />
Because the framebuffer isn't the real framebuffer you cannot take advantage of the GPU to accelerate operations on the screen.<br />
<br />
==Overview of this project==<br />
You need to<br />
*Install VNC (Virtual Network Computing) server software on the Raspberry Pi<br />
*Start the VNC server software<br />
*Install a VNC client on another computer<br />
*Connect over a network from your computer to the Raspberry Pi<br />
<br />
==Instructions==<br />
Log in to your Pi and install the Tight VNC Package<br />
$ sudo apt-get install tightvncserver<br />
Next Run TightVNC Server which will prompt you to enter a Password and an optional View Only Password<br />
$ tightvncserver<br />
Once that is done you can start a VNC server from the shell prompt. This example starts a session on VNC display zero (:0) with full HD resolution:<br />
$ vncserver :0 -geometry 1920x1080 -depth 24<br />
(If fonts appear the wrong size, add '-dpi 96' to the end.)<br />
Or you could create a script to save typing in the whole thing.<br />
$ nano svnc.sh (call the file whatever you like)<br />
Add the lines:<br />
#!/bin/sh<br />
vncserver :0 -geometry 1920x1080 -depth 24 -dpi 96<br />
Ctrl-x y <return> (To Exit Nano and Save)<br />
<br />
Set the file to Execute<br />
$ chmod +x svnc.sh<br />
then to run<br />
$ ./svnc.sh<br />
<br />
=== Run at boot ===<br />
<br />
Start a root session<br />
sudo bash<br />
<br />
Create a file in /etc/init.d with a suitable name such as vncboot with the following content.<br />
### BEGIN INIT INFO<br />
# Provides: vncboot<br />
# Required-Start: $remote_fs $syslog<br />
# Required-Stop: $remote_fs $syslog<br />
# Default-Start: 2 3 4 5<br />
# Default-Stop: 0 1 6<br />
# Short-Description: Start VNC Server at boot time<br />
# Description: Start VNC Server at boot time.<br />
### END INIT INFO<br />
<br />
#! /bin/sh<br />
# /etc/init.d/vncboot<br />
<br />
USER=root<br />
HOME=/root<br />
<br />
export USER HOME<br />
<br />
case "$1" in<br />
start)<br />
echo "Starting VNC Server"<br />
#Insert your favoured settings for a VNC session<br />
/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565<br />
;;<br />
<br />
stop)<br />
echo "Stopping VNC Server"<br />
/usr/bin/vncserver -kill :0<br />
;;<br />
<br />
*)<br />
echo "Usage: /etc/init.d/vncboot {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
<br />
exit 0<br />
<br />
Modify the file permissions so it can be executed<br />
chmod 755 /etc/init.d/vncboot<br />
<br />
Enable dependency based boot sequencing<br />
update-rc.d /etc/init.d/vncboot defaults<br />
<br />
If enabling dependency based boot sequencing was successful, it says<br />
update-rc.d: using dependency based boot sequencing<br />
<br />
But if it says<br />
update-rc.d: error: unable to read /etc/init.d//etc/init.d/vncboot<br />
then try the following command<br />
update-rc.d vncboot defaults<br />
<br />
Reboot your Raspberry PI and you should find a vncserver already started.<br />
<br />
<br />
Install Tight VNC on your desktop from the link below or most VNC clients work I believe.<br />
http://www.tightvnc.com/download.php<br />
<br />
Or install it using your package manager. The following works on my ubuntu 11.10 workstation<br />
sudo apt-get install xtightvncviewer<br />
<br />
Then use <Your Pi IP> (e.g. 192.168.1.2) as the hostname when connecting. <ref>You can put your raspberry pi in /etc/hosts on Linux systems. (On Windows systems, the equivalent file is normally located at c:\windows\system32\drivers\etc\hosts). Then you can refer to your raspberry pi as "rpi" or whatever you called it.</ref><br />
<br />
'''Note:''' some guides tell you to add :1 on the end of the hostname. This is the VNC display number. It is used to calculate which port of the VNC server to connect to. Display zero ( :0 ) is port 5900, display one is port 5901, and so on. If you do not specify a display number on the end of the hostname, the VNC client will attempt to connect to display zero which, if you used the above instructions, will be what the VNC server is listening on. (It is also possible to specify the port directly using the notation hostname::port, e.g. 192.168.1.2::5900.<br />
<br />
Works Great, select full screen from the tool bar and a full 1080p 24bit desktop is yours from anywhere.<br />
<br />
<references /><br />
<br />
==Getting VNC Server to Work on a Specific User==<br />
Instead of using the script in the Raspberry Pi wiki, use this one provided by "PenguinTutor":<br />
#!/bin/sh<br />
# /etc/init.d/tightvncserver<br />
# Customised by Stewart Watkiss<br />
#http://www.penguintutor.com/linux/tightvnc<br />
# Set the VNCUSER variable to the name of the user to start tightvncserver under<br />
VNCUSER='pi'<br />
eval cd ~$VNCUSER<br />
case "$1" in<br />
start)<br />
su $VNCUSER -c '/usr/bin/tightvncserver :1'<br />
echo "Starting TightVNC server for $VNCUSER "<br />
;;<br />
stop)<br />
pkill Xtightvnc<br />
echo "Tightvncserver stopped"<br />
;;<br />
*)<br />
echo "Usage: /etc/init.d/tightvncserver {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
exit 0<br />
<br />
Now, change the VNCUSER=pi to your desired username, so for example: VNCUSER=jsmith<br />
<br />
That'll make it boot on the username of which you want it to boot on... but I then received the grey screen error when remotely accessing the Pi from my computer, now the way you fix this is, open up the xstartup file that was created when VNCSERVER executes on your desired username. Now the way you access it and edit it is by:<br />
sudo nano .vnc/xstartup <br />
.vnc is usually in the home directory.<br />
<br />
Delete everything that is in xstartup (or not in as mine was), and add this:<br />
!/bin/sh<br />
xrdb $HOME/.Xresources<br />
xsetroot -solid black<br />
/usr/bin/lxsession -s LXDE &<br />
<br />
Now it should work.<br />
<br />
==Does Your Openbox Configuration Settings Not Start on VNC?==<br />
You'll often find yourself in a position where VNC will start, but you'll get things such as multiple virtual desktops appearing, and you try to save it in the "Openbox Configuration Manager," and they go away for a second, but then you find you'll restart the Pi and then they appear again. Here's how to fix it:<br />
<br />
Create, or edit the current autostart.sh file which is located in:<br />
.config/openbox/autostart.sh<br />
<br />
Edit using "Nano" or any other text editor, I use Nano as it is the most comfortable for me, so do:<br />
sudo nano .config/openbox/autostart.sh/<br />
<br />
Add the line:<br />
exec openbox-session<br />
<br />
Now add the line<br />
exec openbox-session again in .vnc/xstartup and now it should work.<br />
<br />
But you can't really save the setting in Openbox Configuration Manager on VNC, but you have to do it manually; so you open this file:<br />
nano .config/openbox/lxde-rc.xml<br />
<br />
Scroll down to:<br />
<desktops><br />
<br />
You should see a bunch of stuff there, but only focus on this: <br />
<number>6</number> or something similar.<br />
<br />
Change the number of desktops you want within the <number></number> bit.<br />
<br />
I changed mine to 1, because that's all I want.<br />
<br />
It should now work!<br />
<br />
==Limitations and Alternatives==<br />
<br />
In this example TightVNC has been used. This is a popular and relatively friendly program that uses the VNC protocols and is included in most GNU/Linux distributions. However it does have it's limitations. The biggest of these is that it creates new desktops for each connection. It may be that what you want to do though is view and control the same desktop that shows on the monitor/TV plugged into the Raspberry Pi. To do this a better tool to use is x11vnc. This is more powerful but less easy to use. However if you already have a desktop running it will latch on to it and share it as a default. This too is fairly popular and included in many GNU/Linux distribution repositories such as Raspbian.<br />
<br />
==Security Considerations==<br />
Be aware that basic VNC is not secure. It is not encrypted unless you are advanced in setting it up. If you use it over the internet it can result in criminals "bouncing" you off your connection and taking over. There are even computer robot tools that try to do this. You must set a password but even then it is sometimes possible to take over someone's connection after they have entered it.<br />
A good tip is to set the server to shift from the default port 5900 to something else chosen randomly as long as it is spare.</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_VNC_Server&diff=286190RPi VNC Server2013-09-14T19:53:25Z<p>Crazyskeggy: /* How does it work? */ capitalise Raspberry Pi</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
Back to [[RPi Guides]].<br />
==What does it do?==<br />
<br />
Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it but from another computer by remote control. You can do this and the remote computer can even be anywhere in the world over the internet. This tutorial shows how you can view and control the raspberry pi desktop from your computer's desktop by using special software.<br />
<br />
==What do you need?==<br />
<br />
*A Raspberry Pi<br />
*A boot SD card for the Raspberry Pi<br />
*A network connection (Ethernet or WiFi)<br />
*Special software on both the Raspberry Pi and the remote, controlling computer<br />
<br />
==What skill level is required?==<br />
<br />
This project does not require any coding or compilation. Very basic Linux and networking knowledge would be useful, but not essential.<br />
<br />
You need to...<br />
*Install software<br />
*Enter basic Linux commands<br />
*Use standard software tools (Windows/Linux/Mac) to add software to your PC<br />
*Connect computers using ethernet cables (or to the same Wi-Fi network)<br />
<br />
==How does it work?==<br />
<br />
The commands described below start a "virtual" graphical session. Instead of using a hardware framebuffer, this uses RAM for a framebuffer. It also opens a network channel or port that allows programs on other computers (if they provide the password) to show the framebuffer and provide mouse and keyboard events. <br />
<br />
This way you can run a desktop session on the Raspberry Pi, but display and control it elsewhere. <br />
<br />
Because the framebuffer isn't the real framebuffer you cannot take advantage of the GPU to accelerate operations on the screen.<br />
<br />
==Overview of this project==<br />
You need to<br />
*Install VNC (Virtual Network Computing) server software on the Raspberry Pi<br />
*Start the VNC server software<br />
*Install a VNC client on another computer<br />
*Connect over a network from your computer to the Raspberry Pi<br />
<br />
==Instructions==<br />
Log in to your Pi and install the Tight VNC Package<br />
$ sudo apt-get install tightvncserver<br />
Next Run TightVNC Server which will prompt you to enter a Password and an optional View Only Password<br />
$ tightvncserver<br />
Once that is done you can start a VNC server from the shell prompt. This example starts a session on VNC display zero (:0) with full HD resolution:<br />
$ vncserver :0 -geometry 1920x1080 -depth 24<br />
(If fonts appear the wrong size, add '-dpi 96' to the end.)<br />
Or you could create a script to save typing in the whole thing.<br />
$ nano svnc.sh (call the file whatever you like)<br />
Add the lines:<br />
#!/bin/sh<br />
vncserver :0 -geometry 1920x1080 -depth 24 -dpi 96<br />
Ctrl-x y <return> (To Exit Nano and Save)<br />
<br />
Set the file to Execute<br />
$ chmod +x svnc.sh<br />
then to run<br />
$ ./svnc.sh<br />
<br />
Run at boot.<br />
<br />
Start a root session<br />
sudo bash<br />
<br />
Create a file in /etc/init.d with a suitable name such as vncboot with the following content.<br />
### BEGIN INIT INFO<br />
# Provides: vncboot<br />
# Required-Start: $remote_fs $syslog<br />
# Required-Stop: $remote_fs $syslog<br />
# Default-Start: 2 3 4 5<br />
# Default-Stop: 0 1 6<br />
# Short-Description: Start VNC Server at boot time<br />
# Description: Start VNC Server at boot time.<br />
### END INIT INFO<br />
<br />
#! /bin/sh<br />
# /etc/init.d/vncboot<br />
<br />
USER=root<br />
HOME=/root<br />
<br />
export USER HOME<br />
<br />
case "$1" in<br />
start)<br />
echo "Starting VNC Server"<br />
#Insert your favoured settings for a VNC session<br />
/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565<br />
;;<br />
<br />
stop)<br />
echo "Stopping VNC Server"<br />
/usr/bin/vncserver -kill :0<br />
;;<br />
<br />
*)<br />
echo "Usage: /etc/init.d/vncboot {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
<br />
exit 0<br />
<br />
Modify the file permissions so it can be executed<br />
chmod 755 /etc/init.d/vncboot<br />
<br />
Enable dependency based boot sequencing<br />
update-rc.d /etc/init.d/vncboot defaults<br />
<br />
If enabling dependency based boot sequencing was successful, it says<br />
update-rc.d: using dependency based boot sequencing<br />
<br />
But if it says<br />
update-rc.d: error: unable to read /etc/init.d//etc/init.d/vncboot<br />
then try the following command<br />
update-rc.d vncboot defaults<br />
<br />
Reboot your Raspberry PI and you should find a vncserver already started.<br />
<br />
<br />
Install Tight VNC on your desktop from the link below or most VNC clients work I believe.<br />
http://www.tightvnc.com/download.php<br />
<br />
Or install it using your package manager. The following works on my ubuntu 11.10 workstation<br />
sudo apt-get install xtightvncviewer<br />
<br />
Then use <Your Pi IP> (e.g. 192.168.1.2) as the hostname when connecting. <ref>You can put your raspberry pi in /etc/hosts on Linux systems. (On Windows systems, the equivalent file is normally located at c:\windows\system32\drivers\etc\hosts). Then you can refer to your raspberry pi as "rpi" or whatever you called it.</ref><br />
<br />
'''Note:''' some guides tell you to add :1 on the end of the hostname. This is the VNC display number. It is used to calculate which port of the VNC server to connect to. Display zero ( :0 ) is port 5900, display one is port 5901, and so on. If you do not specify a display number on the end of the hostname, the VNC client will attempt to connect to display zero which, if you used the above instructions, will be what the VNC server is listening on. (It is also possible to specify the port directly using the notation hostname::port, e.g. 192.168.1.2::5900.<br />
<br />
Works Great, select full screen from the tool bar and a full 1080p 24bit desktop is yours from anywhere.<br />
<br />
<references /><br />
<br />
==Getting VNC Server to Work on a Specific User==<br />
Instead of using the script in the Raspberry Pi wiki, use this one provided by "PenguinTutor":<br />
#!/bin/sh<br />
# /etc/init.d/tightvncserver<br />
# Customised by Stewart Watkiss<br />
#http://www.penguintutor.com/linux/tightvnc<br />
# Set the VNCUSER variable to the name of the user to start tightvncserver under<br />
VNCUSER='pi'<br />
eval cd ~$VNCUSER<br />
case "$1" in<br />
start)<br />
su $VNCUSER -c '/usr/bin/tightvncserver :1'<br />
echo "Starting TightVNC server for $VNCUSER "<br />
;;<br />
stop)<br />
pkill Xtightvnc<br />
echo "Tightvncserver stopped"<br />
;;<br />
*)<br />
echo "Usage: /etc/init.d/tightvncserver {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
exit 0<br />
<br />
Now, change the VNCUSER=pi to your desired username, so for example: VNCUSER=jsmith<br />
<br />
That'll make it boot on the username of which you want it to boot on... but I then received the grey screen error when remotely accessing the Pi from my computer, now the way you fix this is, open up the xstartup file that was created when VNCSERVER executes on your desired username. Now the way you access it and edit it is by:<br />
sudo nano .vnc/xstartup <br />
.vnc is usually in the home directory.<br />
<br />
Delete everything that is in xstartup (or not in as mine was), and add this:<br />
!/bin/sh<br />
xrdb $HOME/.Xresources<br />
xsetroot -solid black<br />
/usr/bin/lxsession -s LXDE &<br />
<br />
Now it should work.<br />
<br />
==Does Your Openbox Configuration Settings Not Start on VNC?==<br />
You'll often find yourself in a position where VNC will start, but you'll get things such as multiple virtual desktops appearing, and you try to save it in the "Openbox Configuration Manager," and they go away for a second, but then you find you'll restart the Pi and then they appear again. Here's how to fix it:<br />
<br />
Create, or edit the current autostart.sh file which is located in:<br />
.config/openbox/autostart.sh<br />
<br />
Edit using "Nano" or any other text editor, I use Nano as it is the most comfortable for me, so do:<br />
sudo nano .config/openbox/autostart.sh/<br />
<br />
Add the line:<br />
exec openbox-session<br />
<br />
Now add the line<br />
exec openbox-session again in .vnc/xstartup and now it should work.<br />
<br />
But you can't really save the setting in Openbox Configuration Manager on VNC, but you have to do it manually; so you open this file:<br />
nano .config/openbox/lxde-rc.xml<br />
<br />
Scroll down to:<br />
<desktops><br />
<br />
You should see a bunch of stuff there, but only focus on this: <br />
<number>6</number> or something similar.<br />
<br />
Change the number of desktops you want within the <number></number> bit.<br />
<br />
I changed mine to 1, because that's all I want.<br />
<br />
It should now work!<br />
<br />
==Limitations and Alternatives==<br />
<br />
In this example TightVNC has been used. This is a popular and relatively friendly program that uses the VNC protocols and is included in most GNU/Linux distributions. However it does have it's limitations. The biggest of these is that it creates new desktops for each connection. It may be that what you want to do though is view and control the same desktop that shows on the monitor/TV plugged into the Raspberry Pi. To do this a better tool to use is x11vnc. This is more powerful but less easy to use. However if you already have a desktop running it will latch on to it and share it as a default. This too is fairly popular and included in many GNU/Linux distribution repositories such as Raspbian.<br />
<br />
==Security Considerations==<br />
Be aware that basic VNC is not secure. It is not encrypted unless you are advanced in setting it up. If you use it over the internet it can result in criminals "bouncing" you off your connection and taking over. There are even computer robot tools that try to do this. You must set a password but even then it is sometimes possible to take over someone's connection after they have entered it.<br />
A good tip is to set the server to shift from the default port 5900 to something else chosen randomly as long as it is spare.</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_VNC_Server&diff=286184RPi VNC Server2013-09-14T19:52:10Z<p>Crazyskeggy: /* What skill level is required? */ add that it doesn't have to be ethernet - you can also use Wi-Fi</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
Back to [[RPi Guides]].<br />
==What does it do?==<br />
<br />
Sometimes it is not convenient to work directly on the Raspberry Pi. Maybe you would like to work on it but from another computer by remote control. You can do this and the remote computer can even be anywhere in the world over the internet. This tutorial shows how you can view and control the raspberry pi desktop from your computer's desktop by using special software.<br />
<br />
==What do you need?==<br />
<br />
*A Raspberry Pi<br />
*A boot SD card for the Raspberry Pi<br />
*A network connection (Ethernet or WiFi)<br />
*Special software on both the Raspberry Pi and the remote, controlling computer<br />
<br />
==What skill level is required?==<br />
<br />
This project does not require any coding or compilation. Very basic Linux and networking knowledge would be useful, but not essential.<br />
<br />
You need to...<br />
*Install software<br />
*Enter basic Linux commands<br />
*Use standard software tools (Windows/Linux/Mac) to add software to your PC<br />
*Connect computers using ethernet cables (or to the same Wi-Fi network)<br />
<br />
==How does it work?==<br />
<br />
The commands described below start a "virtual" graphical session. Instead of using a hardware framebuffer, this uses RAM for a framebuffer. It also opens a network channel or port that allows programs on other computers (if they provide the password) to show the framebuffer and provide mouse and keyboard events. <br />
<br />
This way you can run a desktop session on the raspberry pi, but display and control it elsewhere. <br />
<br />
Because the framebuffer isn't the real framebuffer you cannot take advantage of the GPU to accelerate operations on the screen.<br />
<br />
==Overview of this project==<br />
You need to<br />
*Install VNC (Virtual Network Computing) server software on the Raspberry Pi<br />
*Start the VNC server software<br />
*Install a VNC client on another computer<br />
*Connect over a network from your computer to the Raspberry Pi<br />
<br />
==Instructions==<br />
Log in to your Pi and install the Tight VNC Package<br />
$ sudo apt-get install tightvncserver<br />
Next Run TightVNC Server which will prompt you to enter a Password and an optional View Only Password<br />
$ tightvncserver<br />
Once that is done you can start a VNC server from the shell prompt. This example starts a session on VNC display zero (:0) with full HD resolution:<br />
$ vncserver :0 -geometry 1920x1080 -depth 24<br />
(If fonts appear the wrong size, add '-dpi 96' to the end.)<br />
Or you could create a script to save typing in the whole thing.<br />
$ nano svnc.sh (call the file whatever you like)<br />
Add the lines:<br />
#!/bin/sh<br />
vncserver :0 -geometry 1920x1080 -depth 24 -dpi 96<br />
Ctrl-x y <return> (To Exit Nano and Save)<br />
<br />
Set the file to Execute<br />
$ chmod +x svnc.sh<br />
then to run<br />
$ ./svnc.sh<br />
<br />
Run at boot.<br />
<br />
Start a root session<br />
sudo bash<br />
<br />
Create a file in /etc/init.d with a suitable name such as vncboot with the following content.<br />
### BEGIN INIT INFO<br />
# Provides: vncboot<br />
# Required-Start: $remote_fs $syslog<br />
# Required-Stop: $remote_fs $syslog<br />
# Default-Start: 2 3 4 5<br />
# Default-Stop: 0 1 6<br />
# Short-Description: Start VNC Server at boot time<br />
# Description: Start VNC Server at boot time.<br />
### END INIT INFO<br />
<br />
#! /bin/sh<br />
# /etc/init.d/vncboot<br />
<br />
USER=root<br />
HOME=/root<br />
<br />
export USER HOME<br />
<br />
case "$1" in<br />
start)<br />
echo "Starting VNC Server"<br />
#Insert your favoured settings for a VNC session<br />
/usr/bin/vncserver :0 -geometry 1280x800 -depth 16 -pixelformat rgb565<br />
;;<br />
<br />
stop)<br />
echo "Stopping VNC Server"<br />
/usr/bin/vncserver -kill :0<br />
;;<br />
<br />
*)<br />
echo "Usage: /etc/init.d/vncboot {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
<br />
exit 0<br />
<br />
Modify the file permissions so it can be executed<br />
chmod 755 /etc/init.d/vncboot<br />
<br />
Enable dependency based boot sequencing<br />
update-rc.d /etc/init.d/vncboot defaults<br />
<br />
If enabling dependency based boot sequencing was successful, it says<br />
update-rc.d: using dependency based boot sequencing<br />
<br />
But if it says<br />
update-rc.d: error: unable to read /etc/init.d//etc/init.d/vncboot<br />
then try the following command<br />
update-rc.d vncboot defaults<br />
<br />
Reboot your Raspberry PI and you should find a vncserver already started.<br />
<br />
<br />
Install Tight VNC on your desktop from the link below or most VNC clients work I believe.<br />
http://www.tightvnc.com/download.php<br />
<br />
Or install it using your package manager. The following works on my ubuntu 11.10 workstation<br />
sudo apt-get install xtightvncviewer<br />
<br />
Then use <Your Pi IP> (e.g. 192.168.1.2) as the hostname when connecting. <ref>You can put your raspberry pi in /etc/hosts on Linux systems. (On Windows systems, the equivalent file is normally located at c:\windows\system32\drivers\etc\hosts). Then you can refer to your raspberry pi as "rpi" or whatever you called it.</ref><br />
<br />
'''Note:''' some guides tell you to add :1 on the end of the hostname. This is the VNC display number. It is used to calculate which port of the VNC server to connect to. Display zero ( :0 ) is port 5900, display one is port 5901, and so on. If you do not specify a display number on the end of the hostname, the VNC client will attempt to connect to display zero which, if you used the above instructions, will be what the VNC server is listening on. (It is also possible to specify the port directly using the notation hostname::port, e.g. 192.168.1.2::5900.<br />
<br />
Works Great, select full screen from the tool bar and a full 1080p 24bit desktop is yours from anywhere.<br />
<br />
<references /><br />
<br />
==Getting VNC Server to Work on a Specific User==<br />
Instead of using the script in the Raspberry Pi wiki, use this one provided by "PenguinTutor":<br />
#!/bin/sh<br />
# /etc/init.d/tightvncserver<br />
# Customised by Stewart Watkiss<br />
#http://www.penguintutor.com/linux/tightvnc<br />
# Set the VNCUSER variable to the name of the user to start tightvncserver under<br />
VNCUSER='pi'<br />
eval cd ~$VNCUSER<br />
case "$1" in<br />
start)<br />
su $VNCUSER -c '/usr/bin/tightvncserver :1'<br />
echo "Starting TightVNC server for $VNCUSER "<br />
;;<br />
stop)<br />
pkill Xtightvnc<br />
echo "Tightvncserver stopped"<br />
;;<br />
*)<br />
echo "Usage: /etc/init.d/tightvncserver {start|stop}"<br />
exit 1<br />
;;<br />
esac<br />
exit 0<br />
<br />
Now, change the VNCUSER=pi to your desired username, so for example: VNCUSER=jsmith<br />
<br />
That'll make it boot on the username of which you want it to boot on... but I then received the grey screen error when remotely accessing the Pi from my computer, now the way you fix this is, open up the xstartup file that was created when VNCSERVER executes on your desired username. Now the way you access it and edit it is by:<br />
sudo nano .vnc/xstartup <br />
.vnc is usually in the home directory.<br />
<br />
Delete everything that is in xstartup (or not in as mine was), and add this:<br />
!/bin/sh<br />
xrdb $HOME/.Xresources<br />
xsetroot -solid black<br />
/usr/bin/lxsession -s LXDE &<br />
<br />
Now it should work.<br />
<br />
==Does Your Openbox Configuration Settings Not Start on VNC?==<br />
You'll often find yourself in a position where VNC will start, but you'll get things such as multiple virtual desktops appearing, and you try to save it in the "Openbox Configuration Manager," and they go away for a second, but then you find you'll restart the Pi and then they appear again. Here's how to fix it:<br />
<br />
Create, or edit the current autostart.sh file which is located in:<br />
.config/openbox/autostart.sh<br />
<br />
Edit using "Nano" or any other text editor, I use Nano as it is the most comfortable for me, so do:<br />
sudo nano .config/openbox/autostart.sh/<br />
<br />
Add the line:<br />
exec openbox-session<br />
<br />
Now add the line<br />
exec openbox-session again in .vnc/xstartup and now it should work.<br />
<br />
But you can't really save the setting in Openbox Configuration Manager on VNC, but you have to do it manually; so you open this file:<br />
nano .config/openbox/lxde-rc.xml<br />
<br />
Scroll down to:<br />
<desktops><br />
<br />
You should see a bunch of stuff there, but only focus on this: <br />
<number>6</number> or something similar.<br />
<br />
Change the number of desktops you want within the <number></number> bit.<br />
<br />
I changed mine to 1, because that's all I want.<br />
<br />
It should now work!<br />
<br />
==Limitations and Alternatives==<br />
<br />
In this example TightVNC has been used. This is a popular and relatively friendly program that uses the VNC protocols and is included in most GNU/Linux distributions. However it does have it's limitations. The biggest of these is that it creates new desktops for each connection. It may be that what you want to do though is view and control the same desktop that shows on the monitor/TV plugged into the Raspberry Pi. To do this a better tool to use is x11vnc. This is more powerful but less easy to use. However if you already have a desktop running it will latch on to it and share it as a default. This too is fairly popular and included in many GNU/Linux distribution repositories such as Raspbian.<br />
<br />
==Security Considerations==<br />
Be aware that basic VNC is not secure. It is not encrypted unless you are advanced in setting it up. If you use it over the internet it can result in criminals "bouncing" you off your connection and taking over. There are even computer robot tools that try to do this. You must set a password but even then it is sometimes possible to take over someone's connection after they have entered it.<br />
A good tip is to set the server to shift from the default port 5900 to something else chosen randomly as long as it is spare.</div>Crazyskeggyhttps://elinux.org/index.php?title=Talk:RPi_Easy_SD_Card_Setup&diff=272786Talk:RPi Easy SD Card Setup2013-07-21T12:22:02Z<p>Crazyskeggy: /* NOOBS Instructions */ Add signature</p>
<hr />
<div>== Page restructuring / update ==<br />
I have decided to restructure the page, as I found it difficult to work out which tools to use; I want to make it easier for those unfamiliar with this type of activity. I hope that I have got things correct, but I cannot test all of the options. I'll do my best! [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 11:02, 3 May 2013 (UTC)<br />
<br />
==Resizing the SD card==<br />
<br />
I can resize the partition, but not use it. Running the command<br />
<br />
sudo resize2fs /dev/mmcblk0p2<br />
<br />
gives me an error "Permission denied to resize the filesystem". Tried several things and I can't see how this can be done on an SD card that is being used to run the pi. Can someone help?<br />
<br />
==Copying the image to an SD Card on Windows if first option isn't successful==<br />
<br />
--[[User:Kerbik|Kerbik]] 23:55, 24 April 2012 (UTC)<br />
I hope that this will help someone :) (I didn't test this created SDcard on Pi, yet because I still doesn't have it in my hands :( )<br />
<br />
--[[User:Radek|Radek]] 21:03, 18 May 2012 (UTC) Yes it works :)<br />
<br />
== Question about deleting the swap partition ==<br />
<br />
Steps 4 and 6 under section "'''Copying an image to the SD Card in Linux (command line)'''" assume that the OS will automount the USB SDCard reader. This is not the case with the current release of Debian that's listed on the [http://www.raspberrypi.org/downloads RPi downloads page]. (debian6-19-04-2012) Using the df command with this release does not provide the user with the needed information.<br />
I do not (yet) know enough about Linux to provide easy, more reliable instructions. I was able to determine the correct device name by using "tail -f /var/log/messages" and watching for any mention of "sda" or similar while plugging/unplugging the USB SDCard reader.<br />
--[[User:GG Crew|GG Crew]] 20:33, 16 May 2012 (UTC)<br />
<br />
The steps currently listed under [[RPi_Easy_SD_Card_Setup#Manually_resizing_the_SD_card_on_Raspberry_Pi|Manually resizing the SD card on Raspberry Pi]] instruct the user to delete the swap partition (in order to expand the main partition), but never recreate a new swap partition. For a device as limited on RAM as the RPi, this does not seem like a good idea. Hopefully someone with more knowledge than me can update the directions, or explain why we don't need a swap partition. --[[User:GG Crew|GG Crew]] 07:21, 28 May 2012 (UTC)<br />
<br />
: Having swap space on SSD/Flash isn't a good idea except for testing purposes. Prolonged swapping reduces the MTBF of the unit dramatically. If you're going to go to the trouble of adjusting partitions, it isn't unreasonable to move any needed swap space to some other (safer, or sacrificial) device. [[User:Gus3|Gus3]] 14:37, 28 May 2012 (UTC)<br />
<br />
== Incorrect MacOSX drive name ==<br />
<br />
Believe (on a macBook pro, running 10.6.8 with a built in SD card reader) it's /dev/diskN not /dev/rdiskN ? Also should we have a further firm warning about getting this command right..<br />
<br />
== Incorrect eject command in MacOSX ==<br />
<br />
I had to use "diskutil unmount /dev/disk1s1" instead of "diskutil eject /dev/disk1s1" as the latter removed /dev/rdisk1 from the machine. I was using an external USB SD card reader/writer if that makes any difference.<br />
<br />
== Don't need Apple menu in in MacOSX Mountain Lion ==<br />
<br />
At least under Mountain Lion, if you use the Disk Utility (recommended in the semi-graphical method for unmounting the partition), and verify the partition before unmounting, it will give you the BSD name (in my case /dev/disk1s1), saving a step.<br />
<br />
== RasPiWrite ==<br />
<br />
Original URL of http://exaviorn.com/raspiwrite/ was throwing 500s, so changed to github link.<br />
<br />
--[[User:Finnaldo|Finnaldo]] (a noob) 20 Apr 2013: The raspiwrite script has basic errors that prevent it from working, many people have tried pushing fixes in the last nine months but there has been no activity. The wiki should either drop the link or at least warn about it, but I'm too noob to want to touch it ;)<br />
<br />
== Reference section blues ==<br />
<br />
The reference section seems to be messed up (also in the [http://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&oldid=195308 2012-11-24 version]). --[[User:Mortense|Mortense]] ([[User talk:Mortense|talk]]) 19:10, 1 December 2012 (UTC)<br />
: The Mediawiki software was recently upgraded to 1.20.1. which seems to have affected some templates. Wmat now seems to have fixed it [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 10:13, 2 December 2012 (UTC)<br />
<br />
<br />
==Copying the image to an SD Card in Linux (command line)==<br />
<br />
--[[User:TheLancashireman|TheLancashireman]] 00:26 2013-03-14 CET<br />
Is step 11 necessary? The Pi filesystem shouldn't be mounted at this point. Even if it was, umount handles everything, so a sync shouldn't be needed.<br />
==Incorrect argument to dd on osx==<br />
dd will only except bs=1m not bs=1M on osx 10.7<br />
<br />
=="SD/USB/HDD EASY SET UP"==<br />
should i change title and addding a new section, for easy hdd/usb sd card setup tutorial using the same method on this page. or should i create a new page for external storage instalation?<br />
: Changing the title of the page might break external links. The page is part of the beginners section; the SD card if a necessary part of booting the Pi and a significant number of people have problems with booting it. As the USB / HDD storage is not a necessity initially, but is quite likely to be useful later, I think it would be better to be a separate page. You could also look at [[RPi_Adding_USB_Drives | this USB drive]] page. [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 19:55, 29 May 2013 (UTC)<br />
<br />
== NOOBS Instructions ==<br />
<br />
I have just added instructions for Installing via NOOBS. Feel free to update them (I only know Windows - most of it was based on the [http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdf Quick-Start PDF] Page 3)<br />
<br />
[[User:Crazyskeggy|Crazyskeggy]] ([[User talk:Crazyskeggy|talk]]) 12:22, 21 July 2013 (UTC)</div>Crazyskeggyhttps://elinux.org/index.php?title=Talk:RPi_Easy_SD_Card_Setup&diff=272780Talk:RPi Easy SD Card Setup2013-07-21T12:21:25Z<p>Crazyskeggy: /* NOOBS Instructions */ new section</p>
<hr />
<div>== Page restructuring / update ==<br />
I have decided to restructure the page, as I found it difficult to work out which tools to use; I want to make it easier for those unfamiliar with this type of activity. I hope that I have got things correct, but I cannot test all of the options. I'll do my best! [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 11:02, 3 May 2013 (UTC)<br />
<br />
==Resizing the SD card==<br />
<br />
I can resize the partition, but not use it. Running the command<br />
<br />
sudo resize2fs /dev/mmcblk0p2<br />
<br />
gives me an error "Permission denied to resize the filesystem". Tried several things and I can't see how this can be done on an SD card that is being used to run the pi. Can someone help?<br />
<br />
==Copying the image to an SD Card on Windows if first option isn't successful==<br />
<br />
--[[User:Kerbik|Kerbik]] 23:55, 24 April 2012 (UTC)<br />
I hope that this will help someone :) (I didn't test this created SDcard on Pi, yet because I still doesn't have it in my hands :( )<br />
<br />
--[[User:Radek|Radek]] 21:03, 18 May 2012 (UTC) Yes it works :)<br />
<br />
== Question about deleting the swap partition ==<br />
<br />
Steps 4 and 6 under section "'''Copying an image to the SD Card in Linux (command line)'''" assume that the OS will automount the USB SDCard reader. This is not the case with the current release of Debian that's listed on the [http://www.raspberrypi.org/downloads RPi downloads page]. (debian6-19-04-2012) Using the df command with this release does not provide the user with the needed information.<br />
I do not (yet) know enough about Linux to provide easy, more reliable instructions. I was able to determine the correct device name by using "tail -f /var/log/messages" and watching for any mention of "sda" or similar while plugging/unplugging the USB SDCard reader.<br />
--[[User:GG Crew|GG Crew]] 20:33, 16 May 2012 (UTC)<br />
<br />
The steps currently listed under [[RPi_Easy_SD_Card_Setup#Manually_resizing_the_SD_card_on_Raspberry_Pi|Manually resizing the SD card on Raspberry Pi]] instruct the user to delete the swap partition (in order to expand the main partition), but never recreate a new swap partition. For a device as limited on RAM as the RPi, this does not seem like a good idea. Hopefully someone with more knowledge than me can update the directions, or explain why we don't need a swap partition. --[[User:GG Crew|GG Crew]] 07:21, 28 May 2012 (UTC)<br />
<br />
: Having swap space on SSD/Flash isn't a good idea except for testing purposes. Prolonged swapping reduces the MTBF of the unit dramatically. If you're going to go to the trouble of adjusting partitions, it isn't unreasonable to move any needed swap space to some other (safer, or sacrificial) device. [[User:Gus3|Gus3]] 14:37, 28 May 2012 (UTC)<br />
<br />
== Incorrect MacOSX drive name ==<br />
<br />
Believe (on a macBook pro, running 10.6.8 with a built in SD card reader) it's /dev/diskN not /dev/rdiskN ? Also should we have a further firm warning about getting this command right..<br />
<br />
== Incorrect eject command in MacOSX ==<br />
<br />
I had to use "diskutil unmount /dev/disk1s1" instead of "diskutil eject /dev/disk1s1" as the latter removed /dev/rdisk1 from the machine. I was using an external USB SD card reader/writer if that makes any difference.<br />
<br />
== Don't need Apple menu in in MacOSX Mountain Lion ==<br />
<br />
At least under Mountain Lion, if you use the Disk Utility (recommended in the semi-graphical method for unmounting the partition), and verify the partition before unmounting, it will give you the BSD name (in my case /dev/disk1s1), saving a step.<br />
<br />
== RasPiWrite ==<br />
<br />
Original URL of http://exaviorn.com/raspiwrite/ was throwing 500s, so changed to github link.<br />
<br />
--[[User:Finnaldo|Finnaldo]] (a noob) 20 Apr 2013: The raspiwrite script has basic errors that prevent it from working, many people have tried pushing fixes in the last nine months but there has been no activity. The wiki should either drop the link or at least warn about it, but I'm too noob to want to touch it ;)<br />
<br />
== Reference section blues ==<br />
<br />
The reference section seems to be messed up (also in the [http://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&oldid=195308 2012-11-24 version]). --[[User:Mortense|Mortense]] ([[User talk:Mortense|talk]]) 19:10, 1 December 2012 (UTC)<br />
: The Mediawiki software was recently upgraded to 1.20.1. which seems to have affected some templates. Wmat now seems to have fixed it [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 10:13, 2 December 2012 (UTC)<br />
<br />
<br />
==Copying the image to an SD Card in Linux (command line)==<br />
<br />
--[[User:TheLancashireman|TheLancashireman]] 00:26 2013-03-14 CET<br />
Is step 11 necessary? The Pi filesystem shouldn't be mounted at this point. Even if it was, umount handles everything, so a sync shouldn't be needed.<br />
==Incorrect argument to dd on osx==<br />
dd will only except bs=1m not bs=1M on osx 10.7<br />
<br />
=="SD/USB/HDD EASY SET UP"==<br />
should i change title and addding a new section, for easy hdd/usb sd card setup tutorial using the same method on this page. or should i create a new page for external storage instalation?<br />
: Changing the title of the page might break external links. The page is part of the beginners section; the SD card if a necessary part of booting the Pi and a significant number of people have problems with booting it. As the USB / HDD storage is not a necessity initially, but is quite likely to be useful later, I think it would be better to be a separate page. You could also look at [[RPi_Adding_USB_Drives | this USB drive]] page. [[User:Simon Small|SimonSmall]] ([[User talk:Simon Small|talk]]) 19:55, 29 May 2013 (UTC)<br />
<br />
== NOOBS Instructions ==<br />
<br />
I have just added instructions for Installing via NOOBS. Feel free to update them (I only know Windows - most of it was based on the [http://www.raspberrypi.org/wp-content/uploads/2012/04/quick-start-guide-v2_1.pdf Quick-Start PDF] Page 3)</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=272774RPi Easy SD Card Setup2013-07-21T12:18:05Z<p>Crazyskeggy: /* Create your own */ Add instructions for NOOBS</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using NOOBS ==<br />
Recently, the Raspberry Pi Foundation have released a really easy way to set up your SD Card. It's called the New Out Of Box Software (or NOOBS for short) and provides a really easy way to install Raspberry Pi distributions. Be warned, however, that it is a 1GB download - if you have a limit on what you are allowed to download, follow the instructions below, as the other images are around 500MB.<br />
<br />
# Download NOOBS from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page]<br />
# Insert a (4GB+) SD Card into your computer<br />
#* If you want to save space on the SD Card, you can delete some of the images inside the images folder in the NOOBS zip file that you don't want to use.<br />
# Format the disk<br />
#* '''Windows'''<br />
## Download and install the SD Association's Formatting tool from https://www.sdcard.org/downloads/formatter_4/eula_windows/<br />
## Open the Application you have just installed<br />
## Set "FORMAT SIZE ADJUSTMENT" to ON in the Options menu.<br />
## Make sure you have selected the Drive your SD Card is inserted in<br />
## Click "Format"<br />
#* '''Mac'''<br />
## Download and install the SD Association's Formatting tools from https://www.sdcard.org/downloads/formatter_4/eula_mac/<br />
## Select "Overwrite format"<br />
## Make sure you have selected your SD Card, and not something else<br />
## Click "Format"<br />
#* '''Linux'''<br />
## Use gparted (or the command-line version parted if you prefer), if you don't have it, install it as you usually would.<br />
## Format the entire disk as FAT / FAT16 (make sure you select the correct disk)<br />
# Extract the file you downloaded in Step 1<br />
# Copy the files you just extracted to your SD Card<br />
<br />
Not all monitors work with NOOBS straight away. If your monitor is one of those that doesn't work, press the Number buttons 1-4 until you see what you want.<br />
# Default HDMI Mode<br />
# HDMI Safe Mode - Use this if Default (1) doesn't work and you cannot see anything<br />
# Composite PAL Mode - Use this or 4. if you are using the yellow and black outputs on the opposite side to the HDMI output<br />
# Composite NTSC Mode<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use an SD Card slot in your computer (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
Where C:/flashnul/flashnul.exe is the location of the flashnul program; E: is the drive you want to overwrite, and C:/temp/distribution-name.img is the location of the .img file.<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=Talk:RPi_Beginners&diff=272768Talk:RPi Beginners2013-07-21T10:47:02Z<p>Crazyskeggy: /* Update instructions from Debian to Raspbian? */ Add timestamp</p>
<hr />
<div>ARRRGH ! It actually went wrong the way I imagined it would .. <br />
Broken links everywhere ... disoriented forum-goers hitting dead ends ... misinformation scattered amidst the dust ...<br />
Next time , use '''REDIRECTS''' ! (and if necessery new articles and restructuring and ... whatever it takes).<br />
Meanwhile , I added an info text at the top of the article.<br />
<br />
The bit on Americanizing is a way of driving traffic to the writers site. Have left the simple version that was already there and deleted the spam.--[[User:Brian|Brian]] 20:59, 22 April 2012 (UTC)<br />
<br />
Brian: I was requested by forum members at the Raspberry Pi Forum to add it to the Wiki. It was in no way an attempt to drive traffic to my site. I thought it was useful information with screenshots - that's why I wrote it, the Raspberry_Pi Twitter page retweeted it and a forum member asked me to add it to the Wiki. See this link for further details: [http://www.raspberrypi.org/forum/absolute-beginners/my-keyboard-mapping-was-wrong-heres-the-solution/#p67915] Regardless, if you feel it is not a useful resource, there is no need to link to it. --[[User:Rohan Kapoor|Rohan Kapoor]]<br />
<br />
How about a separate page, intro to the command line & SSH for beginners, which is linked to from here? I know the command line sint the best place to throw new users, however a lot of extra software is installed via the command line. [[User:Nickweb|Nickweb]] ([[User talk:Nickweb|talk]])<br />
<br />
== Keyboard Mapping ==<br />
<br />
This information is not quite correct. Maybe it is out of date? It didn't work for me when I tried to change the mapping from en_UK to en_US. I will try to update it. For example, the command "sudo dpkg-reconfigure console-data" returns an error that the console-data package is not installed on the system. The correct process can be found here: http://elinux.org/R-Pi_Troubleshooting#Re-mapping_the_keyboard_with_Debian_Squeeze<br />
[[User:Cmbuck|Cmbuck]] 02:49, 19 May 2012 (UTC)<br />
<br />
== Update instructions from Debian to Raspbian? ==<br />
<br />
Now that Raspbian is the Reccomended Distribution, shouldn't we have instructions for Raspbian, as that is what Beginners, which this article is aimed at, will be likely using?<br />
<br />
[[User:Crazyskeggy|Crazyskeggy]] ([[User talk:Crazyskeggy|talk]]) 10:47, 21 July 2013 (UTC)</div>Crazyskeggyhttps://elinux.org/index.php?title=Talk:RPi_Beginners&diff=272762Talk:RPi Beginners2013-07-21T10:46:22Z<p>Crazyskeggy: /* Update instructions from Debian to Raspbian? */ new section</p>
<hr />
<div>ARRRGH ! It actually went wrong the way I imagined it would .. <br />
Broken links everywhere ... disoriented forum-goers hitting dead ends ... misinformation scattered amidst the dust ...<br />
Next time , use '''REDIRECTS''' ! (and if necessery new articles and restructuring and ... whatever it takes).<br />
Meanwhile , I added an info text at the top of the article.<br />
<br />
The bit on Americanizing is a way of driving traffic to the writers site. Have left the simple version that was already there and deleted the spam.--[[User:Brian|Brian]] 20:59, 22 April 2012 (UTC)<br />
<br />
Brian: I was requested by forum members at the Raspberry Pi Forum to add it to the Wiki. It was in no way an attempt to drive traffic to my site. I thought it was useful information with screenshots - that's why I wrote it, the Raspberry_Pi Twitter page retweeted it and a forum member asked me to add it to the Wiki. See this link for further details: [http://www.raspberrypi.org/forum/absolute-beginners/my-keyboard-mapping-was-wrong-heres-the-solution/#p67915] Regardless, if you feel it is not a useful resource, there is no need to link to it. --[[User:Rohan Kapoor|Rohan Kapoor]]<br />
<br />
How about a separate page, intro to the command line & SSH for beginners, which is linked to from here? I know the command line sint the best place to throw new users, however a lot of extra software is installed via the command line. [[User:Nickweb|Nickweb]] ([[User talk:Nickweb|talk]])<br />
<br />
== Keyboard Mapping ==<br />
<br />
This information is not quite correct. Maybe it is out of date? It didn't work for me when I tried to change the mapping from en_UK to en_US. I will try to update it. For example, the command "sudo dpkg-reconfigure console-data" returns an error that the console-data package is not installed on the system. The correct process can be found here: http://elinux.org/R-Pi_Troubleshooting#Re-mapping_the_keyboard_with_Debian_Squeeze<br />
[[User:Cmbuck|Cmbuck]] 02:49, 19 May 2012 (UTC)<br />
<br />
== Update instructions from Debian to Raspbian? ==<br />
<br />
Now that Raspbian is the Reccomended Distribution, shouldn't we have instructions for Raspbian, as that is what Beginners, which this article is aimed at, will be likely using?</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=272756RPi Beginners2013-07-21T10:42:09Z<p>Crazyskeggy: /* What is Linux and why not use Windows? */ Add Android to the list of things that use Linux, because people know what Android is and may be surprised to find out that it is Linux</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, Android smartphones, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Debian RPi Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings.<br />
<br />
== Default login and password ==<br />
See the ''Username:Password'' column of [[RPi_Distributions#Available Distributions|distributions table]] to access your Pi.<br />
<br />
== Locale settings ==<br />
<br />
By configuring the [[wikipedia:locale|locale]] settings, you can change the language and country settings (e.g. to get correct sorting behaviour) for much of the software available for the RPi. The default RPi locale is English/Great Britain ("en_GB").<br />
<br />
You can alter this with <br />
<br />
sudo dpkg-reconfigure locales<br />
<br />
You will get a very long list of possible locales. You can enable/disable a locale by pressing the spacebar (not Enter), and scroll through the list using the arrow keys or PgUp/PgDn.<br />
<br />
Selecting "All locales" will generate all possible locales, taking a very long time and using a great deal of space. Select only those you wish to use.<br />
<br />
''It is highly recommended to stick to the UTF-8 locales'', and to leave the en_GB.UTF-8 locale enabled, in addition to any other locales you enable.<br />
<br />
If you're unsure of which locale to pick, look up a [[wikipedia:List of ISO 639-1 codes|two-letter language code]] and a [[wikipedia:ISO 3166-1 alpha-2#Officially assigned code elements|two-letter country code]] on Wikipedia, and see if you can find a matching locale.<br />
<br />
When you're done picking locale(s), press Enter. You will be prompted to select a default locale as well.<br />
<br />
== Keyboard layout ==<br />
<br />
If different letters appear on-screen from that which you typed, you need to reconfigure you keyboard settings. In Debian, from a command line type:<br />
<br />
sudo dpkg-reconfigure keyboard-configuration<br />
<br />
Follow the prompts.<br />
<br />
'''Or:''' From the command line type:<br />
sudo nano /etc/default/keyboard<br />
<br />
Then find where it says<br />
<br />
XKBLAYOUT="gb"<br />
<br />
and change the gb to the [[wikipedia:ISO 3166-1 alpha-2#Officially assigned code elements|two-letter code]] for your country. [http://www.raspberrypi.org/phpBB3/viewtopic.php?p=78325#p78325]<br />
<br />
Also, see the [[R-Pi_Troubleshooting#Re-mapping_the_keyboard_with_Debian_Squeeze|Troubleshooting Guide]] for more information about remapping the keyboard.<br />
<br />
You may need to restart for the changes to take effect.<br />
<br />
If you get a very long delay during the keyboard mapping at startup, type the following once on the command line after you have logged in:<br />
<br />
sudo setupcon<br />
<br />
If the selected keyboard layout is not applied in the console (that is, when not running under X), try:<br />
<br />
sudo apt-get install console-data<br />
<br />
== Timezone ==<br />
<br />
Unless you live in Great Britain, you'll have to change the default timezone:<br />
<br />
sudo dpkg-reconfigure tzdata<br />
<br />
Select geographic area - Europe, America or whatever. Etc gives UNIX compatible time zones including CUT, GMT, UTC<br />
<br />
Select city<br />
<br />
Follow the prompts to finish the config. The change should be immediate.<br />
<br />
== Create a new user with sudo-privileges ==<br />
<br />
'''NOTE:Be careful when using visudo! If you use the incorrect format, you may not be able to sudo for any user!'''<br />
<br />
''If you do manage to invalidate your /etc/sudoers file, see section "Repair /etc/sudoers file" on how to recover''<br />
<br />
You may want to create a new user account for yourself.<br />
<br />
Type in following command in the terminal to create a new user (for example the user john):<br />
<br />
sudo adduser john<br />
<br />
Follow the steps.<br />
<br />
To allow the newly created user to use the "sudo" command, type:<br />
sudo visudo<br />
<br />
Add following line under the "root ALL=(ALL) ALL" Line:<br />
<br />
john ALL=(ALL) ALL<br />
<br />
Now press CTRL+O, X to save and exit the editor.<br />
<br />
Alternatively instead of adding the user to the sudoers list, you can add your user to the sudo group with the following command:<br />
<br />
adduser john sudo<br />
<br />
== Repair /etc/sudoers file ==<br />
sudo: parse error in /etc/sudoers near line 29<br />
sudo: no valid sudoers sources found, quitting<br />
sudo: unable to initialize policy plugin<br />
<br />
If you have edited your sudoers file and get the message above, do not worry - it is easy to recover<br />
pkexec bash<br />
<br />
You will be prompted for the pi password. The initial password for pi is "raspberry"<br />
<br />
You will now be connected as root user. Use "visudo" to repair the configuration file<br />
<br />
== Debian Wheezy, using raspi-config ==<br />
Debian Wheezy has a menu that will do some of the above and more. See [[RPi_raspi-config|raspi-config]]<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [http://elinux.org/CLI_Spells Command Line Interface "Must Have" Commands]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Beginners&diff=272750RPi Beginners2013-07-21T10:40:33Z<p>Crazyskeggy: /* Where to start? */ Change "a SD Card" to "an SD Card", because SD is pronounced "ess dee"</p>
<hr />
<div>[[Category:RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
There is some restructuring going on , we are sorry for the inconvenience. '''<br />
<br />
=Where to start?=<br />
Any easy question to ask, but a very difficult one to answer!<br />
# '''If you are looking for any information related to SD Cards and setup look [[RPi Easy SD Card Setup | here]]<br />
# If you need to get a RPi, the see the [[RPi Buying Guide|Buying Guide]].<br />
# If you need to know what equipment you will need and how to set it up, see the [[RPi Hardware Basic Setup|Basic Hardware Setup]] page.<br />
# If you need to install/setup an SD card see the [[RPi Easy SD Card Setup|Preload your Card]] section.<br />
# If something is not working, check the [[R-Pi_Troubleshooting|Troubleshooting]] section.<br />
# If you need help with Debian, try the [http://wiki.debian.org/FrontPage Debian Wiki].<br />
# If you have imaged an SD with the Debian Wheezy image and started your RPi here's some help with what you see first - the raspi-config menu [[RPi_raspi-config]]<br />
# Help for Noob's with a quizical disposition and Wheezy or Raspbian instalations [[RPi_Noob_Guides_for_Wheezy_using_2012-16-18_beta|here]]<br />
# If you don't have a composite monitor or HDMI then it may be worth you looking at [[RPi_A_Method_for_ssh_blind_login|Blind Login Method]]<br />
# Build yourself a Wheezy [[RPi_A_Simple_Wheezy_LAMP_install|LAMP]] webserver.<br />
# VNC connection for the monitorily challenged Noob [[RPi_Wheezy_VNC|VNC for a wheezy install]] (noobs that are using the Blind Login)<br />
# If you've done all that, and you are wondering what next...'''welcome and read on!'''<br />
<br />
<br />
References needed (idea for new section Living Without RPi, which can guide users or link to info to users who haven't got RPis)<br />
Link to emulation builds or live linux cds setup for beginners (RacyPy2 for example)<br />
If you don't have a Raspberry Pi yet, you can still try things out, see [http://sourceforge.net/projects/rpiqemuwindows/ Windows RPi Emulator] for details.<br />
<br />
=What is Linux and why not use Windows?=<br />
Linux is an operating system just like Windows, however, unlike Windows (which needs a set hardware requirement to run i.e. One Size fits or get different hardware), Linux comes in many varieties and configurations which means you can usually find a flavour (or Distribution) which fits your hardware big or small / fast or slow.<br />
<br />
The Raspberry Pi is not suited to running Windows due to its hardware, but there are plenty of Linux Distributions which fit nicely. In addition to this, most Distributions of Linux are free, however Windows can cost many times the price of the Raspberry Pi itself.<br />
<br />
Chances are you already have Linux running in your home without you even knowing it, since it is commonly used in Kindle ebook readers, modern TVs, Freeview and cable boxes to run things and ensure your recording of '''Inbetweeners''' or '''Prison Break''' gets done!<br />
<br />
For more information about Linux see <br />
[http://en.wikipedia.org/wiki/Linux Wikipedia]<br />
<br />
Also see [[RPi_End-user_FAQ End-User|FAQ]]<br />
And [[Will_RPi_Run|Running XXX on the RPi]]<br />
<br />
=Basic Debian RPi Setup=<br />
When you first turn on your Raspberry Pi with it's fresh Debian image on the SD card, you will likely want to tweak the system settings.<br />
<br />
== Default login and password ==<br />
See the ''Username:Password'' column of [[RPi_Distributions#Available Distributions|distributions table]] to access your Pi.<br />
<br />
== Locale settings ==<br />
<br />
By configuring the [[wikipedia:locale|locale]] settings, you can change the language and country settings (e.g. to get correct sorting behaviour) for much of the software available for the RPi. The default RPi locale is English/Great Britain ("en_GB").<br />
<br />
You can alter this with <br />
<br />
sudo dpkg-reconfigure locales<br />
<br />
You will get a very long list of possible locales. You can enable/disable a locale by pressing the spacebar (not Enter), and scroll through the list using the arrow keys or PgUp/PgDn.<br />
<br />
Selecting "All locales" will generate all possible locales, taking a very long time and using a great deal of space. Select only those you wish to use.<br />
<br />
''It is highly recommended to stick to the UTF-8 locales'', and to leave the en_GB.UTF-8 locale enabled, in addition to any other locales you enable.<br />
<br />
If you're unsure of which locale to pick, look up a [[wikipedia:List of ISO 639-1 codes|two-letter language code]] and a [[wikipedia:ISO 3166-1 alpha-2#Officially assigned code elements|two-letter country code]] on Wikipedia, and see if you can find a matching locale.<br />
<br />
When you're done picking locale(s), press Enter. You will be prompted to select a default locale as well.<br />
<br />
== Keyboard layout ==<br />
<br />
If different letters appear on-screen from that which you typed, you need to reconfigure you keyboard settings. In Debian, from a command line type:<br />
<br />
sudo dpkg-reconfigure keyboard-configuration<br />
<br />
Follow the prompts.<br />
<br />
'''Or:''' From the command line type:<br />
sudo nano /etc/default/keyboard<br />
<br />
Then find where it says<br />
<br />
XKBLAYOUT="gb"<br />
<br />
and change the gb to the [[wikipedia:ISO 3166-1 alpha-2#Officially assigned code elements|two-letter code]] for your country. [http://www.raspberrypi.org/phpBB3/viewtopic.php?p=78325#p78325]<br />
<br />
Also, see the [[R-Pi_Troubleshooting#Re-mapping_the_keyboard_with_Debian_Squeeze|Troubleshooting Guide]] for more information about remapping the keyboard.<br />
<br />
You may need to restart for the changes to take effect.<br />
<br />
If you get a very long delay during the keyboard mapping at startup, type the following once on the command line after you have logged in:<br />
<br />
sudo setupcon<br />
<br />
If the selected keyboard layout is not applied in the console (that is, when not running under X), try:<br />
<br />
sudo apt-get install console-data<br />
<br />
== Timezone ==<br />
<br />
Unless you live in Great Britain, you'll have to change the default timezone:<br />
<br />
sudo dpkg-reconfigure tzdata<br />
<br />
Select geographic area - Europe, America or whatever. Etc gives UNIX compatible time zones including CUT, GMT, UTC<br />
<br />
Select city<br />
<br />
Follow the prompts to finish the config. The change should be immediate.<br />
<br />
== Create a new user with sudo-privileges ==<br />
<br />
'''NOTE:Be careful when using visudo! If you use the incorrect format, you may not be able to sudo for any user!'''<br />
<br />
''If you do manage to invalidate your /etc/sudoers file, see section "Repair /etc/sudoers file" on how to recover''<br />
<br />
You may want to create a new user account for yourself.<br />
<br />
Type in following command in the terminal to create a new user (for example the user john):<br />
<br />
sudo adduser john<br />
<br />
Follow the steps.<br />
<br />
To allow the newly created user to use the "sudo" command, type:<br />
sudo visudo<br />
<br />
Add following line under the "root ALL=(ALL) ALL" Line:<br />
<br />
john ALL=(ALL) ALL<br />
<br />
Now press CTRL+O, X to save and exit the editor.<br />
<br />
Alternatively instead of adding the user to the sudoers list, you can add your user to the sudo group with the following command:<br />
<br />
adduser john sudo<br />
<br />
== Repair /etc/sudoers file ==<br />
sudo: parse error in /etc/sudoers near line 29<br />
sudo: no valid sudoers sources found, quitting<br />
sudo: unable to initialize policy plugin<br />
<br />
If you have edited your sudoers file and get the message above, do not worry - it is easy to recover<br />
pkexec bash<br />
<br />
You will be prompted for the pi password. The initial password for pi is "raspberry"<br />
<br />
You will now be connected as root user. Use "visudo" to repair the configuration file<br />
<br />
== Debian Wheezy, using raspi-config ==<br />
Debian Wheezy has a menu that will do some of the above and more. See [[RPi_raspi-config|raspi-config]]<br />
<br />
=Intro to the CLI (Command Line Interface)=<br />
You will need to use the Command Line Interface at some point in your management of the RPi. The command line interface is a powerful way to interact with the Raspberry Pi and is well worth learning some basic commands to get started with.<br />
<br />
For an introductory guide to some basic commands please see: [http://elinux.org/CLI_Spells Command Line Interface "Must Have" Commands]. Featured on the Raspberry Pi [http://www.raspberrypi.org/archives/1414 home page] was also a link to this site for [http://linuxcommand.org/learning_the_shell.php "learning the shell"]<br />
<br />
Your SD card may boot into a GUI, if not and you are done with the text interface and want to use a graphical one instead, run:<br />
<br />
startx<br />
<br />
=Remote Access=<br />
Your default install probably has a ssh (secure shell) "daemon" running. <br />
This means that you can run everything on your Rpi with only the network attached. Provided you know which ip address it has. With appropriate software installed on your Winodws, Mac or Linux PC, you can also run a gui remotely.<br />
<br />
Prior to your initial remote access it is recommended that you regenerate unique host public/private ID keys with the following command <br />
rm /etc/ssh/ssh_host_* && dpkg-reconfigure openssh-server<br />
<br />
More details about remote access (including remote GUI are at [[RPi Remote Access]]<br />
<br />
=Installing and updating software to your Raspberry Pi=<br />
You will probably want to add software to your Raspberry Pi, as well as keep the current packages up to date. With Raspbian this is performed using apt-get. The most common commands can be found in the [http://elinux.org/Add_software adding software page]. It is good practice to regularly ensure you run the update and upgrade commands detailed in the [http://elinux.org/Add_software guide] to ensure you have the most up to date software packages.<br />
<br />
The apt-get package for Raspbian will also keep the GPU firmware updated to the latest stable release. If you'd like to try the bleeding edge releases you can read more on the [http://elinux.org/RPi_Software#GPU_bootloaders RPi Software].<br />
<br />
=Adding USB Storage to Your Raspberry Pi=<br />
Sooner or later, you're going to run out of room on the SD card used to boot up your Raspberry Pi. For a tutorial on how to connect USB flash drives and hard drives to your Pi to expand storage, see: [http://elinux.org/RPi_Adding_USB_Drives Adding USB Drives to a Raspberry Pi]<br />
<br />
=Beginner Projects=<br />
Here are a few things you can try out with your Raspberry Pi, in most cases all you'll need is your SD Card loaded with a particular preconfigured OS Distribution.<br />
<br />
It will be worth getting a few spare SD Cards if you think you will switch between setups regularly or become familiar with how to '''back up and restore''' your card.<br />
Reference needed - a good guide on how to backup and restore cards or software to do this easily<br />
<br />
==Backup your SD card==<br />
<br />
For Windows users the 'Raw HDD Copy Tool' from HDD Guru works well to backup and restore your SD card between projects.<br />
This can backup and restore the entire card sector by sector to/from an img file, and doesn't care which file system is on the card.<br />
<br />
[http://hddguru.com/software/HDD-Raw-Copy-Tool/ Raw HDD Copy Tool]<br />
<br />
Linux and Mac OS(X) users can use the [http://www.gnu.org/software/coreutils/manual/html_node/dd-invocation.html dd] tool that comes with most versions of Linux (including Raspbian) to save the contents of an SD card as an image file. Warning: be sure to use this tool carefully as accidentally choosing your hard drive as the output will destroy all data on it.<br />
<br />
Mac OSX users can use [http://sourceforge.net/projects/picloner/ PiCloner]. The PiCloner app is easy to use and will help you detect your SD card, back it up to an img file and is able to compress the img using GZIP to decrease backup size. PiCloner is Free Open Source Software (FOSS) released under a BSD License so it's '''Free''' as in; '''Free Beer'''!<br />
<br />
==Media Player==<br />
With this configuration you will typically have the Raspberry Pi connected to a TV or large monitor and a source of videos/music/photos etc you wish to play (i.e. Internet/hard-drive/local network etc).<br />
<br />
DesignSpark have written an article on this, which is worth a look, [http://www.designspark.com/content/raspberry-pi-goes-movies DesignSpark - Raspberry Pi goes to the movies]<br />
<br />
You can download an installer from www.raspbmc.com which will install to your desktop (IOS, Windows, Linux) and write the latest install to your SD card. You then boot your Pi with the card and go through the config steps. <br />
<br />
There is a breif video basic tutorial here: http://www.instructables.com/id/RaspberryPi-Media-center-XMBC/<br />
<br />
''Reference needed - More information is needed on specific configuration choices for raspbmc, although raspbmc.com does have a wiki.''<br />
<br />
==Play Games==<br />
While there are not any commercial games for the Raspberry Pi (yet) there are plenty ways to play games on it.<br />
<br />
Many distributions will have games built into them, and some may well support emulation of other platforms so you can run those games.<br />
<br />
Also, a lot of Raspberry Pi users will be writing simple games which will be available for others to enjoy (and if desired added to or modified).<br />
<br />
Reference needed - game section is empty at the moment!<br />
''See the [[RPi Games|Games Section]] for more details''<br />
<br />
<br />
==Introducing Young Children To Computers==<br />
Reference needed - some kid friendly and fun stuff!<br />
<br />
<br />
==Teaching==<br />
There is a huge number of groups, links and resources available within the [[RPi Education|Education]] section.<br />
Reference needed - links to the learning pages, education links and school/university groups<br />
<br />
<br />
==Learn To Program==<br />
There is a huge selection of [[RPi Programming|programming languages]] which you can use to write interesting programs, games, applications and utilities. There are also more great links within the [[RPi Education#Programming languages|Education]] section.<br />
<br />
There is a huge selection to choose from (not just Python...) which should suit any ability and a range of purposes.<br />
<br />
If you are new to programming, there are plenty of tutorials for getting started in the [[RPi Tutorials|Tutorials]] Section.<br />
<br />
Books about programming can be found in the [[RPi Programming Books|Books]] Section.<br />
<br />
In the latest Debian, Python (+Pygame) and MIT Scratch are pre-installed.<br />
<br />
* [http://www.youtube.com/user/RaspberryPiBeginners Raspberry Pi Beginners] (videos)<br />
* [http://www.youtube.com/user/RaspberryPiTutorials Raspberry Pi YouTube Tutorials] (videos)<br />
* [http://www.youtube.com/playlist?list=PLgyU3jNA6VjS3ij6ZXbb2x4GdEP3bAWzO My First Raspberry Pi Game] (videos)<br />
* [[RPi Tutorial Easy GPIO Hardware & Software|Easy GPIO Hardware & Software]] (videos) - in-progress at the moment<br />
<br />
Reference needed - links to the learning pages, recommended books?<br />
<br />
==Interface With Hardware==<br />
# [[RPi Interfacing with hardware|Interfacing with Arduino]]<br />
<br />
Reference needed - links to basic circuits tutorials and expansion boards<br />
<br />
==Word Processing/Internet Browsing etc==<br />
Yes, the Raspberry Pi can do the majority of the dull stuff too which other computers do.<br />
<br />
'''Debian''' currently comes with Midori installed for web browsing and word processing programs be installed rather easily.<br />
<br />
*Entering "sudo apt-get install chromium-browser" into a terminal will install Chromium which is generally a faster and more featured browser than Midori<br />
*Entering "sudo apt-get install openoffice.org" into a terminal will install OpenOffice.org, a free Microsoft Office-like application suite<br />
*Entering "sudo apt-get install abiword-common" into a terminal will install AbiWord, a lighter weight but still fully functional word processor<br />
*Entering "sudo apt-get install gnumeric" into a terminal will install Gnumeric, a lighter weight but still fully functional spreadsheet<br />
<br />
More information needed<br />
<br />
==Your Own Pet Project!==<br />
The sky is the limit really, with some time and effort any number of projects can be achieved.<br />
<br />
Even if you don't have the skill to do it yourself, you can join like minded people by getting involved with one of the numerous groups in the [[RPi Community|Community Section]], also within the [[RPi Education|Education]] pages or learn what you need in from the [[RPi Guides |Guides]] & [[RPi Tutorials |Tutorials]] sections.<br />
<br />
Of course, if you do anything interesting then please let us know in the [[RPi Projects |Projects]] section.<br />
<br />
=Living Without RPi=<br />
Even if you do not have any Raspberry Pi hardware there are a number things you can do to learn about linux, programming or even controlling hardware.<br />
<br />
==Using Linux==<br />
You can install a version of Linux on most computers, and many you will be able to "try out" Linux by using a "Live CD" - this will start your computer up running from a CD or DVD and run Linux (without installing anything to the computer itself).<br />
<br />
RacyPy - This is a simple LiveCD of Puppy Linux which includes some basic programming languages and a light-weight graphical user interface (GUI).<br />
<br />
You can get it from here:<br />
<br />
[http://teampython.wordpress.com/2012/03/03/while-you-wait-for-your-raspberry-pi-why-not-use-racypy2/ teampython RacyPy]<br />
<br />
==Trying Programming==<br />
Many of the programming languages you can use on the Raspberry Pi can be installed on a Windows or Mac machine. Just visit the websites of the languages you are interested in and see if they have an installer for your operating system.<br />
<br />
==Controlling Hardware==<br />
As discussed in the [[RPi Tutorial Easy GPIO Hardware & Software | Easy GPIO Hardware & Software]] tutorials, there are lots of alternative hardware you can use to experiment with (some as little as $5).<br />
<br />
=About This Page - For Contributors=<br />
<br />
The intention of this page is to provide a '''starting point''' for beginners and to '''direct them to''' the kind of information a person would need in order to start doing something useful or interesting with a Raspberry Pi.<br />
<br />
It is not intended to contain or replicate much of the information already available on-line or elsewhere in the wiki, however please create new wiki pages and link them here if there is information beginners will find useful (similarly any section which grows too much here, should be separated into new pages as and when needed)!<br />
<br />
At the moment building up ideas of content of typical things beginners will want to know and the kind of things they will want to do first.<br />
<br />
----<br />
<br />
<br />
<br />
=References= <br />
<references/><br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=271388RPi Easy SD Card Setup2013-07-15T20:59:18Z<p>Crazyskeggy: /* Using command line tools (1) */ Is in a "Mac" section, so no need for the (''Mac'') text</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use an SD Card slot in your computer (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
Where C:/flashnul/flashnul.exe is the location of the flashnul program; E: is the drive you want to overwrite, and C:/temp/distribution-name.img is the location of the .img file.<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=271382RPi Easy SD Card Setup2013-07-15T20:54:56Z<p>Crazyskeggy: /* Using flashnul (if Win32DiskImager isn't successful) */ Update Flashnul instructions</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use an SD Card slot in your computer (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
Where C:/flashnul/flashnul.exe is the location of the flashnul program; E: is the drive you want to overwrite, and C:/temp/distribution-name.img is the location of the .img file.<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* ('''Mac''') If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=271376RPi Easy SD Card Setup2013-07-15T20:48:41Z<p>Crazyskeggy: /* Using the Win32DiskImager program */ Made readability easier</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using an SD Card slot in your computer (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size once written - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
using the correct paths to the flashnul.exe program and the distribution-name.img file<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* ('''Mac''') If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=271370RPi Easy SD Card Setup2013-07-15T20:43:35Z<p>Crazyskeggy: /* Create your own */ Make it sound less bossy</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (although it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using the SD Card slot (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
using the correct paths to the flashnul.exe program and the distribution-name.img file<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* ('''Mac''') If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Easy_SD_Card_Setup&diff=271364RPi Easy SD Card Setup2013-07-15T20:41:06Z<p>Crazyskeggy: /* SD card setup */ Spelling correction</p>
<hr />
<div>[[Category: RaspberryPi]]<br />
{{Template:RPi_Startup}}<br />
<br />
=SD card setup=<br />
The Raspberry Pi will not start without a properly formatted SD Card, containing the bootloader and a suitable operating system. Many problems with booting the Pi are a result of an improperly formatted or corrupted card. Make sure that you insert the card before powering on the Pi, and that you shutdown the Pi before unplugging the card. If you do have problems booting the Pi, see the [[R-Pi_Troubleshooting | trouble shooting page]] first.<br />
<br />
You will also need to choose a distribution. Available distributions [[RPi_Distributions | are shown here]]; you will need the RPi bootloader to launch your distribution, so you need one for the Raspberry Pi and cannot download a PC based distribution and use that. Note that you can have several SD Cards with a separate distribution on each, then power off, swap cards and restart the Pi to use that card.<br />
<br />
Some Raspberry Pi kits will come with a ready-to-go card with the distribution pre-installed, or these can be bought separately. There is more on this below.<br />
<br />
If you don't have a pre-installed card you will need to prepare your own. Make sure you get a reasonable quality card rather than a cheap one. Check the [[RPi_SD_cards | SD Card list]] if you are not sure. Warning! When you write the Raspberry Pi image to your SD card you will lose all data that was on the card. Official images are available from http://www.raspberrypi.org/downloads.<br />
<br />
'''Note: It is highly recommended that you start with the latest official Raspbian distribution: check the Raspberry Pi official website (http://www.raspberrypi.org/downloads) for the current version. This includes the latest bug fixes and ensures you will not spend time dealing with problems that have already been fixed, or having to apply updates. Once you have tried the latest Raspbian build you can then move on to trying other operating systems if you so wish.'''<br />
<br />
= Safe / Easy way =<br />
Buying a preloaded SD card from a reputable supplier means that you can just plug it in and power up your Raspberry Pi; it should then just work. If you don't buy one of these, you will have to create your own using the instructions below<br />
<br />
You may need to perform an upgrade of the card once you have got the Pi working, as a distribution (usually) is continuously updated and the card may not contain those updates<br />
<br />
Compare these for prices, delivery, distribution and card size/class:<br />
<br />
*RS Components<br />
<br />
*Element14 (Farnell)<br />
<br />
*[http://thepihut.com/ The Pi Hut's Raspberry Pi Store] offer SD cards preloaded with either:<br />
**[http://thepihut.com/products/raspbian-preinstalled-sd-card Raspbian].<br />
**[http://thepihut.com/products/xbmc-preinstalled-sd-card OpenELEC XBMC].<br />
<br />
*[http://modmypi.com/ ModMyPi] Sell high quality Samsung SD cards pre-loaded with the latest Raspian Wheezy OS.<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-8gb-sd-card-pre-loaded-with-debian-linux-os 8GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-16gb-sd-card-pre-loaded-with-debian-linux-os 16GB Raspian Wheezy Pre-Loaded]<br />
**[https://www.modmypi.com/sd-cards-and-adaptors/samsung-32gb-sd-card-pre-loaded-with-debian-linux-os 32GB Raspian Wheezy Pre-Loaded]<br />
<br />
'''[http://www.raspberrypi.org/archives/3534 Public Service Announcement on SD Cards]'''. There have been reports of problems with SD cards purchased from ebay and Amazon. Make sure the SD card you're purchasing is up to date with the latest version of your chosen operating System to avoid any issues.<br />
<br />
= Create your own =<br />
To create your own SD Card for the Raspberry Pi you will need access to another machine, or a friend with one. You will need to be careful, as you could corrupt the disk on that machine if you do things wrong (it is not hard to do it right). If you are lucky, you might find a local Raspberry Pi or Linux group who will offer to load your card for you.<br />
<br />
You will also need to choose and download a distribution (already mentioned above). Check the [[RPi_Distributions | Distributions list]] to make sure that you are getting a distribution that will work with the Pi. '''Note that the distribution must be written to the card using the methods below; the standard file copy method will not work'''<br />
<br />
== Using Windows 7 or Windows XP ==<br />
<br />
=== Using the Win32DiskImager program ===<br />
<br />
# Download the distribution from the [http://www.raspberrypi.org/downloads raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
# Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
# Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
# Download the [http://sourceforge.net/projects/win32diskimager Win32DiskImager] utility (it is also a zip file). You can run this from a USB drive. [[File:Win32DiskImager.png|300px|right|frameless|Win32DiskImager screen]]<br />
# Extract the executable from the zip file and run the Win32DiskImager utility; you may need to run the utility as Administrator! Right-click on the file, and select 'Run as Administrator'<br />
# Select the image file you extracted above.<br />
# Select the drive letter of the SD card in the device box. '''Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer's hard disk!''' If you are using the SD Card slot (if you have one) and can't see the drive in the Win32DiskImager window, try using a cheap Adapter in a USB slot.<br />
# Click Write and wait for the write to complete.<br />
# Exit the imager and eject the SD card.<br />
# You are now ready to plug the card into your Raspberry Pi. See [[RPi_Hardware_Basic_Setup]] for the other things you need.<br />
''In Windows, the SD card will appear only to have a fairly small size - about 55 to 75 MB. This is because most of the card has a partition that is formatted for the Linux operating system that the Raspberry Pi uses which is not visible in Windows. If you don't see this small directory with files such as kernel.img then the copy may not have worked correctly.<br />
<br />
=== Using flashnul (if Win32DiskImager isn't successful) ===<br />
You may not be able to choose the device in Win32DiskImager on some notebooks so this is a different way to achieve the same thing on a Windows machine.<br />
<br />
* Download the distribution from the [http://www.raspberrypi.org/downloads | raspberrypi.org downloads page] or from a mirror or torrent. Make sure the distribution is for the Raspberry Pi, as others will not work. Usually these are zipped (compressed) files ending in .zip or .gz (something like "distribution-name.zip").<br />
* Extract the image file from the downloaded .zip file, so you now have "distribution-name.img".<br />
* Insert the SD card into your SD card reader and check what drive letter it was assigned. You can easily see the drive letter (for example G:) by looking in the left column of Windows Explorer. You can use the SD Card slot (if you have one) or a cheap Adapter in a USB slot.<br />
* Download the flashnul software from http://shounen.ru/soft/flashnul/ ; here is the English [http://translate.google.com/translate?u=http%3A%2F%2Fshounen.ru%2Fsoft%2Fflashnul%2F&hl=en&ie=UTF8&sl=ru&tl=en Translated version] with a link to instructions (also translated)<br />
* Download the latest version. At the time of writing it was flashnul-1rc1. <br />
* Extract the application from the archive. <br />
* Click Start button > All Programs > Accessories > Command Prompt, right click on it and Run as Administrator.<br />
* Run flashnul with argument "-p":<br />
C:/flashnul/flashnul.exe -p<br />
* Flashnul will tell you something like this (it should be different, as it depends on the drives on your machine):<br />
Available physical drives:<br />
0 size = 250059350016 (232 Gb)<br />
1 size = 1990197248 (1898 Mb)<br />
<br />
Available logical disks:<br />
C:\<br />
D:\<br />
E:\<br />
F:\<br />
<br />
Press ENTER to exit.<br />
* Use the Load option of flashnul to put the image file on the SD Card. '''Make sure that you use the correct drive letter for the SD Card as that drive will be overwritten!'''<br />
C:/flashnul/flashnul.exe E: -L C:/temp/distribution-name.img<br />
using the correct paths to the flashnul.exe program and the distribution-name.img file<br />
* Flashnul will give you a device summary and a caution message. Check the information to make sure you have selected the correct device, then type yes and press enter.<br />
* If you get an access denied error, make sure to close all explorer windows or folders open for the device, then try re-plugging the SD card.<br />
<br />
=== Using the Fedora Remix Installer ===<br />
Download the installer program from [http://zenit.senecac.on.ca/wiki/index.php/Raspberry_Pi_Fedora_Remix_Installation#SD_Card_Installation_Using_the_Installer Fedora ARM Installer]. This will download and install the Raspberry Pi Fedora Remix images, but it will also install other images if they are already downloaded and in uncompressed or .gz format. This also works with Linux.<br />
<br />
== Using Mac OSX ==<br />
'''Note:''' In OS X each disk may have two path references in /dev:<br />
* /dev/disk# is a buffered device, which means any data being sent undergoes extra processing. <br />
* /dev/'''r'''disk# is a ''raw'' path, which is much faster, and perfectly OK when using the dd program.<br />
On a Class 4 SD card the difference was around 20 times faster using the rdisk path. <br />
<br />
=== Run an App (Only with graphical interface) ===<br />
<br />
'''RPi-sd card builder'''<br />
The [http://alltheware.wordpress.com/2012/12/11/easiest-way-sd-card-setup/ RPi-sd card builder] utility is a app which will walk you through the process of installing to SD card. Note: This is a closed source app which requires your root password.<br />
<br />
'''PiWriter'''<br />
[http://sourceforge.net/projects/piwriter/ PiWriter] is a simple wizard made using shell scripts, PlatyPus and CocoaDialog. To prevent users from making mistakes the wizard auto-detect's the SD card you plan to use and prevents you from selecting your system disk. Also there is no need for a root password so even less damage can be done.<br />
'''Note: This app is open source (BSD license) so use, copy, spread and fork as you please ;)'''<br />
<br />
'''Pi Filler'''<br />
* [http://ivanx.com/raspberrypi Pi Filler] is a GUI wizard for copying a Raspberry Pi operating system image file to an SD card without needing Terminal. It automatically identfies your SD card (and asks for confirmation so the wrong disk doesn't get written to), and shows estimated time remaining during the copy. After it's done, if your Pi is not connected to a display, you can use [http://ivanx.com/raspberrypi Pi Finder] to connect to it from Terminal. Both utilities are written in AppleScript and won't trigger Mountain Lion's "unidentified developer" warnings (WTFPL license).<br />
<br />
=== Using system tools (mostly graphical interface) ===<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Extract the image by double clicking on the download file<br />
# Connect the SD card reader with the SD card inside; note: must be formatted in FAT32!<br />
# From the ''Apple () menu'', choose ''About This Mac'', then click on ''More info...''; if you are using Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion then click on ''System report''.<br />
# Click on ''USB'' (or ''Card Reader'' if using an in-built SD card reader) then search for your SD card in the upper right section of the window; click it, then search for ''BSD name'' in the lower right section: must be something like '''disk'''''n'' where ''n'' is a number (for example, disk4). Note this number<br />
# Unmount the partition so that you will be allowed to overwrite the disk by opening Disk Utility and unmounting it (do not eject it, or you have to reconnect it). Note: On Mac&nbsp;OS&nbsp;X 10.8.x Mountain Lion, "Verify Disk" (before unmounting) will display the BSD name as "''/dev/disk1s1"'' (or similar), allowing you to skip the previous two steps. <br />
# From the Terminal run:<br />
#* '''sudo dd if=''path_of_your_image.img'' of=/dev/disk''n'' bs=1m'''<br />
#* Remember to replace ''n'' with the number that you noted before!<br />
# Wait a LONG time! ''(or see the note above about using /dev/rdisk#...)''<br />
# You're done! Insert it in the Raspberry Pi, and have fun<br />
<br />
=== Using command line tools (1) ===<br />
* ('''Mac''') If you are comfortable with the command line, you can image a card without any additional software. Run:<br />
** diskutil list<br />
*** identify the disk (not partition) of your SD card. e.g. disk4 (not disk4s1)<br />
** diskutil unmountDisk /dev/<disk# from diskutil><br />
*** e.g. diskutil unmountDisk /dev/disk4<br />
** sudo dd bs=1m if=<your image file>.img of=/dev/<disk# from diskutil><br />
*** e.g. sudo dd bs=1m if=2012-12-16-wheezy-raspbian.img of=/dev/disk4<br />
*** (This will take a few minutes)<br />
<br />
=== Using command line tools (2) ===<br />
'''Note''': Some users have [http://www.raspberrypi.org/phpBB3/search.php?keywords=extra+files&t=8226&sf=msgonly reported issues] with using Mac&nbsp;OS&nbsp;X to create SD cards. <br />
#These commands and actions need to be performed from an account that has administrator privileges.<br />
# Download the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key is the same (optional), in the terminal run: <br />
#* '''shasum ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
# Extract the image:<br />
#* '''unzip ~/Downloads/2012-12-16-wheezy-raspbian.zip'''<br />
#* ''(or: just double click the zip, it will extract automatically)''<br />
# From the terminal run '''df -h'''<br />
# Connect the SD card reader with the SD card inside<br />
# Run '''df -h''' again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, '''/dev/disk3s1'''<br />
# Unmount the partition so that you will be allowed to overwrite the disk:<br />
#* '''sudo diskutil unmount /dev/disk3s1'''<br />
#* ''(or: open Disk Utility and unmount the partition of the SD card (do not eject it, or you have to reconnect it)<br />
# Using the device name of the partition work out the raw device name for the entire disk, by omitting the final "s1" and replacing "disk" with "rdisk" ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, rdisk3, not rdisk3s1. Similarly you might have another SD drive name/number like rdisk2 or rdisk4, etc. -- recheck by using the '''df -h''' command both before & after you insert your SD card reader into your Mac if you have any doubts!):<br />
#* For example, '''/dev/disk3s1''' => '''/dev/rdisk3'''<br />
# In the terminal write the image to the card with this command, using the raw disk device name from above (read '''carefully''' the above step, to be sure you use the correct rdisk# here!):<br />
#* '''sudo dd bs=1m if=~/Downloads/2012-10-28-wheezy-raspbian/2012-12-16-wheezy-raspbian.img of=/dev/rdisk3'''<br />
#* if the above command report an error(dd: bs: illegal numeric value), please change bs=1M to bs=1m<br />
#* (note that dd will not feedback any information until there is an error or it is finished, information will show and disk will re-mount when complete. However if you are curious as to the progresss - ctrl-T (SIGINFO, the status argument of your tty) will display some en-route statistics).<br />
# After the dd command finishes, eject the card:<br />
#* '''sudo diskutil eject /dev/rdisk3'''<br />
#* ''(or: open Disk Utility and eject the SD card)''<br />
# Insert it in the Raspberry Pi, and have fun<br />
<br />
* ('''Mac''') The [https://github.com/exaviorn/RasPiWrite RasPiWrite] utility is a python script which will walk you through the process of installing to SD card, it works with any Raspberry Pi compatible disk image, and can download one of the currently available distros if you don't have one.<br />
<br />
== Using Linux (including on a Pi!) ==<br />
<br />
=== Using ImageWriter (graphical interface) ===<br />
If you are using Ubuntu and hesitate to use the terminal, you can use the ImageWriter tool (nice graphical user interface) to write the .img file to the SD card.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Right click the zip file and select "Extract here"<br />
#* '''ATTENTION''': As of this writing (15 June 2012), there is a bug in the ImageWriter program that causes it to fail if the filename of the image file or its path (i.e. all the names of any parent folders that you extract the image file into) contain any space characters. Before going any further, ensure that neither the file name of the image you're using or the path contain any spaces (or other odd characters, for that matter). A bug has been opened for this issue: https://bugs.launchpad.net/usb-imagewriter/+bug/1013834 Once the issue is fixed, edit this page to advise people to use an updated/patched version of ImageWriter.<br />
# Insert the SD card into your computer or connect the SD card reader with the SD card inside<br />
# Install the ImageWriter tool from the Ubuntu Software Center<br />
# Launch the ImageWriter tool (it needs your administrative password)<br />
# Select the image file (example 2012-10-28-wheezy-raspbian.img) to be written to the SD card (note: because you started ImageWriter as administrator the starting point when selecting the image file is the administrator's home folder so you need to change to your own home folder to select the image file)<br />
# Select the target device to write the image to (your device will be something like "/dev/mmcblk0" or "/dev/sdc")<br />
# Click the "Write to device" button<br />
# Wait for the process to finish and then insert the SD card in the Raspberry Pi<br />
<br />
=== Using the Linux command line ===<br />
<br />
Please note that the use of the "dd" tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.<br />
<br />
# Download the zip file containing the image from a mirror or torrent<br />
#* http://www.raspberrypi.org/downloads<br />
# Verify if the the hash key of the zip file is the same as shown on the downloads page (optional). Assuming that you put the zip file in your home directory (~/), in the terminal run: <br />
#* '''sha1sum ~/2012-12-16-wheezy-raspbian.zip'''<br />
#* This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded<br />
# Extract the image, with<br />
#* '''unzip ~/2012-12-16-wheezy-raspbian.zip'''<br />
# Run '''df -h''' to see what devices are currently mounted<br />
# If your computer has a slot for SD cards, insert the card. If not, insert the card into an SD card reader, then connect the reader to your computer.<br />
# Run '''df -h''' again. The device that wasn't there last time is your SD card. The left column gives the device name of your SD card. It will be listed as something like "/dev/mmcblk0p1" or "/dev/sdd1". The last part ("p1" or "1" respectively) is the partition number, but you want to write to the whole SD card, not just one partition, so you need to remove that part from the name (getting for example "/dev/mmcblk0" or "/dev/sdd") as the device for the whole SD card. Note that the SD card can show up more than once in the output of df: in fact it will if you have previously written a Raspberry Pi image to this SD card, because the Raspberry Pi SD images have more than one partition. <br />
# Now that you've noted what the device name is, you need to unmount it so that files can't be read or written to the SD card while you are copying over the SD image. So run the command below, replacing "/dev/sdd1" with whatever your SD card's device name is (including the partition number)<br />
#* '''umount /dev/sdd1'''<br />
#* If your SD card shows up more than once in the output of df due to having multiple partitions on the SD card, you should unmount all of these partitions.<br />
# In the terminal write the image to the card with this command, making sure you replace the input file '''if=''' argument with the path to your .img file, and the "/dev/sdd" in the output file '''of=''' argument with the right device name ('''this is very important:''' you '''will''' lose all data on the hard drive on your computer if you get the wrong device name). Make sure the device name is the name of the whole SD card as described above, not just a partition of it (for example, sdd, not sdds1 or sddp1, or mmcblk0 not mmcblk0p1)<br />
#* '''dd bs=4M if=~/2012-12-16-wheezy-raspbian.img of=/dev/sdd'''<br />
#** Please note that block size set to 4M will work most of the time, if not, please try 1M, although 1M will take considerably longer.<br />
#* Note that if you are not logged in as root you will need to prefix this with '''sudo '''<br />
#* The dd command does not give any information of its progress and so may appear to have frozen. It could take more than five minutes to finish writing to the card. If your card reader has an LED it may blink during the write process. To forcibly stop the copy operation you can run '''pkill -USR1 -n -x dd''' in another terminal (prefixed with '''sudo''' if you are not logged in as root).<br />
# Instead of dd you can use dcfldd; it will give a progress report about how much has been written.<br />
# You can check what's written to the SD card by dd-ing from the card back to your harddisk to another image, and then running diff (or md5sum) on those two images. There should be no difference.<br />
# As root run the command '''sync''' or if a normal user run '''sudo sync''' (this will ensure the write cache is flushed and that it is safe to unmount your SD card)<br />
# Remove SD card from card reader, insert it in the Raspberry Pi, and have fun<br />
<br />
== Using any system and BerryBoot ==<br />
<br />
If your Pi is connected to the '''Internet''', you can use the [http://www.berryterminal.com/doku.php/berryboot BerryBoot installer] to let it download and install the operating system. This requires that you first use a normal Windows/Mac/Linux computer to download a small .zip file with the Berryboot system files and extract it to an empty SD card. Then you put the SD card in your Pi, and follow the on-screen prompts to complete the installation. An additional advantage is that Berryboot allows you to install more than one operating system on a single SD card. Also, it is not necessary to install any additional software on your normal Windows/Mac/Linux computer.<br />
<br />
= Other points =<br />
<br />
To write your SD card you start by downloading the SD image (the data you will write to the card). The best way to do this is using [http://en.wikipedia.org/wiki/BitTorrent_(protocol) BitTorrent]. This generally results in a faster download as it is a highly distributed system (you will be downloading the data from users who have previously downloaded it).<br />
<br />
= Manually resizing the SD card partitions (Optional) =<br />
The SD card image is sized for a 2&nbsp;GB card. So, if you are using an SD card with a greater capacity, you may find that only 2&nbsp;GB is available. If this is the case, then to gain more free space, the partitions must be resized. The Fedora Remix and the BerryBoot will automatically resize the partitions on the mounted card during the first boot. The Debian , OpenSuSe and Rasbian images won't, so you'll have to do it manually. The easiest way is to use the tool [[RPi raspi-config]] selecting menu item EXPAND-ROOTFS - Expand Root Partition to Fill SD Card. If you want to resize the SD card whilst the SD card is not mounted in the Pi, look [[RPi_Resize_Flash_Partitions|here]] for instructions.<br />
<br />
= Adding a data partition (Optional) =<br />
If you would rather not resize the partition on another machine as described above, either because you do not have another working Linux machine or you wish to keep your data on another partition to your operating system, you can instead create a new data partition and have that mount automatically at boot.<br />
<br />
*First you need to become root and install parted (I did all of this from the boot command prompt, although if you feel safer in a GUI, you can do all of this in a terminal window):<br />
sudo su -<br />
apt-get install parted<br />
*Then you need to run parted on your SD card, mine is /dev/mmcblk0, ymmv:<br />
parted /dev/mmcblk0<br />
*Once running, set the display units to something usable and then print your partition table<br />
unit chs<br />
print<br />
*You should see something like this:<br />
Model: SD SD08G (sd/mmc)<br />
Disk /dev/mmcblk0: 121279,3,31<br />
Sector size (logical/physical): 512B/512B<br />
BIOS cylinder,head,sector geometry: 121280,4,32. Each cylinder is 65.5kB.<br />
Partition Table: msdos<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
*Now you need to create your data partition - you need to choose one more than the end of partition 3 with ,0,0 as your start and use the number from the line that starts with Disk as your end:<br />
mkpart primary 29744,0,0 121279,3,31<br />
print<br />
*That should show your new partition:<br />
Number Start End Type File system Flags<br />
1 16,0,0 1215,3,31 primary fat32 lba<br />
2 1232,0,0 26671,3,31 primary ext4<br />
3 26688,0,0 29743,3,31 primary linux-swap(v1)<br />
4 29744,0,0 121279,3,31 primary<br />
*Now quit and format the partition (again, ymmv with the specific device name, try ls /dev for some clues), and then label it:<br />
quit<br />
mkfs.ext4 /dev/mmcblk0p4<br />
e2label /dev/mmcblk0p4 data<br />
*Now we need to make sure that the partition is mounted automatically when the system boots (maybe don't use vi if you never have before, try nano):<br />
vi /etc/fstab<br />
*Enter a line exactly like this at the end of the file and save and quit your text editor:<br />
/dev/mmcblk0p4 /data ext4 defaults 1 2<br />
*Create the mount point:<br />
mkdir /data<br />
*Now mount the partition:<br />
mount /data<br />
cd /data<br />
ls<br />
Your new partition has been created!<br />
<br />
=References= <br />
<references/><br />
<br />
== SD(DC|DX] Card Class 6 & 10 Hints ==<br />
<br />
[[http://elinux.org/index.php?title=RPiconfig&section=14|SD card usage Hints with OverClocking ]]<br />
<br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Hardware_Basic_Setup&diff=271358RPi Hardware Basic Setup2013-07-15T20:38:40Z<p>Crazyskeggy: /* Typical Hardware You Will Need */ Make the page easier to read</p>
<hr />
<div>{{Template:RPi_Startup}}<br />
<br />
= Typical Hardware You Will Need =<br />
You may have decided to buy a Raspberry Pi because you think it is great, it helps if you have an idea of what you want to do with it. You buy the board, but you will need some extra parts to be able to use it. Some of those parts you may have around so you can use them, some you might buy that others have given away or sold, and some you buy yourself. Consider what you buy; you might get very little benefit from an expensive item over a cheap one.<br />
<br />
The Raspberry Pi can be used in the conventional computer configuration, with a keyboard, mouse and display, or in a "headless" configuration where it is available on a network and is controlled from another computer on that network. You can add a range of additional peripherals to the Pi; the first section of this page covers setting up the Pi with the minimum number of peripherals to make sure that you can get it working. Additional peripherals are covered in the second section.<br />
<br />
{| border="1"<br />
! Item !! Conventional !! Headless !! Quick Link<br />
|-<br />
|[[RPi Buying Guide|Raspberry Pi board]]<br />
|Yes<br />
|Yes<br />
|[http://thepihut.com/collections/raspberry-pi-computer The Pi Hut]<br />
|-<br />
|[[#Power Supply|Power Supply]]<br />
|Yes<br />
|Yes<br />
|[http://thepihut.com/collections/power-supplies The Pi Hut]<br />
|-<br />
|[[#Prepared Operating System SD Card|SD Card + OS]]<br />
|Yes<br />
|Yes<br />
|[http://thepihut.com/collections/software The Pi Hut]<br />
|-<br />
|[[#Keyboard & Mouse|USB keyboard]]<br />
|Yes<br />
|No<br />
|[http://thepihut.com/collections/keyboards-mice The Pi Hut]<br />
|-<br />
|[[#Keyboard & Mouse|USB mouse]]<br />
|If using a GUI desktop<br />
|No<br />
|[http://thepihut.com/collections/keyboards-mice The Pi Hut]<br />
|-<br />
|[[#Display|Display]]<br />
|Yes<br />
|No<br />
|<br />
|-<br />
|[[#Cables|Display cable]]<br />
|Yes<br />
|No<br />
|[http://thepihut.com/collections/video-output The Pi Hut]<br />
|-<br />
|[[#Cables|Network cable]]<br />
|If network / internet<br />
|Not possible if Model A; Yes if not WiFi<br />
|[http://thepihut.com/collections/networking/products/2m-network-cable-for-the-raspberry-pi The Pi Hut]<br />
|-<br />
|[[#Network Connectivity|WiFi USB adapter]]<br />
|If network / internet<br />
|If model A, Yes; Yes if not cabled<br />
|[http://thepihut.com/collections/networking/products/usb-wifi-adapter-for-the-raspberry-pi The Pi Hut]<br />
|-<br />
|[[#USB Hub|Powered USB hub]]<br />
|If USB WiFi, complex keyboard or mouse<br />
|No<br />
|[http://thepihut.com/collections/hubs/products/7-port-usb-hub-for-the-raspberry-pi The Pi Hut]<br />
|-<br />
|[[#Another PC|Another PC / laptop, etc]]<br />
|No<br />
|Yes<br />
|<br />
|-<br />
|[[#Real Time Clock|Real-Time Clock module]]<br />
|If no network / internet<br />
|If no network / internet<br />
|<br />
|}<br />
<br />
<br />
'''IMPORTANT''' For USB devices other than a mouse and a simple wired keyboard (for USB devices drawing more than 100mA) a powered USB hub is strongly recommended. A technical discussion as to why can be found [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=24&t=5830 here]. Specifically the RPi's built in USB hub is designed only for "Single current unit" USB devices. Note that when using Revision 2 (or later) boards the problem has been mitigated somewhat with the removal of the USB polyfuses, still due to the limited current the PI can provide to USB devices, due to its main polyfuse, its still recommended to use a hub for all USB peripherals requiring more than 100mA.<br />
<br />
Other, optional equipment includes:<br />
<br />
* [[#Additional Peripherals|Case]]<br />
* [[#Additional Peripherals|SD card reader]] - if you need to prepare your own SD card<br />
* [[#Power Supply|Power Supply Switch]] - if you want an easy way to cycle power<br />
<br />
== Power Supply ==<br />
The unit uses a Micro USB connection to power itself (only the power pins are connected - so it will not transfer data over this connection). A standard modern phone charger with a micro-USB connector will do, but needs to produce at least 700mA at 5 volts. Check your power supply's ratings carefully, and [http://www.raspberrypi.org/forum/general-discussion/power-supply-warning beware cheap knock-offs!]. <br />
<br />
The Pi Hut offers a 5V 1500mA power supply, manufactured specially for the Raspberry Pi. This is available in three varieties :<br />
* [http://thepihut.com/products/micro-usb-power-supply-for-the-raspberry-pi UK]<br />
* [http://thepihut.com/products/eu-micro-usb-power-supply-for-the-raspberry-pi EU]<br />
* [http://thepihut.com/products/usa-micro-usb-power-supply-for-the-raspberry-pi USA]<br />
<br />
Other suitable mains adapters will be available from the [http://www.raspberrypi.com RPi Shop], as well as [http://www.ebay.co.uk/itm/330844162509 eBay]. [https://www.modmypi.com/raspberry-pi-accessories/5v-2A-modmypi-raspberry-pi-power-supply ModMyPi's Raspberry Pi Shop] stocks a 5V 2A bespoke charger designed specifically for use with the Raspberry Pi.<br />
<br />
You can use a range of other power sources (assuming they are able to provide enough current ~700mA):<br />
* Computer USB Port or powered USB hub (will depend on power output)<br />
* Special wall warts with USB ports<br />
* Mobile Phone Backup Battery (will depend on power output) (in theory - needs confirmation)<br />
* Modern TV with built-in USB (for example, it has been shown to work with the Sony KDL-40HX723 and KDL-55NX813)<br />
* Internet Routers with USB Ports (the BT Home Hub 3 seems to run the Pi nicely)<br />
<br />
To use the above, you'll need a USB A 'male' to USB micro 'male' cable - these are often shipped as data cables with mobile phones.<br />
<br />
===Power Switch===<br />
Additionally, the Raspberry Pi does not have the functionality of an on/off switch like traditionally seen on a PC. [http://www.pi-supply.com Pi Supply] have for sale an [http://www.pi-supply.com/product/pi-supply-raspberry-pi-power-switch/ add on board] that introduces this functionality, allowing you to easily manage power on your Raspberry Pi, without wearing out your back, or the micro-USB socket on the Pi. It also includes a safe shutdown switch to avoid corruption of your SD card.<br />
<br />
''For detailed information about power requirements see [[Rpi_Hardware#Power | RPi Hardware - Power]].''<br />
<br />
== Portable Battery Pack ==<br />
Want to use your Raspberry Pi on the go? Then you need a Portable Power Pack! The rechargeable battery pack allows you to use your Raspberry Pi anywhere. Available from The Pi Hut - [http://thepihut.com/products/portable-power-pack-for-the-raspberry-pi Portable Power Pack for the Raspberry Pi]<br />
<br />
== Prepared Operating System SD Card ==<br />
The RPi has no internal storage or built-in boot code, so it requires an SD-Card that is set up to boot the RPi and launch the Operating System. You should look at the [[RPi Easy SD Card Setup]] page for instructions about buying a preinstalled card or creating your own loaded SD Card.<br />
<br />
== Keyboard & Mouse ==<br />
Most standard USB keyboards and mice will work with the RPi. Wireless keyboard/mice should also function, and only require a single USB port for an RF dongle. In order to use a Bluetooth keyboard or mouse you would need to use a Bluetooth dongle, which again uses a single port.<br />
<br />
Remember that the Model A has a single USB port and the Model B only has two (typically a keyboard and mouse will use a USB port each) - see [[RPi_Hardware_Basic_Setup#USB-Hub | USB Hub]] below.<br />
<br />
''To check your mouse and keyboard are compatible with Linux, see [[RPi VerifiedPeripherals | RPi Verified Peripherals]].''<br />
<br />
== Display ==<br />
There are two connection options for the RPi display, ''HDMI'' (high definition) and ''Composite'' (low definition).<br />
<br />
* HD TVs and most LCD Monitors can be connected using a full-size 'male' HDMI cable, and with an inexpensive adaptor if DVI is used. HDMI versions 1.3 and 1.4 are supported, and a version 1.4 cable is recommended. The RPi outputs audio and video via HMDI, but does not support HDMI input.<br />
<br />
* Most older TVs can be connected using Composite (a yellow-to-yellow cable). PAL and NTSC TVs are supported. Note that the RCA output is composite video, not RF, so it cannot be connected directly to the antenna input of a TV, you need to connected it the the yellow video input connector, or to the SCART input using a RCA to SCART plug, (adapter).<br />
<br />
When using composite video, audio is available from a 3.5mm (1/8 inch) socket, and can be sent to your TV, or to an amplifier. To send audio to your TV, you will need a cable which adapts from 3.5mm to double (red and white) RCA connectors. These red and white can go into the red and white RCA plug inputs of a TV, or a stereo set, or to the above mentioned RCA to SCART plug. Another option for audio (when not using HDMI) is to connect the 3.5mm jackplug to an amplified speakerset. Do not connect the 3.5 mm jack directly to a headset, as the 3.5 mm audio output isn't suitable to drive headsets, only amplifier inputs. Attaching a low impedance load, (such as a headset) to the stereo audio output may lead to distorted sound.<br />
<br />
Using an HDMI to DVI-D (digital) adaptor plus a DVI to VGA adaptor will not work. HDMI does not supply the DVI-A (analogue) needed to convert to VGA - converting an HDMI or DVI-D source to VGA (or component) needs an active converter. (It can work out cheaper to buy a new monitor). Problems have been reported with converters if the power supply is not adequate and the converter is not powered from its own power supply.<br />
<br />
The Pi Hut offer two adapters that will allow the Raspberry Pi to be used with multiple monitor formats<br />
* [http://thepihut.com/products/1-8m-hdmi-cable Standard HDMI]<br />
* [http://thepihut.com/products/pi-view-official-raspberry-pi-hdmi-to-vga-convertor VGA adapter]<br />
* [http://thepihut.com/products/hdmi-to-dvi-cable-for-the-raspberry-pi DVI adapter]<br />
<br />
''For detailed information see [[Rpi Screens]].''<br />
<br />
== Cables ==<br />
You will probably need a number of cables in order to connect your RPi up.<br />
# Micro-B USB Power Cable (see above) [http://en.wikipedia.org/wiki/File:MicroB_USB_Plug.jpg picture]. This has to be a [[On the RPi usb power cable|high quality one]].<br />
# HDMI-A [http://en.wikipedia.org/wiki/File:HDMI.jpg picture] or Composite cable [http://en.wikipedia.org/wiki/File:Composite-video-cable.jpg picture], plus DVI adaptor [http://en.wikipedia.org/wiki/File:Adapter_dvi_hdmi_S7302224_wp.jpg picture] or SCART adaptor [http://en.wikipedia.org/wiki/File:Multiconnector-scart-chti.jpg picture] if required, to connect your RPi to the Display/Monitor/TV of your choice. <br />
# Audio cable [http://en.wikipedia.org/wiki/File:Audio-TRS-Mini-Plug.jpg picture], this is not needed if you use a HDMI TV/monitor.<br />
# Ethernet/LAN Cable (see below) [http://en.wikipedia.org/wiki/File:Ethernet_RJ45_connector_p1160054.jpg picture].<br />
<br />
The price you pay for an HDMI cable can very wildly and under most circumstances a low-cost cable from a reputable online or local supplier will be absolutely fine, but the definition of what constitutes 'low cost' can vary wildly - for example, in the UK, a 1m cable can be purchased for anything between £1 and £24.99. <br />
If, however, you want to drive a display some distance from the RPi (say greater than the ubiquitous 1.8m/6ft), or you are using a video switch to share a display between several devices, then higher quality cables might be wise - for example, a pair of 1m HDMI cables purchased in a UK 'pound shop' worked fine when directly connected between the RPi and a display, but would not give a stable picture when used via an HDMI switch. Replacing the £1 1m cable with a 1.5m cable bought online for £1.30 fixed the problem. <br />
For more insight: [http://www.techradar.com/news/video/why-you-dont-need-to-spend-more-than-2-on-an-hdmi-cable-1071343 Why you don't need to spend more than £2 on an HDMI cable]<br />
<br />
Fully tested cables are available from [http://www.pi-supply.com Pi Supply], [http://thepihut.com/collections/cables The Pi Hut's Raspberry Pi Store], and [https://www.modmypi.com/raspberry-pi-accessories ModMyPi's Raspberry Pi Shop] offers a range of High Quality coloured 'Noodle' cables.<br />
<br />
== Network / Internet Connectivity ==<br />
<br />
This may be an Ethernet/LAN cable (standard RJ45 connector) or a USB WiFi adaptor. The RPi ethernet port is auto-sensing which means that it may be connected to a router or directly to another computer (without the need for a crossover cable<ref name=autoMDIX>[http://en.wikipedia.org/wiki/Medium_dependent_interface#Auto-MDIX Wikipedia:Auto-MDIX]</ref>).<br />
<br />
''Support for USB WiFi adaptors will vary - see [[RPi VerifiedPeripherals | RPi Verified Peripherals]].''<br />
<br />
Note: If a Netgear router has a blank in the fourth box of the subnet mask, raspbian will interpret that as a 255, not as a '0' like Ubuntu. This will give you a subnet mask of 255.255.255.255 and a useless network connection. Changing the router's setting to put a '0' in the last field and reinitializing the network will fix this.<br />
<br />
== USB-Hub ==<br />
In order to connect additional devices to the RPi, you may want to obtain a USB Hub, which will allow multiple devices to be used.<br />
<br />
It is recommended that a '''powered''' hub is used - this will provide any additional power to the devices without affecting the RPi itself. The USB ports are fused at about 140ma each without an additional external power source. This not enough to power a hard drive, and you may even have trouble powering wireless adapters and other peripherals. There is enough current out there, however, for mice and most keyboards. (see [[Rpi_Hardware#Power | RPi Hardware - Power]] section).<br />
<br />
USB version 2.0 is recommended. USB version 1.1 is fine for keyboards and mice, but may not be fast enough for other accessories.<br />
<br />
== Real Time Clock ==<br />
Laptops and computers keep time when the power is off by using a pre-installed, battery powered 'Real Time Clock' (RTC). However, this Real Time Clock module is not included with the Raspberry Pi. To keep time, the Raspberry Pi updates the date and time automatically over the internet via Ethernet or WiFi. For projects which have no internet connection, you may want to add a low cost battery powered RTC to help your Pi keep time!<br />
<br />
Afterthought Software have released a 'Plug and Play' Real Time Clock designed specifically for the Raspberry Pi which, unlike other RTC's available, plugs directly in to the Raspberry Pi's GPIO Ports. The unit is available from [https://www.modmypi.com/raspberry-pi-expansion-boards/rasclock-raspberry-pi-real-time-clock-module ModMyPi] and comes complete with an easy to follow [https://www.modmypi.com/blog/installing-the-rasclock-raspberry-pi-real-time-clock Installation Guide].<br />
<br />
== Another PC ==<br />
If you need to install the Operating System on your own SD Card you will need another PC, Laptop or Mac to do so (or get a friend or local group to do it for you). If you are running headless, you also need one, though for a lot of uses (but not all) you can use a tablet or smart phone. This does include another Pi!<br />
<br />
= Connecting Together =<br />
<br />
[[File:Raspi-Model-AB-Mono-1-699x1024.png|200px|thumb|right|A diagram denoting the places of the different components on the Rpi, made by Paul Beech. Click to enlarge.]]<br />
You can use the diagram to connect everything together using the following instructions:<br />
<br />
# Plug the SD Card loaded with the Operating System into the Pi.<br />
# If required, plug the USB keyboard and mouse into the Pi, perhaps via a USB Hub. Connect the Hub to power, if necessary.<br />
# If required, plug the video cable into the display and into the Pi.<br />
# Plug in your Network cable, or WiFi dongle, if required.<br />
# Ensure that your USB Hub (if any) and display are working.<br />
# With your screen on, plug the other end of the power source into the Pi.<br />
# Plug the power source into the main socket, and switch it on.<br />
# If connected to a display, the Pi should boot up and display messages on the screen.<br />
# If running headless, it should boot up. When the leds have stopped flashing, connect to the Pi from the remote computer. Whether this works will depend on the operating system you are using; the Raspian Linux operating system is configured to allow SSH connections by default.<br />
<br />
It is always recommended to connect the MicroUSB Power to the unit last (while most connections can be made live, it is best practice to connect items such as displays and other connections with the power turned off). <br />
<br />
If you use both a R-PI power supply and a powered hub, its recommended you connect them to the same switched power bar, and use the switch on the power bar to switch off both the R-PI and hub at the exact same time. <br />
<br />
Also, always shutdown using the software shutdown function, not by pulling the plug. When not using a GUI, (with a GUI use the GUI command) you can use the command "sudo halt", and power off when all the LED's on the board (except the power LED) go off. This is especially important the first time you boot, as in the process the R-PI modifies the content of the SD-card, without a clean shutdown the contents of the card may be damaged.<br />
<br />
The RPi may take a long time to boot when powered-on for the first time, so be patient, and cleanly shutdown afterwards, as described above!<br />
<br />
= Additional Peripherals =<br />
You may decide you want to use various other devices with your RPi, such as Flash Drives/Portable Hard Drives, Speakers etc.<br />
<br />
''For detailed information see [[RPi VerifiedPeripherals | RPi Verified Peripherals]].''<br />
<br />
== Heatsink ==<br />
Not a vital accessory for your RPi, but will help to reduce the CPU's temperature whilst under load. Available from [http://thepihut.com/collections/heatsinks The Pi Hut's Raspberry Pi Store], [http://www.etsy.com/shop/nhslzt Etsy], [https://www.modmypi.com/shop/raspberry-pi-heat-sink-kit ModMyPi] (with lots of tips and tricks for reducing temperature in the reviews) or [http://www.ebay.co.uk/itm/330758220781 eBay]<br />
<br />
== Case ==<br />
Since the RPi is supplied without a case, it will be important to ensure that you do not use it in places where it will come into contact with conductive metal or liquids, unless suitably protected. Some form of [[Rpi Cases | case]] should be considered, and there is a [http://www.raspberrypi.org/forum/general-discussion/cases-for-the-raspberry-pi Rpi case thread] on the forum. Cases are also available from [http://thepihut.com/collections/cases The Pi Hut's Raspberry Pi Store],[https://www.modmypi.com/raspberry-pi-cases ModMyPi's Raspberry Pi Shop] and [http://store.mobileappsystems.com MobileApp Systems].<br />
<br />
''For detailed information see [[Rpi Cases]].''<br />
<br />
== SD card reader ==<br />
You may need an SD card reader to prepare an SD card, or read a second one, both for the Pi or the other computer if it does not have an integral SD card reader.<br />
<br />
[https://www.modmypi.com/raspberry-pi-accessories/plexus-single-slot-usb2.0-card-reader ModMyPi's Raspberry Pi Shop] stocks a low cost (99p) SD Card Reader.<br />
<br />
== Expansion & Low Level Peripherals ==<br />
If you plan on making use of the low level interfaces available on the RPi, then ensure you have suitable header pins for the GPIO (and if required JTAG) suitable for your needs.<br />
<br />
Also if you have a particular low-level project in mind, then ensure you design in suitable protection circuits to keep your RPi safe (details will be made available within the [[RaspberryPiBoardProjects | RPi Projects, Guides & Tutorials]] section).<br />
<br />
''For detailed information see [[Rpi Low-level peripherals | Rpi Low-level Peripherals]].''<br />
<br />
= External Links =<br />
<br />
For a verbose guide aimed at absolute beginners, see [http://h2g2.com/A13413584 Peripherals You'll Need] and [http://h2g2.com/A9143796 Getting Started] in h2g2's 'Introducing the Raspberry Pi'.<br />
<br />
For a cautionary tale of '7 gotchas' to be on the lookout for (especially concerning the re-use of old monitors, keyboards, etc), see [http://www.keyboardmaven.com/2013/04/raspberry-pi-gotchas-and-newbiebuyer.html Raspbery Pi 'Gotchas' and new buyer tips]<br />
<br />
= References =<br />
<references/><br />
{{Template:Raspberry Pi}}<br />
[[Category:RaspberryPi]]</div>Crazyskeggyhttps://elinux.org/index.php?title=User:Crazyskeggy&diff=269048User:Crazyskeggy2013-07-07T20:42:33Z<p>Crazyskeggy: </p>
<hr />
<div>Hi!<br />
<br />
I'm on here to try and help make the Raspberry Pi section easier to understand for non-techies to understand.<br />
<br />
Feel free to contact me via my [User talk:Crazyskeggy|talk page]<br />
<br />
[[User:Crazyskeggy|Crazyskeggy]] ([[User talk:Crazyskeggy|talk]]) 20:42, 7 July 2013 (UTC)</div>Crazyskeggyhttps://elinux.org/index.php?title=Talk:Add_software_to_Raspberry_Pi&diff=269042Talk:Add software to Raspberry Pi2013-07-07T20:35:13Z<p>Crazyskeggy: /* Rename? */ new section</p>
<hr />
<div>== Rename? ==<br />
<br />
Wouldn't a better name be RPi Add Software, to keep in line with other pages<br />
<br />
[[User:Crazyskeggy|Crazyskeggy]] ([[User talk:Crazyskeggy|talk]]) 20:35, 7 July 2013 (UTC)</div>Crazyskeggyhttps://elinux.org/index.php?title=Category:RaspberryPi&diff=269036Category:RaspberryPi2013-07-07T20:19:04Z<p>Crazyskeggy: Make "RaspberryPI" two words</p>
<hr />
<div>[[Category:Categories]]<br />
[[Category:Linux]]<br />
[[Category:Development Boards]]<br />
[[Category:Education]]<br />
[[Category:BCM2835]]<br />
<br />
Contains [[RPi_Hub|Raspberry Pi]] device related articles. See also related categories listed below. <br><br />
'''Please re-apply this category on orphaned / old pages - use the special pages link (on the left) .'''</div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Remote_Access&diff=269030RPi Remote Access2013-07-07T20:09:19Z<p>Crazyskeggy: /* Remote Access to the Raspberry Pi */ Correct statement to show that it applies to all images, not just Debian</p>
<hr />
<div>[[Category:RaspberryPi]] <br />
Back to [http://elinux.org/RPi_Beginners Beginners Page]<br />
= Remote Access to the Raspberry Pi =<br />
A default install of a Rpi will probably have an ssh daemon running. This means that the board is listening on port 22 for a remote host asking for a connection. You can run a command line, file transfer or GUI over a port 22 connection to the Rpi.<br />
<br />
== Initial Setup ==<br />
Prior to your initial remote access it is recommended that you generate unique host public/private keys with the following command<ref> [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=6&t=4999] ryan29 on 20 Apr 2012 highlighted the reusage of private keys; accessed 7 Jul 2012 </ref><br />
sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server<br />
<br />
You can execute these commands after having logged in remotely, and if executed while logged in from a remote client you will not be disconnected mid-session. However, after you generate unique you will need to clean up your client's known_hosts. <ref >http://www.cyberciti.biz/faq/howto-regenerate-openssh-host-keys, see step 3 - Accessed 6 Jul 2012 </ref><br />
<br />
This extra command (and subsequent follow up to update the cached public key on all clients who've already remotely connected to your Raspberry Pi) may seem like a hassle, but without doing this you leave yourself wide open to a man-in-the-middle attack because your "private" host ID keys are widely available to anyone who has downloaded the same SD card image as you.<br />
<br />
=Running a remote CLI=<br />
You need to have a SSH client program. Linux and Mac OS X already have this installed, for Windows get [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty] or an alternative.<br />
<br />
In order for this to work you must have port 22 open between you and the Pi. You must also have set up a user on the Raspberry PI to use. (see [http://elinux.org/RPi_Beginners Beinners Guide] or CLI page for how to do this).<br />
<br />
===Linux and Mac OS X===<br />
<br />
ssh <ip address of your Rpi> -l <username of RPi user you set up previously><br />
<br />
Here is a record of what happens with me<br />
<br />
[brian@fc16toshiba ~]$ ssh -X 192.168.1.104 -l brian<br />
The authenticity of host '192.168.1.104 (192.168.1.104)' can't be established.<br />
RSA key fingerprint is 26:a4:a1:ab:c2:ff:50:99:d7:e1:49:6e:f2:90:fb:90.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added '192.168.1.104' (RSA) to the list of known hosts.<br />
brian@192.168.1.104's password: <br />
Linux raspberrypi 3.1.9+ #9 Mon Apr 9 20:50:36 BST 2012 armv6l<br />
<br />
The programs included with the Debian GNU/Linux system are free software;<br />
the exact distribution terms for each program are described in the<br />
individual files in /usr/share/doc/*/copyright.<br />
<br />
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />
permitted by applicable law.<br />
<br />
brian@raspberrypi:~$<br />
<br />
<br />
At this point you are running everything you type on the Rpi.<br />
<br />
===Windows (with Putty)===<br />
<br />
First you need to download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty].<br />
<br />
====Create a Profile====<br />
<br />
I recommend to create a profile for your connection so you don't need to configure it every time you want to start it. <br />
Start Putty and type in the ''Host Name (or IP address)'' field the Raspberry PI's IP address (usually something like 192.168.0.xxx, use "ip address show"). <br />
If not already set, enter 22 as ''Port'' and select SSH as ''Protocol''. <br />
Go to ''Connection'' -> ''Data'' and type your Raspberry PI's username under ''Auto-Login username''. <br />
Now your profile is complete, you can save it under ''Session'' by typing a name for your profile under ''Saved Sessions'' and clicking on the ''Save'' button. <br />
<br />
====Establish a connection====<br />
<br />
To establish a connection to your Raspberry PI simply click on ''Open''. If you can't etablish a connection make sure the SSH daemon is running on your Raspberry PI. For more information check the [http://elinux.org/RPi_Advanced_Setup#Setting_up_for_remote_access_.2F_headless_operation Advanced Setup].<br />
<br />
Usually you will get a security warning, you can simply click on ''yes''. <br />
<br />
====More information====<br />
<br />
Here is an excellent guide for setting up an SSH connection with Putty:<br />
http://www.howtoforge.com/ssh_key_based_logins_putty<br />
<br />
=Running a remote GUI=<br />
<br />
To do this, you need an X server on your machine. There is a free one available for Windows and Mac. <br />
<br />
Two Xservers for Windows are [http://www.cygwin.com/ Cygwin] (which has a lot more besides) and [http://www.straightrunning.com/XmingNotes/ XMing] <br />
<br />
For a Mac, either install [http://www.gimp.org/ Gimp] for Lion 10.7 or earlier or install X11 from [http://xquartz.macosforge.org XQuartz]<br />
<br />
Linux has one built in. <br />
<br />
The command uses the X switch to tell ssh to send the X commands to the X server on your host.<br />
ssh -X <ip address of Rpi> -l <username on Rpi><br />
<br />
In case you are connecting from a Windows machine using Putty then you should enable X11 forwarding, this option can be found navigating the configuration tree through Connection/SSH/X11.<br />
<br />
'''cannot open display: localhost:10.0'''<br />
<br />
if RPi is left idle one needs to reboot to launch new applications that use X11.<br />
The ones already displayed work fine.<br />
<br />
A fix and workarounds are of interest.<br />
<br />
'''What is an Xserver?'''<br />
<br />
A 'nix box running a GUI is almost certainly running "X" and also an X Server. The X sends commands to the X Server about what kind of things to put on the screen and the X server does it. This means that the GUI and the X server are separate. This also means that you can run a program on the Rpi and have all the graphical bit appear on the screen of the X Server somewhere else on the network. This removes a large amount of processor demand from the Rpi as well as meaning that you just need to plug the Rpi into your network and you need not plug in usb devices and hdmi as well.<br />
<br />
Here is a record of what happens with me when I run the command. Log in and then run "midori" which is the browser on this Rpi. (The "&" means that the "midori" is launched as a separate process so you get your cli back).<br />
<br />
[brian@fc16toshiba ~]$ ssh -X 192.168.1.104 -l brian<br />
brian@192.168.1.104's password: <br />
Linux raspberrypi 3.1.9+ #9 Mon Apr 9 20:50:36 BST 2012 armv6l<br />
<br />
The programs included with the Debian GNU/Linux system are free software;<br />
the exact distribution terms for each program are described in the<br />
individual files in /usr/share/doc/*/copyright.<br />
<br />
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />
permitted by applicable law.<br />
Last login: Wed May 30 09:29:57 2012 from fc16toshiba.local<br />
brian@raspberrypi:~$ midori &<br />
[1] 5773<br />
<br />
Sometimes you will get gtk errors which report library shortcomings on host (the Rpi) or server (Your X server) but the process is pretty robust.<br />
<br />
<br />
[[File:Ssh-X-midori.png|400px|thumb|c|center|Midori running in Remote Gnome 3 X Server]]<br />
<br />
= References =<br />
<references/></div>Crazyskeggyhttps://elinux.org/index.php?title=RPi_Remote_Access&diff=268994RPi Remote Access2013-07-07T16:10:42Z<p>Crazyskeggy: /* Initial Setup */ Adding sudo to the private key reset commands</p>
<hr />
<div>[[Category:RaspberryPi]] <br />
Back to [http://elinux.org/RPi_Beginners Beginners Page]<br />
= Remote Access to the Raspberry Pi =<br />
A default install of a Rpi will probably have an ssh daemon running. This means that the board is listening on port 22 for a remote host asking for a connection. You can run a command line, file transfer or GUI over a port 22 connection to the Rpi.<br />
<br />
== Initial Setup ==<br />
Prior to your initial remote access it is recommended that you generate unique host public/private keys with the following command<ref> [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=6&t=4999] ryan29 on 20 Apr 2012 highlighted the reusage of private keys; accessed 7 Jul 2012 </ref><br />
sudo rm /etc/ssh/ssh_host_* && sudo dpkg-reconfigure openssh-server<br />
<br />
You can execute these commands after having logged in remotely, and if executed while logged in from a remote client you will not be disconnected mid-session. However, after you generate unique you will need to clean up your client's known_hosts. <ref >http://www.cyberciti.biz/faq/howto-regenerate-openssh-host-keys, see step 3 - Accessed 6 Jul 2012 </ref><br />
<br />
This extra command (and subsequent follow up to update the cached public key on all clients who've already remotely connected to your Raspberry Pi) may seem like a hassle, but without doing this you leave yourself wide open to a man-in-the-middle attack because your "private" host ID keys are widely available to anyone who has downloaded the Debian SD card image.<br />
<br />
=Running a remote CLI=<br />
You need to have a SSH client program. Linux and Mac OS X already have this installed, for Windows get [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty] or an alternative.<br />
<br />
In order for this to work you must have port 22 open between you and the Pi. You must also have set up a user on the Raspberry PI to use. (see [http://elinux.org/RPi_Beginners Beinners Guide] or CLI page for how to do this).<br />
<br />
===Linux and Mac OS X===<br />
<br />
ssh <ip address of your Rpi> -l <username of RPi user you set up previously><br />
<br />
Here is a record of what happens with me<br />
<br />
[brian@fc16toshiba ~]$ ssh -X 192.168.1.104 -l brian<br />
The authenticity of host '192.168.1.104 (192.168.1.104)' can't be established.<br />
RSA key fingerprint is 26:a4:a1:ab:c2:ff:50:99:d7:e1:49:6e:f2:90:fb:90.<br />
Are you sure you want to continue connecting (yes/no)? yes<br />
Warning: Permanently added '192.168.1.104' (RSA) to the list of known hosts.<br />
brian@192.168.1.104's password: <br />
Linux raspberrypi 3.1.9+ #9 Mon Apr 9 20:50:36 BST 2012 armv6l<br />
<br />
The programs included with the Debian GNU/Linux system are free software;<br />
the exact distribution terms for each program are described in the<br />
individual files in /usr/share/doc/*/copyright.<br />
<br />
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />
permitted by applicable law.<br />
<br />
brian@raspberrypi:~$<br />
<br />
<br />
At this point you are running everything you type on the Rpi.<br />
<br />
===Windows (with Putty)===<br />
<br />
First you need to download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty].<br />
<br />
====Create a Profile====<br />
<br />
I recommend to create a profile for your connection so you don't need to configure it every time you want to start it. <br />
Start Putty and type in the ''Host Name (or IP address)'' field the Raspberry PI's IP address (usually something like 192.168.0.xxx, use "ip address show"). <br />
If not already set, enter 22 as ''Port'' and select SSH as ''Protocol''. <br />
Go to ''Connection'' -> ''Data'' and type your Raspberry PI's username under ''Auto-Login username''. <br />
Now your profile is complete, you can save it under ''Session'' by typing a name for your profile under ''Saved Sessions'' and clicking on the ''Save'' button. <br />
<br />
====Establish a connection====<br />
<br />
To establish a connection to your Raspberry PI simply click on ''Open''. If you can't etablish a connection make sure the SSH daemon is running on your Raspberry PI. For more information check the [http://elinux.org/RPi_Advanced_Setup#Setting_up_for_remote_access_.2F_headless_operation Advanced Setup].<br />
<br />
Usually you will get a security warning, you can simply click on ''yes''. <br />
<br />
====More information====<br />
<br />
Here is an excellent guide for setting up an SSH connection with Putty:<br />
http://www.howtoforge.com/ssh_key_based_logins_putty<br />
<br />
=Running a remote GUI=<br />
<br />
To do this, you need an X server on your machine. There is a free one available for Windows and Mac. <br />
<br />
Two Xservers for Windows are [http://www.cygwin.com/ Cygwin] (which has a lot more besides) and [http://www.straightrunning.com/XmingNotes/ XMing] <br />
<br />
For a Mac, either install [http://www.gimp.org/ Gimp] for Lion 10.7 or earlier or install X11 from [http://xquartz.macosforge.org XQuartz]<br />
<br />
Linux has one built in. <br />
<br />
The command uses the X switch to tell ssh to send the X commands to the X server on your host.<br />
ssh -X <ip address of Rpi> -l <username on Rpi><br />
<br />
In case you are connecting from a Windows machine using Putty then you should enable X11 forwarding, this option can be found navigating the configuration tree through Connection/SSH/X11.<br />
<br />
'''cannot open display: localhost:10.0'''<br />
<br />
if RPi is left idle one needs to reboot to launch new applications that use X11.<br />
The ones already displayed work fine.<br />
<br />
A fix and workarounds are of interest.<br />
<br />
'''What is an Xserver?'''<br />
<br />
A 'nix box running a GUI is almost certainly running "X" and also an X Server. The X sends commands to the X Server about what kind of things to put on the screen and the X server does it. This means that the GUI and the X server are separate. This also means that you can run a program on the Rpi and have all the graphical bit appear on the screen of the X Server somewhere else on the network. This removes a large amount of processor demand from the Rpi as well as meaning that you just need to plug the Rpi into your network and you need not plug in usb devices and hdmi as well.<br />
<br />
Here is a record of what happens with me when I run the command. Log in and then run "midori" which is the browser on this Rpi. (The "&" means that the "midori" is launched as a separate process so you get your cli back).<br />
<br />
[brian@fc16toshiba ~]$ ssh -X 192.168.1.104 -l brian<br />
brian@192.168.1.104's password: <br />
Linux raspberrypi 3.1.9+ #9 Mon Apr 9 20:50:36 BST 2012 armv6l<br />
<br />
The programs included with the Debian GNU/Linux system are free software;<br />
the exact distribution terms for each program are described in the<br />
individual files in /usr/share/doc/*/copyright.<br />
<br />
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent<br />
permitted by applicable law.<br />
Last login: Wed May 30 09:29:57 2012 from fc16toshiba.local<br />
brian@raspberrypi:~$ midori &<br />
[1] 5773<br />
<br />
Sometimes you will get gtk errors which report library shortcomings on host (the Rpi) or server (Your X server) but the process is pretty robust.<br />
<br />
<br />
[[File:Ssh-X-midori.png|400px|thumb|c|center|Midori running in Remote Gnome 3 X Server]]<br />
<br />
= References =<br />
<references/></div>Crazyskeggyhttps://elinux.org/index.php?title=User_talk:Crazyskeggy&diff=268988User talk:Crazyskeggy2013-07-07T15:52:13Z<p>Crazyskeggy: </p>
<hr />
<div>'''Welcome to ''eLinux.org''!'''<br />
We hope you will contribute much and well.<br />
You will probably want to read the [[Help:Contents|help pages]].<br />
Again, welcome and have fun! [[User:Wmat|Wmat]] ([[User talk:Wmat|talk]]) 15:37, 7 July 2013 (UTC)<br />
<br />
Thanks!<br />
[[User:Crazyskeggy|Crazyskeggy]] ([[User talk:Crazyskeggy|talk]]) 15:52, 7 July 2013 (UTC)</div>Crazyskeggy