代码之家  ›  专栏  ›  技术社区  ›  gMale

在vmware fusion:filesystem not found下的Redhat Linux中启动时出现内核死机

  •  0
  • gMale  · 技术社区  · 14 年前

    这应该很简单。然而,这让我见鬼去吧。

    问题
    我已经编译了最新的内核,当我重新启动我的机器时,它会生成一个与文件系统相关的内核死机。

    问题
    如何让新内核识别VMware文件系统?一定有一些设置可以让Linux安装程序知道“硬盘”实际上不是一个驱动器,而是一个表示虚拟机的文件。

    背景
    首先,我不是Linux专家。这是我第一次编译内核。我做了什么来解决这个问题:

    • 从kernel.org下载了kernel版本2.6.34
    • 已将源解包到目录中
    • 遵循以下安装说明:
    • http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
    • 基本上,运行:make menuconfig,make,make modules,make modules_install,make install,reboot
    • 我没有在Make menuconfig部分真正更改任何内容

    重新启动后,它失败,并出现以下错误:

    No volume groups found
    Volume group "VolGroup00" not found
    Unable to access resume device (/dev/VolGroup00/LogVol01)
    mount: could not find filesystem '/dev/root'
    setuproot: moving /dev failed: No such file or directory
    setuproot: error mounting /proc: No such file or directory
    setuproot: error mounting /sys: No such file or directory
    switchroot: mount failed: No such file or directory
    Kernel panic - not syncing: Attempted to kill init!
    

    环境
    我运行的是VMware Fusion 3.1.0(261058)下的Red Hat Enterprise Linux Server(2.6.18-194.3.1.el5pae),它运行在带有OS X v10.5.8的MacBook Pro上,运行带有4GB 1067 MHz DDR3内存的2.8 GHz Intel Core Duo处理器。虚拟机分配了2个处理器内核和2048 MB内存。vm硬盘设置指向文件“Red Hat Enterprise Linux 5.vmdk”,选中“总线类型”设置为“SCSI”,“磁盘大小”设置为40GB,“拆分为2GB文件”选项。

    当我使用下面的/boot/grub/menu.lst文件时,除了它引导到错误的内核(2.6.18-194.3.1.el5pae而不是2.6.34)之外,其他一切都工作得很好:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux Server (2.6.34)
        root (hd0,0)
        kernel /vmlinuz-2.6.34 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.34.img
    title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.3.1.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.3.1.el5PAE.img
    title Red Hat Enterprise Linux Server (2.6.18-194.el5PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-194.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-194.el5PAE.img
    

    当我使用以下文件(最后一行被注释掉,并进行了一些其他小的编辑)时,它试图引导正确的内核,但引导失败,内核死机如上所述:

    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
    #          initrd /initrd-version.img
    #boot=/dev/sda
    default=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux Server (2.6.34)
        root (hd0,0)
        kernel /vmlinuz-2.6.34 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.34.img
        savedefault
        boot
    #title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5PAE)
    #   root (hd0,0)
    #   kernel /vmlinuz-2.6.18-194.3.1.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    #   initrd /initrd-2.6.18-194.3.1.el5PAE.img
    #title Red Hat Enterprise Linux Server (2.6.18-194.el5PAE)
    #   root (hd0,0)
    #   kernel /vmlinuz-2.6.18-194.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    #   initrd /initrd-2.6.18-194.el5PAE.img
    

    我不明白,在一种情况下,它如何能够很好地找到VMware的文件系统,而在另一种情况下,它却不能。我错过了什么?我是否应该选择一些与VMware相关的特殊编译选项?在VMware Fusion方面有什么需要我改变的吗?我搞不清楚!

    非常感谢您的任何建议!

    3 回复  |  直到 8 年前
        1
  •  1
  •   James    14 年前

    您的内核可能无法加载定位卷所需的模块。

    我的最佳猜测是你的名字不在正确的地方。它需要与安装的内核在同一目录中。

    另外,对于RedHat系统,遵循Debian指令也不是一个好主意。一般来说,这是可以的,但是您正在做一些相对特定于分布的事情。

        2
  •  6
  •   Yuriy Litvin    11 年前

    我也有类似的问题。

    内核比硬件老得多。硬盘已按SATA默认方式连接。我(在bios或vm.properties中)重新配置了硬件以通过ide进行连接。这对我很有效,我很高兴:)

        3
  •  0
  •   SanMarz    8 年前

    我在另一种情况下收到了内核的恐慌。我有一个Rhel5.5工作站,BIOS/主板出现故障。因此,我将操作系统驱动器移到了另一台相同的PC(Dell T5500)和另一台相同的PC(Dell T5400)。我以前就这样做过,因为Linux包含许多主板的驱动程序,而且PC通常是直接启动的。两个核恐慌是相同的。我很惊讶。我向一个朋友提到了你的决心,他还记得一个可能导致这种情况发生的BIOS设置。我们将BIOS->驱动器->SATA操作->RAID SATA更改为RAID AHCI。更改此BIOS设置后,两台电脑都启动了RHEL5.5 OS HD!!替换的PC以前有Windows。他告诉我Windows需要ATA BIOS设置,而Linux需要另一个。谁知道呢!