Migrating an Ubuntu 14.04 server to new hardware: HP ProLiant MicroServer Gen8

Jan 21, 2017 16:55

For the past few years I have been using my venerable ThinkCentre A61e as a file server, but it finally died and wouldn't show POST or BIOS. I knew the disk was probably fine, so I took the opportunity to buy an HP ProLiant MicroServer (Gen8). Specifically a G1610T which came with 4GB RAM and no disks.

So, Linux (specifically I using Ubuntu Server 14.04) is usually pretty forgiving about hardware changes, so I whipped the drive out of the old machine, and into a neat front loading drive bay in the new machine. No disk boot. My USB DVD drive booted, and I could then see the true drive, so maybe the problem was in the BIOS? Yes, I didn't want to use the hardware RAID (yet!) so I needed to turn off the RAID and turn on ACHI.

In the future I can migrate to hardware RAID by plugging the old drive in differently, and using the drive bays for RAID.

Good, now it booted up by itself, but no networking. The kernel logs show a Tigon3 / tg3:

/var/log/dmesg:636:[ 1.913271] tg3 0000:03:00.0 eth0: Tigon3 [partno(N/A) rev 5720000] (PCI Express) MAC address ...

The odd lines were:

/var/log/dmesg:657:[ 2.006399] tg3 0000:03:00.0 em1: renamed from eth0
/var/log/dmesg:659:[ 2.025785] tg3 0000:03:00.1 em2: renamed from eth1

How does one rename them back? After some Duck Duck Going I was looking at udev and systemd. The file "/etc/udev/rules.d/70-persistent-net.rules" is auto generated at boot from the detected devices, but does allow editing of the "NAME" tags so network sockets keep the same same name across reboots.

That file is generated by this script: /lib/udev/rules.d/75-persistent-net-generator.rules
And in there is a bit code in there which only looks for certain types of kernel objects, so I added "em*|":

# device name whitelist
KERNEL!="em*|eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", \
GOTO="persistent_net_generator_end"

Yet another reboot later and 70-persistent-net.rules now contained the right lines where I could tweak the names to make sense:

# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:02:03:04:05", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="em*", NAME="eth0"

# PCI device 0x14e4:0x165f (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:02:03:04:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="em*", NAME="eth1"

If you found this useful, or have any questions, feel free to leave a comment.

technical

Previous post Next post
Up