这应该很简单。然而,这让我见鬼去吧。
问题
我已经编译了最新的内核,当我重新启动我的机器时,它会生成一个与文件系统相关的内核死机。
问题
如何让新内核识别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方面有什么需要我改变的吗?我搞不清楚!
非常感谢您的任何建议!