(Solved) How to fix mix of MBR and UEFI installs

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

(Solved) How to fix mix of MBR and UEFI installs

Post by act5860 » Fri Mar 25, 2016 7:57 pm

Somehow I ended up with a mix of MBR and UEFI installs on my laptop that is confusing the computer at boot. I want to get rid of the MBR entries since those OS's are no longer installed. Can anyone provide some guidance on how to accomplish this?

Boot Repair results at http://paste2.org/BWmU7swj



Thanks in advance.
Last edited by act5860 on Mon Mar 28, 2016 6:53 pm, edited 1 time in total.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Fri Mar 25, 2016 8:54 pm

I tried reinstalling GRUB to my Mint partition from my Live USB and got the following error:

grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
grub-install.real: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install.real: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install.real: error: will not proceed with blocklists.

User avatar
Derek_S
Level 6
Level 6
Posts: 1233
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: How to fix mix of MBR and UEFI installs

Post by Derek_S » Fri Mar 25, 2016 11:38 pm

Hello act5860 - Based on what I read in the output from boot repair and the info in your last post, I have a strong hunch that at one point your machine had Windows installed and it used UEFI boot. But when you installed Linux Mint, you changed the BIOS setting from UEFI boot to Legacy/CSM boot prior to installing Linux Mint. Am I correct in my assumption? Question - to confirm this - When you booted the system, you had to use your BIOS boot menu to select which operating system you wanted to boot, correct? You did not find or use the Grub boot menu at all, correct?

This is what I refer to as a "cross-installation", with Windows using UEFI boot mode and Linux using Legacy/CSM. In this situation, boot repair gets a bit confused. It detects a GPT disk, finds the EFI system partition, and sees Windows using bootmgfw.efi as the Windows bootloader. But it also detects Linux as using MBR boot, and fails to detect a Linux bootloader, at least not in the default location, which is the MBR area of the disk.

It also seems that you deleted all of your Windows disk partitions and have only Linux Mint installed at this point. Is this also correct? What I would do is the following:

1.) Go into your BIOS settings, disable Legacy/CSM boot, and enable UEFI boot. Also double-check that Secure Boot is set to disabled.

2.) Boot the machine into a live CD session using your Linux Mint installation media. Make your internet connection - very important! Then open the Terminal and enter "ls /sys/firmware". If you see "efi" included in the output, that confirms that you've successfully booted in EFI mode. If not, go back and double-check your BIOS settings. Now close the Terminal.

3.) Now open Gparted and do two things: a.) Reformat the EFI boot partition, /dev/sda1, as FAT32. This will eliminate all the Windows-related files. b.) Verify that the EFI partition is flagged as "boot". Now close Gparted.

4.) Now open the Terminal once more to chroot into the installed system and re-install grub using the following commands:
(Ignore the ### symbols and all comments to the right)

sudo mount /dev/sda2 /mnt ###mount /dev/sda2, where sda2 is the root partition
sudo mount /dev/sda1 /mnt/boot/efi ####mount /dev/sda1, where sda1 is the efi boot partition

for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done ###mount and bind the running processes
sudo cp /etc/resolv.conf /mnt/etc/ ###make the network available after chrooting
modprobe efivars ###verify the kernel module efivars is loaded
sudo chroot /mnt ###chroot into the installed system

apt-get install --reinstall grub-efi ###install the package grub-efi
update-grub ###update grub
exit ###to exit chroot

for i in /sys /proc /dev/pts /dev; do sudo umount /mnt$i; done ###unmount all processes
sudo umount /mnt/boot/efi #to verify the efi partition is umounted - you don't want to corrupt the efi partition at this point
sudo umount /mnt ###to verify that root is unmounted as well - ditto the above
sudo reboot ###cross your fingers and reboot the system
If Bill Gates had a nickel for every time Windows crashed . . . . . oh wait, he does.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sat Mar 26, 2016 12:46 pm

Your assumptions are correct. I'm having a problem, when I boot from a LiveUSB and get to the terminal after Gparted, I get the following message:
mint@mint ~ $ sudo mount /dev/sda2
mount: can't find /dev/sda2 in /etc/fstab or /etc/mtab
mint@mint ~ $

User avatar
Derek_S
Level 6
Level 6
Posts: 1233
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: How to fix mix of MBR and UEFI installs

Post by Derek_S » Sat Mar 26, 2016 1:22 pm

act5860 wrote:Your assumptions are correct. I'm having a problem, when I boot from a LiveUSB and get to the terminal after Gparted, I get the following message:
mint@mint ~ $ sudo mount /dev/sda2 < Here is the problem
mount: can't find /dev/sda2 in /etc/fstab or /etc/mtab
mint@mint ~ $
Hello act5860 - You didn't include the very last portion of the mount command. You should enter " sudo mount /dev/sda2 /mnt ", where /dev/sda2 is the block device to be mounted and /mnt is the assigned mount point.

If you're having problems reading this text or transcribing the commands, here's a suggestion: While you're in the live CD session and connected to the internet, open Firefox, come back to this thread, then copy and paste the commands from here directly into the Terminal.
If Bill Gates had a nickel for every time Windows crashed . . . . . oh wait, he does.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sat Mar 26, 2016 4:02 pm

Did as instructed. No luck. I'm going to wipe the drive and re-install. Will let you know the results.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sat Mar 26, 2016 7:13 pm

No Luck with fresh install. I get the "No Boot Drive" error now. I'm going to wipe the drive and install Ubuntu.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sat Mar 26, 2016 9:39 pm

Did full reinstall of Mint from CD in case the USB install was causing the problem. Still getting "No Boot Device" message.

Boot repair log at http://paste2.org/4WEbbHbb.

User avatar
Derek_S
Level 6
Level 6
Posts: 1233
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: How to fix mix of MBR and UEFI installs

Post by Derek_S » Sat Mar 26, 2016 10:34 pm

Hello act5860 - There is something very wrong here. Maybe it's not related to the installation itself, but a BIOS or hardware issue. Just to double-check, enter your BIOS settings and examine the following items:

1.) Verify that Secure Boot is disabled. LM17.3 does not support it.

