Raspberry Pi Setup
I ordered a RaspberryPi last week and it arrived yesterday. Let hacking begin!
If you don’t know, a Raspberry Pi is a $25 credit-card sized ARM-based GNU/Linux computer that sports an HDMI port, a 10/100 Ethernet port, a 3.5MM audio jack, a component video port, two USB ports and an SD Card slot for SD/SDHC cards. There is no onboard storage so the only way to run the Pi with an OS is to cluster is, or install an SD card into it with a preloaded OS like Raspbian.
I love my Raspberry Pi and cannot believe I haven’t ordered one sooner. I was fortunate enought to order mine just after the switchover from the Model A to the Model B versions. The difference between the two is the internal memory was changed from 256mb to 512mb. This is huge for hackers and users and the foundation was able to keep the cost the same, which is a big plus. The only downsides I’ve come across so far are the fact that I can’t run x86 programs (Dropbox cli) and that running and external HDD/SSD off the USB ports is challenging. The ARM/x86 issue is by architectural design of the SoC so I can’t complain about that, but the power to USB ports is a bit of an issue with me. I have a spare 64GB Kingston SSD I’d like to use on this RPi because it is silent and the SSD is just collecting dust.
While image is downloading (~238mb), setup RPi (HDMI, power, ethernet, keyboard)
Prepare SD Card - Disk Utility > Format the respective disk with MS-DOS (FAT32)
Install to SD card
- Unzip the image
- CD to image folder
- Identify the SD Card
- Unmount SD card
sudo diskutil unmount /dev/disk1s1
- Install image to SD card
sudo dd bs=1m if=2012-10-28-wheezy-raspbian.img of=/dev/rdisk1or whichever the SD card is
- This process completes, without errors, after a few minutes. If there are errors after it completes, start over.
After install, pop SD card into SD Card slot in the Pi and plug in the power adapter
Follow this guide (I’m too lazy to redo it) and enter your respective locale settings when prompted
Update and upgrade the packages already installed on Raspbian. This will take care of 3 things: updating the apt-cache, upgrading the packages, then rebooting once that is all done
sudo apt-get update && sudo apt-get upgrade && sudo apt-get reboot
Once updated, grab Hexxeh’s update tool for the RPi from Github. The second command is optional, you should install if you get errors about certificates. Basic instructions are:
sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && sudo chmod +x /usr/bin/rpi-update sudo apt-get install git-core binutils ca-certificates sudo rpi-update
You now have an awesome, cheap, functioning computer at your fingers for hacking! You can stop here and go do your own thing, or you can continue and customize your RPi to suit your needs
If you plan on using your RPi as a headless webserver, you should change the gpu_mem option in
- Add/edit the line
- Add/edit the line
If you are annoyed like I am of the constant SSH disconnections, set the timeout for an hour
- Add/Edit the line
ddclientand setup with your dynamic IP host so that you can host your RPi from wherever you are
sudo apt-get install ddclient
- Once installed setup window opens and asks what service you use. In my case www.dyn.com
- Enter your Dyn.com user, then password
- Either select your hosts from the list, or input manually (list is easiest, manual if you are working offline)
ddclientwill continue to install and complete, provided no errors occurred.
- Check Dyn.com My Services page to see if IP has updated
- Broken Pipe error message with SSH
- Bash script that adds a Raspberry Pi logo to your login
- Turn your RPi into a webserver
- Setup Dynamic IP
- Change GPU split for headless SSH/webserver
- Set SSH timeout to an hour
- Add apt-add-repository for Debian
- Locale issue ~http://hexample.com/2012/02/05/fixing-locale-problem-debian/~ Dead link
I want to hear from you, dear reader 😄
If you enjoyed this content, please let me know on Twitter.