Jun
30
2012

Installing Raspberry Pi with XBMC for a Windows Network (SMB) using RaspBMC

This very short guide is designed to be a single point of reference for installing the excellent RaspBMC product on the Raspberry Pi and enabling it for connecting to a Windows network.

There are a few things you’re going to be needing for this tutorial: -

  • Raspberry Pi (Check out www.raspberrypi.org for official sources or  ebay.co.uk / ebay.com if you’re feeling brave and willing to spend some more cash)
  • A compatible SD memory card and a way of connecting it to your PC
  • A compatible power supply
  • A USB keyboard for the Raspberry Pi (To get you up and running quickly)
  • A screen for your Pi to output on (I’ll be using my TV)
  • An internet connection

Before we go any further I should note that if you’ve not already received your Raspberry Pi then you may be in for a very long wait. Current wait times are looking like 14 weeks and there’s a queue to even get to the point of ordering.

Assuming you’ve got a Raspberry Pi in hand, we can proceed.

Step 1

Insert your SD card into your computer / laptop. It doesn’t matter if it’s been formatted before as this process will replace it’s contents. So before recycling that old camera’s memory card, get what you need off it.

Step 2 (Macintosh Version)

Open a terminal window. You can do this byt searching using the finder for terminal and then selecting the application with the black icon with white writing.

Once your terminal window has appeared you need to grab the installer using the following command (All on one line) and pressing Enter: -

curl -O http://svn.stmlabs.com/svn/raspbmc/testing/installers/python/
install.py chmod +x install.py

The installer will take a short while to download. Once done type the following command and press Enter: -

sudo python install.py

The sudo part of the command above will run the command using administrator privileges, so you’re going to be asked for your administrator password. Don’t worry, this is entirely normal.

The installer will prompt you to make sure you’ve got your SD card installed. But that’s not an issue as we got that covered up in step 1. Just press Enter to start configuring the memory card.

You’re now going to see a, potentially large, list of drives installed on your PC. It’ll look something like the screenshot below: -

The trick here is to find the memory card using the 3rd column, the size. Once you’ve found your card take a note of the identifier (4th column). Take your time here. It’d be very easy to note down the wrong one and potentially wipe a different external drive.

Type the identifier name for your memory card and press Enter. You’ll be asked if you’re sure. Assuming you are, just type Y and press Enter.

The installer will now download the files and start writing out to the memory card. If you’ve already done this process before, the installer is clever enough to note that you’ve already downloaded the files and will ask if you want to download them again.

It’s worth noting here that this may very well be a process you do several times. Unlike with lots of other devices (Roku, Apple TV, WD-Live, etc) you can’t just unplug the RaspBMC once it’s up and running. If you do it can corrupt the file system and you’re going to be right back at this step time and again. Believe me, writing this guide is my 5th time doing this. On the plus side, once you’ve done it once, it’s a cinch.

Now, let’s get back on track. When the installer has finished it’ll drop you back to the terminal prompt. You’re now ready for step 3.

Step 2 (Windows Version)

Installing under windows is an altogether more graphical affair than it is with the Mac terminal approach. First, grab a copy of the installer ZIP from here.

Once you have the ZIP file on your PC extract it to a temporary folder location. Open your temporary folder and you’ll find an info file, an application and a dll file. Double-click the install.exe application to start the graphical installer. It should look like this: -

As you can see in the screenshot above, there’s a list in the middle of the screen. Here you should see your SD card. Tick the box next to the SD card and click Install. If you’re not seeing the card listed, remove it, re-insert in and press the refresh button and give it another whirl.

The installer will download the card image, prep your card and do it’s magic. This might take a few minutes after which you’re ready for step 3.

Step 3: Safely eject the memory card

I can’t stress enough that you should safely remove the memory card. By that I don’t mean take good physical care of it and remove it slowly. On the Mac you need to go to the finder, locate your memory card and right-click and Eject it properly.

One windows look to the bottom-right of the screen next to the clock for the USB icon, open it up and locate and eject your drive there.

Assuming you’ve ejected the card, take it out of your computer. You’re now ready to get hands on with the Raspberry Pi and your TV.

Step 4: Plugging in for the first time

The first time you connect your Raspberry Pi it must have an internet connection to allow it to perform its final configuration. So insert the SD card into the Raspberry Pi, plug your video cables in (I’m using HDMI), plug in the internet connected network cable, connect your USB Keyboard and add power.

Now switch your TV to the appropriate input and you should start to see pretty standard text based Linux boot screens. Scary stuff, for those of feint heart, but you don’t need to worry too much about this stage as Sam Nazarko (The genius behind RaspBMC) has done an excellent job with this script.

After a short while the screens will change from white text on a black background to more interesting text based dialog boxes (Screenshots to follow in a future update).

The system will now setup your SD card drive partitions and connect to the distribution servers and grab the necessary components to build a working file system.

When the installer process has finished you’ll see the RaspBMC logo onscreen and the system will boot directly into XBMC.

Step 5: Surely we’re done? Right!? (Or … ‘Getting on the network with SMB’)

I appreciate that at this point you could have followed any number of other guides but I wanted partly to explain a little about the process as it went and to impart the following experiences: -

You probably feel that about now you should be up and running and ready to go. However my mileage says otherwise. You may find that the system starts reporting that various components that are installed are broken. My advice here is to allow XBMC to disable any add-ins it prompts about.

Next we want to confirm our network settings. I find that although some components seem to be networked now, not everything is. For example if you view Network Settings in the System Settings side of XBMC… it’ll probably report that there’s no IP address. To fix this go into the Programs main menu and then select the option to configure RaspBMC. No doubt it’ll say that you’re configured for DHCP and have an IP address. Confirm this dialog and allow it to restart XBMC, no changes necessary … but boy does it make a difference.

When XBMC reboots you’ll now find that XBMC also reports the correct IP Address.

SMB is our final stop. As it comes out of the box for me now, I get SMB options but it simply doesn’t work. Two things work for me here and I’ll recommend one as the easier and more complete option. I could drop to a terminal window, execute sudo apt-get install samba and let it do it’s magic under a linux terminal window. .. OR … go back to the Programs menu in XBMC and open the RaspBMC program. Navigate to the option to download Nightly builds of XBMC and follow the onscreen default options. This will grab the current build which has all SMB options built in and should work a treat.

After one final reboot your RaspBMC system should be good to go.

One final recommendation on cases

I am still too cheap to buy a case, though I’ll tell everyone that I’m waiting for the right one. In the mean time I can recommend the following cardboard print case as a good stand-in option: -

http://squareitround.co.uk/Resources/Punnet_net_Alpha3.pdf

As an alternative you could always go with the standard Lego case. Excellent instructions are available here: -

http://www.raspberrypi.org/archives/tag/cases

Google+

About the Author: Andre Boyle

IT Manager, Specialist in Technology Convergence, data management and security.

Comments are closed.