笔记:在将其标记为重复之前,请完整阅读该问题。
我一直在正常使用 Ubuntu 12.04,但是今天当我打开笔记本电脑并从两个选项中选择 Ubuntu(Windows 和 Ubuntu)时,出现了以下屏幕:
我在这里搜索了很多次,但找不到可行的解决方案。
一个解决方案建议我先ls
在不同的分区中执行操作,然后查看文件所在的位置vmliuz
。initrd
但我没有找到这些文件的位置。
我也调整了笔记本电脑的亮度,这可能是屏幕卡住的原因。
编辑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/
编辑2:
另外,请注意,我已经安装了 Ubuntu 12.04 和 Windows 7。我的 Ubuntu 位于以下位置;我通过启动 Windows 操作系统进行了检查:
grub ls (hd0,3)/ubuntu/
install/ uninstall-wubi.exe winboot/
答案1
如果你没有安装 Wubi.exe:
在grub
提示符下尝试以下命令:
set pager=1
ls
现在,假设的输出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
当然,vmlinuz-3.13.0-29-generic
用initrd.img-3.13.0-29-generic
你在/boot
/dev/sda1
是根系统的位置。如果/dev/sda1
没有效果,您可能需要更改它。
如果您使用 Wubi.exe 安装:
如果你使用 Wubi 安装 Ubuntu,请按照五笔指南:
启动 Windows,
chkdsk /r
从安装 Ubuntu 的同一驱动器上的 Windows 运行,干净关闭,然后尝试再次启动 Ubuntu。如果还是不行,请检查是否有
C:\ubuntu\disks\root.disk
文件。如果缺少此文件,请在 Windows 上启动,打开Windows Explorer
,将其设置为能够查看隐藏文件夹,然后查找名为C:\found.000
或 的隐藏文件夹dir0000.chk
。将文件从 found.000 移动到目录中的原始位置\ubuntu\disks
。您可能必须将其重命名为root.disk
。
答案2
运行这些命令
grub> linux (hd0,1)/vmlinuz root=/dev/sda1
grub> initrd (hd0,1)/initrd.img
grub> boot
用你的硬盘号和 /dev/sda1替换hd0
为保存 /boot 的分区,如果你没有多个硬盘并且使用默认安装,那么这个方法就可以正常工作
当你可以再次启动时你应该解决了你的问题
sudo update-grub
sudo grub-install /dev/sda