My HDA Project: From the Ground Up -or- How I Did It

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

My HDA Project: From the Ground Up -or- How I Did It

Postby flickeringsight » Fri Jan 01, 2010 1:15 pm

Hi everyone! I've finally made the plunge into the murky waters of home brew HDA media servers and have decided to let you in on my efforts - my successes and failures, pitfalls and discoveries. But I'm not doing this entirely out of selfless generosity, I need help and advice too so my hope is that we can all learn from my shameless exposition. I look forward to group feedback!

This is an on-going post and is far from complete. I hope that through input from other users it will grow, becoming ever-more comprehensive.

My goal is firstly to create a central media server for my home that can serve up media to TVs and computers. I'm tired of digging through spindles of DVDs strewn around the house to find a movie to watch and then conceding that I can't watch it in the bedroom because the DVD player in there that can't play media files and I can't watch it in the living room because someone is using the computer. No! I want a media player for both TVs and media server to supply them. And as a plus, Amahi's modular software will let me add other cool capabilities from which I can get some utility. Of course all of this is just academic until I can make it work, so on that note lets get going!

Here's my original concept (on graph paper of course).
Image

Currently my iMac sits on the coffee table and is connected to the HDTV, as a screen-spanned external monitor, via Displayport-HDMI cable and the surround sound decoder via optical cable. It has a 500GB external drive that holds a selection of movies that I use VLC to playback. It works well but is limiting, especially in storage. Instead I want to use the iMac to manage the media system, since the HDA will be headless, and hand over playback to a dedicated box.

I am considering using the HDA as a full HTPC to reduce the need for a separate playback box in the living room, but only if that is technically feasible, and since I like to think about long-term flexibility the hardware I selected for this project is fully capable of playing the role of an HTPC. What do you think of that?

Well that's a good start for now, I'll cover hardware selection in my next post. Did I mention this is my first PC build?
Last edited by flickeringsight on Thu Jan 14, 2010 11:33 am, edited 2 times in total.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby moredruid » Sat Jan 02, 2010 2:47 am

nice setup you've got there :)
I think I might draw up my own network too
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby cpg » Sat Jan 02, 2010 4:08 am

I am considering using the HDA as a full HTPC to reduce the need for a separate playback box in the living room, but only if that is technically feasible, and since I like to think about long-term flexibility the hardware I selected for this project is fully capable of playing the role of an HTPC. What do you think of that?
Good going for a first PC build!

One of the great and most useful things that many people do not do is a draw a diagram of their network!

Anyway, ... about making Amahi also a front end, there are a couple of things:

- accelerated drivers (you want that, for sure, though even midly accelerated these days will do full 1080p just fine)
- some way to get the media to the screen. This is very specific. There is XBMC, MythTV front end, Linux MCE, bare VLC, ...
- do you want a remote-driven solution or just a wireless kbd/mouse?

I am definitely not an expert, so a few others will correct me and add to this. I am fairly sure it can be done, however, it depends to what degree you want it to be a front end (remote, etc.).

Also depends on the two boxes labeled "media server" ... I have WD TV Live that recently have been testing with Amahi DLNA ... which you can read here in the forums (and since it looks like you are in the USA, you can probably get easily).

BTW, thanks for documenting this, as this is something that many people will want!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

My HDA Project: From the Ground Up -or- How I Did It Pt. 2

Postby flickeringsight » Sat Jan 02, 2010 12:13 pm

HARDWARE
OK, here's my HDA hardware rundown, my goals are these: lots of storage, gigabit ethernet, hdmi video output, optical audio output, low power consumption, low noise, low cost, attractive case (i.e. does not look like a PC), option to run as an HTPC. Given these criteria I researched and looked for deals. I did not rush to purchase everything at once and took advantage of holiday sales, buying nearly every component at a discount - patience is a virtue.

