标签 kernel 下的文章

xenserver平台,centos7的vm,在更新完5.14内核后重启会提示如下错误:

[ OK ] Reached target Basic System.
dracut-initqueue[227]: Warning: Counld not boot.
dracut-initqueue[227]: Warning: /dev/mapper/centos-root does not exist
dracut-initqueue[227]: Warning: /dev/centos/root does not exist
dracut-initqueue[227]: Warning: /dev/centos/swap does not exist
             Starting Dracut Emergency Shell ...
Warning: /dev/mapper/centos-root does not exist
Warning: /dev/centos/root does not exist
Warning: /dev/centos/swap does not exist 

但是,在5.12之前的内核是没有问题的,这是因为在新的内核里xen平台的两个模块没有加入到启动镜像里,重新生成一下启动镜像即可。

cd /boot/
dracut -v -f -H -k /usr/lib/modules/5.15.11-1.el8.elrepo.x86_64/ --add-drivers "xen-blkfront xen-netfront dm-mod" initramfs-5.15.11-1.el8.elrepo.x86_64.img 5.15.11-1.el8.elrepo.x86_64

注意:更新内核后,网卡名称会变成espXX这样的名字,如果之前是用ethX这样命名网卡,那就需要添加net.ifnames=0 biosdevname=0参数,否则,这两个参数就不需要添加。在GRUB_CMDLINE_LINUX=后面添加 net.ifnames=0 biosdevname=0
修改后的应该如下

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet net.ifnames=0 biosdevname=0"