GNU GRUB 终端 - 而不是 Ubuntu 登录屏幕

Ars*_*Ali 21 boot grub2 dual-boot

注意:在将其标记为重复之前,请完整阅读问题。

我一直在正常使用 Ubuntu 12.04,但是今天当我打开我的笔记本电脑,并从两个选项中选择了 Ubuntu:Windows 和 Ubuntu,出现了以下屏幕:

在此处输入图片说明

我在这里搜索了很多,但找不到有效的解决方案。

一个解决方案建议我首先ls在不同的分区中执行并查看文件vmliuzinitrd驻留的位置。但是我找不到这些文件在哪里。

我还玩过我的笔记本电脑的亮度,这可能是卡住屏幕的原因。

编辑1:

我仍然无法找到包含该initrd.img文件的目录。

grub> ls 
(memdisk) (hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
grub> set pager=1
grub> ls (memdisk)/
wubuilder.cfg
grub> ls (hd0)/
error: unknown filesystem.
grub> ls (hd0,3)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $RECYCLE.BIN/ $Secure $UpCase $Volume ./ Code School/ Downloads/ Movies/ System Volume Information/ ubuntu/ wubuilder
grub> ls (hd0, 2)/
Programming Files (x86)/ Users/ $AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $RECYCLE.BIN/ $Secure $UpCase $Volume ./ Documents and Settings/ hiberfil.sys Intel/ MSOCache/ pagefile.sys PerfLogs/ Program Files/ ProgramDAta/ Recovery/ Setup/ swsetup/ System Volume Information/ Windows/ wubildr wubildr.mbr
grub> ls (hd0, 1)/
$AttrDef $BadClus $Bitmap $Boot $Extend/ $LogFile $MFT $MFTMirr $RECYCLE.BIN/ $Secure $UpCase $Volume ./ Boot/ bootmgr BOOTSECT.BAK System Volume Information/
Run Code Online (Sandbox Code Playgroud)

编辑2:

另外,请注意我已经安装了 Ubuntu 12.04 和 Windows 7。我的 Ubuntu 位于以下位置;我通过启动 Windows 操作系统来检查它:

grub ls (hd0,3)/ubuntu/
install/ uninstall-wubi.exe winboot/ 
Run Code Online (Sandbox Code Playgroud)

Ron*_*Ron 15

如果没有安装 Wubi.exe:

grub提示符下尝试这些命令:

set pager=1
ls
Run Code Online (Sandbox Code Playgroud)

现在,假设输出ls是:(hd0) (hd0,msdos2) (hd0,msdos1),为了找到 linux 根文件系统运行:

ls (hd0,1)/ 这应该为您提供/诸如bin/ boot/ cdrom/ dev/ etc/ home/ lib/等的所有文件/文件夹。

完成后继续:

set root=(hd0,1)
linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1
initrd /boot/initrd.img-3.13.0-29-generic
boot
Run Code Online (Sandbox Code Playgroud)

当然,替换vmlinuz-3.13.0-29-genericinitrd.img-3.13.0-29-generic与你找到你的/boot

/dev/sda1是根系统的位置。如果/dev/sda1不起作用,您可能需要更改它。

如果您已使用 Wubi.exe 安装:

如果您已经使用 Wubi 安装了 Ubuntu,请按照WubiGuide 中给出的步骤执行以下步骤:

  1. 启动到 Windows,chkdsk /r在安装 Ubuntu 的同一驱动器上从 Windows运行,彻底关闭,然后再次尝试启动到 Ubuntu。

  2. 如果仍然不好,请检查您是否有C:\ubuntu\disks\root.disk文件。如果此文件丢失,请在 Windows 上启动,打开Windows Explorer,将其设置为能够看到隐藏文件夹,然后查找名为C:\found.000或的隐藏文件夹dir0000.chk。将文件从 found.000 移动到目录中的原始位置\ubuntu\disks。您可能需要将其重命名为root.disk.


May*_*hux 11

运行这些命令

grub> linux  (hd0,1)/vmlinuz root=/dev/sda1
grub> initrd  (hd0,1)/initrd.img
grub> boot
Run Code Online (Sandbox Code Playgroud)

更换hd0你的硬盘数量和你的分区持有的/ boot的/ dev / sda1的主要dafult会工作,如果你不这样做有一个以上的硬盘,并用默认制作安装

检查这个以获取更多信息

当您可以再次启动时,您应该解决您的问题

sudo update-grub
sudo grub-install /dev/sda
Run Code Online (Sandbox Code Playgroud)