2.) Verify that the boot mode is set to UEFI boot and not Legacy/CSM. Your disk has a GPT partition table, so you should be using UEFI.

3.) Verify that the disk is the very first item in the boot order. Some BIOS can get flaky when you have the DVD drive at the top of the boot order, but they don't detect a DVD in the tray.

4.) Verify that the hard drive is included in the boot order. Some BIOS, like Lenovo, give you the option to exclude system devices from the boot order.

5.) Verify that the hard disk controller is set to AHCI mode, not compatibility or IDE mode.

If you find nothing at wrong in the BIOS settings, there is one more thing to try: Install a clean GPT partition table on the disk before trying another installation. Do you know how to use Gparted to do this?
If Bill Gates had a nickel for every time Windows crashed . . . . . oh wait, he does.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sun Mar 27, 2016 8:16 am

Thanks for your suggestions, I'll check everything out and get back to you. If I find everything set correctly in the BIOS, I'm going straight to your last suggestion and use Gparted to repartition the HD then do reinstall.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sun Mar 27, 2016 9:46 am

OK, it's better but still not right. When I start, I get the "Boot device not found" message but if I hit Enter it takes me to the boot manager and it still doesn't boot. If I hit enter again it takes me to the grub menu and I can boot into Mint.

Latest boot info at http://paste2.org/m1eEbaXD

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Sun Mar 27, 2016 9:53 am

BTW - Mint Mate is running really slow. It took almost a minute to open Software Manager and almost 5 minutes to install Chromium.

User avatar
Derek_S
Level 6
Level 6
Posts: 1233
Joined: Sat Dec 28, 2013 5:36 pm
Location: Long Island, N.Y.

Re: How to fix mix of MBR and UEFI installs

Post by Derek_S » Sun Mar 27, 2016 11:59 pm

Hello act5860 - I had a look at your last boot-info summary, and this section does not look right at all:

sda1: __________________________________________________________________________

File system: vfat
Boot sector type: FAT32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /EFI/Boot/bootx64.efi /EFI/ubuntu/MokManager.efi
/EFI/ubuntu/grubx64.efi /EFI/ubuntu/shimx64.efi
/EFI/Microsoft/Boot/bootmgfw.efi
/EFI/Microsoft/Boot/bootx64.efi

If you created a new GPT partition table on the disk before you performed a clean install of Linux Mint, then none of the Microsoft related files should be present on the EFI system partition. Did you ever have Windows installed on this hard drive? Or were you dual-booting Windows and Linux Mint in the past? This is very strange, because I went back at looked at the summary from boot repair that you included with you first post on this thread, and there is no mention of Windows being present at all(?). Did you swap hard drives between then and now?
If Bill Gates had a nickel for every time Windows crashed . . . . . oh wait, he does.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Mon Mar 28, 2016 6:57 am

Derek, the only change between then and now was the installation of Ubuntu alongside Mint.

This mornings results: http://paste2.org/dBZnn2VC

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Mon Mar 28, 2016 7:02 am

Because Ubuntu supports secure boot, I'm going to go into Gparted and create a new partition table then install Ubuntu and see if it will handle a UEFI install correctly.

User avatar
act5860
Level 1
Level 1
Posts: 14
Joined: Sat Feb 27, 2016 8:44 pm

Re: How to fix mix of MBR and UEFI installs

Post by act5860 » Mon Mar 28, 2016 7:03 pm

I finally got it fixed. I loaded Ubuntu from a LiveUSB, went into Gparted and created a new partition table then installed Ubuntu to my HD. GRUB installed correctly so I installed Mint (Mate) next to Ubuntu and Mint showed up on the Grub menu, so everything is working now.

Thanks to all who helped.

Post Reply

Return to “Installation & Boot”