我刚刚安装了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引导加载程序,请尝试以下步骤。
首先,您需要从Ubuntu Live CD引导。
从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。
重要:用包含Ubuntu的分区sda1
和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
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句