最新内核升级后找不到根设备

最新内核升级后找不到根设备

我正在运行 Ubuntu 13.04。昨天我尝试安装更新,但出现错误,系统建议我运行,apt-get -f install于是我照做了。

现在,当我尝试启动时,出现错误“放弃等待根设备”。文本几乎与问题。但是,“内置 shell”根本不起作用!我输入的任何内容都不会显示在屏幕上,也不会执行任何操作。

加载以前的内核可以正常工作(尽管有一些图形故障),但据我所知,它应该启动完全相同的东西。新内核是 3.8.0-31-generic,以前工作的内核是 3.8.0-25-generic。

我尝试rootdelay按照建议将 a 添加到 grub,但它只是等待更长时间并显示相同的屏幕。这是我的整个/boot/grub/menu.lst文件,已删除注释:

default     0
timeout     3

title       Ubuntu 13.04, kernel 3.8.0-31-generic
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-31-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro quiet splash 
initrd      /boot/initrd.img-3.8.0-31-generic
quiet

title       Ubuntu 13.04, kernel 3.8.0-31-generic (recovery mode)
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-31-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro  single
initrd      /boot/initrd.img-3.8.0-31-generic

title       Ubuntu 13.04, kernel 3.8.0-25-generic
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-25-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro quiet splash 
initrd      /boot/initrd.img-3.8.0-25-generic
quiet

title       Ubuntu 13.04, kernel 3.8.0-25-generic (recovery mode)
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-25-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro  single
initrd      /boot/initrd.img-3.8.0-25-generic

title       Ubuntu 13.04, kernel 3.8.0-23-generic
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-23-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro quiet splash 
initrd      /boot/initrd.img-3.8.0-23-generic
quiet

title       Ubuntu 13.04, kernel 3.8.0-23-generic (recovery mode)
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/vmlinuz-3.8.0-23-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac ro  single
initrd      /boot/initrd.img-3.8.0-23-generic

title       Ubuntu 13.04, memtest86+
uuid        c690c1e6-beb9-46e7-85c2-145cd07d44ac
kernel      /boot/memtest86+.bin
quiet

title       --------------------------------
root

title       Windows Vista
rootnoverify    (hd0,2)
savedefault
makeactive
chainloader +1

使用 rootdelay 时,顶部的行是:

kernel      /boot/vmlinuz-3.8.0-31-generic root=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac rootdelay=120 ro quiet splash 

如您所见,所有内核的 UUID 都是相同的。为什么我会遇到这个问题?我该怎么做才能修复它?

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                  Version                 Architecture            Description
+++-=====================================-=======================-=======================-===============================================================================
un  linux-image-2.6                       <none>                                          (no description available)
rc  linux-image-2.6.28-11-generic         2.6.28-11.42            i386                    Linux kernel image for version 2.6.28 on x86/x86_64
rc  linux-image-2.6.31-22-generic         2.6.31-22.65            i386                    Linux kernel image for version 2.6.31 on x86/x86_64
rc  linux-image-2.6.32-25-generic         2.6.32-25.44            i386                    Linux kernel image for version 2.6.32 on x86/x86_64
rc  linux-image-2.6.35-22-generic         2.6.35-22.35            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.35-23-generic         2.6.35-23.41            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.35-24-generic         2.6.35-24.42            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.35-25-generic         2.6.35-25.44            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.35-27-generic         2.6.35-27.48            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.35-28-generic         2.6.35-28.50            i386                    Linux kernel image for version 2.6.35 on x86/x86_64
rc  linux-image-2.6.38-10-generic         2.6.38-10.46            i386                    Linux kernel image for version 2.6.38 on x86/x86_64
rc  linux-image-2.6.38-11-generic         2.6.38-11.50            i386                    Linux kernel image for version 2.6.38 on x86/x86_64
rc  linux-image-2.6.38-12-generic         2.6.38-12.51            i386                    Linux kernel image for version 2.6.38 on x86/x86_64
rc  linux-image-2.6.38-8-generic          2.6.38-8.42             i386                    Linux kernel image for version 2.6.38 on x86/x86_64
un  linux-image-3.0                       <none>                                          (no description available)
rc  linux-image-3.0.0-13-generic          3.0.0-13.22             i386                    Linux kernel image for version 3.0.0 on x86/x86_64
rc  linux-image-3.0.0-14-generic          3.0.0-14.23             i386                    Linux kernel image for version 3.0.0 on x86/x86_64
rc  linux-image-3.0.0-15-generic          3.0.0-15.26             i386                    Linux kernel image for version 3.0.0 on x86/x86_64
rc  linux-image-3.0.0-16-generic          3.0.0-16.29             i386                    Linux kernel image for version 3.0.0 on x86/x86_64
rc  linux-image-3.0.0-17-generic          3.0.0-17.30             i386                    Linux kernel image for version 3.0.0 on x86/x86_64
rc  linux-image-3.2.0-24-generic          3.2.0-24.39             i386                    Linux kernel image for version 3.2.0 on 64 bit x86 SMP
rc  linux-image-3.2.0-25-generic          3.2.0-25.40             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-26-generic          3.2.0-26.41             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-27-generic          3.2.0-27.43             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-29-generic          3.2.0-29.46             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-30-generic          3.2.0-30.48             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-31-generic          3.2.0-31.50             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-32-generic          3.2.0-32.51             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-33-generic          3.2.0-33.52             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-34-generic          3.2.0-34.53             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.2.0-35-generic          3.2.0-35.55             i386                    Linux kernel image for version 3.2.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-21-generic          3.5.0-21.32             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-22-generic          3.5.0-22.34             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-23-generic          3.5.0-23.35             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-25-generic          3.5.0-25.39             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-26-generic          3.5.0-26.42             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.5.0-27-generic          3.5.0-27.46             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-3.8.0-19-generic          3.8.0-19.30             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc  linux-image-3.8.0-21-generic          3.8.0-21.32             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc  linux-image-3.8.0-22-generic          3.8.0-22.33             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-3.8.0-23-generic          3.8.0-23.34             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-3.8.0-25-generic          3.8.0-25.37             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-3.8.0-31-generic          3.8.0-31.46             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-3.8.0-32-generic          3.8.0-32.47             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-21-generic    3.5.0-21.32             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-22-generic    3.5.0-22.34             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-23-generic    3.5.0-23.35             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-25-generic    3.5.0-25.39             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-26-generic    3.5.0-26.42             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.5.0-27-generic    3.5.0-27.46             i386                    Linux kernel image for version 3.5.0 on 32 bit x86 SMP
rc  linux-image-extra-3.8.0-19-generic    3.8.0-19.30             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc  linux-image-extra-3.8.0-21-generic    3.8.0-21.32             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
rc  linux-image-extra-3.8.0-22-generic    3.8.0-22.33             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-extra-3.8.0-23-generic    3.8.0-23.34             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-extra-3.8.0-25-generic    3.8.0-25.37             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-extra-3.8.0-32-generic    3.8.0-32.47             i386                    Linux kernel image for version 3.8.0 on 32 bit x86 SMP
ii  linux-image-generic                   3.8.0.32.50             i386                    Generic Linux kernel image

