【笔记】修复grub引导失效的问题
前言
修复grub引导失效的问题
出现问题的原因
- 先安装了Windows,引导方式为
Windows NT MBR - 然后安装了Linux,引导被改为了
GRUB - 然后卸载了Linux,但是引导没有恢复为
Windows NT MBR
MBR
- 查看所有分区
1 | ls |
1 | (hd0) (hd0,msdos1) |
- 查看
bootmbr文件所在的分区
1 | ls (hd0,1)/bootmgr |
1 | bootmgr |
- 设置引导分区
1 | set root=(hd0,1) |
- 链接引导
1 | chainloader +1 |
- 立即引导
1 | boot |
UEFI + GPT
- 查看所有分区
1 | ls |
1 | (hd0) (hd0,gpt1) |
- 查看
bootmbr文件所在的分区
1 | ls (hd0,1)/efi/microsoft/boot/bootmgfw.efi |
1 | bootmgfw.efi |
- 设置引导分区
1 | set root=(hd0,1) |
- 链接引导
1 | chainloader /efi/microsoft/boot/bootmgfw.efi |
- 立即引导
1 | boot |