The hard disk is definitely set up for BIOS-style booting. Specific evidence of this includes:
- The partition table is MBR. Although it's theoretically possible to boot in EFI mode from an MBR partition table, to the best of my knowledge Windows does not support this configuration. Certainly its installer doesn't; the Windows installer supports MBR-on-BIOS or GPT-on-EFI, but not MBR-on-EFI or GPT-on-BIOS.
- There's no ESP on /dev/sda. (There are EFI boot files on /dev/sdb1, but that looks like a USB flash drive, not your regular boot disk.)
- The Boot Info Script output identifies GRUB as being installed in the MBR of /dev/sda. This is consistent with a BIOS-mode GRUB installation.
- The Boot Info Script output has identified /Windows/System32/winload.exe as a boot file on /dev/sda2. If this were an EFI installation of Windows, you'd see a reference to winload.efi somewhere.
Thus, whatever the source of the problem, it doesn't seem to have anything to do with EFI; it's a straight-up GRUB-on-BIOS problem.
The biggest clue I see is this, from the Boot Info Script output:
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos6)/root/grub on this drive.
Note in particular the reference to (,msdos6)/root/grub
. Later in the Boot Info Script output, there's a list of boot files on /dev/sda6 ((,msdos6)
in GRUB-speak). This list includes /boot/grub/grub.cfg
, but there's no mention of anything in the root
directory. In fact, the root
directory (not to be confused with the /
directory, whose name is pronounced "root") is the superuser's home directory, and it doesn't ordinarily hold boot files. Thus, I suspect that GRUB was mis-installed. Perhaps you used options to grub-install
that you didn't mention and that were inappropriate, or perhaps there's a bug in the installation script. In any event, I recommend re-installing GRUB using the usual procedures for doing this on a BIOS-based computer. Note, however, that if your emergency system boots in EFI mode, that could create complications, so you should be sure to boot your emergency system in BIOS mode.
You can check your boot mode in Linux by looking for the /sys/firmware/efi
directory. If it's present, you've booted in EFI mode. If it's absent, you've probably booted in BIOS mode (although there are conditions when that file will be absent even though you've booted in EFI mode).
When Windows is installed in Legacy BIOS (MBR) mode you do not need to create an EFI partition. When Windows is installed in UEFI mode you already do have an EFI partition.
Then you have to install ubuntu in UEFI mode - the existing EFI partition will be used.
Learn more : https://help.ubuntu.com/community/UEFI
Best Answer
An EFI System Partition (ESP) is simply a FAT32 partition with a GUID type code of C12A7328-F81F-11D2-BA4B-00A0C93EC93B (or 0xEF on an MBR disk). Most partitioning tools have some other way of displaying the GUID type code, because GUIDs are so cumbersome. In
parted
, GParted, and most other libparted-based tools, it's shown as a "boot flag" being set on the partition. (Note, however, that in libparted-land, the "boot flag" on a GPT disk is unrelated to the "boot flag" on an MBR disk. AFAIK, libparted provides no way to correctly label an MBR ESP.) In GPT fdisk (gdisk
,sgdisk
, andcgdisk
), an ESP has a type code of EF00. Non-Linux tools have their own ways to identify ESPs.Thus, to create a new ESP, you would:
For making partition table changes, there's no need to be concerned with your boot mode -- you can use EFI mode or BIOS mode as you see fit. (That said, some computers make it easier to boot from USB or CD-R in one mode or another.)
I agree with oldfred that creating a new ESP is unlikely to be necessary in your scenario. If you want to completely erase the Windows boot loader from the ESP, feel free to do so -- it would be the
/boot/efi/EFI/Microsoft
directory tree once Ubuntu is installed. Note that this will not remove the Windows boot loader from the firmware's boot manager menu. To do that, you'll need to useefibootmgr
, as in:This example deletes boot option #4, which is identified as "Windows boot manager." (I don't recall the name that Windows uses by default; I edited this example from one of my systems on which Windows is not installed.)