linux--抽取硬盘到另一个机器,网络更换

上一篇 / 下一篇  2018-09-06 17:41:05 / 个人分类:Linux

1.
[root@compute1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether d0:27:88:87:92:3d brd ff:ff:ff:ff:ff:ff
    inet 10.204.125.171/24 brd 10.204.125.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::2a1b:9965:b3c6:101a/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

2.
cd /etc/sysconfig/network-scripts
cp -a ifcfg-eno1 ifcfg-eth0
3.
cd /etc/default
禁用该可预测命名规则。对于这一点,你可以在启动时传递“net.ifnames=0 biosdevname=0 ”的内核参数。这是通过编辑/etc/default/grub并加入“net.ifnames=0 biosdevname=0 ”到GRUBCMDLINELINUX变量来实现的。

vi /etc/default/grub 
GRUB_CMDLINE_LINUX=""net.ifnames=0 biosdevname=0" crashkernel=auto rhgb quiet"

4.
运行命令grub2-mkconfig -o /boot/grub2/grub.cfg 来重新生成GRUB配置并更新内核参数。
grub2-mkconfig -o /boot/grub2/grub.cfg

5.
init 6


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar