How to dual boot Linux and Windows without losing your files
By Pull This RepoPosted 5 min read
Short answer
To dual boot Linux and Windows, back up your files, save your BitLocker recovery key, shrink the Windows partition in Disk Management, then boot a Linux USB stick and choose the installer's option to install alongside Windows. Linux adds a GRUB boot menu that lets you pick either system every time the computer starts.
To dual boot Linux and Windows, you give Linux its own slice of the disk next to Windows and let the Linux installer add a boot menu. Your Windows files stay where they are, as long as you prepare first and pick the right option in the installer. The steps below follow Ubuntu's and Linux Mint's official install guides, plus Microsoft's disk and BitLocker docs, all checked on 22 November 2026. Any mainstream distro works the same way; the screens differ a little.
What do you need before you dual boot Windows and Linux?
You need four things ready before you touch a partition:
| Item | Why |
|---|---|
| A full backup of your files | Ubuntu's guide says to back up before installing on a used PC |
| Your BitLocker recovery key | Windows may ask for it after the disk changes |
| A USB stick, 12GB or larger | Ubuntu recommends 12GB or above for its installer |
| Free disk space | Ubuntu asks for at least 25GB; Mint suggests 100GB for its root partition |
If you have not picked a distro yet, our Linux vs Windows comparison covers the free options.
How do you find and save your BitLocker recovery key?
Save it before anything else. Microsoft says Device Encryption can be on by default, even on Windows Home, once you sign in with a Microsoft account. Check under Settings, Privacy & security, Device encryption.
The key is a 48 digit number. Microsoft's page says to open aka.ms/myrecoverykey from another device and sign in with your Microsoft account to see it. Write it down or print it. Microsoft Support cannot recover a lost key.
Ubuntu's guide adds that its installer may ask you to turn BitLocker off before it continues. To do that, back up, close the installer, search Settings for Manage BitLocker, turn it off and wait for decryption to finish. Ubuntu warns that some Windows versions cannot turn BitLocker back on afterwards. You do not need to turn it off if Linux goes on a separate, unencrypted drive.
How do you shrink the Windows partition?
Use Windows' own Disk Management, which moves files out of the way without reformatting:
- Right-click Start and choose Disk Management.
- Right-click the C: volume and choose Shrink Volume.
- Enter the amount to free in MB and confirm.
The space shows up as Unallocated. Leave it empty; the Linux installer uses it. Microsoft notes that files such as the page file cannot be moved, so the shrink stops at them. If you prefer a command line, the same job in an administrator Command Prompt is:
diskpart
list volume
select volume <number>
shrink desired=<size in MB>Many Linux installers can also resize Windows for you. Ubuntu's Installing Ubuntu alongside another operating system option offers a slider, and Mint resizes the other system when you pick its alongside option. Shrinking in Windows first is the cautious route, because you see exactly how much space you free before the installer starts.
How do you install Linux alongside Windows?
Boot from the USB stick and pick the alongside option, not the erase option:
- Write the ISO to the USB stick with balenaEtcher (select the ISO, select the drive, click Flash!). Ubuntu's guide notes that copying the ISO file onto the stick is not enough.
- Restart with the stick plugged in and press the boot menu key. Mint's guide lists Escape, F1, F2, F8, F10, F11, F12 or Delete, and says the key is usually shown briefly at startup.
- Start the live session, then the installer. Connect to the internet so updates and drivers can download.
- At the installation type screen, choose the option to install alongside Windows. In Ubuntu this is Installing Ubuntu alongside another operating system, with a slider for how much space Linux gets. Manual partitioning in Ubuntu, or Something else in Mint, is for setting partitions yourself.
- Do not choose Erase disk and install. Mint's guide says that option is only for a drive whose data can all be lost.
- Finish the user and time zone screens, install, restart and remove the stick.
Our Linux Mint install guide walks through every Mint screen, including how to verify the ISO first.
What about Secure Boot?
Secure Boot is a firmware setting that can block an installer from starting. If you see a Secure Boot violation with Linux Mint, its EFI page says to restart the install connected to the internet without ticking the third party software option, or to disable Secure Boot in your firmware settings.
How does the GRUB boot menu work?
After the install, the computer starts into a GRUB menu where you pick Linux or Windows. Mint's guide explains that Windows has no boot menu of its own, while Linux detects other systems and builds one. That is also why installing Windows first is easier: Windows overwrites the boot sequence when it installs.
If the PC skips the menu and goes straight to Windows, boot the live USB and list the boot entries:
sudo efibootmgr
sudo efibootmgr --bootorder XXXX,YYYYPut the Linux entry first. Mint's guide notes that its EFI entry is named ubuntu for technical reasons. If a Windows install later replaces the menu, the guide's fix is to boot the live session, find the Linux partition with lsblk -f, and reinstall GRUB.
How do you remove Linux later and keep Windows?
Fix the boot order first, then delete the partitions:
- Boot the live USB, run
sudo efibootmgr, and set Windows Boot Manager first with--bootorder. - Delete the Linux entry using its number. The efibootmgr manual defines
-bto pick the entry and-Bto delete it:
sudo efibootmgr -b XXXX -B- In Windows Disk Management, delete the Linux partitions.
- Right-click C: and choose Extend Volume. Microsoft says the unallocated space must sit immediately after the volume you extend, on the same disk. If another partition is in between, you can make a new volume in the free space instead.
Mint's EFI page also notes that if GRUB fails, the computer moves on to the next entry in the boot order, which is why putting Windows first matters.
What is the catch?
Dual booting means one system at a time: you restart to switch. Two systems share one disk, so you budget space for both. Reinstalling Windows overwrites the boot sequence, and Microsoft says BitLocker asks for the recovery key after a hardware change, so keep the key and the live USB. If you only want to try Linux, a virtual machine is lower risk; see our free virtual machine software roundup.
Prefer Arch? Our Arch install guide uses archinstall and covers the disk setup.
Pull it. Stash it.
Questions people ask
Is it safe to dual boot Windows and Linux?
It is safe when you prepare. Ubuntu's install guide says to back up your data first, and the installer resizes Windows rather than wiping it when you pick the alongside option. The main risks are choosing the erase option by mistake and a BitLocker recovery prompt, so save that key first.
Should I install Windows or Linux first?
Windows first. Linux Mint's guide says it is easier and recommended, because Windows overwrites the boot sequence when it installs, while Linux detects other systems and builds a boot menu that includes Windows.
Do I need to turn off BitLocker to dual boot?
Sometimes. Ubuntu's guide says its installer may ask you to disable BitLocker before it continues, but not when you erase Windows or install to a separate unencrypted drive. To turn it off, back up, search Settings for Manage BitLocker, and wait for decryption to finish.
How much space does Linux need for dual booting?
Ubuntu's install tutorial asks for at least 25GB of storage. Linux Mint's install guide suggests a root partition of 100GB or more when you set partitions by hand, and its 22.3 beta announcement lists 20GB as the minimum with 100GB recommended.
How do I remove Linux and keep Windows?
Make Windows Boot Manager the first boot entry, delete the Linux boot entry with efibootmgr from a live USB, then delete the Linux partitions in Windows Disk Management and use Extend Volume to give the space back to C: if it sits right after it.
Sources
- 1Ubuntu tutorial: Install Ubuntu Desktop (read 2026-11-22)
- 2Linux Mint Installation Guide: Install Linux Mint (read 2026-11-22)
- 3Linux Mint Installation Guide: Multi-boot (read 2026-11-22)
- 4Linux Mint Installation Guide: EFI (read 2026-11-22)
- 5Linux Mint Installation Guide: Boot Linux Mint (read 2026-11-22)
- 6Linux Mint blog: Linux Mint 22.3 Zena beta release notes (read 2026-11-22)
- 7Microsoft Learn: Shrink a basic volume (read 2026-11-22)
- 8Microsoft Learn: Extend a volume in Windows (read 2026-11-22)
- 9Microsoft Support: Find your BitLocker recovery key (read 2026-11-22)
- 10Microsoft Support: Device encryption in Windows (read 2026-11-22)
- 11efibootmgr manual page (read 2026-11-22)
More repos like this
Get tomorrow's repo in your feed
One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.
