Recently, I converted my desktop machine to a headless file server. I spent quite a bit of time choosing the perfect product for the job. I had a few choices:
- Windows XP – Unfortunately, I don’t have enough licenses and it’s not the ideal product for a file server anyway.
- Windows Home Server – Microsoft is kindly giving away 120-day evaluation copies of the Windows Home Server. I was ready to give it a go until I realised a couple of things. Firstly, the installation erases all existing programs and data on the hard drives. As the drives are already holding all my data, it’s a bit troublesome to have to back everything up to another media. The other point that put me off Windows Home Server was the fact that it is based on Windows Server 2003. When I ran the installation, it did not even have native support for my SATA controllers. I decided then that it was too much hassle.
- Amahi Linux Home Server – This open source project has received a lot of good reviews. Unfortunately, it requires a Fedora installation, which I can’t be bothered downloading. The Fedora ISO image includes a lot of packages, most of which I don’t use.
- Ubuntu Server – I like Ubuntu for its small base installation size. I also like the fact that it’s Linux based as this means less risk of infection for my precious files. Not to mention, it’s absolutely free.
So, the choice was made. It is going to run Ubuntu. After a bit of googling around, I discovered that there is not much difference between an Ubuntu server installation and an Ubuntu desktop installation. As I already have the Ubuntu desktop ISO image, I don’t feel like wasting bandwidth downloading another ISO image with an almost identical set of packages. Additionally, I think the server installation does not include an X server, which means no graphical user interface. I need a graphical user interface!
Armed with the Ubuntu desktop live cd, I deleted my Windows XP partition and whacked on Ubuntu. Everything installed nicely. However, the default install is not suitable for a headless file server. It is missing a few critical servers for headless operation.
Firstly, it needs an OpenSSH server for secure remote access. Fortunately, this is easily done:
sudo apt-get install openssh-server
Secondly, it needs a Samba service so that it can participate in Windows file sharing. This turned out to be more difficult than I first expected. The important thing is to get the Samba configuration file right. I’ll leave the details to another post but it’s fairly simple once you get the hang of it. The following instructions are incomplete and is meant only as a reference.
sudo apt-get install samba # Shut down the Samba service sudo /etc/init.d/samba stop # Set a password for the Samba user # Use the same username and password as your Ubuntu logon sudo smbpasswd -a <username> # Edit the Samba configuration file cd /etc/samba sudo mv smb.conf smb.conf.master sudo testparm -s smb.conf.master > smb.conf # Define the shares by editing smb.conf # Start up the Samba service sudo /etc/init.d/samba start
That should be enough for a basic headless file server operation. However, I also wanted a VNC server so that I can administer the machine remotely with the comfort of a graphical user interface. I cheated on this part. I enabled the remote desktop functionality in Ubuntu and set the machine to logon automatically on boot up. Then, I downloaded the free RealVNC viewer for Windows, which enables me to remote into my file server. It is not ideal security wise but it does the job.
In the process, I also came across GParted, a nifty utility for tweaking partitions:
sudo apt-get install gparted
For the final part, before you yank the keyboard and monitor, check the BIOS to make sure that it’s not set to halt on keyboard or VGA. This ensures that the machine can start up without a keyboard or monitor attached.
1 comment so far
I did run into an issue with the display driver. My file server runs an NVIDIA GeForce FX 5200 graphics card. When I installed Ubuntu, I was presented with the option of installing a proprietary driver for the card, the NVIDIA accelerated graphics driver. I opted to install it as the graphics performance is poor otherwise.
When I remoted into the file server, I noticed that the display resolution is shockingly low. Some windows won’t even fit and I couldn’t see the buttons at the bottom of the windows. When I checked the driver configuration under System > Administration > NVIDIA X Server Settings, the highest resolution listed was only 640×480.
Luckily, there is a solution. If you select the Advanced option, you are presented with a field called Panning. At my wit’s end, I decided to check out what the field does. I typed in 1024×800 and to my surprise, the screen resolution changed accordingly. I still don’t know what the field is actually meant to do, but it did the trick for me. Once done, remember to Save to X Configuration File.
December 19th, 2008 at 18:38
Leave a Comment