Dual-boot Mint 18 and windows on GPT/UEFI

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
RDoberman
Level 1
Level 1
Posts: 4
Joined: Sat Jul 09, 2016 11:11 am

Dual-boot Mint 18 and windows on GPT/UEFI

Post by RDoberman »

Hello,
I am an IT pro but a novice at linux. I've setup dual-boot in the past with no problems at all. However, I have an HP Envy I5 laptop that I want to dual-boot Mint 18 (by default) and Windows 10 and probably Windows server 2016 Tech Preview 5. I've read MS made some changes to windows 10 in the November update that seems to lock down UEFI changes more or something like that. I want to run Mint 18 by default and run windows 10 on VMware onlhy when necessary so I force myself to learn linux better. This has turned out to be WAY more difficult than I would have thought.

I have tired MANY variations in the installations. Currently, it defaults to boot Windows server 2016 TP 5 but I can hit the ESC key and choose bootup options and select Ubuntu and Mint 18 loads fine. I did the Mint install as custom and chose to install GRUB into the windows boot manager partition.

When I use the ESC sequence above, Grub does show linux mint 18 and also windows so I can boot either. If windows boots up and I run msconfig the boot tab ONLY shows windows like it doesn't even see linux as a bootable OS.

In my BIOS, I had turned off secure boot and also tried "legacy support" when doing the various installations. When installing windows 10 and wiping the drive to start, I then went into recovery and advanced startup to use a USB to install Mint thinking the advanced startup would "unlock" (guessing here) UEFI and allow grub to update the partition. It is using GPT rather than MBR and I see an EFI system partition, MS reserved partition, NTFS (basic data), another NTFS (450 MB), then ext4 for / and linux-swap.

How can I configure my system to boot up to Grub by default? Thanks in advance for any help and I will post more info if necessary.

Thanks

deepakdeshp
Level 17
Level 17
Posts: 7901
Joined: Sun Aug 09, 2015 10:00 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by deepakdeshp »

Here is a good tutorial with lots of links with the same scenerio.

viewtopic.php?f=42&t=163126
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

JChristensen
Level 2
Level 2
Posts: 86
Joined: Sat Apr 25, 2015 8:52 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by JChristensen »

@RDoberman, please post back here if you find a fix. I have an HP dv6 laptop in the same condition. It's been that way since I tried installing Mint 15 on it. It's now running Mint 18 and Win 8.1 but I can only access Mint through the boot menu, I never see GRUB. I feel pretty ignorant about this whole area and am reluctant to just dive in and blindly try stuff.
LM19.1 C64 on Dell Optiplex 745, HP dv6, dv7, h8; LM18.3 on HP 14-ck0xxx

RDoberman
Level 1
Level 1
Posts: 4
Joined: Sat Jul 09, 2016 11:11 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by RDoberman »

