How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting

Many times just doing an update-grub may find Windows and add it to grub, but a lot of times it won't.

 

Create Windows in a custom grub entry like below:

sudo vi /etc/grub.d/40_custom

menuentry "Windows 10" {
   set root='(hd0,0)'
   chainloader + 1
}

Change Windows 10 to whatever you want to call it.  For example if it was for Windows 11 you'd probably want to call it "Windows 11" to avoid confusion.

The set root= part wil also vary.  If the drive that contains windows is known to hd0 as grub then keep it the same, but if you have other drives, it could be hd1,hd2 etc... and depending on your partition table setup the second part after the "," 0 means partition 1 but sometimes it may be msdos1.

Here's an example of booting Windows from the second hd on msdos3 partiton AKA partition #3

menuentry "Windows 10" {
   set root='(hd0,msdos3)'
   chainloader + 1
}

Now update grub otherwise the added menu entry won't show or be available when you boot grub:

sudo update-grub


Tags:

grub, dual, bootingmany, update, custom, entry, sudo, vi, etc, _custom, menuentry, quot, hd, chainloader, confusion, wil, vary, contains, depending, partition, msdos, booting, partiton, aka,

Latest Articles

  • How To Emulate Android in Linux
  • How to use KVM and GUI inside Docker
  • python spacey ERROR: No matching distribution found for thinc<8.4.0,>=8.3.12
  • Debian 11 security repo fixes due to EOL
  • MySQL vs MariaDB how to create a socket user tutorial
  • Ubuntu Linux Mint Desktop Dark Black Cannot See Solution
  • How to combine .txt ACLs without breaking things
  • How to ping all of Googlebot's IPs script
  • 'virtio0' uses a qcow2 feature which is not supported by this qemu version: QCOW version 3
  • Linux bash script to get the IP of a list of hostnames
  • How To Use Camera Webcam in Docker for OBS Studio etc...
  • Computer Server Won't Post Boot Or Enter BIOS Setup After Installing RAID SAS or GPU Card etc..
  • How To Test PHP Scripts from CLI with GET variables/query string
  • apt-cache how to see all available versions of a package in Debian Ubuntu Mint
  • Virtualbox VBox Guest-utils drag and drop files stops working with Windows VMs
  • How To Remove Ubuntu Netplan and Go Back to /etc/network/interfaces
  • How To Force Flash an AMD Instinct GPU To Another Model Using Debian Ubuntu Mint Linux
  • How To compile ollama from source to use unsupported AMD GPU with rocm in Ubuntu Debian
  • QEMU KVM Virtio GPU Windows Cannot Select 1080P
  • Linux Gnome Desktop Ubuntu Mint Debian Gets Slower After Weeks