A first quack

I have decided that I will start making the shuffle duck a reality, and as such I have made some progress towards setting it up.

My plan is to have a raspberry pi connected to a hifi, an external hard drive, a cd drive and of course an rfid reader. I’m still undecided as to whether to connect up a small display and some buttons too but we will see closer to the time.

So far I have bought a raspberry pi 2 which will be the center of the system. The audio unfortunately is not extremely good on the raspberry pis, so to fix this I have also connected the raspberry pi to a HIFIberry DAC+, but a USB sound card would also work. And finally I added a USB hard drive, I recommend that if you add a USB hard drive to your pi to get one that is separately powered, as the raspberry pi cant provide too much current.

When after all these parts arrived I started setting up the raspberry pi to run an mpd server. This will allow me to connect to the server from another device and control the music playing.


First things first, we need to download a linux distribution to run on the raspberry pi. I have used raspbian.
To download the latest version go to the raspberry pi website and download it. There are nice instructions on the raspberry pi site for how to set up the sd card that the raspberry pi will run on for both windows users and Linux users.

Once you have your sd card written its time to plug it into your raspberry pi, connect a display and a keyboard and power and set finish setting up your raspberry pi. When you first plug in your raspberry pi it will boot into a blue screen with a few initial setup options.

The key things you will want to do are:

  1.  expand the file system , makes the file system take up all the space on the sd card.
  2. set yourself a password, you don’t want to use the default password of course.
  3. enable ssh, this will allow you to connect to the pi remotely latter on so you dont need a display anymore.
  4. set the device hostname, think of this as the name of the computer. I personally went with ShuffleDuck.

When you have gone through these your raspberry pi will reboot. Once your pi has rebooted, log in and we can finish setting up your pi to run your MPD server

Setting the HIFIberry

Again there are good instructions for what to do on the HIFIberry website but I will try to summaries the process here.

First thing to do is to make sure your raspberry pi is uptodate,

When this is done we need to change some settings for the drivers that the raspberrypi uses. First we want to modify /etc/modules in your favourite command line text editor.

Find the line snd_bcm2835, and comment the line out by adding a # to the start of the line and save the file.

Next file to modify is /boot/config.txt , we need again to add a few additional lines to the end.

Again save the file, and now we have one final file to work on to set up the hifiberry.

Next file we need to create first rather than just modify. so create and open the file /etc/asound.conf and add the following contents to the file.

Again save the file, and reboot the pi again. Your sound should now work.

Setting up an external hard drive

First thing to decide when setting up your external hard drive is where in the file system you would like it to appear. Normally I mount them in /media/Files but this is by no means a rule. When you have decided where to locate the files in your external hard drive we can create the folder.

Next we need to set the permissions on the folder such that anyone can view/edit the files using

Now we can plug in your external hard drive. Mounting the drive once is easy, but really we want the hard drive to automatically mount when we turn on the raspberry pi. To do this we need to add it to the file system table, and to make sure that the system always mounts your hard drive, even if you plug in a second hard drive we will use the UUID. To find the UUID of your hard drive run

which will return something like :

make a note of the long number ( 74B451D1B4519688 in this case) next to -> ../../sda1

Next we need to double check the user and group id by running

and again taking note of the results. If your hard drive is nfts formatted (as mine was) you will need to install an additional driver, if however your hard drive is FAT formatted skip this

First thing we want to do is back up the current version of the fstab

Now open /etc/fstab so that we and add the following text to the bottom of the file

replacing the the UUID with the ID of your drive /media/Files with the folder you created before, and uid and gid with the details you noted down before. If your hard drive is not formatted as an ntfs

At this point save the file and try restarting your pi.

Now one thing I found at this point was that my hard drive was not mounting at after the reboot. Check that your has done but dont panic if your hard drive hasn’t. If your hard drive did not mount open up the file /boot/cmdline.txt, at the end of the line add the following

and reboot your pi again. Hopefully this will get your hard drive mounting properly.

I will come back to detail how you get MPD running as this has become quite the long post already.

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *