
如:grub-mkconfig -o /boot/grub/grub.cfg
如果不行,可以在/etc/grub.d/40_custom 中手动添加后使用 grub-mkconfig自动生成。
在BIOS-MBR模式下安装的Microsoft Windows:
if [ "${grub_platform}" == "pc" ]then
menuentry "Microsoft Windows Vista/7/8 BIOS-MBR" {
insmod part_msdos
insmod ntfs
insmod search_fs_uuid
insmod ntldr
search --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 69B235F6749E84CE
ntldr /bootmgr
}
fi
UEFI-GPT 模式下安装的Windows的启动项:
if [ "${grub_platform}" == "efi" ]then
menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root $hints_string $uuid
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
fi
具体请参考GRUB (简体中文) - ArchWiki相关内容:
ht tps://wiki.archlinux.org/index.php/GRUB2_%28%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%29
grub2:menuentry "Other grub.cfg" {
set root=
configfile /path/to/other/grub.cfg
}
syslinux:
LABEL othermenu
MENU LABEL Other Menu
KERNEL vesamenu.c32
APPEND othermenu.cfg
或者
LABEL new_config
CONFIG /path/to/new/config.cfg
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)