Uefi Dual Boot

0 views
Skip to first unread message

Mireille Kreines

unread,
Aug 3, 2024, 11:42:30 AM8/3/24
to rdinenspokwie

Dual booting is not just a matter of software. Or, it is, but it involves changing your firmware, which among other things tells your machine how to begin the boot process. Here are some firmware-related issues to keep in mind.

Before attempting to install, make sure your firmware configuration is optimal. Most computers sold today have a new type of firmware known as Unified Extensible Firmware Interface (UEFI), which has pretty much replaced the other firmware known as Basic Input Output System (BIOS), which is often included through the mode many providers call Legacy Boot.

If you choose to dual boot and have both operating systems on the same drive, you have to break it into partitions. Even if you dual boot using two different drives, most Linux installations are best broken into a few basic partitions for a variety of reasons. Here are some options to consider.

If you are doing a fresh installation or using a new drive, there are probably no partitions to begin with. In this case, the OS installer will create the first one, which is the EFI System Partition (ESP). If you choose to manually partition your drive using a tool such as gdisk, you will need to create this partition with several parameters. Based on the existing ESP, I set the size to around 500MB and assigned it the ef00 (EFI System) partition type. The UEFI specification requires the format to be FAT32/msdos, most likely because it is supportable by a wide range of operating systems.

Once you accomplish the first two tasks, you can install your operating systems. While I focus on Windows 10 and Fedora Linux here, the process is fairly similar when installing other combinations as well.

I then proceeded with and completed the Windows 10 installation process. I then rebooted into Windows to make sure it was working, created my user account, set up wi-fi, and completed other tasks that need to be done on a first-time OS installation.

As with Windows, I continued and completed the Linux installation, and then rebooted. To my delight, at boot time the GRand Unified Boot Loader (GRUB) menu provided the choice to select either Windows or Linux, which meant I did not have to do any additional configuration. I selected Linux and completed the usual steps such as creating my user account.

Overall, the process was painless. In past years, there has been some difficulty navigating the changes from UEFI to BIOS, plus the introduction of features such as Secure Boot. I believe that we have now made it past these hurdles and can reliably set up multi-boot systems.

I might point out, that--in my experience...Windows 10 needs a minimum of 40 GB and preferably 80 GB due to "Windows Updates" that will quickly swamp a 20 GB partition. Now add on software and you'll blow past the 20 GB in a very short period of time.

Chris, that is a good point. I must confess that I did not clarify my use case. I only needed to install Windows since the particular laptop I am using does not yet (fingers crossed) have support for firmware updates via LVFS. So, my only reason is to run a firmware update. You are correct though that for users expecting more out of their Windows installation, they'll need more space. Thanks!

Opensource.com aspires to publish all content under a Creative Commons license but may not be able to do so in all cases. You are responsible for ensuring that you have the necessary permission to reuse any work on this site. Red Hat and the Red Hat logo are trademarks of Red Hat, Inc., registered in the United States and other countries.

I currently have a dual boot setup where I have Windows 10 on one disk and ubuntu on another. This was installed in CSM mode, not UEFI. It works great, when I start my PC I can select Ubuntu or Windows with the GRUB bootloader. Now I wanted to get ready for Windows 11, one requirement for Windows 11 is to enable "Secure Boot". In order to enable that I had to change to UEFI. The issue is, that with UEFI I cannot boot Ubuntu. In the boot options it only shows "Windowsbootmanager" and the only disk I can select is the one with windows on it. After switching back to CSM mode I can access windows and ubuntu.

Now I see two options in my BIOS/UEFI, the Windows Boot Manager (Samsung SSD EVO 250GB) and ubuntu (Samsung SSD EVO 250GB) . If I select Ubuntu as first bootoption I receive the following error screen:Ubuntu GRUB Error ScreenNow it is not possible anymore to boot ubuntu. Even if I switch back to CSM.

Note: Do not follow this procedure if your computer is already booting correctly. Use this procedure only if you believe you've accidentally installed Ubuntu in BIOS/CSM/legacy mode and you want it to boot in UEFI/UEFI mode.

If you do not see a "Separate/boot/efi partition`" line, this means that your PC does not have any UEFI partition. In this case, exit Boot-Repair, then create an UEFI partition (see the "Creating an UEFI partition" paragraph above).

