Installing Linux on a HP media home server (X310)

I was given a broken HP media home server model X310 by a customer after it failed.  Windows home server is not the most stable thing in the world and it was what had the problem along with a hard drive failure.  So I decided,  let's try to install linux and make it a real server.

If you look these up online, everyone says you have to buy an expensive $80 device to get the VGA and keyboard available so you can install linux.   This is complete hogwash if you want to install ubuntu linux.  All you need is a PC you can install the hard drive in to install ubuntu server and make a few tweaks.

Download ubuntu server, I chose 32 bit as these boxes don't have more than 4gig of ram in them. Make a USB bootable stick for it (I used  Linux Live creator as I am lazy and used a windows machine to make the stick.)  or you can burn a CD/DVD to install the server OS on the target hard drive.   After you make the disc, open up the PC you will use as the surrogate and disconnect all hard drives.  Now plug your target drive into the machine and set it someplace safe, and run the full install of Ubuntu server.  let it complete, and configure your network eth0 as you like it.  I chose a .10 address for mine.

Finish,  reboot and check if it's ok in the surrogate machine.   Good? now shutdown and install the disk in the HP mini home server and boot it up. give it about 10 minutes and then give up trying to ping it.   It's not going to work.  What we need is the Ubuntu install to detect and save the information we need for the mac address of the ethernet connection in the little server box.  Remove the drive and re-hook it to the surrogate...  boot to your ubuntu install and log in

edit the following file....


 /etc/udev/rules.d/70-persistent-net.rules


You will see the following......

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.


SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:66:FF:0f:63:ef", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:FF:2d:FE:88:ef", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

You might see more, but the very last entry is the network card in your HP home server.  change ETH0's mac address to match the last entry.   Now delete all entries except for  ETH0, save and shutdown.

Remove the drive, install it in your HP home server and boot.  Enjoy a linux home server that puts Microsoft Home server to shame. and spend the $80 you saved by not buying that "debugging cable" that all the HP home server forums say you need to buy to install linux.

Now how about those front panel LED's?  they dont work under linux.    
https://github.com/merelin/mediasmartserverd is where you can find the fix for that, I had to compile it and install it by hand,  which is not bad after you get gcc and G++ installed.  I copied it into /opt and added it as a daemon in my init.d and all seems to be running fine on my X310

I also wanted to add the "web based" easy control panel to further simulate an appliance instead of just having a raw Ubuntu server.  so I installed  http://ajenti.org/  if you follow their instructions for ubuntu server it's quite painless except it doesnt work under 14.10....    https://github.com/Eugeny/ajenti/issues/618 has the information that fixes the issue.    Now I have a nice click and drool user interface to my server, and I even installed kernel updates to the server through it with just a couple of clicks.  Remember; if you make kernel changes under ubuntu, the GRUB bootloader will not auto run on the next boot.  Your server will be stuck at a boot screen until you plug in a usb keyboard and press enter.   once it finally boots, then check the grub config and run update-grub to get things back to normal again. I am unsure as to why this happens, It seems that some versions of grub freak out and dont follow the timeout setting on the first boot after they have been reconfigured.



Comments

Popular Posts