答案1

好的,首先,你的内核列表中有大量的杂乱内容,请清除它们:

sudo apt-get purge linux-image-2.6.* linux-image-3.0.* linux-image-3.2.*

这些问题似乎有不同的原因,从软件到硬件,但其中一些并不适用于您,因为您能够启动其他内核。那么,该怎么办?

当您使用其他内核时,请删除并重新安装两个新内核:

 sudo apt-get clean
 sudo apt-get purge linux-image-3.8.0-31-generic linux-image-3.8.0-32-generic
 sudo apt-get install linux-image-generic

第一行将删除本地缓存中的内核包,并确保您有足够的可用空间来安装新内核。

现在,如果你看到这个块:

Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
  - Check rootdelay= (did the system wait long enough?)
  - Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/a0c70102-b5d8-4b82-a14c-225330e1c4d4 does not exist. Dropping to a shell!


BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu11) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs) _ 

以下是常见的“解决方案”及其原因:

  1. 您尝试使用 来修复该问题rootdelay=,但遗憾的是,这对您来说不起作用,因为问题可能出在其他地方。

    /boot/vmlinuz-3.8.0-31-通用根=UUID=c690c1e6-beb9-46e7-85c2-145cd07d44ac根延迟=120ro 安静飞溅
  2. 如果您使用的是 RAID(由于其他内核启动,因此值得怀疑),这可能会导致问题。将分区移至非 raid 文件系统应该可以解决问题。或者检查是否/etc/initramfs-tools/modules正确的模块然后运行sudo update-initramfs -u

  3. 当您使用(initramfs)内置 shell 时,您可以输入exit并启动。同样,问题出在其他地方。

  4. 文件系统损坏可能会导致此问题。fsck从实时系统运行应该会有所帮助。

  5. 如果您删除,quiet splash您可以获得有关具体失败原因的更多详细信息。如果您遇到此问题,请quiet splash从 grub 脚本中删除,这确实会有所帮助。

  6. 您可能只是忘记了为您的内核版本安装linux-image-extra-X.YY.Z-PP,或者由于某种原因安装不完整(rc在 的输出中dpkg -l | grep linux-image)。最可怕的是/boot/initrd.img-X.YY.Z-PP将会被内置两个都在某些情况下,但对于您的硬件来说,额外的模块linux-image-extra可能是绝对必要的。在这种情况下,您必须将“无法找到根设备”解释为“无法找到所需的额外驱动程序或模块”。

这是我到处收集的一些技巧,如果您遇到同样的问题,请使用第 5 个技巧并提供内核消息的完整输出。

相关内容