安装12:04后,GRUB抱怨“没有这样的分区”

我刚刚安装了12.04。 我以前安装了11.10, /dev/sda6作为安装分区安装在/并且/dev/sda1安装在/home 。 安装12.04时,我正确选择了相同的选项,没有重新格式化。 我选择/dev/sda6作为引导加载程序分区。 正如预期的那样,我被警告将删除/dev/sda6上的系统文件。

重新安装后,我无法通过GRUB:选择主启动选项或恢复模式选项,两者都给我错误“没有这样的分区”,以及返回主GRUB屏幕的选项。

这里发生了什么? 它说什么分区不存在? 显然,我该如何解决这个问题?


编辑1:

我得到错误三次; 看起来像:

 error: no such partition. error: no such partition. error: no such partition. Press any key to continue ... 

“内存测试”启动选项也会发生这种情况。

输入命令行并运行ls会给我同样的错误。

要修复Grub引导加载程序,请尝试以下步骤。

1 – Live CD

首先,您需要从Ubuntu Live CD启动。

2 – 修复引导加载程序

从Live CD打开终端,然后运行以下命令:

 sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair boot-repair 

几秒钟后,Boot Repair的主窗口将打开。

点击Recommended repair

你完成了!

重新启动以测试所有内容。

如果一切顺利,你应该立即开始运行。 如果没有,继续前进。

命令行版本

如果上述操作失败,您还可以使用命令行(从Live CD)重新安装Grub。

重要说明:sda1替换为包含Ubuntu和sda的分区,其中包含Ubuntu分区的驱动器

 sudo mount /dev/sda1 /mnt sudo grub-install --root-directory=/mnt/ /dev/sda *edit* at this point, also ensure that if /usr and /var are on seperate partitions that you mount them to /mnt/usr and /mnt/var *edit 2* whithin the chroot you need to have /dev /run and /proc available for update-grub to work, use the following to acheive that: for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done sudo chroot /mnt sudo update-grub sudo reboot