Your Digital Media Has Never Looked So Good

 
jmsaul
Topic Author
Posts: 85
Joined: Wed Aug 18, 2004 7:00 pm
Location: Ann Arbor, MI (USA)

Wouldn't acquire an IP address (wired), how I fixed it

Mon Apr 16, 2007 5:11 am

Just in case this is useful to someone else... I have a Rev A HD1000, and recently bought a used Rev B as well. We have DSL with a router that assigns IP addresses via DHCP, and we use wired ethernet for the Roku due to speed so wireless issues are irrelevant.

The Rev B wouldn't acquire an IP address, even after repeated power-off resets. I even tried assigning it a static one using the script soiaf wrote. No luck. I tested the same connection with my Rev A, and it worked fine. Unfortunately, I had no way to access the Rev B to find out what was wrong with its configuration files, even if I would have been able to identify the problem. But I could look at the Rev A...

So what did I do? I modified soiaf's script to blow away the Rev B's current /etc/sysconfig/network-scripts/ifcfg-eth0 file and replace it with the contents of the known good one from the Rev A, and then ran the script from a CF card. It worked!

In case it's useful to anyone else, here it is (but if you're going to copy it and use it, be careful -- many editors screw up line breaks so double check what it actually looks like before running it):

#!/bin/sh

# Back up the original IP address file

chmod 644 /etc/sysconfig/network-scripts/ifcfg-eth0
mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak3
touch /etc/sysconfig/network-scripts/ifcfg-eth0
chmod 644 /etc/sysconfig/network-scripts/ifcfg-eth0

echo "DEVICE=eth0" > /etc/sysconfig/network-scripts/ifcfg-eth0
echo "ONBOOT=yes" >> /etc/sysconfig/network-scripts/ifcfg-eth0
echo "BOOTPROTO=dhcp" >> /etc/sysconfig/network-scripts/ifcfg-eth0


(This script saves the old ifcfg-eth0 to ifcfg-eth0.bak3, just in case you need it later.)

Who is online

Users browsing this forum: No registered users and 2 guests