CentOS7重新生成 /boot/grub2/grub.cfg

修改/etc/default/grub

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet"

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto enforcing=0 vconsole.keymap=us rhgb quiet"

添加 enforcing=0 或者net.ifnames=0 biosdevname=0

GRUB_DISABLE_LINUX_UUID=true

存盘退出

echo "GRUB_DISABLE_LINUX_UUID=true" >> /etc/default/grub sed -i 's#GRUB_CMDLINE_LINUX="#GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 #g' /etc/default/grub grub2-mkconfig --output /boot/grub2/grub.cfg

 

 

添加新评论 »