Systems Administration » Repurposing HP MediaSmart EX490

Repurposing HP MediaSmart EX490

Last modified by Marc Singer on 2011/09/08 13:27

Overview

The HP MediaSmart Server EX490 is a four bay NAS box with a 2 GHz Celeron CPU and 2 GiB of memory.  For those who are dissatisfied with the Microsoft Windows server shipped with the product you can run either a generic Linux system or you may be served best by FreeNAS.  Bother can be run on the EX490.

Debian Linux

I was first asked to install Linux on an HP MediaSmart Server EX490.  Installing Linux on this device is a little challenging because it is headless and there is no (currently) published interface to the BIOS.

My installation strategy is as follows.

  • Build a small Debian image that can be copied to a physical hard drive and booted on the EX490.
  • Use VirtualBox to construct the image because I have no x86 machines to host the install.  Moreover, using a VM is a more universal solution.
  • Mount a physical drive to VirtualBox and copy the running image to it.
  • Install the drive in the EX490 and boot it.
  • Login remotely over SSH.

The steps are as follows.

  • Download a Debian installer image CD.  The netinst CD images are about 180MiB.
  • Create a empty VM with 512MiB of RAM and 2GiB of disk.  Create a dynamically sized disk.  Don't make it larger than 2GiB because you'll be copying it byte for byte.
  • Attach the Debian installer image to the CD device.
  • Boot the VM and install a minimal Debian system.  Select the SSH server option from tasksel and don't add other unnecessary features.
  • Clobber the contents of /etc/udev/rules.d/70-persistent-net.rules.  This is important as you don't want to have the wrong ethernet hardware assigned to eth0.
  • Edit /etc/network/interfaces such that eth0 and eth1 are staticly initialized.  It's a good idea to configure both just in case udev remembers eth0 as the host adapter of the VM.
  • Attach the SATA drive to the host running the VM.  I'm using a SATA to USB adapter.
  • Create a raw disk image VMDK for the SATA disk.  On OSX, it may look like the following.
VBoxManage internalcommands createrawvmdk -filename external-disk.vmdk -rawdisk /dev/disk1
  • Shutdown the VM.
  • Attach the raw VMDK to the SATA controller after the boot disk.
  • Restart the VM and boot into the recovery kernel image.  This will be a single user system.
  • Use "telinit 1' to shutdown unnecessary system services and login as root.
  • Verify that you can see sdb by browsing the contents of /proc/partitions.
  • Remount root read-only, "mount -o remount,ro /".
  • Bit copy from the VM to the raw disk, "dd if=/dev/sda of=/dev/sdb".
  • Stop the VM.

You now have a disk that should boot on the MediaServer.

Fixing Grub

You may want to make sure that grub is properly setup for your new system.  Copying the image from the VM to a physical disk is OK as long as you don't attempt to upgrade the software in that root image.  Grub maintains some state that has to be adjusted when moving a root filesystem from one device to another.

The command grub-mkdevicemap builds the file /boot/grub/device.map that gives grub a mapping from the UUIDs of physical drives to the pseudo device names it uses such as hd0.  Once the system boots, rebuild the grub configuration to match accurately the device mapping.

grub-mkdevicemap ; update-grub

FreeNAS

Both versions 7.0 and 8.0 of FreeNAS will boot on the EX490.  The Celeron processor is 64 bit capable and supports the amd64 versions of FreeNAS.

I used the image versions of the install copying them directly to a hard drive and then installing this drive into the EX490.  When version 7 boots it takes the IP address 192.168.1.250.  Version 8 will use DHCP to gather an address so you'll have to scan for it.  Version 8 has no default password so you can connect to the HTTP interface and start working with the software directly.  Version 7 requires you to login with the account and password of admin and freenas.
  

Tags:
Created by Marc Singer on 2011/09/06 12:32

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 3.1 - Documentation