一、BIOS方式,grub2安装

查看磁盘情况

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

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:\WINDOWS\system32>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:\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
}

grub2 windows版安装的更多相关文章

  1. Redis Windows版安装及简单使用

    1.Redis简介及优势 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. 特点: Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次 ...

  2. xcode windows版安装使用教程

    随着iPhone.iPad.Mac等苹果产品越来越火爆,越来越多的初学者想要了解和尝试苹果平台,包括苹果操作系统Mac OS X.苹果演示软件Keynote.苹果开发工具Xcode等.然而,苹果电脑价 ...

  3. Redis Windows版安装详解

    一.下载Redis Redis下载有两个途径一是官网.二是Github,由于Redis官方只支持Linux系统,所以官网是没有Windows版本的,不过微软开源团队维护了一份所以我们可以使用这个. 官 ...

  4. MySQL Windows版安装详解

    一.下载MySQL MySQL官网https://dev.mysql.com提供了Windows下的安装版msi和解压版zip,其中均包含32和64位版本,mis版本与SqlServer安装基本一致N ...

  5. Kettle转换工具Windows版安装

    一.简介 Kettle是一款国外开源的ETL工具,纯java编写,可以在Window.Linux.Unix上运行,绿色无需安装,数据抽取高效稳定. Kettle 中文名称叫水壶,该项目的主程序员MAT ...

  6. redis windows版安装

    首先到 https://github.com/ServiceStack/redis-windows 下载redis 然后将下载的文件解压 然后获取里面的这个压缩包并且解压 这是2.8.2101版本的, ...

  7. Redis windows版安装测试

    1.下载 下载地址是 https://github.com/microsoftarchive/redis/releases/tag/win-3.2.100 ,我选择的是Redis-x64-3.2.10 ...

  8. 标准mysql(x64) Windows版安装过程

    mysql x64不提供安装器,不提供安装器,不提供安装器-- 每次查英文文档有点慢,不够简. 5.7.6以后的64位zip包下载后解压是没有data目录的. 进入解压后的bin目录:(我用的powe ...

  9. Nginx Windows版安装及域名绑定

    1.到 http://nginx.org/en/download.html 下载一个稳定版本1.16.1 2.解压,放到C盘根目录下,如C:\nginx-1.16.1,此时双击nginx.exe就启动 ...

随机推荐

  1. CCF 权限查询(模拟)

    试题编号: 201612-3 试题名称: 权限查询 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 授权 (authorization) 是各类业务系统不可缺少的组成部分,系统 ...

  2. Tasks in parallel

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  3. convention over configuration

    惯例优先原则:也称为约定大于配置或规约大于配置(convention over configuration),即通过约定代码结构或命名规范来减少配置数量,同样不会减少配置文件:即通过约定好默认规范来提 ...

  4. java获取时间戳

    package com.ycy.test; import java.text.SimpleDateFormat; import java.util.Date; public class ItemsCo ...

  5. U盘在制作Ubuntu启动盘后Windows系统下显示空间不对的解决办法(Ubuntu系统下格式化U盘的方法)

    用Ubuntu系统自带的启动盘制作工具后,将U盘拿到Windows系统下使用显示出的空间与U盘大小不同. 解决该问题的办法: 使用Linux终端: 第一步:sudo fdisk -l 这个命令主要是查 ...

  6. 【工具】Swagger2写接口注释

    一.遇到的问题 作为一名coder,经常需要向别人提供接口,或者调用别人的接口.于是就有了接口参数是什么意思,要怎么传参数,返回值是什么意思……有多少调用方,就会有多少人来询问这些参数.如果是长时间之 ...

  7. TCP/IP 传输原理

    TCP传输原理简单说明 TCP传输需要经过3次握手4次挥手.     三次握手 当客户端向服务端进行连接时,会发送一个SYN报文,请求服务端监听端口,服务端确认请求后,会向客户端发送ACK确认,客户端 ...

  8. js 判断是ie浏览器

    if (!+[1,]) { //IE window.event.returnValue = false; } else { return false; }

  9. 软件测试技术作业3---PrintPrimes()

    一.代码部分: private static void printPrimes (int n) { int curPrime; // Value currently considered for pr ...

  10. 20145314郑凯杰《信息安全系统设计基础》第7周学习总结 part B

    20145314郑凯杰<信息安全系统设计基础>第7周学习总结 part B 上篇博客反思与深入 首先根据本周第一篇博客,娄老师给我的评论,我开始进行局部性的深入研究: 分为两个步骤,一是知 ...