我有两个 HD,一个装有 Fedora 20,另一个装有 Windows 8。
我可以在启动时选择从哪个驱动器启动,并且选择我安装 Windows 的驱动器可以使其启动,但我希望在 grub 菜单中有该选项,而不是在我的计算机启动时必须按 F11 等。
以下是输出fdisk -l
:
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: gpt
Disk identifier: 1815802D-B749-4FD4-8297-EABE9FD93AE0
Device Start End Size Type
/dev/sda1 2048 616447 300M Windows recovery environment
/dev/sda2 616448 821247 100M EFI System
/dev/sda3 821248 1083391 128M Microsoft reserved
/dev/sda4 1083392 976773119 465.3G Microsoft basic data
Disk /dev/sdb: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000a4b0c
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 1026047 512000 83 Linux
/dev/sdb2 1026048 117229567 58101760 8e Linux LVM
Disk /dev/mapper/fedora_5586577d00-root: 15.6 GiB, 16777216000 bytes, 32768000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora_5586577d00-swap: 5.6 GiB, 6002049024 bytes, 11722752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/fedora_5586577d00-home: 34.2 GiB, 36712742912 bytes, 71704576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
我已经在谷歌上搜索解决方案,有几个人建议运行,grub2-mkconfig -o /boot/grub2/grub.cfg
但这并不能解决我的问题,什么也没有改变。
如何将 Windows 8 添加到我的 grub 菜单?
答案1
大约 2 天前出现了这个问题,通过修改 Add 修复/etc/grub.d/40_custom
如下:
menuentry "Windows Vers" {
set root='(hdX,X)'
chainloader +1
}
其中 hdX,X 是您的 Windows 磁盘,/dev/sda1 是 hd0,0,/dev/sdb1 是 hd1,0 等等。
然后运行grub2-mkconfig -o /boot/grub2/grub.cfg
希望它对你也有同样的效果,就像对我一样。