Motherboard: Gigabyte GA-G41M-ES2H
This board just hit the market and is designed for HTPC use. It's a micro ATX with integrated gigabit ethernet, HDMI/DVI/VGA video out, integrated graphics capable of full HDTV output, support for S/PDIF in/out audio, 4 SATA ports, low power/energy saving features plus other goodies that made this an ideal board that saves me from buying a lot of separate components.
CPU: Intel BX80571E5300 Dual Core 2.60 GHz
This cpu sports Intel's low energy consumption technology and has the best GHz to energy consumption in the dual core line.
Memory: 2Gb DDR2 1066/800/667 Dual Channel Kingston
I'll probably put in another 2 Gb stick down the road since the mobo has 2 dual channel memory slots.
PSU: Corsair CMPSU-400CX
This PSU is high quality, rated 80+ efficiency, has very nice cabling, a silent fan, very good reviews and more than adequate without being overkill.
Hard Disks: (1) Western Digital Caviar Blue 320 Gb SATA WD3200AAKS, (1) Western Digital Green 1.0Tb SATA WD10EADS, (1) Western Digital Green 1.5Tb SATA WD15EADS
The 320Gb drive is the system/scratch disk drive since the Caviar Blue series is a workhorse drive and can handle a lot of strain from constant little read/writes. The Green drives are low power, high storage but aren't as durable as the blue drives however they'll only be serving the media files which isn't as mechanically taxing.
Optical Drive: Lite-On CD/DVD/Blu-Ray IHOS104-8
My only concern regarding the optical drive was to get media onto the HDA by copying files from my backup disks or ripping. I have a strong dislike for Blu-Ray, I was cheering for HD-DVD, and swore I would never buy a Blu-Ray player. However I saw this drive for a great sale price from Newegg and figured - what the heck. I've owned Lite-On drives in the past and they've always been of excellent quality.
Case: nMediaPC 5000B
This case meet my criteria nicely since it can hold up to 4 hard drives, 1 optical drive, has a set of very quiet fans, media card readers, lots of USB ports, looks sharp and nothing like a PC. In fact it looks very much like my surround sound decoder. It also has three very quiet fans; one on the left side and two in the back with an available spot to add another fan on the right side. There are only a few little issues that others who bought this box have mentioned, none of which are huge: the bottom-front panel that runs along the entire length of the case, hiding the front ports, is made of very thin flimsy metal. You can't tell by looking and it's more of tactile thing when you use it. Also, although the box has the same width and height as an audio decoder the depth is an inch or two greater. And finally, the only thing that actually bugged me is that the flap that covers the optical drive door sometimes sticks preventing the drive tray from extending. A little shaving along the bottom of the flap with a x-acto knife fixed that.
Optical Audio: Gigabyte RCA S/PDIF 12CR1-1SPINO-11R
This is the one thing I bought that I wasn't sure if I'd actually use. If the HDA is just going to be a server I won't need it, if going the HTPC route I'll absolutely need it. Although the mobo advertises S/PDIF in and out it doesn't come with the card! A lot of research revealed this card is as elusive as a chupacabra in Alaska. I did track it down on eBay from one seller in China for $16 with free shipping.
Misc Stuff: SATA cables
Realistically, between what was provided with the case and components I had all the SATA cables I needed but while waiting for the case to arrive I saw a sale on right-angle SATA cables for a buck each and ordered 3 becuase I had read some people recommenced them for this case. Honestly, you don't need them, this case has plenty of room internally.

The actual build went well, there weren't any catches or problems to report. I like the drive cage design of the case because it is a separate piece than can be rotated upwards to give easy access to the drives and cabling.

Image
Image
Image
Image
Last edited by flickeringsight on Thu Jan 14, 2010 11:59 am, edited 3 times in total.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby flickeringsight » Sat Jan 02, 2010 1:40 pm

Anyway, ... about making Amahi also a front end, there are a couple of things:

- accelerated drivers (you want that, for sure, though even midly accelerated these days will do full 1080p just fine)
- some way to get the media to the screen. This is very specific. There is XBMC, MythTV front end, Linux MCE, bare VLC, ...
- do you want a remote-driven solution or just a wireless kbd/mouse?

I am definitely not an expert, so a few others will correct me and add to this. I am fairly sure it can be done, however, it depends to what degree you want it to be a front end (remote, etc.).

Also depends on the two boxes labeled "media server" ... I have WD TV Live that recently have been testing with Amahi DLNA ... which you can read here in the forums (and since it looks like you are in the USA, you can probably get easily).
Thanks for the interest in my project. On my graph the "media players" reference playback devices like a WD TV Live or Popcorn Hour box. I don't want extra keyboards or mice laying around and don't want to interact with the HDA directly once it's setup, I plan to use VNC for any direct interaction with it once everything is established.

However... I am interested in looking at using the HDA as a front end for playback using something like XBMC, I just haven't gotten to that point yet. If I do go that route then I'd like a remote control interface. Have others setup XBMC or MythTV on their HDAs?

An unexpected bonus though, I got a WD TV Live for Christmas which I was not expecting! A while ago when looking around on Amazon I put it on my wishlist and forgot about it. I was lately leaning towards Popcorn Hour, but now I'm focused on WD TV Live. I'll look up your posts on the subject.
Last edited by flickeringsight on Tue Jan 05, 2010 6:36 pm, edited 1 time in total.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby moredruid » Sat Jan 02, 2010 3:46 pm

here's my network layout (created with dia - yum -y install dia):

Image
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 3

