标签:images ifcfg 装系统 work reboot /etc bsp otp sysconfig
修改内核选项:net.ifnames=0 biosdevname=0
1、编辑网卡信息
cd /etc/sysconfig/network-scripts/ #进入网卡目录 mv ifcfg-en067761 ifcfg-eth0 #重命名网卡 cat ifcfg-eth0 TYPE=Ethernet BOOTPROTO=static DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no NAME=eth0 #name修改为eth0 ONBOOT=yes IPADDR=10.0.0.23 NETMASK=255.255.255.0 GATEWAY=10.0.0.254 DNS1=114.114.114.114
2、修改grub
cat /etc/sysconfig/grub #编辑内核信息 GRUB_TIMEOUT=5 GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rhgb net.ifnames=0 biosdevname=0 quiet" #修改项 GRUB_DISABLE_RECOVERY="true"
grub2-mkconfig -o /boot/grub2/grub.cfg #生成启动菜单 Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.10.0-229.el7.x86_64 Found initrd image: /boot/initramfs-3.10.0-229.el7.x86_64.img Found linux image: /boot/vmlinuz-0-rescue-1100f7e6c97d4afaad2e396403ba7f61 Found initrd image: /boot/initramfs-0-rescue-1100f7e6c97d4afaad2e396403ba7f61.img Done
3、验证是否修改成功
reboot #重启系统生效 yum install net-tools #默认centos7不支持ifconfig 需要安装net-tools包 #检查网卡信息 ifconfig eth0
标签:images ifcfg 装系统 work reboot /etc bsp otp sysconfig
原文地址:http://www.cnblogs.com/freeblogs/p/7881597.html