如何从GRUB运行Windows


0

重复的 https://stackoverflow.com/questions/39935181/run-windows-from-grub

我有以下驱动器:

Model: ATA WDC WD5000LPVX-2 (scsi)
Drive /dev/sda: 500GB
Sector size (logic/physical): 512B/4096B
Partition table: gpt
Drive flags:

Number Start   End    Size    File system       Name                          Flags
 1     1049kB  500MB  499MB   fat32                                           boot, esp
 2     500MB   103GB  102GB   ext4
 3     103GB   111GB  8193MB  linux-swap(v1)
 4     111GB   346GB  235GB                     Basic data partition          msftdata
 5     346GB   346GB  16,8MB                    Microsoft reserved partition  msftres
 6     346GB   500GB  154GB   ntfs              Basic data partition          msftdata

我没有从GRUB访问Windows的权限,需要打开BIOS设置来更改默认启动设备,这非常不方便。我怎么解决这个问题?


@AndrewMorton好,完成。
黎明

Answers:


1

在/boot/grub/grub.cfg中,是grub查找可以引导哪些系统的配置。对于每个要引导的系统,都有一个菜单项,如下所示:

menuentry 'Windows 7 (loader) (on /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-AE200FF6200FC475' {
insmod part_msdos
insmod ntfs
set root='hd2,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  AE200FF6200FC475
else
  search --no-floppy --fs-uuid --set=root AE200FF6200FC475
fi
parttool ${root} hidden-
chainloader +1

}

“ AE200FF6200FC475”是可以在其中找到窗口的设备的UUID。您可以使用linux“ blkid”命令找到该UUID。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.