Postby flickeringsight » Sat Jan 02, 2010 10:56 pm

INITIAL SETUP
I'm going to gloss over the BIOS setup because it's largely black magic to me, I muddled through and everything seems to work and if I were you I wouldn't take my advice regarding BIOS anyway. Of course if anyone has any advice I'm all ears.

INSTALLING FEDORA 12 A.K.A. WELCOME TO MY NIGHTMARE
OK, installing Fedora isn't that hard, but I still had problems that took days to overcome. I downloaded the Fedora 12 x86 64bit DVD disk image and burnt it to a DVD-R disk using Toast. Here's the trouble part - the computer would boot from the disk, I'd select language and keyboard layout options and then get an error stating "cannot find install image". For some reason it would not recognize the install image on the DVD disk. I assumed it was an incompatibility with the Blu-Ray drive so I tried a net install but it would fail as soon as the image loaded from the ftp server. I also tried putting the installer files on an external USB drive but it would not boot so I booted it from the DVD-R, selected the image on the USB drive and it would actually start the graphical installer only to get an error after the first screen. But I found a solution! Going back to the beginning I burnt a new DVD, this time on DVD+R media and also changed the burn settings from 'Write Disc' to 'Write Session' and the new disk did boot and install perfectly! I'm not sure if the solution lie in the DVD media or the write method.

[EDIT:] Turns out it was the DVD-R media that my Lite-On Blu-Ray drive didn't like. Subsequent attempts to read any DVD-R discs have failed, however DVD+R discs read fine.

NETWORK CONFIGURATION
I'm not sure if I set the host name and domain name correctly given that my Amahi account has a home domain setting, the relationship between the two is unclear to me. My Amahi home domain is hypnotoad.com but in the Fedora hostname setup I entered: hypnotoad.morbo.com. I could use some feedback on that.

PARTITIONING
I did a lot of research on this topic and have a few specific ideas about my ideal setup. My HDA will be downloading torrents and possibly transcoding video files. In an effort to reduce as much wear on the large capacity green drives I want a large partition on the boot drive just for torrents and transcoding work. The thinking being that once the files are finished downloading/transcoding they'll be copied to the big drives. I also want the two large capacity green drives to behave as a single volume. So given my needs and suggestions gleamed from various forums I created the following partition scheme:

BOOT DRIVE
[EDIT:] Thanks to feedback from others I have updated my partition scheme to include a separate /var partition

/boot 250MB EXT3
The recommenced size is between 200MB-250MB, I played safe and went for the larger.
[EDIT:] Although the Fedora 12 installer defaults to EXT4 for the /boot partition, it has been pointed out that EXT3 or EXT2 should be used because, although it works, EXT4 is not officially supported by GRUB and stability issues may occur.
/home 30720MB EXT4
I went large for this one just to cover possibilities, most guides recommend around 6GB
/ 10240MB EXT4
/var 2048MB EXT4
/scratch 214748MB EXT4
This is my personal touch to this scheme, it's a dedicated area for downloads, encoding, ripping etc. Again, went big.
swap 6442MB EXT4
Swap partitions should be at least 2x installed RAM upt to 2GB, then 1x for additional memory. I plan on 4GB for RAM so a 6GB partition it is.

I formatted all of the boot drive partitions with EXT which is robust for heavy read/writes. Make sure that the /boot /home and root [/] are all on the primary (not extended) partition. This left around 35GB unallocated for whatever I might want in the future.

CREATE A LVM VOLUME GROUP
I made a LVM volume group with the two large capacity green drives so that they behave as a single 2.5TB volume. In order to do this I first partitioned each of the green drives with a single maxed-out partition in the LVM file system type and below that select both drives in the Allowable Drives field. Then click the LVM button in the main window to create a large volume group. A new window opens, name the group, make sure both drives are selected and click Add to create the logical volume. Another window opens where you can name the volume, give a Mount Point and designate a file system. I chose the XFS file system for it's large file handling abilities and set the mount point to /var/hda/files so that Amahi will automatically utilize the LVM group.

/var/hda/files 2.5TB XFS On the large volume group
By designating the LVM with this path all of Amahi's media directories will be placed there automatically.

BOOT LOADER CONFIGURATION
[EDIT] Here the installer asks where to install the boot loader. By default it selects the first hard drive listed in you bios which can be a problem since, as on my system, that was not the boot drive but one of the large storage drives. It'll still work, but I don't want the boot loader on my media drive since that's not it's job. I clicked on Change device and a window opens showing a priority list of hard drives, I moved my boot drive to the top of the list and hit OK so that my boot drive is now the install location of the boot loader.

