最近弄两个双硬盘安装Linux和windows.然后透过GRUB2 引导双系统启动。
花费了一段时间,试了两天。特别记录下来。
1. 两个硬盘,单独安装系统。
2. Boot Linux 系统进入后,yum install grub2.
3.在linux /etc/grub2.cfg里面添加如附件。
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 8 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-F40A1F270A1EE680' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 F40A1F270A1EE680
else
search --no-floppy --fs-uuid --set=root F40A1F270A1EE680
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###
