sky*_*der 27 grub2 dual-boot uefi
所以,我已经成功地用 Ubuntu 12.04 双启动了我的 Windows 8 机器。但是,我仍然没有方便的方法来选择在启动时加载的操作系统。
安装 Ubuntu 后,我的电脑仍然直接加载 Windows 8。然后我将其添加grubx64.efi
到引导加载程序的白名单中。但是在那之后,我的机器直接加载了 Ubuntu,甚至没有出现 GRUB 的影子!
我使用了引导修复,我得到了这个 paste.ubuntu URL:paste.ubuntu.com/1326074。运行引导修复(并重新将grubx64.efi
文件列入白名单)后,GRUB 现在显示但没有任何 Windows 8 选项!
最后,我跑了sudo fdisk -l
,它给了我这个:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x6396389f
Device Boot Start End Blocks Id System
/dev/sda1 1 1465149167 732574583+ ee GPT
Partition 1 does not start on physical sector boundary.
Run Code Online (Sandbox Code Playgroud)
我猜我的问题与fdisk
上面的警告有关,但我不知道该怎么办。我现在如何进行?
我etc/default/grub
的如下:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Run Code Online (Sandbox Code Playgroud)
另外,只是为了记录,这就是我在安装双引导时遵循的。该教程(使用 11.10,我必须注意)没有提及有关此问题的任何内容。有什么我不应该做的吗?
Rod*_*ith 18
首先,你的fdisk -l
输出没有问题;它只是将您的磁盘标识为使用GUID 分区表 (GPT)分区系统。要查看您的分区,您必须改用启用 GPT 的工具,例如gdisk
或parted
,而不是fdisk
,它不理解 GPT。
其次,您可以通过向 GRUB 添加合适的条目/etc/grub.d/40_custom
然后执行sudo update-grub
. 条目可能如下所示:
menuentry "Windows 8" {
set root='(hd0,gpt1)'
chainloader /EFI/microsoft/BOOT/bootmgfw.efi
}
Run Code Online (Sandbox Code Playgroud)
不过,详细信息可能取决于您的安装。
第三,如果您认为 rEFInd 很丑,您可以随时尝试其他 rEFInd 主题或创建自己的主题,如rEFInd 文档中所述。或者,如果您更喜欢文本模式引导加载程序,您可以textonly
在refind.conf
. 您可以通过切换到gummiboot来达到类似的目的。
第四,如果 rEFInd 定期报告错误,请写下来或用数码相机拍下屏幕并报告给我。(我是 rEFInd 的维护者。)如果没有人报告错误,则无法修复它们;或者如果它们不是 rEFInd 中的错误,消息可能会提供有关如何解决问题的线索。
最后,可以在不使用 GRUB 的情况下通过 rEFInd(或gummiboot)启动 Linux;你只需要一个不同的 EFI 引导加载程序。我个人的偏好是 Linux 内核的EFI 存根加载器。不过,这仅在 3.3.0 及更高版本的内核中可用。由于 Ubuntu 12.04 附带 3.2.0 内核,您需要为 Ubuntu 12.04 找到一个预构建的 3.3.0(我听说过这样的事情,但我没有任何方便的链接)或构建您的从源代码拥有。(你也可以安装 Ubuntu 12.10,它附带了一个合适的内核,但大概你想要一个 LTS 版本,所以这可能不是最佳的。)请参阅 rEFInd 文档关于启动 Linux的页面有关如何设置的更多详细信息。您也可以使用 ELILO 或 GRUB Legacy。如果您只是反对延迟,您可以减少 GRUB 2 超时值并将其设置为默认不显示菜单。
小智 8
两个答案/EFI/Microsoft/Boot/bootmgfw.efi
都可以。但是,为了获得set root='(hd0,gpt1)'
. 如果你知道这很简单
当 GRUB 启动时:在提示符下按c
给出命令ls
。
您将获得硬盘上的分区列表,例如 (hd0,gpt1) 等。
键入ls
(hd0,gpt1) 并尝试其他分区。
看看标签,如果它指出 EFI,你就知道你成功了。
警告:可能会有更多标有 EFI 的分区,具体取决于您安装 Ubuntu 的方式。尝试所有这些。
启动到Ubuntu的使用CD,
选择“试用Ubuntu”,
连接到互联网,
通过打开一个终端窗口Ctrl- - Alt,t然后运行:boot-repair
如果未找到引导修复,则安装它:
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)
单击“推荐维修”。在纸上写下将出现的新 URL。重新启动电脑,你应该会得到一个可以访问 Ubuntu 和 Windows 的 GRUB 菜单。如果有任何问题,请指出新的 URL。
小智 6
尝试运行sudo update-grub
。这应该有望自动识别 Windows 8 并将其添加到 GRUB 并重新配置菜单。
如果失败,请/etc/default/grub
在此处共享您的文件,我们将查看。
归档时间: |
|
查看次数: |
116523 次 |
最近记录: |