Installing HDA on HP Mediasmart Server

From Amahi Wiki
Revision as of 04:19, 25 October 2012 by Sc4s2cg (talk | contribs) (→‎Installing Ubuntu: formatting)
Jump to: navigation, search

Installing your HDA on an old MediaSmart server, previously used for Windows Home Server, will bring all the benefits of Amahi to the small device. This is only recommended for users who are comfortable with the terminal, or are willing to set up a headless server with VNC.

The steps for this tutorial are from here. To continue you will require:

- An HP MediaSmart server - An extra PC - A spare hard drive - An existing network - An SSH solution, like Putty - Ubuntu 12.04, the server version

Starting From Scratch

Installing Ubuntu

1. Connect the hard drive into the spare PC. 2. Install Ubuntu 12.04, the server version. I was not able to get the GUI version of Ubuntu working on the MediaSmart server. The GUI version is also not recommended since there is no VGA or DVI ports for a monitor, only USB. 3. Do NOT install Amahi yet. 4. Install an ssh server:

bash code
​sudo apt-get install openssh-server​


5. Verify that the SSH is working by connecting with [Key-based SSH Logins With Putty|Putty]. If the SSH is not enabled, enable it:

bash code
​sudo update-rc.d ssh defaults​


6. Change the interfaces file to reflect eth1, not eth0:

bash code
​sudo nano /etc/network/interfaces​


           auto eth1
           iface eth1 inet dhcp

7. Save using ctrl+x, and hitting "y" to confirm

8. Note the hardware address of the network card:

bash code
​ifconfig​


9. Shutdown the PC:

bash code
​sudo shutdown now -h​


Installing Amahi

1. Move the hard drive to the MediaSmart server's slot 1, turn on the server.

2. Check your router for the server's IP address, use Putty to SSH into that IP address.

3. Install Amahi

Modifying Ubuntu for Amahi

1. After rebooting and SSHing into the server, change the network card to eth0 from our previous eth1. After opening the 70-persistent-net.rules file below, look for the PC network card hardware address and delete that whole line. Change the remaining hardware address to come up as eth0 (it is currently eth1 at the end of the line).

bash code
​sudo nano /etc/udev/rules.d/70-persistent-net.rules​


           SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:60:b5:43:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
           SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="5c:d9:98:af:21:43", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth1"

So above, we would delete the first line and change "eth1" to "eth0" on the second line. The reason is that Amahi is configured by default to recognize eth0, so all apps would go to that. However our eth0 was taken by the host-PC's network card. Again, ctrl+x and y to save.

12. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.

bash code
​sudo nano /etc/network/interfaces​


13. Finally, reboot your HDA:

bash code
​sudo reboot now -h​


You should now be able to access your HDA as a share and as the http://hda link. You can [Install VNC server on Ubuntu Server 12.04|install a VNC server] to connect to the HDA using a graphical interface.

Transplanting an existing Amahi server

Here I will present how I transplanted my current Amahi server from a PC to the MediaSmart server. The steps below are mainly a reorganization of the steps above.

Preparing the HDA

1. Disconnect all drives. If you are using Greyhole, check out the Reconnect existing Greyhole storage pool page. This will allow you to disconnect the data drives, and only risk the OS drive.

2. Change the interfaces file to reflect eth1, not eth0:

bash code
​sudo nano /etc/network/interfaces​


           auto eth1
           iface eth1 inet dhcp

3. Save using ctrl+x, and hitting "y" to confirm

4. Note the hardware address of the network card:

bash code
​ifconfig​


5. Shutdown the server:

bash code
​sudo shutdown now -h​


Moving the Hardrive

1. Move the OS hardrive to the MediaSmart server, slot 1. Turn on the MediaSmart server.

2. Check your router for the server's IP address, use Putty to SSH into that IP address.

3. After opening the 70-persistent-net.rules file below, look for the PC network card hardware address and delete that whole line. Change the remaining hardware address to come up as eth0 (it is currently eth1 at the end of the line).

bash code
​sudo nano /etc/udev/rules.d/70-persistent-net.rules​


           SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:60:b5:43:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
           SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="5c:d9:98:af:21:43", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth1"

So above, we would delete the first line and change "eth1" to "eth0" on the second line. The reason is that Amahi is configured by default to recognize eth0, so all apps would go to that. However our eth0 was taken by the host-PC's network card. Again, ctrl+x and y to save.

4. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.

bash code
​sudo nano /etc/network/interfaces​


5. Finally, reboot your HDA:

bash code
​sudo reboot now -h​


Reconnect the Storage Drives

Plug the remaining data drives into the MediaSmart server. If you have Greyhole and are having trouble, check out the Reconnect existing Greyhole storage pool page. Otherwise, the Adding a second hard drive to your HDA page may be of service.