硬盘迁移 网卡更名无法启动 Linux

一 描述


gentoo系统最初装在4vc这台本本上.后来打算将55c cpu的vmx技术用上.于是做两本本的硬盘迁移.

二 步聚


拆机,将两本本的硬盘互换.

三 问题


55c系统更换启动后,/etc/init.d/net.eth0 无法启动.网络无法连接. (错误提示忘记记录)

四 解决方案


查看/etc/udev/rules.d/70-persistent-net.rules 文件.此文件中

SL410 oracle # cat !$
cat /etc/udev/rules.d/70-persistent-net.rules
# 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 0x10ec:0x8172 (rtl819xSE)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="70:1a:04:2d:76:6d", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x10ec:0x8172 (rtl819xSE)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="70:1a:04:2d:76:6d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:43:55:8c:wd:q3", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:26:9e:45:9f:1d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SL410 oracle #

删除 eth0 eth1 两红色字行.重启系统.


#reboot   即可

五 原因


更换设备后MAC地址发生了改变,所以需要删掉原来的rules,重启后系统会自己重写


记下来,防止下次再遇到这个问题


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值