UEFI dual booting

You left me hangin’ Dude :grimacing: :rofl:

Oh well, no big rush, I guess. I’ve got Windows for the time being.

1 Like

I thought I might try to explain UEFI boot a little bit.

UEFI has things called UEFI Variables. These can be set in the BIOS or in the operating system. One of the things they control is the boot process. The variables for boot describe the boot device, partition, and what file to boot.

UEFI boot is simply launching an EFI application. UEFI is a sort of small operating system and it supports device drivers, file systems and has its own application type. The default filesystem is FAT which has to be used for the ESP (EFI System Partition) boot partition.

If UEFI cannot find the file from the boot variables it goes to the next boot variable, etc. Then it will try to find a file called \EFI\boot\bootx64.efi on every boot device ESP. Then it tries the old MBR boot, although probably only if it has CSM enabled.

You can adjust the priority of boot variables in the BIOS config or from Linux with efibootmgr. In my experience once you put Linux GRUB, ELILO or whatever on top Windows will not move it around and it will always boot first. Then to boot your Windows you add it to your Linux boot manager or use the UEFI boot selection.

One danger is with Windows boot troubleshooting. I believe that if you do a Windows rescue boot and tell it that Windows cannot boot it takes a big hammer approach where it rewrites the disk GPT to remove any bad MBR boot entries and reformats the ESP and removes any boot variables, then it resets everything for a Windows boot.

Another danger is if you try to use old tools on a GPT disk. The GPT is rigged to look a little bit like an old style MBR so older tools can sort of use it. The danger is when a bootloader install tool decides to write to it as if it really was an MBR. It seems to me that can trigger corruption checks causing Windows to rewrite the whole thing. So don’t do that. Don’t go around trying to make Windows 7 dual boots or Ubuntu 12, etc. Don’t use Linux rescue disks that were last updated in 2010.

3 Likes

My apologies, a client trashed a vm & needed to restore from bakup. I’ve been babysitting it since.

1 Like

Ha ha, not to worry. Of course I was joking. And as you can see, someone else has chimed in to help out. Thanks very much Guys. I feel like I’m in good hands :smiley:

1 Like

Hey, thank you very much for this. It looks really helpful. I’m going to read through it all properly tomorrow, as it’s getting a bit late here now.

I definitely think that the phrase “big hammer” and the word “Windows” go together very well, and I suppose that that’s probably why my Linux installations got knocked out. So clearly even when I get my multi-boot going exactly the way I want it, I’m going to need to make sure that it’s properly backed up for whenever Windows has an “episode” :sweat_smile:

But like I said, I’m going to read more carefully tomorrow. Thank you very much. This forum really is awesome. I’ve pretty much given up on the Ubuntu and Linux Mint Forums now, because the best help seems to be coming from here!

1 Like

I’d like to clear up the idea that Windows just resets the boot all the time. It doesn’t. I have a dual boot Windows / Fedora Dell laptop from 2013 (I think? It’s a m3800.) which has been dual boot since I bought it and Windows has upgraded from 8.1 to Windows 10 2004 without ever overwriting GRUB.

Windows will only overwrite all the boot information if it thinks it is corrupted.

OK, I’m just going to recapitulate what happened in this case, for complete clarity, because it’s fine to talk about the theory of how this works (and I am very grateful for the explanations, of course), but I need to learn how that theory all works in practice by dealing with this situation. So here goes:

I put Windows 10 on a completely new unformated SSD. Fine. I then resized the Windows partition and installed Ubuntu, which installed its boot manager next to the Windows boot manager. Fine. And then, just to see if I could do it, I installed Linux Mint next to those two. Fine. So I had a Windows boot manager (which didn’t give the option to boot the other two systems - is that normal?) and a Linux boot manager with LM as the default as it was the last on. Fine. Everything was working. And maybe I should further clarify that I could see “Windows Boot Manager” and “ubuntu” as boot options in the BIOS, along with whatever hardware options are there at the moment. (Not sure if that’s the “normal” way of things or otherwise.)

And then I tried to install rEFInd from a USB. It didn’t even begin to install. It reported an error immediately and nothing happened. Of course it would be helpful to know if anyone has any idea about why that happened. I know that I hadn’t got around to disabling fast startup in Windows at that point (I’ve been told that that can be a problem, but no idea if it’s relevant in this case). After that I had lost both boot managers, so I restored Windows from the Macrium Reflect backup, which includes the EFI partition (and please tell me - should it?)

That restored Windows as before. I can get to Windows from the Windows boot manager but also from the Ubuntu boot manager. But I can’t get to either of the Linux installations from that boot menu, and instead I get the screens which I showed in my earlier post (well, I might as well just copy them here again):

So it looks like your issue is that you initcpio or mkinitrd pointed to the wrong device as the root file system. If SDA5 is not supposed to be your root file system, then you may need to modify your kernel parameters to point to the correct root fs.

I don’t remember, but are you dual booting with multiple HDDs or are they all sharing the same disk? That last one is pretty difficult to do without GRUB UEFI for a new comer.

I do really try to follow, but I still get hopelessly lost sometimes. However, I’m going to keep smiling, as I am determined to understand this stuff :hugs:

Oh dear, that is really not what I wanted to hear! I thought everything was going to be relative plane sailing once I moved over to UEFI :sob: :pensive:

So the answer is that I have the OSes on the same disk, yes, and that’s the way I want it, as I only have three drive bays, and I want the other bays for data storage.

