Difference between revisions of "Installing HDA on HP Mediasmart Server"

From Amahi Wiki
Jump to: navigation, search
 
Line 27: Line 27:
 
4. Install an ssh server:
 
4. Install an ssh server:
  
{{Code|sudo apt-get install openssh-server}}
+
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:
 
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:
  
{{Code|sudo update-rc.d ssh defaults}}
+
sudo update-rc.d ssh defaults
  
 
6. Change the interfaces file to reflect eth1, not eth0:
 
6. Change the interfaces file to reflect eth1, not eth0:
  
{{Code|sudo nano /etc/network/interfaces}}
+
sudo nano /etc/network/interfaces
  
 
             auto eth1
 
             auto eth1
Line 44: Line 44:
 
8. Note the hardware address of the network card:
 
8. Note the hardware address of the network card:
  
{{Code|ifconfig}}
+
ifconfig
  
 
9. Shutdown the PC:
 
9. Shutdown the PC:
  
{{Code|sudo shutdown now -h}}
+
sudo shutdown now -h
  
 
===Installing Amahi===
 
===Installing Amahi===
Line 60: Line 60:
 
1. After rebooting and SSHing into the server, [[Binding Network Devices|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).
 
1. After rebooting and SSHing into the server, [[Binding Network Devices|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).
  
{{Code|sudo nano /etc/udev/rules.d/70-persistent-net.rules}}
+
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}=="00:1d:60:b5:43:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Line 69: Line 69:
 
2. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.
 
2. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.
  
{{Code|sudo nano /etc/network/interfaces}}
+
sudo nano /etc/network/interfaces
  
 
3. Finally, reboot your HDA:
 
3. Finally, reboot your HDA:
  
{{Code|sudo reboot now -h}}
+
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.
 
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.
Line 83: Line 83:
 
1. Change the interfaces file to reflect eth1, not eth0:
 
1. Change the interfaces file to reflect eth1, not eth0:
  
{{Code|sudo nano /etc/network/interfaces}}
+
sudo nano /etc/network/interfaces
  
 
             auto eth1
 
             auto eth1
Line 92: Line 92:
 
3. Note the hardware address of the network card:
 
3. Note the hardware address of the network card:
  
{{Code|ifconfig}}
+
ifconfig
  
 
4. Note the IP address of your HDA. This can typically be found by connecting to the router and seeing what IP is assigned, or checking your [https://www.amahi.org/users Amahi Control Panel].
 
4. Note the IP address of your HDA. This can typically be found by connecting to the router and seeing what IP is assigned, or checking your [https://www.amahi.org/users Amahi Control Panel].
Line 98: Line 98:
 
5. Shutdown the server:
 
5. Shutdown the server:
  
{{Code|sudo shutdown now -h}}
+
sudo shutdown now -h
  
 
===Moving the Hardrive===
 
===Moving the Hardrive===
Line 107: Line 107:
 
3. After opening the 70-persistent-net.rules file below, look for the PC network card hardware address and comment out that whole line. Do not delete incase the server needs to be put back into the old case. Change the remaining hardware address to come up as eth0 (it is currently eth1 at the end of the line).
 
3. After opening the 70-persistent-net.rules file below, look for the PC network card hardware address and comment out that whole line. Do not delete incase the server needs to be put back into the old case. Change the remaining hardware address to come up as eth0 (it is currently eth1 at the end of the line).
  
{{Code|sudo nano /etc/udev/rules.d/70-persistent-net.rules}}
+
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}=="00:1d:60:b5:43:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
Line 116: Line 116:
 
4. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.
 
4. Change all eth1's to eth0's in the interfaces file. Ctrl+x and y to save.
  
{{Code|sudo nano /etc/network/interfaces}}
+
sudo nano /etc/network/interfaces
  
 
5. Finally, reboot your HDA:
 
5. Finally, reboot your HDA:
  
{{Code|sudo reboot now -h}}
+
sudo reboot now -h
  
 
====Troubleshooting====
 
====Troubleshooting====
Line 130: Line 130:
 
Check what eth1's HWaddr is set to. Copy this information.
 
Check what eth1's HWaddr is set to. Copy this information.
  
{{Code|ifconfig C}}
+
ifconfig C
  
 
​Edit the 70-persistent-net.rules file:
 
​Edit the 70-persistent-net.rules file:
  
{{Code|sudo nano /etc/udev/rules.d/70-persistent-net.rules​}}
+
sudo nano /etc/udev/rules.d/70-persistent-net.rules​
  
 
Comment out the line with the mac address that was copied down in the previous step, and add the following line (repacing "55:55:55:55:55:55" with the MediaSmart server's address):
 
Comment out the line with the mac address that was copied down in the previous step, and add the following line (repacing "55:55:55:55:55:55" with the MediaSmart server's address):

Latest revision as of 17:09, 9 January 2021

Warning.png WARNING
NOTE: This Ubuntu-based systems ONLY. Guidance may not work for Amahi 7 or other Fedora-based releases.



Msgbox.update.png Update Needed
The contents of this page have become outdated or irrelevant. Please consider updating it.

Installing your HDA on an old HP 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. Experienced users may also migrate from a PC server to the MediaSmart server, avoiding installation of a new HDA and all the hassle of backing-up files that occurs with it.

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

  • An HP MediaSmart server. This page provides hardware specifications to compare with any preexisting PC setup.
  • An extra PC
  • A spare hard drive
  • An existing network
  • An SSH solution, like Putty
  • Ubuntu Server 12.04 LTS, not the desktop 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:

sudo apt-get install openssh-server

5. Verify that the SSH is working by connecting with Putty. If the SSH is not enabled, enable it:

sudo update-rc.d ssh defaults

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

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:

ifconfig

9. Shutdown the PC:

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).

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.

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

sudo nano /etc/network/interfaces

3. Finally, reboot your HDA:

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 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 (headless) Amahi server, installed on Ubuntu 12.04, the server version, from a PC to the MediaSmart server. The steps below are mainly a reorganization of the steps above.

Preparing the HDA

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

sudo nano /etc/network/interfaces
           auto eth1
           iface eth1 inet dhcp

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

3. Note the hardware address of the network card:

ifconfig

4. Note the IP address of your HDA. This can typically be found by connecting to the router and seeing what IP is assigned, or checking your Amahi Control Panel.

5. Shutdown the server:

sudo shutdown now -h

Moving the Hardrive

1. Move the OS hardrive to the MediaSmart server, slot 1. If you are using Greyhole, make sure to move the rest of your data drives as well, and plug these into any slot other than slot 1. Turn on the MediaSmart server.

2. Use Putty to SSH into the previously noted IP address.

3. After opening the 70-persistent-net.rules file below, look for the PC network card hardware address and comment out that whole line. Do not delete incase the server needs to be put back into the old case. Change the remaining hardware address to come up as eth0 (it is currently eth1 at the end of the line).

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=="eth0"

So above, we commented out 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.

sudo nano /etc/network/interfaces

5. Finally, reboot your HDA:

sudo reboot now -h

Troubleshooting

Q: Only one line shows up in step 3, and the MAC address is that of my old PC.

A: If there is no second hardware address, we will have to add the MediaSmart server's network drive to eth0. Do the following:

Check what eth1's HWaddr is set to. Copy this information.

ifconfig C

​Edit the 70-persistent-net.rules file:

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

Comment out the line with the mac address that was copied down in the previous step, and add the following line (repacing "55:55:55:55:55:55" with the MediaSmart server's address):

         # SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:60:b5:43:66", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth1"
          SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="55:55:55:55:55:55", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth0"

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.

General Troubleshooting

Q: The MediaSmart server's health light is flashing, it is a bluish color

A: This is normal if using the guide above. After experimenting, it seems that the health light indicates that the MediaSmart server cannot detect a valid Windows Home Server installation. I came to the conclusion after using the Recovery Disk (comes with the HP WHS server) to reinstall Windows Home Server onto the hard drive. The blinking stopped after a reboot with Windows, but it came back after I reinstalled Ubuntu onto the same hard drive.

Q: The MediaSmart server is falshing red and blue when booting

A: I have not found this to be of any consequence, once fully booted the server will just flash the blue health sign indicating that Windows Home Server is not installed.