簡體   English   中英

在VMWare Fusion下在RedHat Linux中引導時出現內核恐慌:找不到文件系統

[英]Kernel Panic When Booting in RedHat Linux under VMWare Fusion : Filesystem Not Found

這應該很簡單。 然而,它給了我地獄。

問題
我已經編譯了最新的內核,當我重啟機器時,它會產生與文件系統有關的內核恐慌。


如何獲得新內核以識別VMWare文件系統? 必須在某處進行一些設置,以使Linux安裝知道“硬盤”實際上不是驅動器,而實際上是代表虛擬機的文件。

背景
首先,我不是Linux專家。 這是我第一次編譯內核。 我為解決此問題所做的工作:

  • 從kernel.org下載了內核版本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),該軟件在MacBook Pro上運行,OS X v10.5.8在2.8 GHz Intel Core Duo處理器上運行並具有4GB 1067 MHz DDR3內存 虛擬機分配了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方面的某些內容嗎? 我不知道這個!

任何和所有建議都將不勝感激!

我有一個類似的問題。

內核比硬件要老得多。 硬盤默認是通過SATA連接的。 我重新配置了硬件(在BIOS或VM.Properties中)以通過IDE連接。 它為我工作,我很高興:)

您的內核可能無法加載查找卷所需的模塊。

我最好的猜測是您的initrd位置不正確。 它必須與已安裝的內核位於同一目錄中。

另外,遵循Debian的RedHat系統說明也不是一個好主意。 總的來說還可以,但是您正在做的是相對於發行版特定的事情。

我在其他情況下收到了內核恐慌。 我有一個RHEL 5.5工作站,其中BIOS /主板出現故障。 因此,我將OS驅動器移至另一台相同的PC(Dell T5500)和另一台已返回一代的PC(Dell T5400)。 過去,我這樣做過,因為Linux包含許多主板的驅動程序,並且PC通常會啟動。 兩種內核恐慌是相同的。 我很驚訝。 我曾向一位朋友提及您的解決方案,他記得一個BIOS設置可能會導致這種情況發生。 我們將BIOS->驅動器-> SATA操作-> RAID SATA更改為RAID AHCI。 更改此BIOS設置后,兩台PC均使用RHEL5.5 OS HD啟動! 替換的PC之前裝有Windows。 他告訴我,Windows需要ATA BIOS設置,而Linux需要另一個。 誰知道!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM