博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
grub2 windows版安装
阅读量:6957 次
发布时间:2019-06-27

本文共 2620 字,大约阅读时间需要 8 分钟。

一、BIOS方式,grub2安装

查看磁盘情况

E:\grub-2.02-for-windows>wmic diskdrive list briefCaption                   DeviceID            Model                     Partitions  SizeINTEL SSDSCKKF256H6L      \\.\PHYSICALDRIVE0  INTEL SSDSCKKF256H6L      3           256052966400SanDisk Ultra USB Device  \\.\PHYSICALDRIVE1  SanDisk Ultra USB Device  2           30746096640

 

grub2 mbr安装

E:\grub-2.02-for-windows>grub-install.exe --target=i386-pc \\.\PHYSICALDRIVE1Installing for i386-pc platform.Installation finished. No error reported.

 

二、UEFI方式,grub2安装

grub2 UEFI安装

1、给Sandisk Ultra U盘在末段分一个 FAT32 格式的分区,并且改变分区类型为:

0xEF Partition with an EFI file system  【可能需要】

 

2、导入EFI目录到U盘ESP分区的根目录,导入grub程序文件到U盘ESP分区的boot目录。

C:\WINDOWS\system32>f:D:\>cd grub-2.02-for-windowsD:\grub-2.02-for-windows>grub-install.exe --target=x86_64-efi --efi-directory=d: --boot-directory=d:\boot --bootloader-id=boot --modules="part_msdos fat normal"Installing for x86_64-efi platform.Installation finished. No error reported.

把D盘替换成U盘ESP分区实际盘符

3、把ESP分区下\EFI\boot\目录下的grubx64.efi文件改名为bootx64.efi

4、编写grub.cfg配置文件,复制对应的ESP分区下\boot\grub目录下

set timeout=300

#set prefix=(${root})/boot/Grub/

menuentry "BIOS Windows Boot Manager" {

echo "BIOS Windows Boot Manager"
#set root=(hd0,msdos1)
insmod ntldr
ntldr (hd0,msdos1)/boot/bootmgr
}

menuentry "BIOS Install CentOS71511"{

echo "BIOS Install CentOS71511 Minimal"
set root=(hd0,msdos1)
linux /isolinux/vmlinuz inst.stage2=hd:LABEL=ULTRA:/ quiet
initrd /isolinux/initrd.img
}

menuentry "BIOS Install CentOS71511 ks"{

echo "BIOS Install CentOS71511 Minimal ks"
set root=(hd0,msdos1)
linux /isolinux/vmlinuz inst.stage2=hd:LABEL=ULTRA:/ inst.ks=hd:LABEL=ULTRA:/isolinux/ks.cfg quiet
initrd /isolinux/initrd.img
}

menuentry " "{

configfile
}

menuentry "EFI Windows Boot Manager" {

echo "EFI Windows Boot Manager"
#search --file ($root)/efi/Microsoft/boot/bootmgfw.efi --set=root
terminal_output console
chainloader (hd0,msdos1)/efi/Microsoft/boot/bootmgfw.efi
}

menuentry 'EFI Install CentOS 7' --class fedora --class gnu-linux --class gnu --class os {

echo "EFI Install CentOS71511 Minimal"
set root=(hd0,msdos1)
linux /isolinux/vmlinuz inst.stage2=hd:LABEL=ULTRA:/ quiet
initrd /isolinux/initrd.img

}

menuentry " "{

configfile
}

menuentry "DiskGenuis Tool"{

set root='(hd0,msdos1)'
linux16 /boot/Grub/memdisk
initrd16 /PE/imgs/DG_x64.img
}

menuentry "Maxdos Toolbox"{

set root='(hd0,msdos1)'
linux16 /boot/Grub/memdisk
initrd16 /PE/imgs/maxdos9.img
}

menuentry 'Reboot' --class reboot {
echo 'Rebooting ...'
reboot
}

menuentry 'Shutdown' --class halt {

echo 'Shutdown ...'
halt
}

 

转载于:https://www.cnblogs.com/fatt/p/7272997.html

你可能感兴趣的文章
(三)spring cloud微服务分布式云架构 - Spring Cloud集成项目简介
查看>>
企业级 SpringBoot 教程 (九)springboot整合Redis
查看>>
Kubernetes Ingress 日志分析与监控的最佳实践
查看>>
Git无法使用
查看>>
重大消息,为企业、创业者提供直播解决方案的智播就要发布了
查看>>
Angularjs 配合bootstrap-datetimepicker.js ngModel取不到
查看>>
ORA-31623: a job is not attached to this session via the specified handle
查看>>
mysql索引
查看>>
http服务器的目录安全性配置
查看>>
部署k8s ssl集群实践10:work节点基础环境
查看>>
Linux下DHCP中继代理配置
查看>>
如何在Xcode中添加依赖的lib工程
查看>>
linux使用nfs、portmap服务共享远程磁盘的方法
查看>>
usermod、用户密码管理、mkpasswd
查看>>
iptables表的备份和恢复、firewalld的9个zone、zone操作、service操作
查看>>
网友精选25个Java试题分享
查看>>
网络工程师必备的好帮手usb转console调试线
查看>>
加密文件系统EFS
查看>>
怎样禁止修改ip地址
查看>>
Filebeat的Registry文件解读
查看>>