D
D
Dmitry2016-01-01 20:07:24
Windows
Dmitry, 2016-01-01 20:07:24

How to properly install grub uefi?

Good evening.
In the first lines of your message, Happy New Year to everyone !!!)))
This is the situation.
I have an ssd with Ubuntu 16.04 installed. There is also a hdd for storing files, 3tb. Both disks have a gpt partition table.
It occurred to me to "cut off" a part from the second disk and install Windows 7x64 there.
So I did ... I installed Windows with uefi.
Now on the first disk (ssd) I, in addition to the Ubuntu partitions, have an efi partition
2c923803430e447aba9b0aa39eb71899.png
And on the second disk (hdd) - one partition for storing files and the second with Windows 7 installed
fb0c8fbcefaf42d5bdd5f508eb3791f0.png
Naturally, Ubuntu is loaded when setting up Lagacy-Uefy, and Windows when Uefy.
Tried adding a boot point for Windows to grub (in /etc/grub.d/40_custom)

menuentry "Microsoft Windows Start" --class windows --class os {
insmod usbms 
insmod part_gpt 
insmod part_msdos 
insmod fat 
insmod search_fs_uuid 
insmod chain 
search --fs-uuid --no-floppy --set=root F2BD-FD83 # здес находится раздел efi
chainloader (${root})/efi/microsoft/BOOT/bootmgfw.efi
}

But when I try to download, it gives an error "invalid signature"
How can I now combine all this without reinstalling Ubuntu? Is it possible to install grub for use with uefi.
Found this instruction:
Installing GRUB UEFI GPT
Is this solution optimal or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-01-05
@slo_nik

The solution was found to be quite simple.
This requires:
1) Set the boot mode to uefi
2) A bootable USB flash drive that supports uefi is done elementarily, without any utilities.
3) Console in which you need to execute several commands in sequence
sudo mount /dev/sda1 /mnt - mount the system partition
sudo mount /dev/sda5 /mnt/boot/efi - mount the EFI partition
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/ proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
/# sudo grub-install /dev/sda - a message will appear that GRUB-efi is installed
/# exit
exit
sudo umount --bind /dev /mnt/dev
sudo umount --bind /proc /mnt/proc
sudo umount --bind /sys /mnt/sys
sudo umount /dev/sda5 /mnt/boot/efi
sudo umount /dev/sda1 /mnt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question