I will post any success. I just installed windows 10 as a 3rd os (Win Server 2016, Mint 18, and now Win 10). I figured it would cause the windows boot menu to show up and MAYBE, linux would show (didn't really expect it). It shows only Windows server and Windows 10. The one item I found in the post from the first reply is that I never turned windows fastboot off in power options. Will try that.

deepakdeshp
Level 17
Level 17
Posts: 7901
Joined: Sun Aug 09, 2015 10:00 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by deepakdeshp »

Mint should be installed last after installing windows otherwise windows will overwrite the MBR and you can not see the grub menu.

Now since Windows is installed last you have to recover grub from Live cd by following commands

Code: Select all

sudo grub-install
sudo update-grub
 
https://community.linuxmint.com/tutorial/view/245
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

RDoberman
Level 1
Level 1
Posts: 4
Joined: Sat Jul 09, 2016 11:11 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by RDoberman »

I don't think It's as simple as recovering grub. I actually have installed grub-customizer and grub sees all but it isn't set to boot first.
However, as posted above, I think this will work - https://www.iceflatline.com/2009/09/how ... g-bcdedit/

deepakdeshp
Level 17
Level 17
Posts: 7901
Joined: Sun Aug 09, 2015 10:00 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by deepakdeshp »

Even here Linux is installed after windows. Windows install will not recognize Mint but Mint installation and grub will probe and recognize all installed os.

If you install Mint as the last os to be installed, even grub recovery will not be required.
Of course all the points mentioned in my first post have to be taken care of.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
Dngrsone
Level 5
Level 5
Posts: 576
Joined: Thu Nov 29, 2012 12:18 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by Dngrsone »

I use rEFInd for my bootloader. Once you get it installed and working, then you can add pretty much anything to your machine and it will pick it up.

My tutorial here documents my dual-boot fun with UEFI.
Try politeness; people will like you for it.

JChristensen
Level 2
Level 2
Posts: 86
Joined: Sat Apr 25, 2015 8:52 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by JChristensen »

I installed rEFInd but the machine still boots to Windows on power up or restart. Unless I hit escape and go to the built-in boot manager. rEFInd is then listed there and works OK but it is as though this machine's built-in boot manager is programmed in right down to the bare metal. I expected rEFInd to replace it but it didn't.

I even booted Mint and went into the /boot/efi directory and renamed what I thought was the efi file responsible for booting Windows and Windows still booted. So I am not understanding something.
LM19.1 C64 on Dell Optiplex 745, HP dv6, dv7, h8; LM18.3 on HP 14-ck0xxx

JChristensen
Level 2
Level 2
Posts: 86
Joined: Sat Apr 25, 2015 8:52 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by JChristensen »

I think this machine is a lost cause. It's either a primitive/buggy EFI implementation or a conspiracy to always boot Windows when present. (The machine is about 4 years old and the firmware is current.)

I booted Mint, and using GParted I could see that the EFI partition was mounted at /boot/efi. In this directory I found:
/boot/efi/EFI/Boot/bootx64.efi
/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
/boot/efi/EFI/Microsoft/Boot/bootmgr.efi
/boot/efi/EFI/Microsoft/Boot/memtest.efi

From the computer's boot manager, selecting any one of the first three files boots Windows.

I renamed these four files by adding .bak to their names. After doing this and nothing else, the machine booted to grub! The Windows entry in grub did not work but that would be expected. So I booted into Mint and changed the files back to their original names. After booting again, I thought grub came up again and let me boot Windows but either I was mistaken or it let one slip by because now things are back to square one.
LM19.1 C64 on Dell Optiplex 745, HP dv6, dv7, h8; LM18.3 on HP 14-ck0xxx

User avatar
Dngrsone
Level 5
Level 5
Posts: 576
Joined: Thu Nov 29, 2012 12:18 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by Dngrsone »

Yes, I had the same problem on my Toshiba. As you say, it is part of the conspiracy to keep non-Windows operating systems out.

For me, I think the key was replacing /boot/efi/EFI/Boot/bootx64.efi with the rEFInd version (named bootx64.efi), as that's the only one left in the fluster-cluck of folders that's renamed bootx64.old
Try politeness; people will like you for it.

JChristensen
Level 2
Level 2
Posts: 86
Joined: Sat Apr 25, 2015 8:52 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by JChristensen »

@Dngrsone, thanks for the confirmation. Hard to believe what a mess it is. This type of thing only makes me a more committed Linux Extremist™.

I've made some progress but not quite to where I want to be yet. I was wondering about renaming a copy of rEFInd's .efi file as you describe, I'll try that next.
LM19.1 C64 on Dell Optiplex 745, HP dv6, dv7, h8; LM18.3 on HP 14-ck0xxx

RDoberman
Level 1
Level 1
Posts: 4
Joined: Sat Jul 09, 2016 11:11 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by RDoberman »

If anyone gets this to work with with a UEFI setup that WANTS windows, please post how you did it. I tried easyBCD, EFIBootMgr and manually using BCDEdit but no luck. Playing around in EasyBCD left the laptop unbootable for a bit and even bootrec /rebuildbcd (going by memory) didn't work because it couldn't find/update the EFI partiion? However, installing an additional windows 10 Pro straightened it out. I now have Win server 2016, Mint18, Windows 10 Home, and Windows 10 Pro and all can boot - but by default I get the menu of windows installs only. Grub is installed and will boot Mint or the Windows boot manager but ONLY if I hit escape after powering on and choose boot options and pick Ubuntu. I initially thought EFIBootMgr would surely change the EFI boot order but nope. I will eventually try the method again of using BCDEdit after copying the bootloader(?) for Mint to one of the windows partitions and then creating an GUID entry in BCD to boot it. Before I do though that the method with the lines below should work on Mint 18. For my setup, I mounted /dev/sda9 (I created a new 500MB Fat32 partition) and I used sd5 (instead of sda3) for creating the ubuntu.bin file. When I first installed it though I selected the option to install Grub to the EFI partition rather than to the root partition like in the post below. Maybe that is why it didn't work. If Mint 18 is booted live, how can I confirm where grub booted from (EFI partition for example) and how can I change the install to the root partition?

///////////// Website - https://www.iceflatline.com/2009/09/how ... g-bcdedit/
sudo su
mkdir /mnt/share
mount /dev/sda6 /mnt/share
dd if=/dev/sda3 of=/mnt/share/ubuntu.bin bs=512 count=1
bcdedit /create /d “Ubuntu” /application bootsector
bcdedit /set {ID} device partition=c:
bcdedit /set {ID} path \ubuntu.bin
bcdedit /displayorder {ID} /addlast

User avatar
Dngrsone
Level 5
Level 5
Posts: 576
Joined: Thu Nov 29, 2012 12:18 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by Dngrsone »

The rEFInd site has a lot of good information on the entire EFI boot and secure boot process, which is helpful even if you don't want to use that particular program.

Fair warning: the pages are information-dense, and if it were my choice, I'd rather it be in the form of a 'for dummies' dead-tree with a half-dozen stickie tabs.

Hrm... maybe I will recommend that to Rod.
Try politeness; people will like you for it.

Sunset
Level 1
Level 1
Posts: 9
Joined: Sat May 10, 2014 11:15 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by Sunset »

Regarding the desire to run Windows 10 in a virtual machine, see this:

http://www.sunsetsystems.com/node/36

Rod

pgmer6809
Level 3
Level 3
Posts: 185
Joined: Sun Mar 04, 2012 9:06 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by pgmer6809 »

When dual booting from MBR disks you have the option of the Windows boot manager running the boot menu, or having grub running the boot menu. It all depends on which set of code you put in the MBR.
I have successfully configured (MBR) dual boot with Windows Boot manager controlling the boot process to boot either Windows 7 or Linux.

I have also successfully configured (NBR) grub to control the process to boot either Windows 7 or Linux.

I do not have any machine which UEFI dual boots windows and Linux, but I do have a machine that UEFI dual boots two versions of Linux.
You have to be sure that the Linux install process is booting in UEFI mode, which means you must boot your install media (DVD or USB stick) in UEFI mode. If you do that then the UEFI version of Grub will detect previously installed versions of Linux OS's and I am assuming, previously installed versions of Windows also, but I have never tried this out because I have no Windows install DVDs to check with.

You do have to set the UEFI boot order in the UEFI setup screens to boot the grubx64.efi as the first choice. (Or if using secure boot, use shimx64.efi)

Ubuntu/ mint has a strange way of linking to the grub.cfg file when doing UEFI boots, but it seems to be automatic and work ok.

One thing that does NOT work is to try to have UEFI installed grub, boot a MBR installed Windows.

User avatar
Dngrsone
Level 5
Level 5
Posts: 576
Joined: Thu Nov 29, 2012 12:18 pm

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by Dngrsone »

In my experience, the Mint installation utility has problems occasionally recognizing the Windows installation.

I always do manual installations anyway because I use separate root and home partitioning (and leave unused drive space for future OSs).

In the past, I've also gone the Windows bootloader route with MBR, just to prove I could; but I haven't tried to do so with the GPT version.

Getting multi-boot working with Secure-boot enabled is something only power-users and masochists should pursue, quite frankly-- little benefit for the pain and effort involved.
Try politeness; people will like you for it.

deepakdeshp
Level 17
Level 17
Posts: 7901
Joined: Sun Aug 09, 2015 10:00 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by deepakdeshp »

Here is another good article on dual booting
http://www.everydaylinuxuser.com/2015/1 ... e.html?m=1
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

deepakdeshp
Level 17
Level 17
Posts: 7901
Joined: Sun Aug 09, 2015 10:00 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by deepakdeshp »

Excellent indormation with all multiboot scenerios

https://ubuntuforums.org/showthread.php?t=2147295
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
Regards,
Deepak

I am using Mint 20 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

abufoysal
Level 1
Level 1
Posts: 24
Joined: Wed Feb 22, 2017 10:12 am

Re: Dual-boot Mint 18 and windows on GPT/UEFI

Post by abufoysal »

pgmer6809 wrote: I have successfully configured (MBR) dual boot with Windows Boot manager controlling the boot process to boot either Windows 7 or Linux.
How did you configure that ?

Post Reply

Return to “Installation & Boot”