这应该很简单。但它却让我下地狱。
问题
我已经编译了最新的内核,当我重新启动我的机器时,它会产生与文件系统相关的内核恐慌。
问题
如何让新内核识别VMWare文件系统?一定有某种设置让Linux安装知道“硬盘”不是真正的驱动器,而是一个代表虚拟机的文件。
背景
首先,我不是Linux专家。这是我第一次编译内核。我为解决这个问题所做的一切:
kernel.org
http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
基本上,
中没有真正更改任何内容。
在重新启动时,它失败了,出现了一个错误,大致如下:
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融合版本3.1.0 (261058)下运行(2.6.18-194.3.1.el5PAE),运行在MacBook Pro上,OSXv10.5.8运行2.8GB英特尔核心双处理器,内存为4GB 1067 MHz DDR3。虚拟机被分配给两个处理器核心和2048 MB内存。VM硬盘设置指向文件“RedHatEnterpriseLinux5.vmdk”,其中"Bus Type“设置为"SCSI",”磁盘大小“设置为40 2Gb,”拆分为2GB Files“选项选中。
当我使用以下/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融合方面有什么东西我需要改变吗?我搞不懂这个!
任何和所有的建议都是非常感谢的!
发布于 2010-07-08 02:30:01
您的内核可能无法加载定位卷所需的模块。
我猜你的位置不对。它需要与已安装的内核位于同一个目录中。
此外,遵循RedHat系统的Debian指令也不是一个好主意。一般来说,这是可以的,但您正在做的是相对特定的发行。
发布于 2013-10-02 16:58:57
我也有过类似的问题。
内核比硬件老得多。硬盘驱动器是由SATA默认附加的。我重新配置了(在BIOS或VM.Properties中)硬件,以便通过IDE进行连接。它对我有效,我很高兴:)
发布于 2016-09-25 06:04:15
在不同的情况下,我收到了内核的恐慌。我有一个RHEL5.5工作站,其中的BIOS/主板失败。因此,我把操作系统驱动器移到了另一台相同的PC (戴尔T5500)和另一台一代人(戴尔T5400)上。我过去就这样做过,因为Linux包含许多主板的驱动程序,而PC通常会启动。两种核心恐慌都是相同的。我很惊讶。我向一位朋友提到了你的决议,他记得一个BIOS设置,它可能导致这种情况发生。我们将BIOS->驱动器->SATA操作-> RAID SATA更改为RAID AHCI。更改此BIOS设置后,两台PC都启动了RHEL5.5OSHD!!替换的个人电脑有Windows优先。他告诉我Windows需要ATA BIOS设置,Linux需要另一个BIOS设置。谁知道呢!
https://stackoverflow.com/questions/3199046
复制相似问题