Running both Linux and Windows on the same machine is a practical setup for sysadmins and developers who need the best of both worlds. This guide walks you through dual booting Rocky Linux 10 or AlmaLinux 10 alongside Windows 11 on a UEFI-based system. Every step includes verification so you know things are working before moving on.
Rocky Linux 10 and AlmaLinux 10 are both enterprise-grade distributions built from RHEL 10 sources. They share nearly identical installation procedures, so this guide applies to either one. Where differences exist, they are noted.
Prerequisites
Before starting, confirm the following requirements are met:
- UEFI firmware – Windows 11 requires UEFI, so your system already uses it. Legacy BIOS/CSM is not covered here.
- Windows 11 already installed – Install Windows first. Windows overwrites the entire boot chain if installed after Linux, making recovery more difficult.
- GPT partition table – Windows 11 on UEFI uses GPT. Verify this in Windows Disk Management (the disk should show “GPT” in its properties).
- Minimum 50 GB free disk space – You need enough unallocated space for the Linux partitions. 50 GB is a reasonable minimum for a working system.
- Rocky Linux 10 or AlmaLinux 10 ISO – Download the DVD or minimal ISO from the official site (rockylinux.org or almalinux.org).
- USB flash drive – 8 GB or larger for the bootable installer.
- Secure Boot awareness – Both Rocky Linux 10 and AlmaLinux 10 support Secure Boot through the shim bootloader. You do not need to disable Secure Boot, but be aware of how it interacts with GRUB (covered later in this guide).
- Backup your data – Partition operations carry risk. Back up anything you cannot afford to lose on the Windows side before proceeding.
Step 1 – Shrink the Windows Partition
You need to carve out free space on your disk for the Linux installation. The safest way to do this is from within Windows itself using Disk Management.
Open Disk Management
Right-click the Start button and select Disk Management. Alternatively, press Win + R, type diskmgmt.msc, and hit Enter.
Shrink the Primary Windows Partition
Locate your main Windows partition (usually C: on Disk 0). Right-click it and select Shrink Volume.
- Windows will query the volume for available shrink space. This may take a moment.
- In the Enter the amount of space to shrink in MB field, enter the size you want to free up. For a comfortable Linux installation, allocate at least 51200 MB (50 GB). If you plan to store data on Linux, allocate more.
- Click Shrink.
After the operation completes, you should see a new block of Unallocated space next to your Windows partition.
Verify the Shrink Operation
Confirm the following in Disk Management:
- The Windows C: partition is smaller by the amount you specified.
- A block of Unallocated space is visible on the same disk.
- The EFI System Partition (usually 100 MB, labeled “EFI System Partition”) still exists and is untouched.
Tip: If Windows cannot shrink the partition to the size you want, unmovable files (such as the pagefile or hibernation file) may be in the way. Disable hibernation with powercfg /h off from an elevated Command Prompt, reboot, and try again.
Step 2 – Create a Bootable USB Drive
You need a bootable USB drive with the Rocky Linux 10 or AlmaLinux 10 ISO written to it.
Option A – Using Rufus on Windows
Rufus is a straightforward tool for creating UEFI-bootable USB drives on Windows.
- Download Rufus from rufus.ie.
- Insert your USB drive and launch Rufus.
- Under Device, select your USB drive.
- Click SELECT and choose the downloaded ISO file.
- Set Partition scheme to GPT.
- Set Target system to UEFI (non CSM).
- Leave the file system as FAT32 (or Large FAT32 if the ISO exceeds 4 GB – Rufus handles this automatically).
- Click START and wait for the process to finish.
Option B – Using dd on Linux or macOS
If you have access to a Linux or macOS machine, use dd to write the ISO directly:
sudo dd if=/path/to/Rocky-10-x86_64-dvd.iso of=/dev/sdX bs=4M status=progress oflag=sync
Replace /dev/sdX with your actual USB device. On macOS, use /dev/rdiskN for faster writes. Double-check the device name with lsblk (Linux) or diskutil list (macOS) – writing to the wrong device will destroy data.
Verify the Bootable USB
After writing, safely eject and re-insert the USB. You should see a partition with files on it. Look for directories like EFI, images, and isolinux (or boot) – this confirms the ISO was written correctly.
Step 3 – Boot from the USB Drive (UEFI Boot Menu)
With the USB drive inserted, restart your computer and access the UEFI boot menu.
- Restart the system. As it powers on, press the boot menu key for your hardware. Common keys are F12 (Dell, Lenovo), F9 (HP), F2 or Esc (ASUS, Acer). Check your manufacturer’s documentation if unsure.
- In the boot menu, select the USB drive entry that includes UEFI in its name. Do not select a legacy/CSM entry – you must boot in UEFI mode to match your Windows installation.
- The Rocky Linux or AlmaLinux boot menu appears. Select Install Rocky Linux 10 (or Install AlmaLinux 10) and press Enter.
Verify UEFI Boot Mode
Once the installer loads, open a terminal (press Ctrl + Alt + F2 on the installer’s virtual console) and run:
ls /sys/firmware/efi
If this directory exists and contains files, you booted in UEFI mode. If it does not exist, you booted in legacy mode – reboot and select the correct UEFI USB entry. Switch back to the installer with Ctrl + Alt + F6.
Step 4 – Install Rocky Linux 10 / AlmaLinux 10 with Manual Partitioning
The Anaconda installer guides you through the setup. Most options are straightforward – language, keyboard, time zone, and network. The critical part for dual boot is Installation Destination (partitioning).
Select the Installation Destination
- On the Installation Summary screen, click Installation Destination.
- Select the disk where Windows is installed (the same disk with the free space).
- Under Storage Configuration, select Custom.
- Click Done to open the manual partitioning screen.
Create the Partition Layout
In the manual partitioning interface, you will create partitions in the unallocated (free) space. Do not touch any existing Windows partitions. Use the Standard Partition scheme (not LVM) for simplicity, or LVM if you prefer flexible volume management.
Create the following partitions using the free space:
| Mount Point | File System | Size | Notes |
|---|---|---|---|
/boot/efi | EFI System Partition | Use existing | Do NOT create a new one. Select the existing Windows EFI partition (typically 100 MB, FAT32) and set its mount point to /boot/efi. Do not format it. |
/boot | ext4 | 1024 MB | Stores kernel and initramfs images. Keeping this separate ensures GRUB can always find boot files. |
swap | swap | 4096 MB | Match your RAM size if you plan to use hibernation, otherwise 2-4 GB is sufficient for most workloads. |
/ | ext4 or xfs | 30 GB minimum | Root filesystem. 30-50 GB is reasonable for a desktop or workstation setup. |
/home | ext4 or xfs | Remaining space | User data. Assign all remaining free space here. |
Important: When assigning /boot/efi, select the existing EFI System Partition that Windows created. Do not format or recreate it. The installer will add the Linux bootloader files alongside the existing Windows boot files. This shared EFI partition is how UEFI dual boot works.
Verify Partition Layout Before Proceeding
Before clicking Done, review the partition summary carefully:
- The existing Windows partitions (NTFS, Recovery, EFI) should show as unchanged (no format flag).
- The EFI partition should be mounted at
/boot/efiwith no reformat option checked. - Your new Linux partitions (
/boot,swap,/,/home) should be marked for creation in the free space. - No existing partition should be marked for deletion or formatting unless you explicitly intended it.
Click Done, then Accept Changes when the installer shows the summary of disk operations.
Complete the Installation
- Set a root password and create a user account.
- Configure your network and hostname if not already done.
- Click Begin Installation.
- Wait for the installation to complete. This typically takes 10-20 minutes depending on your hardware and the ISO you chose.
- When finished, click Reboot System. Remove the USB drive when prompted or during the reboot.
Step 5 – GRUB Setup and Windows Detection
After the first reboot, GRUB (the Linux bootloader) should load. In many cases, the installer’s version of GRUB automatically detects Windows during installation and adds it to the boot menu. If you see both Rocky Linux (or AlmaLinux) and Windows Boot Manager listed, dual boot is already working.
If Windows is not listed in the GRUB menu, you need to configure os-prober.
Enable os-prober in GRUB
Boot into Rocky Linux or AlmaLinux. Open a terminal and run the following commands as root (or with sudo):
sudo dnf install os-prober -y
By default, GRUB 2 in RHEL-based distributions disables os-prober for security reasons. You need to explicitly enable it:
sudo vi /etc/default/grub
Add the following line at the end of the file (or modify it if it already exists):
GRUB_DISABLE_OS_PROBER=false
Save the file and regenerate the GRUB configuration:
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
For AlmaLinux, replace rocky with almalinux in the path:
sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
You should see output that includes a line like:
Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi
This confirms GRUB detected the Windows bootloader.
Verify GRUB Configuration
Check the generated GRUB configuration for a Windows entry:
grep -i windows /boot/efi/EFI/rocky/grub.cfg
You should see a menuentry line referencing “Windows Boot Manager”. If this line is present, GRUB is properly configured to offer both operating systems at boot time.
Step 6 – Secure Boot with Shim
Both Rocky Linux 10 and AlmaLinux 10 ship with a signed shim bootloader. Shim is a first-stage bootloader signed by Microsoft’s UEFI certificate authority, which then chain-loads GRUB. This allows the Linux bootloader to work with Secure Boot enabled.
Check Secure Boot Status
From your Linux installation, verify whether Secure Boot is active:
mokutil --sb-state
Expected output if Secure Boot is enabled:
SecureBoot enabled
If Secure Boot is enabled and your system booted into Linux without issues, everything is working correctly. The shim bootloader handled the chain of trust automatically during installation.
If Secure Boot Causes Boot Failures
In rare cases, the UEFI firmware may not trust the shim bootloader. If you get a Secure Boot violation error:
- Enter your UEFI firmware settings (press the setup key during POST – typically F2, Del, or F10).
- Navigate to the Secure Boot settings.
- Confirm that Secure Boot is set to Enabled with the standard Microsoft keys enrolled.
- Check the boot order – the entry for Rocky Linux or AlmaLinux (shimx64.efi) should be present. If it is missing, add a new UEFI boot entry pointing to
\EFI\rocky\shimx64.efi(or\EFI\almalinux\shimx64.efi). - As a last resort, you can temporarily disable Secure Boot to get into Linux, then troubleshoot from there. Re-enable it once the shim is properly registered.
Enroll MOK (Machine Owner Key) if Needed
If you use third-party kernel modules (such as NVIDIA drivers or VirtualBox modules), you may need to sign them or enroll a Machine Owner Key. The mokutil tool handles this:
sudo mokutil --import /path/to/public-key.der
On the next reboot, the shim will prompt you to enroll the key through a blue MokManager screen. Follow the on-screen prompts to complete enrollment.
Step 7 – Verify Dual Boot Works
With everything configured, reboot the system to confirm dual boot is fully operational.
sudo reboot
Test the GRUB Menu
- When the GRUB menu appears, you should see at least two entries:
- Rocky Linux (or AlmaLinux) with kernel version
- Windows Boot Manager (on /dev/sdXN)
- Select Rocky Linux / AlmaLinux and verify it boots to the login screen. Log in and confirm networking, display, and basic functionality work.
- Reboot again. This time, select Windows Boot Manager from the GRUB menu.
- Verify Windows 11 boots normally and all your files and applications are intact.
Verify UEFI Boot Order
From Linux, check the UEFI boot order to confirm the Linux bootloader is the default:
efibootmgr -v
You should see entries like:
Boot0000* rocky HD(1,GPT,...)/File(\EFI\rocky\shimx64.efi)
Boot0001* Windows Boot Manager HD(1,GPT,...)/File(\EFI\Microsoft\Boot\bootmgfw.efi)
The entry marked with an asterisk (*) and listed first in the BootOrder line is the default. The Linux entry (shim) should be first so GRUB loads and presents both options.
If the boot order is wrong, fix it with:
sudo efibootmgr -o 0000,0001
Adjust the numbers to match your actual boot entry IDs.
Step 8 – Set the Default Boot Entry and Timeout
By default, GRUB boots the first entry after a 5-second timeout. You can adjust these settings in /etc/default/grub.
To change the default timeout to 10 seconds:
sudo sed -i 's/^GRUB_TIMEOUT=.*/GRUB_TIMEOUT=10/' /etc/default/grub
To set the default boot entry to the saved selection (GRUB remembers your last choice):
sudo sed -i 's/^GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/' /etc/default/grub
echo 'GRUB_SAVEDEFAULT=true' | sudo tee -a /etc/default/grub
Regenerate the GRUB configuration after any changes:
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
Troubleshooting Common Issues
GRUB Does Not Appear – System Boots Directly into Windows
This happens when the UEFI firmware boot order has Windows Boot Manager set as the first entry, overriding the Linux bootloader.
Fix:
- Enter the UEFI firmware settings.
- Navigate to the Boot tab or section.
- Move the rocky or almalinux entry above Windows Boot Manager in the boot priority list.
- Save and exit.
Alternatively, from a Linux live USB, use efibootmgr to reorder the entries:
# Mount the installed system's EFI partition
sudo mount /dev/sda1 /mnt
# Check boot entries
efibootmgr -v
# Set the Linux entry (e.g., 0000) as first
sudo efibootmgr -o 0000,0001
Windows Not Detected by os-prober
If grub2-mkconfig does not detect Windows even with GRUB_DISABLE_OS_PROBER=false set:
- Verify the Windows EFI files exist on the shared EFI partition:
If this file is missing, the EFI partition may not be correctly mounted or Windows EFI files were removed.ls /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi - Confirm the EFI partition is mounted:
You should see the EFI partition mounted atmount | grep efi/boot/efi. - Make sure the
ntfs-3gorntfs3kernel module is available. The os-prober tool needs to read NTFS partitions:sudo dnf install ntfs-3g -y - Run os-prober manually to check its output:
Expected output:sudo os-prober/dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi - Regenerate GRUB again after fixing the issue:
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
Windows Update Overwrites GRUB / Changes Boot Order
Major Windows updates sometimes reset the UEFI boot order, putting Windows Boot Manager first. Your Linux installation is not damaged – the boot order just changed.
Fix:
- Access the UEFI boot menu (F12 or equivalent) and manually select the Linux bootloader entry.
- Once in Linux, reset the boot order with
efibootmgras shown earlier. - To make this more resilient, some systems allow you to lock the boot order in UEFI firmware settings.
GRUB Rescue Shell Appears Instead of Boot Menu
If you see grub rescue> instead of the normal boot menu, GRUB cannot find its configuration or modules.
Fix from GRUB rescue:
grub rescue> set prefix=(hd0,gpt2)/boot/grub2
grub rescue> set root=(hd0,gpt2)
grub rescue> insmod normal
grub rescue> normal
Adjust (hd0,gpt2) to match your /boot partition. Use ls at the rescue prompt to list available partitions and find the one containing /boot/grub2.
Once you boot into Linux, reinstall GRUB properly:
sudo dnf reinstall grub2-efi-x64 shim-x64 -y
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
Time Discrepancy Between Windows and Linux
After switching between Windows and Linux, you may notice the clock is off by several hours. This happens because Windows treats the hardware clock as local time, while Linux treats it as UTC.
Fix (on Linux): Tell Linux to use local time for the hardware clock:
sudo timedatectl set-local-rtc 1
Verify:
timedatectl
The output should show RTC in local TZ: yes.
Fast Startup in Windows Causes Filesystem Issues
Windows 11 has Fast Startup enabled by default. This feature hibernates the kernel to speed up boot times, but it locks NTFS partitions. If you try to mount a Windows NTFS partition from Linux while Fast Startup is active, you may get read-only access or mount errors.
Fix: Disable Fast Startup in Windows:
- Open Control Panel – Power Options – Choose what the power buttons do.
- Click Change settings that are currently unavailable.
- Uncheck Turn on fast startup.
- Click Save changes.
Alternatively, from an elevated Command Prompt in Windows:
powercfg /h off
Summary
At this point you have a fully working dual-boot setup with Rocky Linux 10 (or AlmaLinux 10) and Windows 11 on a UEFI system. GRUB serves as the bootloader, using the shared EFI System Partition to chain-load either operating system. Secure Boot remains functional through the shim bootloader, and os-prober handles automatic detection of the Windows installation.
The key points to remember for maintaining this setup:
- After kernel updates on Linux, GRUB is automatically regenerated. Run
sudo grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfgif the Windows entry disappears. - After major Windows updates, check the UEFI boot order and reset it if Windows moved itself to the top.
- Keep Fast Startup disabled in Windows to avoid NTFS locking issues.
- Use
efibootmgras your primary tool for managing UEFI boot entries from Linux.
































