You may be fighting an issue with your backups software then. It may not like the other OSes being there and is causing your issues. I have not looked into it but it may be trying to verify them with known keys for “secure boot”. I know that you turned secure boot off, but it may be possible that you are fighting that battle.

Again. Grub2-efi might be your best bet since you are trying to split the rent on that one drive with three tenants.

Hi again, and thanks for persisting with me :grin: Sorry if this is a stupid question, but by “secure boot” do you mean the Windows fast startup thing, or something in the BIOS settings? If it’s just another way to say fast startup, yes, I did turn that off.

And here’s something that might be related, by the way. It seems to be that Windows sometimes doesn’t restart correctly, after I’ve accidentally booted into one of the disconnected Linux installations from the ubuntu boot manager (I think). And what happens is that the screen settings return to default, oversized, and the advanced display options that I installed (AMD Radeon) are gone. All I have to do then is to restart again, without going near either Linux installation, and it’s fine. To test this out, I’ll actually change the BIOS boot options to use the Windows boot manager, and if this problem doesn’t recur, I’ll have a pretty good idea that that was the cause.

I’m very happy to do this, if it’s the most stable solution, but of course I just don’t know where to start, sorry :grimacing: Can I do this without removing the OSes that I have on there, or do I have to start from zero?

(Actually I think that that screen resizing problem might just be to do with unplugging and replugging the HDMI cable, which unfortunately I’m having to do every time I want to go into the BIOS settings.)

No. Secure Boot is the main reason for WinTel co0conspiring EFI. Basically it prevents an “advisary” from booting a non-sacntioned OS on your system [read: MS and Intel don’t want you booting alternative OSes on your system since usually your computer cost is subsidized by MS and or Intel]. This is a setting in BIOS/uEFI that you can turn off. In your case, your backup system may not like that. Luckily is it something that you can toggle on and off.

Yes, you can do this without uninstalling your OS. It would be easiest to do this under Ubuntu since it is Debian based.
https://help.ubuntu.com/community/Grub2/Installing

That is strange. That could be related more to the monitor than to the BOS/EFI though.

Aaaaaah, well, I’ve just been asking about that setting on another thread, as it happens. I can’t see it in the BIOS, but I guess I’ll keep looking. Are there any other titles that it might possibly go under? I’ve just tried searching the manual for “secure/quick/fast boot” and no results :man_shrugging: Would it help to investigate updating the BIOS? I’ve probably mentioned this already, but the motherboard is from 2012.

Yes, I don’t know at all, of course. But I’ll tell you what I learned from switching to Windows Boot Manager from the Ubuntu menu - blank screen! That Windows Boot Manager seems to have knocked itself out completely. But Windows still boots OK from the Ubuntu menu.

Well, I guess I’ll try this off the Ubuntu USB later (unless I should wait to sort out the secure boot thing first?). And of course I’ll be reporting back!

Some mobo vendors did not allow turning this off in early iterations. I firmware update cannot hurt you in this situation. I only know it as Secure Boot, but I am sure there is some other branded names for it out there.

For the grub install, if there is an issue with secure boot forcing signed certs, grub should give you an error message on the setup telling you that you will need to turn off secure boot or generate a signed key.

As far as the blank screen with the Window Boot manager, it uses a low resolution. Maybe you monitor is being asked to do something that is our of its supported EDID.

Ha, don’t forget you’re not talking to an expert old hand here! Nearly everything that I’m doing is for the first time, so of course I’m not at all confident about that kind of thing.

I did search for the relevant BIOS updates, and found this page:

https://drivers.softpedia.com/downloadTag/Gigabyte%20GA-Z77P-D3%20BIOS%20update

But since it’s not from a page on the Gigabyte website, I’m a bit nervous about using that. I can’t find anything on the Gigabyte website - maybe just me not searching properly, or maybe some weird oversight on their part.

Go to https://www.gigabyte.com/Support and search for your board.

For example here is the BIOS for one of my Gigabyte boards: https://www.gigabyte.com/Motherboard/GA-X99-UD5-WIFI-rev-11/support#support-dl-bios

2 Likes

OK, thanks very much. Of course I had been on the Gigabyte site and got lost. So I get two different links from searching for my board:

https://www.gigabyte.com/Search?kw=GA-Z77P-D3

And then no idea what the difference would be between choosing the link for version 1.0 or the one for version 1.1. Same dates, same file-sizes, same updates (including one for secure boot by the way). The only differences that I can see are Driver(+23) versus Driver(+27). What does that mean? Anyway, I’ll certainly try this update once one of you guys reassures me about which one to go for. Thanks very much. Maybe there is some progress happening. Not sure :grimacing:

Hey Guys, sorry, I’m going to be a bit pathetic and say that I’m really nervous about doing a BIOS update, simply because I’ve never done it before. I downloaded one of those two updates that I mentioned in my previous post, extracted the files, but I haven’t gone any further yet.

I’ve found some info here on a Gigabyte forum relating to BIOS updates. Not for my mobo, but can I assume that it’s the same principle for all? That is, can I follow the same procedure as what those guys are saying, and it will be “correct”?

Aaaaah, I really hope that I can get past this soon :grimacing:

Should be similar yes. It should do a hash on it before updating to see if the file is corrupt. If it has a problem with the update, it will back out before flashing.

I would recommend using the most recent file. So the version1.1 in your case.