Slackware - Installation This forum is for the discussion of installation issues with Slackware. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-06-2020, 12:23 PM
|
#1
|
Member
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183
Rep:
|
eth0 changed to eth1 when replacing motherboard
The network interface is still eth0 in /etc/udev/rules.d/70-persistent-net.rules:
# PCI device 0x8086:0x1539 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="30:9c:23:b6:10:0c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
I have worked around this for now by turning on USE_DHCP[1]="yes" in /etc/rc.d/rc.inet1.conf
...but...
I'd like to know how to reset the DEVNAME back to eth0 and what/why exactly caused this when I swapped out my dead motherboard.
Thanks, wirelessmc
|
|
|
06-06-2020, 12:41 PM
|
#2
|
Senior Member
Registered: Mar 2020
Posts: 3,706
Rep: 
|
Is this the MAC address of the NIC on the new motherboard: 30:9c:23:b6:10:0c?
|
|
|
06-06-2020, 02:56 PM
|
#3
|
Senior Member
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674
|
Quote:
Originally Posted by wirelessmc
The network interface is still eth0 in /etc/udev/rules.d/70-persistent-net.rules:
|
Normally that file keeps the OLD MAC address (which isn't there anymore) as eth0, so the new detected one becomes eth1
The solution mostly is to remove /etc/udev/rules.d/70-persistent-net.rules altogether and reboot to let it be REgenerated with the curently present MAC address for the the interface.
|
|
1 members found this post helpful.
|
06-06-2020, 03:08 PM
|
#4
|
Senior Member
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: KDE Neon
Posts: 1,272
|
As ehartman suggested, remove the 70-persistance-net.rules and reboot. The system will make a new file with the new nic info.
|
|
1 members found this post helpful.
|
06-06-2020, 03:41 PM
|
#5
|
Member
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183
Original Poster
Rep:
|
Thanks guys. That was it. The old MAC address from the previous MB was in the /etc/udev/rules.d/70-persistent-net.rules file.
I should have figured that one out myself. Duh!
I removed the old rules file and rebooted -but- I suppose I could have also just edited that rules file with the new MAC and run /etc/rc.d/rc.inet restart
I suppose some clever person (who frequently swaps out his NIC or MB) has written a start-up script to clobber and replace that file if the MAC (in the rules file) is not detected on boot.
|
|
1 members found this post helpful.
|
06-07-2020, 01:18 AM
|
#6
|
Senior Member
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,284
|
IIRC, via network manager (aka network mangler) or rc.inet1.conf, you can clone/spoof the MAC address for each interface. For eth0, add, for example,
Code:
# Config information for eth0:
IPADDR[0]="192.168.1.3"
NETMASK[0]="255.155.255.0"
IPALIASES[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
HWADDR[0]="30:9c:23:b6:10:0c"
Now when /etc/udev/rules.d/70-persistent-net.rules for fixed IP it will get that MAC and never see the one from the motherboard - you can then plug that HD in into any motherboard - no scripts required.
|
|
|
06-07-2020, 05:01 PM
|
#7
|
Member
Registered: Aug 2008
Location: San Diego County
Distribution: Slackware
Posts: 183
Original Poster
Rep:
|
Thanks so much kingbeowulf! Your suggestion of using fixed IP addresses might just solve another issue. One even more pressing is the machines that use IPV6 by default on my local network (i.e. over IPV4) have name resolution issues with the older machines that default to IPV4. This would no longer be an issue since I could then use a /etc/hosts file with fixed addresses. I have always just assumed that my home (AT&T) router will only assign addresses via DHCP. It might be perfectly happy with static IP addresses but I haven't really tried configuring it to do so. I will look into this. Thanks!
|
|
|
06-13-2020, 12:00 AM
|
#8
|
Senior Member
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,284
|
wirelessmc,
I have a few fixed IP on my home network. I use that IP and MAC reservervations in the Netgear wifi router (DD-WRT) so that they too get a human readable name. Better than having to remember to update hosts files on serveral boxes!
Look for services management, dhcp static leases. Also may need to enable dnsmasq (DD-wrt and OpenWRT). On some factory stock router firmware (Netgear I am looking at you!), setting up static leases and hostnames (DNS) is not possible. Thus for a dhcp lease 192.168.1.x -> name.domain but for a static IP just the IP, no name (unless you just go ahead an fire up a slackware box to do local DNS).
|
|
|
All times are GMT -5. The time now is 09:49 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|