3

I shrunk Windows partition, freed 100 Gb, installed Ubuntu into it, installed GRUB into into MBS of the first drive and after reboot I got Windows and with no any option to select. Even in BIOS in boot priority config I see that the main drive entitled as Windows.

My question is not what to do. I don't want to see these long canvases of text and pictures you can find bu searching on this topic, saying only what authors do not understand what are they doing.

My question is what is happening?

How BIOS can know operating system? What is boot sequnce in my case and why does MBR code is ignored?

UPDATE

Some authors recommend to run this command under Windows:

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

What does it do and how can it help?

UDPATE 2

I was able to boot my linux partition win Grub for Windows, and currently

$ efibootmgr
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0005,0004,0003,0002,0000,0001,0006
Boot0000  <CENSORED>
Boot0001  <CENSORED>
Boot0002  Hard Drive 
Boot0003  Оптический накопитель CD/DVD 
Boot0004* Network Card 
Boot0005* Windows Boot Manager
Boot0006  Grub2Win EFI

(I was entering some bad words during experiments)

Looks like it just prints some info from EFI partition.

1

It is generally not easy to do UEFI/GPT and UEFI/MBR OR BIOS/MBR dual boot with one hard drive, the best solution is to use a seperate hard drive for Linux.

The short explanation of why:

  1. MBR , Master Boot Record or MSDOS Partition Table is deprecated in EFI Systems, it has been replaced by GPT or GUUID Partition Table

    • GPT and MBR live in different disk sectors, and do not conflict, however, this is done to avoid corruption if someone write to MBR , like you just did, not for legacy compatability
    • You can if you wish, Use both, but there are problems ,
    • In EFI-land , GRUB lives as a firmware file on the EFI System Partition, which under windows is the special \EFI\ mountpoint.
    • In BIOS-land, GRUB installs a bootloader in MBR (<1kB) which then loads grub from /boot/grub either on root FS partition or dedicated boot partition
  2. Windows 10, in default install on EFI systems uses GPT partitioning

  3. If you attempted to install grub to mbr, you did not install it in EFI mode,

    • GRUB is not in the list of bootable firmware based on your log
    • Grub2Win is recognized as EFI firmware, and you boot successfully
  4. The system firmware which you call BIOS is not BIOS, it is smarter than BIOS and is able to run more sophisticated software, which can enumerate the drives and read the EFI system partition, as well as query various bootloaders
    • This is why your system firmware recognized Windows as Boot Drive

How To Boot as-is

The easiest way is to force BIOS boot mode in your system firmware. This will use legacy boot mode that uses MBR, which contains grub info, and knows nothing about Windows 10 or efi.

Alternatively, you could try Hardrive0 boot from EFI, which does roughly the same thing.

You could also try to install grub-efi instead of grub (within linux), since you have determined the kernel is EFI bootable (using Grub2Win)

$ apt-get install grub-efi

$ update-grub

1

If you are not able to view the boot menu after installing Ubuntu,Try this out from windows :
1. Right click on Command Prompt and choose run as Administrator.
2. Type mountvol f: /s (if F drive is empty else use any other)
3. Type cd f:\EFI
4. Type dir (it should list out all the files)
5. Type bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi
6. Restart it now. If you still find it a problem, then Repeat 1-5 and Type bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.