在 CentOS 6 VM 上升级到内核 2.6.32-200.23.1 会导致启动时出现内核崩溃。我该如何修复?

在 CentOS 6 VM 上升级到内核 2.6.32-200.23.1 会导致启动时出现内核崩溃。我该如何修复?

我使用 yum 将 CentOS 6 x64 系统上的内核从 2.6.32-220 更新到 2.6.32-200.23.1。现在我在启动时在控制台上收到以下消息:

mknod: '/dev/null' : File exists
mknod: '/dev/console: File exists
/init: 102: cannot open /proc/cmdline: No such file
mkdir: cannot create directory '/dev/pts': File exists
dracut: FATAL: No or empty root= argument
dracut: Refusing to continue


Kernel panic - not syncing: Attempted to kill init!

在启动时选择较旧的内核版本可以让我正常启动。我尝试升级的所有四台虚拟机都重现了这个问题。它们都是同一台 CentOS 6.2 x64 主机上的 CentOS 6.2 x64 客户机。每个虚拟机的文件系统都位于 iSCSI SAN 卷上。这是虚拟机的/etc/grub.conf文件:

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-220.23.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.23.1.el6.x86_64 ro root=/dev/mapper/vg_main-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_main/lv_swap rd_NO_MD quiet SYSFONT=latarcyrhe
b-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_main/lv_root  rhgb crashkernel=auto quiet  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.23.1.el6.x86_64.img
title CentOS (2.6.32-220.7.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.7.1.el6.x86_64 ro root=/dev/mapper/vg_main-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_main/lv_swap rd_NO_MD quiet SYSFONT=latarcyrheb
-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_main/lv_root  rhgb crashkernel=auto quiet  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.7.1.el6.x86_64.img
title CentOS (2.6.32-220.4.2.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.4.2.el6.x86_64 ro root=/dev/mapper/vg_main-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_main/lv_swap rd_NO_MD quiet SYSFONT=latarcyrheb
-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_main/lv_root  rhgb crashkernel=auto quiet  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.4.2.el6.x86_64.img
title CentOS (2.6.32-220.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_main-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=vg_main/lv_swap rd_NO_MD quiet SYSFONT=latarcyrheb-sun
16 rhgb crashkernel=auto rd_LVM_LV=vg_main/lv_root  rhgb crashkernel=auto quiet  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM
        initrd /initramfs-2.6.32-220.el6.x86_64.img

以下是主机上的虚拟机配置文件:

<domain type='kvm' id='117'>
  <name>test1</name>
  <uuid>6b783832-bb85-6a8e-2dad-5898d3c87259</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='rhel6.2.0'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/disk/by-path/ip-192.168.200.1:3260-iscsi-iqn.2012-02.net.mydomain.storage1:test1-lun-1'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <interface type='bridge'>
      <mac address='52:54:00:5b:71:43'/>
      <source bridge='br0'/>
      <target dev='vnet5'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/6'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/6'>
      <source path='/dev/pts/6'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='5905' autoport='yes' listen='127.0.0.1'>
      <listen type='address' address='127.0.0.1'/>
    </graphics>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

答案1

这看起来像是 initrd 的问题,请尝试在使用旧内核启动时用以下命令重建它:

mkinitrd /initramfs-2.6.32-220.23.1.el6.x86_64.img 2.6.32-220.23.1.el6.x86_64

相关内容