Early Experience with Raspberry Pi

Though I’m pretty late to the party, I thought it might be useful to post my initial experiences with the Rasberry Pi and Raspbmc specifically. This is far from an exhaustive guide and plenty of those exist on the internet, but this may help someone get around a few problems I had as a first-time Rasberry Pi user.

I should note that I just finished setting up Raspbmc and that I haven’t yet used it long enough to really form an opinion, but the platform seems incredibly neat once you get past some very rough edges.

Logging in would be nice…
The first problem I had after installing Raspbmc from both the auto-downloader image and the “full” image was that I couldn’t log in to a shell. All of the documentation said that the username “pi” and the password “rasberry” should work, but that consistently failed from both SSH and a local console. (Actually, it took me a few minutes to even figure out how to get to a local console. To do so, select the power icon in Raspbmc then select shutdown. Hit escape on the screen that pops up and you will be presented with a normal logged out console.)

Finally, I just dropped the SD card in another computer and manually edited /etc/shadow so that the “pi” user didn’t have a password. That let me log in – but don’t forget to set a new password if you do that.

There are three (blinking) lights…or one light blinking three times.
One of the intended uses for this box is a basic HTPC. I went ahead and ordered the MPEG2 license from the Rasberry Pi Store and received the code about 12 hours later. This is where I hit the second problem. I tried using the Raspbmc Settings program inside Raspbmc to set the code, but the Pi wouldn’t even boot after doing so. I simply got a solid red activity light and the green activity light blinked 3 times in a pattern. It turns out that Raspbmc had saved a config file without all of the necessary elements.

To solve that problem, I mounted the original raspbmc full image using the loop adapter (Protip: sudo mount -o loop,offset=$((4096*512)) raspbmc-final.img /mnt/image) and copying the contents of the original config.txt from the stock boot partition. I then manually added my MPEG 2 key line and the Pi booted fine. When it prompted me about a discrepancy between config.txt and an add-on’s config, I selected “No” not to fix it and it has been running fine since.

Next Steps
I have a number of other things I want to try with this platform and I will try to remember to post more tips as I do.

Disabling IPv6 on Debian Wheezy

The web is full of suggestions for how to disable ipv6 in Linux and Debian specifically, but I’ve found that the most commonly referenced set of procedures was ineffective on modern kernels. For example, I tried adding


to /etc/sysctl.conf and saw no effect. From what I gather, blacklisting or aliasing the module in /etc/modprobe.conf is no longer effective as ipv6 is now an integrated part of the kernel rather than a module. After spending an hour or so trying, the only method I found that actually worked was adding a command line parameter to the kernel.

To do so, open the file /etc/default/grub and find the line that reads


Modify it to read


Finally, run sudo update-grub to apply the changes and reboot. Always be careful editing system files. Some changes could cause your system to not boot.

After a reboot, ipv6 should be disabled. To confirm, run sudo ifconfig and make sure no ipv6 address is listed. Also, run sudo netstat -tunlp and make sure no services are listening on IPV6 addresses.

Hopefully, ipv6 development in the kernel is stable enough now that this method will continue to work for the foreseeable future.

I should note that we should be migrating to ipv6 as soon as possible, but I still have some equipment on my home network that can’t handle it and I imagine that is still pretty common.

GA-B75M-D3V Build with Debian Wheezy/Linux

A week or two ago, I built a new workstation based on the Gigabyte GA-B75M-D3V motherboard. As Debian Linux has been my distribution of choice for many years, I installed Debian Wheezy on this machine. The vast majority of the components worked without tweaking, but I did have to take an extra step each to get networking and sound working properly. The purpose of this post is just to document those steps in case someone else is doing a build based on that board or in case I do a reinstall at some point in the future.

First, to get networking working in the installer, I had to provide the files from the firmware-realtek package. The installer specified the exact firmware file needed, but I just threw them all on a USB stick and it was happy to proceed.

To get the raw files, you’ll need to download the package and extract it using your favorite archive program. Next, extract the file data.tar.gz contained in the package. Finally, grab the files in lib/firmware/rtl_nic and put them on a removable device for the installer to find.

After installation, sound didn’t work. Running lspci showed:

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
Subsystem: Giga-byte Technology Device a002
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at f7c10000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel

and cat /proc/asound/card0/codec* | grep Codec showed:

Codec: Realtek ALC887-VD

All I had to do to get sound working was add:

options snd-hda-intel model=auto

to /etc/modprobe.d/alsa-base.conf and reboot.

Other than those two minor annoyances, the system has been running extremely well. My one current complaint is that the “extra” buttons on a new Logitech MK550 Cordless Wave don’t work properly in KDE, but I think it is fixable. I just haven’t found the time to look into it yet.

Just what the world needs!

Welcome to yet another random blog by someone far too uninteresting to be blogging.

I created this blog for two reasons. First, I have been helped many times by random blog or forum posts that described the fix to a linux, software development, or other problem I was having. It was far past time for me to make publicly available the little pieces of knowledge I find useful as I go about my work. Second, I occasionally have something else I want to say and I’d rather put it on the free and open internet than in a walled garden social network.

This blog may be updated weekly, or it may not see updates for months or years. Comments are disabled for now, but you can contact me on twitter (@joshlefler) if you want to tell me how awful this entire idea was. You’re probably right.