# [SOLVED] net services after mother board change

## ad_meis

Dear All,

my shuttle desktop abandoned me for a few weeks. Got the replacement mother board (mobo). Everything worked fine out of the box, except network services.

At first, I had a bit of a hard time because network was not working at all

```
dmesg | grep eth
```

 gave this output

 *Quote:*   

>  sky2 0000:02:00.0: eth0 addr xxxxx
> 
> <30>udevd[13734]: renamed network interface eth0 eth1

 

This I could work out rather easily, mostly following https://forums.gentoo.org/viewtopic-t-889516-start-0.html. So now I have net.eth1 and not net.eth0. Net now works.

What I cannot get to work is to get ntp-client to start at start up, because it still waits for eth0 to start (which I think, will never happen anymore with the new mobo). Is there a way to tell ntp-client (and also ntpd) to look for and wait for net.eth1 to be started (and not eth0)?

thank you, any suggestion is mostly appreciated.

MLast edited by ad_meis on Fri Dec 23, 2011 1:32 pm; edited 1 time in total

----------

## Quincy

I would suggest a perhaps nicer solution:

udev creates new devices but still leaves (even abandoned) ones still in place. You could just clean /etc/udev/rules.d/70-persistent-net.rules then the new card will be eth0 again and you will not run into more problems like this...

----------

## ad_meis

I did it. Deleted old /etc/udev/rules.d/70-persistent-net.rules. New one reads:

 *Quote:*   

> UBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="....", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

 

However this is what I get (pasting from /var/log/messages)

 *Quote:*   

> 
> 
> sky2 0000:02:00.0: eth0: addr ....
> 
> <30>udevd[13734]: renamed network interface eth0 to eth1
> ...

 

Then the only thing I can do to start the net is to 

```
ln -s net.lo net.eth1

rc-update add net.eth1 default
```

But then I am stuck with the problem of before. The system is looking for eth0 to be started in order to start ntp-client, sshd etc etc.

Any suggestions? Is there a way to tell the system to start ntp-client, sshd, etc etc, when eth1 is started (and not eth0)?

Am I on the wrong track?

thanks

----------

## krinn

If you have only 1 network deleting the file will force udev to recreate it, and as you have only one card, you can't fail at attributing it to eth0

But with more than one network interface, once delete, there's no warrant you'll get the "i wish that network card as eth0" attribute with eth0.

So instead of removing the file, now edit it to fix who is who, it's just changing who is eth1 and who is eth0

Look here for a sample: https://forums.gentoo.org/viewtopic-p-6646389-highlight-eth1.html#6646389

As you see, a common problem.

----------

## ad_meis

Dear all and dear Krinn,

I tried the suggestions in the post but I could not solve my problem.

I edited the file /etc/udev/rules.d/70-persistent-net.rules, which now reads:

```
# This file was automatically generated by the /lib64/udev/write_net_rules

# program run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single line.

# PCI device 0x11ab:0x4364 (sky2)

SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="00:30:1b:45:83:90", KERNEL=="eth*", NAME="eth1"

# PCI device 0x11ab:0x4364 (sky2)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:30:1b:48:69:61", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
```

To double check I also recompiled the kernel (sky2 is loaded as module)

```
lspci -k | grep -A2 Ether

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12)

   Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer Device 3113

   Kernel driver in use: sky2
```

```
grep SKY /usr/src/linux/.config

CONFIG_SKY2=m
```

ifconfig -a looks fine (at least to me)

```
eth0      Link encap:Ethernet  HWaddr 00:30:1b:48:69:61  

          inet addr:10.1.60.255  Bcast:10.1.63.255  Mask:255.255.192.0

          inet6 addr: fe80::230:1bff:fe48:6961/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:37210 errors:0 dropped:0 overruns:0 frame:0

          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:2943352 (2.8 MiB)  TX bytes:2452 (2.3 KiB)

          Interrupt:17 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:624 errors:0 dropped:0 overruns:0 frame:0

          TX packets:624 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:50176 (49.0 KiB)  TX bytes:50176 (49.0 KiB)
```

But net is not working

```
/etc/init.d/net.eth0 stop  

 * Use of the opts variable is deprecated and will be

 * removed in the future.

 * Please use extra_commands, extra_started_commands or extra_stopped_commands.

 * Stopping sshd ...                                                                                                                                                                            [ ok ]

 * Unmounting network filesystems ...                                                                                                                                                           [ ok ]

 * Bringing down interface eth0

 *   Stopping dhcpcd on eth0 ...                                                                                                                                                                [ ok ]
```

```
 /etc/init.d/net.eth0 start

 * Bringing up interface eth0

 *   You are using a bash array for config_eth0.

 *   This feature will be removed in the future.

 *   Please see net.example for the correct format for config_eth0.

 *   dhcp ...

 *     Running dhcpcd ...

dhcpcd[16956]: version 5.2.12 starting

dhcpcd[16956]: eth0: waiting for carrier

dhcpcd[16956]: eth0: carrier acquired

dhcpcd[16956]: eth0: rebinding lease of 10.1.60.255

dhcpcd[16956]: eth0: acknowledged 10.1.60.255 from 192.168.64.12

dhcpcd[16956]: eth0: checking for 10.1.60.255

dhcpcd[16956]: eth0: leased 10.1.60.255 for 86400 seconds

dhcpcd[16956]: forked to background, child pid 16963                                                                                                                                            [ ok ]

 *     received address 10.1.60.255/18                                                                                                                                                          [ ok ]
```

```
 ping -w 3 www.yahoo.com

ping: unknown host www.yahoo.com

```

Any suggestions? Hints? thanks

----------

## cwr

My laptop has had various devices attached over the years - the current

/etc/udev/rules.d/70-persistent-net.rules is:

```

# This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.

#

# You can modify it, as long as you keep each rule on a single

# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x1031 (e100)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:d0:59:d8:fa:c5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCMCIA device 0x0002:0x0156 (orinoco_cs)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:02:2d:0d:84:d9", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x1031 (e100)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:d0:59:cc:a3:49", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x1814:0x0301 (rt61pci)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0e:2e:f4:f3:16", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x168c:0x0023 (ath9k)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:86:ba:a0:42", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan1"

# PCMCIA device 0x0002:0x0156 (orinoco_cs)

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:02:2d:0d:86:67", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

```

I tend to edit the various ethN and wlanN as the cards change, to keep the current devices

at eth0/wlan0.  Anyhow, this may be a useful example.

Will

----------

## linoleum

Your card seems correctly recognized. Have a look if the /etc/resolv.conf file is updated by the dhcpcd (if you are using it).

----------

## ad_meis

Dear linoleum,

thanks, it did the job.

Basically, /etc/resolv.conf was all commented out. I removed it, restart dhcpcd (which created the correct /etc/resolv.conf) and then net.eth0 and all other related services started again.

Marking as solved.

Thank you all from the forum

M

----------

