grub2 windows版安装

摘要:
一、BIOS方式,grub2安装查看磁盘情况E:grub-2.02-for-windows˃wmicdiskdrivelistbriefCaptionDeviceIDModelPartitionsSizeINTELSSDSCKKF256H6L\.PHYSICALDRIVE0INTELSSDSCKKF256H6L3256052966400SanDiskUltraUSBDevice\.PHYSICAL

一、BIOS方式,grub2安装

查看磁盘情况

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

grub2 mbr安装

E:grub-2.02-for-windows>grub-install.exe --target=i386-pc \.PHYSICALDRIVE1
Installing 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:WINDOWSsystem32>f:
D:>cd grub-2.02-for-windows
D:grub-2.02-for-windows>grub-install.exe --target=x86_64-efi --efi-directory=d: --boot-directory=d:oot --bootloader-id=boot --modules="part_msdos fat normal"
Installing for x86_64-efi platform.
Installation finished. No error reported.

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

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

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

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
}

免责声明:文章转载自《grub2 windows版安装》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇通过QQ邮箱的SMTP服务器发送QQ邮件至163邮箱提示“发送邮件失败”的解决方案(三种可能性,不妨一试)HPE Proliant DL380 GEN10服务器配置iLO 5/RAID/安装系统下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Spring Boot + thymeleaf 实现文件上传下载

参考博客:https://juejin.im/post/5a326dcaf265da431048685e 技术选型:spring boot 2.1.1+thymeleaf+maven 码云地址:https://gitee.com/ZhangShunHai/upload 项目截图:...

Spring Boot 项目实战(六)集成 Apollo

一、前言 上篇介绍了 Spring Boot 集成 Dubbo,使我们的系统打下了分布式的基础。随着程序功能的日益复杂,程序的配置日益增多:各种功能开关、参数配置、服务器地址等;对程序配置的期望值也越来越高:配置修改后实时生效,灰度发布,分环境、分集群管理配置,完善的权限、审核机制等;在这样的大环境下,传统的通过配置文件、数据库等方式已经越来越无法满足开发...

Spring Boot 入门系列(二十二)使用Swagger2构建 RESTful API文档

前面介绍了如何Spring Boot 快速打造Restful API 接口,也介绍了如何优雅的实现 Api 版本控制,不清楚的可以看我之前的文章:https://www.cnblogs.com/zhangweizhong/category/1657780.html 在实际项目中,Api 接口系统对接过程中,Api 接口文档是非常重要的文档。一般是设计完成之...

SpringMVC 钉钉 消息推送

Spring Boot Admin 集成自定义监控告警(2.0.1版本)------钉钉机器人_yuancao24的博客-CSDN博客_bootadmin 2.0 监控信息https://blog.csdn.net/yuancao24/article/details/83576194 OA集成钉钉开发——第四篇——微应用开发_weixin_34249678...

Spring boot 使用profile完成不同环境的maven打包功能

<profiles> <profile> <id>dev</id> <properties> <!-- 环境标识,需要与配置文件的名称相对应 --> <activatedProperties>dev</activatedPropert...

Spring boot + Gradle + Eclipse打war包发布总结

首先感谢两位博主的分享 http://lib.csdn.net/article/git/55444?knId=767 https://my.oschina.net/alexnine/blog/540651 buildscript { ext { springBootVersion = '1.5.2.RELEASE' }...