Translation(s): none
How to run Debian smoothly in dual boot with Windows
UEFI + GPT Solves Everything
If your machine comes with UEFI, it is recommended to format the entire disk in GPT before you install any operating systems on it. With UEFI + GPT, Windows Boot Manager and GRUB are isolated and re-installing Windows (or upgrading it to another version) will not rewrite GRUB records on the disk. And because of this, the installation order of this 2 systems also does not matter at all.
Converting to GPT
Microsoft has a utility in Windows 10 and 11 to convert a MBR disk into GPT without losing any data using the MBR2GPT tool. To use this tool first make sure that Bit Locker or Device Encryption has been disabled (you can re enable it after however Bit Locker has a few issues with dual booting as shown below.) and that your PC actually supports UEFI.
It is preferred to boot into Windows Recovery to use this tool so you can use the existing System partition instead of making a new EFI partition. To boot into Windows Recovery shift click the restart button from within Windows. If you don't have a recovery partition boot into Windows instead.
In CMD (if you aren't in recovery make sure to run as admin) run the following command: mbr2gpt.exe /convert
Keep in mind if you aren't in recovery mode you need to add the argument /allowFullOS to the command above.
Bit Locker/Device Encryption
Bit Locker/Device Encryption are enabled by default on some newer Windows PCs. Be warned as Bit Locker can sometimes falsely trigger during a dual boot and ask for your recovery key again, if you do not have your recovery key your Windows data becomes irreversibly LOST. Therefore it is recommended before you install Debian to get a copy of your recovery key. This key may be located in different places such as your Microsoft Account, a USB drive or a printout depending on what you chose during setup.
Considerations for traditional computers
Traditionally, personal computers are pre-installed with Windows on an MBR disk and boot using legacy BIOS. The installation (or even upgrading using Windows Update) of Windows would rewrite GRUB records and Debian will be no longer bootable until it is fixed.
Partitions / Harddisks
When installing Windows and Debian on one shared hard disk, it is important to consider the partition layout first. Windows's automatic installation, as of Vista, normally creates one 100 MB bootloader partition and occupies the rest of the disk for system, software and data.
Debian should be run with at least a swap partition and a partition for the root filesystem.
Looking at that, it seems that the maximum of four primary partitions in a MBR partition table is enough to dual-boot Windows and Debian; however, you might want to choose installing on logical partitions to support your future plans.
A disk with GPT partition table would not have such limitations on the number of partitions. On the other hand, placing the root, swap and other partitions (except /boot partition) inside a LVM volume also helps.
Installing on a separate drive of course always is an option.
Order of installation
As the Windows setup will most likely overwrite at least GRUB, for fresh installations it appears reasonable to install Windows first and then Debian.
On a GPT disk, the order of fresh installation does not matter.
Making room
If you already have installed Windows on your system and later on decide to install Debian, but do not have space left on your hard drive to create partitions for Debian, you have several options.
Rely on your manufacturer's OEM stuff
Most computer manufacturers nowadays set apart one or even two partitions to store service and recovery data. If you are an experienced user (and still have not reinstalled the OS on your own), you most likely do not need these files and can remove the partitions in order to make room for Debian.
Resize NTFS partitions
The Debian installer is capable of resizing NTFS partitions. However, you do this at your own risk. Always defragment and chkdsk the filesystem in Windows before trying and be sure to have up to date backup copies of your data.
Special configuration issues
Wifi not available in Windows after installing Debian
If your wifi interface is not available in Windows after you installed and booted Debian, this is due to a bug in the Windows driver of your card. For example, Atheros chipsets are known to not power up correctly if not having been powered down by the same Windows driver beforehand.
Debian automatically powers down network interfaces on halt. To disable this, add an entry like this to /etc/default/halt:
NETDOWN="no"
With this variable set, the script will add an option to the halt command to prevent it from powering down network interfaces.
Automatically adding Windows to GRUB boot menu
If you have installed Windows after installing Debian or have manged to remove GRUB's Windows boot entry in some other way, os-prober helps you to automatically have it added by update-grub.