REPOSITORIES
At this step just follow the Amahi installation instructions and let the sucker rip.
Last edited by flickeringsight on Fri Jan 15, 2010 4:33 pm, edited 11 times in total.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby moredruid » Sun Jan 03, 2010 11:42 am

Your /boot cannot be ext4, grub doesn't have support for the ext4 filesystem yet and grub needs to start its stage 2 from that partition.
You can use ext2/ext3 for the /boot partition, since it won't have many modifications speed and journaling aren't that important.

Your /swap is a raw filesystem, you can't format it - nor do you need to.
I would make /var a separate filesystem of around 2GB because the logs are put there and if /var/log gets full if it's on its own partition it won't crash your server.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 4

Postby flickeringsight » Mon Jan 04, 2010 11:12 am

FIRST BOOT
After installing Fedora 12 with the Amahi repository the first boot went just fine. I followed the instructions for installing Amahi and rebooted. At startup Fedora's user login screen comes up prompting for a password and I realized that automatic login would be needed if this box is going to run headless. Surprisingly I could not find an auto login option in the preferences like OS X has (if there is control panel for this I'd like to know) so I searched around and found this solution:

AUTOMATIC LOGIN
The /etc/gdm/custom.conf file must be edited in Terminal using the Vi or Nano text editors, I used Vi. Start terminal and type # su root to switch to root user, it wall ask for your password. Then type #vi 'etc/gdm/custom.conf' to launch the Vi editor and open the custom.conf file, you should see the file text come up. Type a to enter editing mode and move the cursor to the bottom of the text using the arrow keys, enter this text:

[daemon]
TimedLoginEnable=true
AutomaticLoginEnable=true
AutomticLogin=(username)
TimedLogin=(username)
TimedLoginDelay=0

Press ESC to exit editing mode and type :w to save the file, quit Terminal. You should now have automatic login at startup.

EDIT: Also be sure to go into the Screensaver control panel and turn off screen locking if you don't want to enter a password to exit the screensaver.

A TRANSMISSION BUG
One of the first Amahi apps I installed was Transmission, I use it on my iMac and it's a great torrent client. The Amahi interface is simply Transmission's web interface which is great for general use but lacks a lot of preference settings that I like to adjust; like adding blocklists and defining incomplete downloads folder. Back to the subject, if you install Transmission in a clean install of Fedora and Amahi and then install system update at the subsequent restart Fedora hangs at the load screen. Pressing ESC while stuck at the load screen lists the processes loading and the last one on was '...Transmission daemon loading' so I figured the Transmission daemon was hung up and that it must die. SSHing in from my iMac I figured I could kill the processes and unstick Fedora but that didn't work so I thought about editing or deleting Transmission's config file so it wouldn't launch a daemon at startup, although this may work in theory my Terminal skills aren't up to snuff.

Luckily there's an easy solution. Amahi's web interface had loaded and I was able to access the Dashboard from my iMac and uninstall Transmission. I gave a # reboot command via terminal and Fedora restarted normally. I reinstalled Amahi's Transmission (because I'm stubborn like that), crossed my fingers, restarted and this time it did not hang.

After this I decided to try and locate Amahi Transmission's config file to manually tweek preferences but could not find it. My question is this: Is it possible to do more advanced preference tweeking for Amahi's Transmission, and if so - how?

EDIT: Thanks to cpg for pointing out a bug report that address a resume after restart bug but also describes the location of Transmission's config files.
Last edited by flickeringsight on Sat Jan 16, 2010 7:26 pm, edited 5 times in total.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

User avatar
flickeringsight
Posts: 41
Joined: Fri Nov 06, 2009 3:46 pm
Location: Ventura, Ca

Re: My HDA Project: From the Ground Up -or- How I Did It Pt. 1

Postby flickeringsight » Mon Jan 04, 2010 11:17 am

Your /boot cannot be ext4, grub doesn't have support for the ext4 filesystem yet and grub needs to start its stage 2 from that partition.
You can use ext2/ext3 for the /boot partition, since it won't have many modifications speed and journaling aren't that important.

Your /swap is a raw filesystem, you can't format it - nor do you need to.
I would make /var a separate filesystem of around 2GB because the logs are put there and if /var/log gets full if it's on its own partition it won't crash your server.
Thanks for pointing out my posting errors, they're the result of dodgy notes and typos and have been fixed. I'll have to double check which file systems were indeed used, although I am certain they were all a version of ext, where applicable. Fortunately Fedora's installer makes this part hard to screw up.
HDA: 2.6GHz Dual Core, Gigabyte MB, 2GB RAM, Blu-Ray, 320GB+1.0TB+2.0TB+4.0TB, Amahi 8

Who is online

Users browsing this forum: No registered users and 12 guests