I currently use a modded xbox running XBMC (xbox media center) and although I've loved it for many years it is starting to show its age. Its 10 year old cpu just can't decode an h264 encoded movie, plus I'd really like to be able to surf from the couch and view TED Talks and YouTube videos.
I was considering getting a little dedicated box but figured I'd run into the same problems I have with the xbox, it will get dated and not be flexible enough. So then I considered building a new low powered machine but the costs to do that right were getting expensive. I was also worried about a) startup times if I turned the box off, or b) electricity costs if I kept it going 24/7.
I toyed with the idea of moving my intel Mac Mini into the living room and getting a new one but that was going to be even more expensive than a new pc and since I'm happy with my current mini as my main desktop that was out…
Then I had the brainwave, turn my server into my HTPC since it's always running anyways.
But I'd need to do some upgrading and noise canceling. I'll likely spend as much as buying a new pc but I think I'll end up with a better system when I'm done.
- 4 x 500GB drives, RAID 5 with LVM
- virtual machine storage
- user directories
- 1 TB drive with LVM
- boot drive
- main system drive
- backup drive
- Centurion case
- Core 2 Duo 6300
- 6 GB ram
- NVidia card, dual DVI
I of course purchased everything from Memory Express.
- 2 x Western Digital 2TB Caviar Green, RAID 1 with LVM. $110 each (on sale)
- 100 MB boot partition
- everything else
- EAH4350 Radeon HD 4350 Silent. $25 on sale
- HDMI out w/ audio
- no fan
- Grandia GDM01MX. $270
- lcd and IR port
- bloody expensive!
- I haven't got the case yet, special order
- I'll get some better fans when I get my case
So I went from 5 drives to 2, that makes it quieter and use less electricity. However my drive subsystem is now significantly slower than it was. And this was an expensive touch that wasn't really required.
The case is also very nice, but damn… that's expensive. I'm getting close to a new mini here… On the upside the drives and the video card went on sale the day after I decided on them. When does that happen?
Ouch, this ended up hurting.
My main tasks were:
- install new drives
- copy old drives to new
- boot using new drive, run from new drives
- upgrade system to fedora 13
- make sure virtual machines worked
- get hdmi working to my tv
Copying 1.5 TB spread out over many LVM partitions is very painful. That took Friday night and most of Saturday. I have a cold at the moment so it's not like this is a usual Friday night for me. ;)
I don't have good advice on how to do this. On a LVM parition a simple
dd would work, but when LVM was a drive that I was also expanding while I was at it, that was painful. Mount, then
cp -av /mnt/old_lvm/foo /mnt/new_lvm/foo.
At first I wanted to raid the entire disk and then partition it. That wasn't working so good so I ended up partitioning the disks then making two raid arrays. However, this would later cause many problems because the root of the drive (sda, sdb) would have raid superblocks on them.
I wasn't able to get my original install of Fedora 10 to boot so I installed Fedora 13 but then couldn't boot it either. Turns out the problem was that damn extra superblock. Dracut could not figure out my raid partitions, so then it couldn't find my lvm drives and I hung at the dreaded
Could not find root filesystem.
To delete a raid superblock, or in other words to delete a raid array you must:
mdadm --zero-superblock /dev/sda mdadm --zero-superblock /dev/sdb
After that I could boot. I think we can all agree that's an important first step.
So then I couldn't get my virtual machines to start, I had to:
virsh edit magneto change arch='i686' to arch='x86_64'
So I could finally breathe a sigh of relief, I at least had my machine back into a usable state. I have a virtual firewall so when I couldn't boot it made looking up answers ala Google painful.
So I now had a fully working system. Except for one thing… audio.
HDMI audio should have worked. Every website either said it works out of the box or run kernel 2.6.33 and then it will work. Well I was running 2.6.33. I spent hours trying to figure this out. Reading up on alsa, pulseaudio, everything. I could see graphs showing volume levels change as I played wav files but still no sound.
Maybe my tv couldn't handle audio from the hdmi port? When you exhaust the possible you have to try the impossible right? Well my XBox 360 seemed to have no problems.
So then I did something I haven't done in probably 5 years, I downloaded and booted a custom kernel.
cd /usr/src wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-184.108.40.206.tar.bz2 tar xvfz linux-220.127.116.11.tar.bz2 ln -s linux-18.104.22.168 linux cd linux cp /boot/config-22.214.171.124-147.2.4.fc13.x86_64 . make oldconfig # hold down the enter key here for all the defaults make make modules_install make install reboot
So I was fully expecting to not be able to boot, but low and behold it worked first time. Then miracles of miracles, when I logged in I heard a chime. A chime!!!
So now I can YouTube and TED my little heart out.