If you are a total Linux power user, this article is not for you. It is for total Linux newbs who’d like to setup a spare box to serve mp3s, videos, etc.
I don’t subscribe to cable TV so that’s why there’s no PVR/MythTV details.
TODO: add how-tos for broadcatching via RSS + BitTorrent to download your favorite shows auto-magically.
Now, back to the regularly scheduled broadcasting…
This is a guide explaining what was involved in setting up a Linux box to be used as a shared network media server, although I also include my experiences in trying to setup Windows XP. (I didn’t get very far on the XP front)
The Box
So, the girlfriend hooked me up recently with an old Dell P4 2.0Ghz box that she got from work. (I’m gonna help her out w/ a laptop for her new pad up in N. Scottsdale)
The Tools
Tools:
- an old PC you have lying around somewhere
- one or two large hard-drives (newegg.com rocks for this)
- Fedora Core 4 installation disks (torrents available here)
The Operating Systems
1) Windows XP Professional SP2
2) Red Hat Fedora Core 4 Linux
My XP Experience
I figured everything would be peachy with the XP install. Hardly. It didn’t detect a video card or monitor. The display looked like crap. 8 colors, maybe 16. Very pixelated and ugly. From my experience w/ Red Hat, I knew this wouldn’t be a problem on the other side of the fence.
Then, lo and behold, I go to configure networking under the XP install. Looky looky, no network card identified! It’s an onboard Dell ethernet card! How can you not find the drivers for that?! There are probably millions of these babies out in the wild and the boys from MS can’t figure out how to detect it!
My Red Hat Linux Experience
Within a minute or two, Red Hat’s anaconda installer program had already identified my onboard video card *and* monitor!
It booted up a nice GUI that looked awesome. I knew good things were to come.
Next, it easily detected my network card. The only problem I ran into (user error) was not manually configuring the partitions.
I would *highly* recommend this. For some reason, the auto-partitioning feature didn’t work quite right since the previous dell OS install had left some nasties in the partition table.
Here’s all you need to know
/boot - 100mb
a swap partition - 2x your RAM
/ - the rest
Easy!
Two programs came in handy on the linux box for configuring new media server drives. I had installed a new 250 GB hard drive that I wanted to configure as FAT32. This would make it easier to transfer to a new media server, regardless of OS. (FAT32 is supported by win98, XP, linux, most of the *nixes I believe)
Update: You may want to format using Ext2, if FAT32 is not to your liking. The Ext2 filesystem is accessible under windows by adding some basic drivers. Thanks Pete and Blue Rowlf for the constructive feedback/comments!
Configuring a New FAT32 Drive Under Linux
The mkdosfs command came in handy. But first, be sure to format the new drive using Fdisk or a similar utility.
Steps to configure a brand-spankin’ new drive as FAT32 under Fedora Core 4 (and probably most linuxes):
1. Partition the drive using Fdsik. I recommend creating one big monster partition for the whole drive.
2. Format the new drive as FAT32 using mkdosfs.
Command to list your drives/partitions:
> fdisk -l
Command to format your new drive (assuming its at /dev/hdd1):
> mkdosfs -v -F 32 -n media /dev/hdd1
3. Make a new directory for the mount location
For example, if you want to mount your new drive at “/mnt/media”, do the following:
> mkdir /mnt/media
4. Edit your fstab file so the drive always gets mounted at boot-time.
> vi /etc/fstab
Add the following line to the end of the file and save:
/dev/hdd1 /mnt/media vfat users,owner,rw,umask=000 0 0
Mount all the drives (as directed by the fstab config file, I believe):
> mount -a
Your new drive should now be accessible at /mnt/media!
Try copying a few files over and make sure it works alright. Next, configure Samba and you’ve got yourself a new media server. w00t!
Configuring Samba on Fedora Core 4 (Without OS X Samba Client Support)
This guide goes over the process in detail.
There is a caveat in the title of this section because the version of Samba bundled with Fedora Core 4 does not work with Finder (out of the box) on many OSX setups. See this thread for details.
But all in all, setting up Samba was a snap if you just want to access the drive from your PC.
I cruised over to my regular windows box, browsed the network, entered my credentials, and bam! I was copying over files to my new media server!
Uh oh, Browsing the Samba Share Doesn’t Work on My OS X Box!
I thought it was too good to be true!
The Samba version installed with Fedora Core 4 is not the very latest.
You’ll need to download and install the latest version of Samba if you need to access your linux media server from OS X. (unless you’re lucky and you can mount your share from OSX without a problem - maybe Apple’s fixed this bug in the latest build)
But if it isn’t working for ya, there are also configuration settings you’ll need to setup on OSX, and even possibly a simple AppleScript startup launcher which will perform the mount of the network share upon startup each time. (this should work in OS X but is broken on some systems, including mine)
If you’re having OS X samba connection woes, I’ll just have to point you to this thread at macworld.com. It contains most of the information needed to configure your new Linux Samba installation (this was the trickiest part), as well as a few minor settings you need to configure in your OS X “/etc/smb.conf” file.
Auto-Mounting Your Network Share Under OS X on Startup
There isn’t really the concept of a “Mapped Network Drive” under OS X like there is in Windows (there’s mounted volumes, instead). However, you can do basically the same thing but it can be a bit tricky to do so w/o using some AppleScript kung fu.
Open Script Editor and make a script like:
tell application "Finder"
open location "smb://myusername:mypassword@myserveraddress/the/path"
end tell
For example, mine was:
tell application "Finder"
open location "smb://sbraford@192.168.1.97/media"
end tell
From user ‘Virtual1′ on the thread:
Select to save as “Application”, and make sure “startup screen” and “stay running” are NOT checked.
Save the application script somewhere. Next open up your OS X User profiles / settings / configurations.
Click over to Startup Items, then drag your new auto-mounter AppleScript file onto it & make sure it’s enabled and that your settings get saved (may have to click on the Lock icon).
Next, logout and log back on to see if your new network share gets auto-mounted on startup! If so, w00t, you’re in business.
Regularly Scheduled Media Downloads
You have two options here. If you have cable/satellite television, you can use Myth TV as a PVR.
OR, if you only have one big fat Internet connection like yours truly, Broadcatching via RSS + BitTorrent is your answer.
Update: After playing with Azureus and its various RSS plugins for a while, I was still unable to get it to download torrents properly.
Instead, the simplest approach was to mount the Linux Media Server share as a mapped network drive, and configure a Win32 BitTorrent client to do the downloading and just use the server as a file store. (not ideal, but does the job in a pinch.) uTorrent is an excellent C++ based BitTorrent client that has added RSS feed import support in its latest version.
In Part Deux of this guide, I hope to more fully flush out this ‘media server’ setup to include the RSS + BitTorrent auto-downloading feature of your favorite shows.
Recommended Links
Personal Fedora Core 4 Installation Guide
Fedora Project
How to Skip Product Activation in XP (if your OS will not even detect your video card, monitor, network card, etc. etc…. it doesn’t make much sense to buy a full license just to take it for a test drive.)
mkdosfs info
How to Configure a REAL Media Server on FC4
Broadcatching via RSS + BitTorrent
If you use linux, you obviously need a dedicated hosting for your website needs. If you spend a lot of time online, consider getting a Exchange Server Hosting that will meet all of your requirements! If you want a credibility in hosting, make sure you do your research. No matter what type of computer web hosting you need, there is a host to meet your requirements!