"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." (Robert A. Heinlein)
Showing posts with label DLNA. Show all posts
Showing posts with label DLNA. Show all posts

Thursday, 7 May 2015

Setting up a DLNA media server on the Raspberry Pi


My first though about how to use the Raspberry Pi has been to set-up a always-on, low-power, home-server. There are not many services that could be really useful at home but, among them, a DLNA compatible server is the one that more interested me.

Mounting the USB drive

In order to be a useful server, especially a media server, the Raspberry first needed some bigger disk than the system 8 GB micro SD. I so selected as main storage for Raspberry a old 3.5” IDE USB drive. No problems from the electrical power side since the drive it's externally powered.
Mounting a USB drive on the Raspberry is just a basic exercise of CLI Linux: after getting the device name with the lsusb command the disk can be mounted with a simple command:
sudo mkdir /media/usbdisk
sudo mount /dev/sda /media/usbdisk
the mount command automatically recognized the XFS file system the disk was formatted with (I used it, before, attached to the NAS). In order to make the disk permanently mounted I added the following line to the /etc/fstab file
/dev/sda1 /media/usbdisk xfs rw,defaults 0 0