fredag 15 februari 2013

Media center part 4: Raspberry Pi with OpenELEC


So, the latest happenings on my media center is I flashed a 512 MB SD card with OpenELEC, and I can get it to play almost all of my media files from the server without any special config. I realized, though, that my wireless network USB dongle is too slow to transfer full HD material, so I'll have to pull wired network into my room, install a switch, and maybe tinker a little with the setup. I am preparing to flash another 8 GB card with RaspBMC, though, so I get a full-featured Debian install instead of OpenELEC bare minimum. This is solely because I want to be able to have an MPD server on the Pi to play music with the TV turned off...

My current setup is as follows:

  • Raspberry Pi: OpenELEC media center, connected to the TV.
  • CuBox: file server, and that's pretty much it. 
  • Kerstin: My old P3 low-power desktop running Debian to play music via MPD.

This is not optimal, as Kerstin could be optional. However, Kerstin is housing a Creative Audigy 2 ZS sound card, and I don't want to sacrifice that if I can avoid it. If I can get my hands on an ARM box with PCIe support, I might be able to do something about that. It would probably be easier to get a USB sound card, though. In fact, I do have one already. That'll be it about the media center, now on to some other Linux related.

In the book "After The Software Wars", Keith Curtis is (among other things) presenting a theory that eventually, all Linux distributions will merge into one single distribution that is the ultimate one. His reasoning follows Darwin's theory of survival of the fittest. However, there's a fact that he doesn't count in.

In the animal kingdom, there is not one animal suited for every environment on the planet. In the domain of operating systems, there is not one OS suited for every task a computer could accomplish. The Linux kernel has shown that it is possible to make a kernel that suits pretty much every possible application, but that does not apply on whole operating systems. Let us look at some examples:

  • Debian GNU/Linux is a distribution with a strong focus on stability and freedom. They simply do not allow unfree packages into their repositories, even Firefox is considered too "unfree" for Debian. Debian is also conservative, meaning they have a pretty old package database, compared to...
  • Arch Linux, which is a bleeding-edge, rolling release distribution with a focus on simplicity in code, and the user's abiĺity and right to reconfigure pretty much everything in the system. Arch Linux allows pretty much anything stable enough into the repositories, and for unstable or proprietary software, there is the source-based unofficial Arch User Repository. 
  • OpenELEC is a distro aimed at providing a media-center solution. It is built from scratch, and includes neither a package manager nor build tools, so adding extra Linux packages is not easily done, though not impossible. The OpenELEC OS is under 100MB in size, making it ideal to run on a Raspberry Pi with a 512MB SD card, for example. 
  • Ubuntu is a distro aimed at new users. It's philosophy is simplicity for the user, and the slogan is "Linux for human beings". This philosophy is nearly the opposite of Arch Linux, and Ubuntu is also built so that users should not nee to configure their system if they do not desire to do so. 

Is there an ultimate distro among these? One that is perfect for all tasks? No. Debian, Arch and Ubuntu may all work as media centers, but they won't run on a 128 MB SD card, and to get directly into the media center environment, non-trivial configuration is required. Both Debian and Ubuntu will work as server environments, but Arch Linux is not really a great choice for a web server, due to the natural unstability of a rolling release distribution compared to a fixed release cycle. OpenELEC is NOT a good server OS. For the desktop, Debian won't be a good choice for inexperienced users, as LibreOffice is not in the package repositories. Neither will Arch, as you get to a command line at first boot. For the tinkering developer who want an easy install of source code, Arch is perfect.

All of these different user cases may be seen as different environments. Of course, it is possible to make a distro, let's call it Z.org (X.org is used), that may be configured with a GUI at installation to be anything you want. To satisfy the tinkering user, it must  be complex and allow for a complex setup. To satisfy the first-timer, it must be point-and-click installation. These two wills do conflict with each other. It's possible to take care of this, but it requires a lot of effort, and smart people thinking. And when it is finally implemented, the system will NEVER be able to fit on a 128MB SD card. It may be installed to an SD card from another computer, though.

