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

本文共 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

你可能感兴趣的文章
Ubuntu配置和修改IP地址
查看>>
转载:如何设计一个可扩展的用户登录系统
查看>>
python对redis的常用操作 上 (对列表、字符串、散列结构操作)
查看>>
I.MX6 i2c_data_write_byte ioctl error: I/O error
查看>>
myisam MySQL 锁问题
查看>>
为什么获取的System.Web.HttpContext.Current值为null,HttpContext对象为null时如何获取程序(站点)的根目录...
查看>>
告诉你一个真实的OpenStack:都谁在用,用来干什么?
查看>>
在idea中maven项目jdk编译version总是跳到1.5
查看>>
理解与应用css中的display属性
查看>>
升级openssl环境至openssl-1.1.0c
查看>>
javaScript判断浏览器类型
查看>>
SQL注入之SQLmap入门
查看>>
Hibernate缓存研究
查看>>
Cesium原理篇:3D Tiles(1)渲染调度
查看>>
neuroph Perceptron Sample
查看>>
持续集成CI相关的几个概念
查看>>
JQuery 获得元素的方法
查看>>
LeetCode Implement Stack using Queues
查看>>
构建基于Netty 的HTTP/HTTPS 应用程序
查看>>
HDU 1814 Peaceful Commission(2-sat 模板题输出最小字典序解决方式)
查看>>