Grub2 Adding a gpt+efi win7 boot entry

Source: Internet
Author: User

1. Enter Linux and execute as root:

sudo fdisk-l

The main information for the hard disk is listed below:

Device Start End Size Type
/DEV/SDA1 2048 616447 300M Windows Recovery Environment
/dev/sda2 616448 821247 100M EFI System
/dev/sda3 821248 1083391 128M Microsoft reserved
/DEV/SDA4 1083392 122882047 58.1G Microsoft Basic data
/dev/sda5 122882048 286722047 78.1G Microsoft Basic data
/dev/sda6 286722048 491522047 97.7G Microsoft Basic data
/dev/sda7 491522048 492546047 500M EFI System
/dev/sda8 492546048 493570047 500M Microsoft Basic data
/DEV/SDA9 493570048 976709631 230.4G Linux LVM

can see:
The/DEV/SDA2 and/DEV/SDA7 partitions are EFI SYSTEM,/DEV/SDA7 is the boot of the Linux partition, and the/dev/sda2 is the boot of the window.

2. Edit the configuration of the GRUB2:

sudo gedit/etc/grub.d/40_custom

Add the following content

' Windows Boot Manager ' {Set Root='hd0,gpt2'/efi/microsoft/boot/bootmgfw.efiboot}

Set root is the disk on which the boot resides, and in Grub2 hd0 refers to the first hard disk Sda,gpt2 is the second hard disk partition that is divided by GPT mode.

3. Enter the command to update the GRUB2 boot entry

sudo update-grub

Reference connection: http://www.cnblogs.com/hilo/p/4553296.html

Grub2 Adding a gpt+efi win7 boot entry

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.