But neverthless, there is a clear conflict between the experienced users, who still prefer the command line, and the new, inexperienced users, who will most likely want to stay away from the terminal. Z.org would have to take this into account, and it might just be easier to have several distributions to deal with this. Moore's law might be able to solve the issue of large install media for Z.org, but given the current 29% yearly increment of internet traffic (numbers provided by Cisco), that will take a little while.

One thing the Linux distros could really settle between them though is the packaging. Having RPM, .deb, .tar.xz, and many others doesn't make much sense. I'm not the right person to determine which format to use, though I prefer the Arch Linux package manager, pacman, which uses .tar.xz-packages.

måndag 21 januari 2013

No media center this time, but the dock and battery arrived

So, I receieved the dock and external battery for my Lenovo Thinkpad a few days ago, and I love them! The battery combination currently reports 80% and 15 hours left, after being in school for two hours and using the computer on the way here. The dock is a different story, and I am still working on getting the monitor inputs to work. However, I found a way of enabling the external monitor which requires minimal Xorg configuration, and will (hopefully) get me into a working triple monitor setup. The guide is avaliable here, if you're also a concerned Thinkpad user. So far, the external monitors does not work flawlessly, but I am working on it and expect to have a fully usable dual monitor setup by the end of the week.

One thing happened on the media center, I found a TV. It is a 46 inch Panasonic plasma, and I was very lucky to find it. We tested it with the Xbox 360 and a couple of movies, and I can say it was a very good deal. So now I can finally test the CuBox without having to move down to the bottom floor and borrow the living room TV. I have begun a little hacking on the Raspberry Pi, but just a little. The CuBox is the main focus for the moment, and a working XBMC and file server in the same unit is my goal. We'll see about that.

lördag 12 januari 2013

Building a home media center, part 3: New drives and Kerstin back online

So, I now have three 3 TB drives attached to the CuBox in a RAID5 array, which gives me a total storage of 5,46 TiB. That's pretty much all that has happened to the media center building since the last post, except that I managed to install Debian 7 "wheezy" on Kerstin, and use her as a headless music player. She refused to boot properly with the Debian 7 CD, though, so I used an old Debian 5 CD and went through two dist-upgrades. It was smooth, though time-consuming, and I have a working Debian 7 installation with Linux 3.2, MPD (music player daemon) and a mounted NFS share from the CuBox containing all the music. She boots perfectly fine headless, and also shuts down properly whenever the power button is pressed. I do have SSH access though, for system maintenance and updates.

Apart from that, not much has happened. I have a steady 8 MB/s transfer rate over wireless network from the server, and a good 30 MB/s over a wired connection. The hard drive stack is capable of MUCH more, but either the CuBox or the router is bottlenecking me and preventing that. Currently, I am happy with this setup, though photo browsing is considerably slower than it was when I used a local hard drive for the photos. But on the other hand, is anyone seriously surprised by that fact?

Lisbeth (my main laptop and workstation) have receieved an upgrade, with 16 GB additional RAM, now giving her a nasty 20GB of avaliable DDR3-PC12800 memory. I will tweak my ramdisk a little to take more advantage of this memory, as I think my Linux system will not use more than 6-7 GB of memory even during the nastiest multitasking scenarios. I do however not plan on running a 10+ stack of virtual machines at the same time as I am using the ramdisk fully, so allocating 14 GB to the ramdisk should be safe. Also, that allows me to place a full HD-quality movie in the memory, saving some power in both the laptop and on the server. I love having excess RAM!

Also, I wrote to a business-to-business company and asked to buy the slice battery and dock for my computer from them. They accepted, paymen is sent, and I expect delivery in the middle of next week. Exactly how I will get multihead displays working as desired will be a later question, but I am 100% certain it is possible. I have read up on some other people getting multihead to work with ThinkPads running Linux, and though it does not seem to be easy, it seems perfectly possible. Challenge accepted, my friends! At least three displays working should not be too hard.