在VMware Fusion下启动RedHat Linux时的内核恐慌:找不到文件系统
-
02-10-2019 - |
题
这应该很简单。然而,这给了我地狱。
问题
我已经编译了最新的内核,当我重新启动框时,它会生成与文件系统相关的内核恐慌。
问题
如何获得新内核来识别VMware文件系统?必须在某个地方设置一些设置,使Linux安装知道“硬盘驱动器”不是真正的驱动器,而是一个代表虚拟机的文件。
背景
首先,我不是Linux Guru。这是我第一次编译内核。我为解决这个问题做了什么:
- 从kernel.org下载了内核版本2.6.34
- 将源拆箱到目录中
- 在此处遵循安装说明: http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
- 基本上,运行:制作menuconfig,制作,制作模块,制作模块_install,制作安装,重新启动
- 我没有真正改变任何东西
重新启动后,它沿着:
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!
环境
我正在运行Red Hat Enterprise Linux Server(2.6.18-194.3.1.el5pae)在VMware Fusion版本3.1.0(261058)上,在MacBook Pro上运行的带有OS X V10.5.8运行2.8 GHz Intel Core Duo Processor,带有4GB 1067 MHz DDR3内存。虚拟机分配了2个处理器内核和2048 MB的内存。 VM硬盘设置指向“ Red Hat Enterprise Linux 5.VMDK”文件,其中“ BUS类型”设置为“ 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融合侧有一些东西吗?我无法弄清楚!
所有建议都非常感谢!
解决方案
您的内核可能无法加载定位量所需的模块。
我最好的猜测是您的Initrd不在正确的位置。它需要与已安装的内核处于相同的目录。
另外,遵循Debian指示RedHat系统不是一个好主意。总的来说,这还可以,但是您正在做一些相对分布的事情。
其他提示
我也有类似的问题。
内核比硬件大得多。 SATA默认设置附加了硬盘驱动器。我重新配置了(在BIOS或VM.Properties中)硬件以通过IDE连接。它对我有用,我很高兴:)
我在不同的情况下收到了内核恐慌。我有一个RHEL 5.5工作站,其中BIOS/主板失败了。因此,我将操作系统驱动器移至另一台相同的PC(Dell T5500),然后将OS驱动器移至另一代后方(Dell T5400)。过去,我已经这样做了,因为Linux包含许多主板的驱动程序,并且PC通常启动。两种内核恐慌都是相同的。我很惊讶。我向朋友提到了您的决议,他想起了可能导致这种情况的BIOS环境。我们更改了Bios->驱动器 - > SATA操作 - > RAID SATA突袭AHCI。更改此BIOS设置后,两台PC都使用RHEL5.5 OS HD启动!替换PC有Windows之前。他告诉我,Windows需要ATA BIOS设置,而Linux需要对方。谁知道!