Ubuntu 12.04 (Wubi) 无法启动-root.disk 已损坏

Ubuntu 12.04 (Wubi) 无法启动-root.disk 已损坏

我的笔记本电脑上通过 Wubi 安装了 Ubuntu 12.04。不知为何,当我在启动时单击 Ubuntu(当您必须选择 Windows 或 Ubuntu 时)时,我得到了以下屏幕,grub 光标不断闪烁。

Gnu grub version 1.99-21 Ubuntu 3.4 

Minimal bash-like line editing is supported. For the first word, tab lists possible
command completions. Anywhere else tab lists possible device or file completions. 

grub>

您能告诉我如何修复这个问题并正常启动 Ubuntu 吗?

答案1

有时,root.diskWubi 用于启动的虚拟分区 会损坏。这是位于\ubuntu\disks\目录中的文件。如果 Grub(在 内wubildr)无法挂载root.disk,它就无法显示 grub 菜单(存储在 上root.disk),然后它只会将您带到 grub 提示符以等待进一步的指令。

除非您找出问题所在,否则您无法从 grub 提示符下执行任何操作,root.disk而且很可能存在NTFS损坏。例如,如果您执行了硬关机或重启,这种情况很常见。在某些情况下,原因尚不清楚。

您需要做的是从安装 Wubi 的驱动器上的 Windows运行chkdsk /f(或)。如果您安装在驱动器上,则需要完全重启。/rC:\

要在 Windows 7 上运行chkdsk(第一个复选框对应chkdsk /f,第二个复选框对应chkdsk /r

Windows7 上的 chkdsk

如果出现提示,请重新启动计算机并启动 Windows 以完成操作,chkdsk确保不要“按下任意键”来中止它。

之后,检查ubuntu\disks\目录以确保root.disk仍在那里。在某些情况下,ubuntu\disks\目录本身不再存在。如果缺少任何一个,您需要查找它们,因为chkdsk通常会将损坏的文件/目录恢复到名为 等的隐藏文件夹中\found.000\found.001默认情况下,这些是隐藏的和受保护的操作系统目录(Windows 7),因此它们不会显示在资源管理器中。我发现最简单的方法是使用命令提示符。

为此,请右键单击CMD.EXE并选择“以管理员身份运行”。更改为目录\ubuntu所在的驱动器,然后搜索隐藏\found.???目录。

例如,如果root.disk缺少,则表示您正在寻找大小5GB为 > 的文件。如果您知道安装的大小,这会有所帮助。在本例中,它是15GB

C:\>dir /a:h
C:\>cd \found.000
C:\found.000>dir
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/07/2011  02:02 PM    15,000,000,000 file0000.chk
               1 File(s) 15,000,000,000 bytes
               0 Dir(s)  222,258,069,504 bytes free

C:\found.000>move file0000.chk \ubuntu\disks\root.disk
        1 file(s) moved.

如果整个\ubuntu\disks目录都丢失,您要查找名为的目录dir0000.chk,并且在其中您将找到正确命名的root.diskswap.disk,因此您可以将目录移回原位:

C:\>cd \found.000

C:\found.000>dir
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
19/07/2011  02:02 PM    <DIR>          dir0000.chk
               0 File(s)              0 bytes
               3 Dir(s)  222,258,069,504 bytes free

C:\found.000>dir dir0000.chk
 Volume in drive C is OS
 Volume Serial Number is B4B7-99A8

 Directory of C:\found.000\dir0000.chk

19/10/2012  04:51 PM    <DIR>          .
19/10/2012  04:51 PM    <DIR>          ..
24/02/2012  12:22 AM    <DIR>          boot
06/11/2012  09:28 AM    13,000,000,000 root.disk
15/11/2011  09:28 PM       268,435,456 swap.disk
               2 File(s) 13,268,435,456 bytes
               3 Dir(s)  127,904,968,704 bytes free

C:\>move dir0000.chk \ubuntu\disks
        1 dir(s) moved.

并非所有情况下都能保证恢复,具体取决于损坏程度。请注意,root.disk在运行之前可能正确存在chkdsk,但在运行之后可能被删除。

参考:http://ubuntu-with-wubi.blogspot.ca/2011/08/missing-rootdisk.html

答案2

我遇到了类似的问题,但不是 wubi。这是 ubuntu 双启动安装的问题。以下内容对我有帮助:

Booting From grub

This is how to set the boot files and boot the system from the grub> prompt. We know from running the ls command that there is a Linux root filesystem on (hd0,1), and you can keep searching until you verify where /boot/grub is. Then run these commands, using your own root partition, kernel, and initrd image:

    grub> set root=(hd0,1)
    grub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
    grub> initrd /boot/initrd.img-3.13.0-29-generic
    grub> boot
The first line sets the partition that the root filesystem is on. The second line tells GRUB the location of the kernel you want to use. Start typing /boot/vmli, and then use tab-completion to fill in the rest. Type root=/dev/sdX to set the location of the root filesystem. Yes, this seems redundant, but if you leave this out you'll get a kernel panic. How do you know the correct partition? hd0,1 = /dev/sda1. hd1,1 = /dev/sdb1. hd3,2 = /dev/sdd2. I think you can extrapolate the rest.

The third line sets the initrd file, which must be the same version number as the kernel.

The fourth line boots your system.

On some Linux systems the current kernels and initrds are symlinked into the top level of the root filesystem:

    $ ls -l /
    vmlinuz -> boot/vmlinuz-3.13.0-29-generic
    initrd.img -> boot/initrd.img-3.13.0-29-generic

So you could boot from grub> like this:

    grub> set root=(hd0,1)
    grub> linux /vmlinuz root=/dev/sda1
    grub> initrd /initrd.img
    grub> boot

来源:http://www.linux.com/learn/tutorials/776643-how-to-rescue-a-non-booting-grub-2-on-linux/

相关内容