jam*_*her 18 grub2 12.04 system-installation
我刚刚安装了 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 ...
Run Code Online (Sandbox Code Playgroud)
“内存测试”引导选项也会发生这种情况。
输入命令行并运行ls
给我同样的错误。
Sir*_*rlo 28
要修复 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
Run Code Online (Sandbox Code Playgroud)
几秒钟后,启动修复的主窗口将打开。
单击Recommended repair
。
重新启动以测试一切。
如果一切顺利,您现在应该可以正常运行了。如果没有,请继续。
如果上述操作失败,您还可以使用命令行(来自 Live CD)重新安装 Grub。
重要提示:替换sda1
为sda
包含 Ubuntu 的分区和包含 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
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
42111 次 |
最近记录: |