Debian

How To Boot Windows Via Grub?

Hi, I recently installed Debian and I would like to set up a dual boot system where Grub will boot Windows if I wish. I tried modifying my grub file based on some stack overflow posts.

[https://askubuntu.com/questions/197868/grub-does-not-detect-windows](https://askubuntu.com/questions/197868/grub-does-not-detect-windows)

​

I tried mounting the windows drive but that didn’t seem to work. I am not sure what to do next? I figure since the work to setup Grub will be mostly done on the Debian side I would post it here.

​

Some Important Info:

​

Output From fdisk -l

Disk /dev/sdb: 698.7 GiB, 750156374016 bytes, 1465149168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C407F6C5-5EB8-4C93-9C20-B583C999C672

Device Start End Sectors Size Type
/dev/sdb1 2048 1050623 1048576 512M EFI System
/dev/sdb2 1050624 1431756799 1430706176 682.2G Linux filesystem
/dev/sdb3 1431756800 1465147391 33390592 15.9G Linux swap

Disk /dev/sda: 298.1 GiB, 320071851520 bytes, 625140335 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xedcb4fc6

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4208639 4206592 2G 82 Linux swap / Solaris
/dev/sda2 * 4208640 88100863 83892224 40G 83 Linux
/dev/sda3 88100864 625139711 537038848 256.1G 83 Linux

Disk /dev/sdc: 698.7 GiB, 750155292160 bytes, 1465147055 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xba420d24

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 718847 716800 350M 7 HPFS/NTFS/exFAT
/dev/sdc2 718848 1464221695 1463502848 697.9G 7 HPFS/NTFS/exFAT
/dev/sdc3 1464221696 1465143295 921600 450M 27 Hidden NTFS WinRE


View Reddit by chiefdrafahlView Source

Sending
User Review
0 (0 votes)

5 Comments

Click here to post a comment

  • HEY THERE! I just did this yesterday. So what I did was use disks utility (gnome disk utility) to look at my drive that has both windows and Debian on it and then noticed the windows partition didn’t have booting signed to it! So clicked the option to not only mount but to boot, followed the prompts, and then the most important part updated the grub! Done! Worked like a charm. You may need a tool to update your grub boot loader. I’m using mx Linux that has that tool built in, but I’m sure one can be found in the repos!

  • So I also tried adding this menuentry and it gave an error EFI file invalid?

    ​

    >menuentry “Windows” {   
        insmod part_msdos
        insmod ntfs
        set root='(hd0,msdos1)’
        chainloader +1   
    }

  • Are you specifically saying you want grub to boot windows or just you want dual boot?

    I’d install I’d use EFI for that.

    On my bios I think I press f5 during the boot sequence and then I can choose the efi system to boot. Windows and Debian gnu Linux are my choices.

    But it’s also possible to boot grub by default then have grub choose the system to boot.

  • I’m sure it’s doable, I’ve just not tried since getting a motherboard with efi.

    In the old days one booted windows from grub with a chainloader+1 statement if I recall correctly.