linux gpt引导分区,linux 引导gpt分区windows及clover
原因:電腦采用gpt分區,安裝了win10+linux(debian)+mac 10.11(El capitan),使用clover做引導器時,可以引導linux和mac,但通過bootmgfw.efi引導win10時無限轉圈,不能正常啟動win10。所以考慮用linux的grubx引導器。
1、引導Clocer
查看clover所在EFI分區uuid
執行命令:sudo blkid |grep EFI
/dev/sdb1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="88634925-55b0-497d-a4b7-c4965a7d66c7"
修改/boot/grub/grub.cfg,增加以下內容:
menuentry 'Clover (on /dev/sdb1)' --class Clover --class os
$menuentry_id_option 'osprober-efi-67E3-17ED' {
insmod part_gpt
insmod fat
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1??67E3-17ED
else
search --no-floppy --fs-uuid --set=root 67E3-17ED
fi
chainloader /EFI/Boot/bootx64.efi
}
2、類似方法引導win10
menuentry 'Windows Boot Manager (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-efi-67E3-17ED' {
insmod part_gpt
insmod fat
set root='hd1,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1??67E3-17ED
else
search --no-floppy --fs-uuid --set=root 67E3-17ED
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
3、修改默認引導菜單和等待時間
通過set default修改默認引導菜單:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
###以下修改引導菜單編號###
set default="3"
fi
通過set timeout修改引導等待時間
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=8
fi
總結
以上是生活随笔為你收集整理的linux gpt引导分区,linux 引导gpt分区windows及clover的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 已经windows如何在安装linux,
- 下一篇: linux使用gpio开一个线程,LIN