To dual boot Ubuntu 22.04 and Windows 11 on separate physical drives, install Windows first on your primary NVMe SSD, then install Ubuntu on the secondary drive while ensuring both share a single EFI System Partition (ESP) or configuring GRUB to chainload Windows correctly. This approach prevents BIOS conflicts, maintains Secure Boot compatibility, and ensures reliable boot selection without disabling critical security features.
Preparation and Drive Strategy
The foundation of a stable dual-boot system lies in correct installation order and hardware configuration. Windows must be installed before Ubuntu because Windows bootloader is often non-compliant with UEFI standards and may overwrite the EFI partition if installed second. Start by installing Windows 11 on your primary drive, typically the faster NVMe SSD. During this process, create only the necessary partitions for Windows, leaving ample unallocated space on that drive if you intend to use it for shared data, though keeping OSes strictly separated on different physical disks is cleaner.
Before touching Ubuntu, verify your BIOS settings. Ensure Secure Boot is enabled to maintain system integrity, as modern Ubuntu kernels support Secure Boot out of the box. Disable Fast Startup in Windows Control Panel under Power Options; this feature locks the NTFS filesystem when shutting down, which can cause data corruption if accessed from Linux. Additionally, ensure the SATA operation mode in BIOS is set to AHCI rather than RAID or Intel RST, unless you have specific driver requirements, as AHCI provides better compatibility for Linux storage drivers.
Creating the Ubuntu Installation Media
Download the Ubuntu 22.04 LTS ISO from the official website and create a bootable USB stick using a tool like Rufus or BalenaEtcher. When creating the media, select the GPT partition scheme and UEFI target to match your Windows installation. This ensures the USB stick is recognized as a bootable device in the same manner as your internal drives. It is crucial to disconnect the Windows drive during the Ubuntu installation if you want to force the creation of a separate EFI partition, but for most users, connecting both drives allows the installer to detect the existing ESP automatically.
If you choose to keep both drives connected, the Ubuntu installer will present an option to install alongside Windows Boot Manager. However, for precise control over partitioning, select "Something Else" in the installation type menu. This manual partitioning method allows you to assign specific mount points and ensure that the EFI partition is mounted correctly at /boot/efi. If you have two separate EFI partitions due to previous installations, delete the old one or merge them into a single shared partition to avoid confusion in the boot menu.
Manual Partitioning for Separate Drives
In the manual partitioning screen, identify your Ubuntu target drive. Create a new partition table for this drive if it is blank. You need at least two partitions: one for the root filesystem and one for swap. The root partition should be formatted as ext4 and mounted at /. A common recommendation is to allocate 50-100GB for the root partition depending on your software needs. For swap, you can either use a dedicated swap partition or a swap file later; however, creating a swap partition during installation is straightforward and effective.
The most critical step is handling the EFI partition. If your Windows drive has an existing FAT32 EFI partition, do not format it. Instead, mount it at /boot/efi on the Ubuntu side. This shares the bootloader environment between both operating systems. If you prefer complete isolation, you can create a new small FAT32 partition (300MB) on the Ubuntu drive and mount it at /boot/efi, but this requires configuring GRUB to chainload the Windows bootloader manually. Sharing the ESP is generally safer and simpler for UEFI systems, as it allows the firmware to see both entries in the boot manager list.
Configuring the Bootloader
After partitioning, ensure the "Device for boot loader installation" is set to the EFI partition. If you are sharing the ESP, this will be the partition on the Windows drive. Once installation completes, reboot into Ubuntu. Open a terminal and run sudo update-grub. This command scans all connected drives for operating systems and adds Windows to the GRUB menu. If Windows does not appear, check that the ESP is mounted correctly and that the Windows bootloader files exist in /boot/efi/EFI/Microsoft.
Post-Installation Configuration
With both systems installed, you can manage boot priorities from within Ubuntu using efibootmgr. List current boot entries with efibootmgr and reorder them using efibootmgr -o [order] if you prefer one OS to load by default. Alternatively, you can change the boot priority directly in the BIOS/UEFI setup utility every time you start the computer. Many users find it easier to press F12 or F8 during startup to select the boot device manually, avoiding any potential conflicts between the two bootloader managers.
It is also advisable to install os-prober if it is not already present, as it helps detect other operating systems on the disk. Run sudo apt install os-prober and then sudo update-grub again. This ensures that any future changes to Windows updates or partitions are reflected in the GRUB menu. Regularly updating both systems keeps the kernel and bootloader compatible, reducing the risk of boot failures after major updates.
Frequently Asked Questions
Can I use Secure Boot with Ubuntu 22.04?
Yes, Ubuntu 22.04 supports Secure Boot natively. You do not need to disable it in the BIOS, which helps protect against bootkits and unauthorized modifications. If you encounter issues, ensure you are using the standard Ubuntu repositories and not third-party PPA packages that might lack proper signing.
What happens if I accidentally format the Windows EFI partition?
Formatting the shared EFI partition will remove the Windows bootloader entry, making Windows unbootable until repaired. You would need to use the Windows installation media to repair the boot sector. Always double-check the partition type and mount point before formatting to prevent accidental data loss.
How do I switch between Ubuntu and Windows at startup?
You can select your desired OS from the GRUB menu that appears shortly after powering on the machine. If GRUB does not appear, hold Shift or Esc during boot to reveal it. You can also adjust the timeout in /etc/default/grub to give yourself more time to make a selection.
Is it safe to keep both drives connected during daily use?
Yes, it is safe to keep both drives connected. However, ensure that Windows Fast Startup is disabled to prevent NTFS lock issues. Linux handles multiple drives well, and having them connected allows GRUB to detect Windows updates or changes automatically.
Why does my computer boot straight into Windows instead of showing the menu?
This usually indicates that the UEFI boot order prioritizes the Windows drive over the Ubuntu drive. You can change this in the BIOS/UEFI settings by moving the Ubuntu drive or its EFI entry to the top of the boot priority list. Alternatively, use efibootmgr in Ubuntu to reorder the boot entries permanently.