如何从 Windows 8 切换预装的 Ubuntu?

如何从 Windows 8 切换预装的 Ubuntu?

我的电脑预装了 Ubuntu,后来又安装了 Windows 8。现在我想使用 Ubuntu,但不知道如何打开它。请帮忙!

答案1

您可能需要提供更多有关您无法访问 ubuntu 的具体原因的详细信息。其中一个问题可能出在您的 grub 加载程序上。grub 菜单基本上列出了计算机上安装的所有可用操作系统。您可能需要安装自定义 grub,以便可以访问 grub 菜单。

“当您安装 Windows 时,Windows 会假定它是机器上唯一的操作系统 (OS),或者至少它不考虑 Linux。因此,它会用自己的引导加载程序替换 GRUB。您需要做的是用 GRUB 替换 Windows 引导加载程序。我见过各种使用 GRUB 命令或类似命令替换 GRUB 的说明,但对我来说,最简单的方法是简单地 chroot 到您的安装并运行 update-grub。chroot 很棒,因为它允许您在实际安装上工作,而不是尝试到处重定向内容。它真的很干净。

就是这样:

Boot from the live CD or live USB, in "Try Ubuntu" mode.
Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!

Mount your partition:

sudo mount /dev/sda2 /mnt  #Replace sda2 with your partition number

Bind mount some other necessary stuff:

for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done

chroot into your Ubuntu install:

sudo chroot /mnt

At this point, you're in your install, not the live session, and running as root. Update grub:

update-grub

If you get errors, go to step 7. (Otherwise, it is optional.)

Depending on your situation, you might have to reinstall grub:

grub-install /dev/sda
update-grub # I'm not sure if this is necessary, but it doesn't hurt.

If everything worked without errors, then you're all set:

exit
sudo reboot

At this point, you should be able to boot normally.

如果您无法正常启动,并且由于没有错误消息而未执行步骤 7,请重试步骤 7。

Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 7 does. Experience helping users in chat has shown that step 7 is sometimes necessary even when no error messages are shown."

-这不是我的答案。

相关内容