The PC had no option to boot from USB, so I copied the Linux .iso installation file with dd command from a USB to the swap partition. The swapoff command had to be run first. Then did system reboot and firmware startup menu had a new choice. When selected, the installation disk booted from the old swap partition. From there, the installation was done to the current Linux partition to rewrite the UEFI information. After that, the Legacy boot option was reset in the BIOS.

I have a laptop with OEM Windows 10 UEFI installed. I don't really understand how the UEFI boot process works, so that's part of my issue. What I would like to do is install Ubuntu (preferably on a secondary drive) and have the boot option added to the existing windows bootloader. I'm scared to try anything for fear of accidentally overwriting the windows bootloader with the GRUB one from Ubuntu (which is what happened on legacy BIOS versions of Ubuntu).

I don't understand why do you want to use the Windows bootloader instead of GRUB: if you want a dual booting system, GRUB is the way to go. However, if your only concern is messing up Windows, and if you prefer to use a secondary disk for Ubuntu anyway, just install Ubuntu on a secondary drive and use GRUB installed on that secondary drive. There should be no danger of touching the Windows bootloader on your primary hard disk. Assuming that your laptop does have an empty slot for a secondary hard drive/disk, just do this:

As long as you don't touch your primary hard disk during installation of Ubuntu, the worst possible thing that could happen would be that you would remove the new secondary hard disk out of frustration, and you'd be back to where you started.

The best way to do that is by booting into Windows, then pressing Windows+R, then typing into the box: msconfig, then choosing the boot section and moving the Windows option to the top (first selection) and the other OS goes second.

I have just bought a Dell Inspiron laptop which supports both UEFI and legacy boot mode. I already have Windows 10 installed in legacy boot mode. Do I need to install Ubuntu in legacy boot mode or UEFI mode for dual boot? Which mode will be better?

Details vary greatly from one EFI to another, but in all but some very ancient EFIs, BIOS-mode OSes are installed using a Compatibility Support Module (CSM), which is a sort of BIOS emulator for EFI firmware. The CSM can be switched on and off, either by you setting options in the firmware or by the firmware itself, when it detects whatever key things trigger it to use the CSM or not use it. Unfortunately, there's very little standardization in the way different EFIs (and therefore computers) determine which boot mode to use when both are active. This makes the CSM a temperamental and tricky thing to use. That said, there are typically two ways that OSes using different boot modes can be managed:

Neither of these tools is guaranteed to work; some EFIs lack CSMs and so can't boot in BIOS mode at all. (Clearly that's not the case for you.) Also, some very early EFIs for x86-64 were actually implemented on top of BIOS, so they boot in BIOS mode by using the underlying BIOS. These EFIs don't have a CSM, so the boot manager works differently and rEFInd can't boot in BIOS mode. Chances are you don't have such a system, but it's possible you do.

Note that the CSM must be active for it to be useful, but activating it does not (usually) guarantee that it will be used. This is what makes switching boot modes from one boot to the next, without mucking with firmware settings, possible. That said, if your computer has nothing but BIOS-mode boot loaders installed, booting in EFI mode becomes impossible (unless or until you plug in an EFI-bootable medium or install an EFI boot loader). Once again, I'd like to emphasize that there are subtle (and not-so-subtle) differences between computers, which makes providing generic advice very difficult.

As a practical matter, this information is largely academic for you. Given an existing Windows installation in BIOS mode, you should probably install Ubuntu in BIOS mode, too. The trick is to know the mode in which the installer boots. That information isn't exactly identified in flashing red letters, so it's easy to boot in the wrong mode and not realize it. You may want to drop to a shell and look for a directory called /sys/firmware/efi. If it's present, you've booted in EFI mode; if it's absent, you've booted in BIOS mode. If you accidentally boot in the wrong mode, stop and try again.

Alternatively, you could convert the Windows installation to boot in EFI mode using Microsoft's new MBR2GPT tool and then install Ubuntu in EFI mode. This is likely to be a cleaner solution in the long term, but in the short term, it adds some risk (I'm not sure how much yet; the tool is new enough that I have no idea of how risky it is) and is likely to be more time-consuming than doing a BIOS-mode install of Ubuntu.

When dual booting, both OS's have to be booted in the same mode.
It does not matter which. If the two OS's are in different modes, they wil not see each other and you will have to switch boot mode in system setting each time you switch OS.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages