0

I can't seem to find a way to do that. And adding an entry with Grub Customizer won't work either. The first partition is where Linux is installed.

My current partition layout

I want to add an entry to boot into that Windows 7 partition, which contains a legacy(BIOS) Windows bootloader.

1

2 Answers 2

2

As mook765 noted in a comment, this cannot be done with GRUB. The trouble is that most EFI-mode boot loaders and boot managers, including the EFI-mode version of GRUB, can launch OS kernels in EFI mode and/or chainload to other EFI programs; but they cannot launch BIOS-mode boot loaders, which is what you need to boot your existing BIOS-mode version of Windows. I know of three exceptions to this rule:

  • The firmware's own boot manager -- Most recent EFIs with BIOS-mode support (provided by a Compatibility Support Module, or CSM; also referred to as legacy-mode boot support) provide a built-in boot manager that enables you to switch between native EFI-mode and BIOS/CSM/legacy-mode booting. You typically enter this boot manager by hitting Esc, Enter, or a function key as the computer is powering on. This can be awkward, and in some cases it's not supported at all.
  • rEFInd -- My rEFInd boot manager supports switching from EFI-mode to BIOS-mode booting. On Macs, this ability is enabled by default. On UEFI-based PCs, though, you must edit refind.conf: Uncomment the scanfor line and ensure that hdbios is one of the options. Since you're trying to boot Windows from a second hard disk, you might need to uncomment the uefi_deep_legacy_scan option, too -- but I recommend doing this only if doing it without that option doesn't produce an option that boots Windows.
  • rEFIt -- This is rEFInd's predecessor project. It supports BIOS/CSM/legacy-mode booting on Macs only. If your computer is a UEFI-based PC, it won't do the job. If you've got a Mac, you could use rEFIt for it; but as rEFIt has been abandonware since 2010, rEFInd (which I'm still developing) is probably the better choice.

Note that all of these options require that the firmware provide a CSM, and that it be enabled. AFAIK, all Macs (with their latest firmware) and most UEFI-based PCs provide a CSM, but a few UEFI-based PCs lack this feature. If you've got such a computer, your only choice is to convert the Windows installation to boot in EFI mode. See this page for instructions on how to do this. You might want to go this route even if your computer provides a CSM, since a CSM slightly slows and complicates the boot process. OTOH, it's likely to be easier to set up rEFInd or use the built-in boot manager. You may need to enable the CSM in your firmware setup utility. Details of how to do this vary from one computer to another. Typically, there's an option called "boot mode" that you'd set to "UEFI or legacy," or some variant on these option names.

5
  • I installed rEFInd and followed your instructions, but it only detected my Windows 10 EFI bootloader from another disk, grub and Mint on this Disk. And its not detecting the Windows 7 bootloader, even after uncommenting the uefi_deep_legacy_scan option. What am I missing? I did check my system's setup and CSM is enabled.
    – POPCORNS
    Jun 9, 2017 at 8:31
  • Please ensure that you uncomment scanfor and add hdbios to the options list. You should then see a new diamond-shaped gray icon for each of your hard disks. Note that this will not be called "Windows"; it'll be named after the disk device (whatever name your firmware assigns the disk), but it should launch whatever BIOS-mode boot loader is on the disk.
    – Rod Smith
    Jun 9, 2017 at 12:41
  • Ok, I got it working now. Turns out I didn't save refind.conf at my first attempt, that was dumb. Anyway, thanks for helping!
    – POPCORNS
    Jun 9, 2017 at 13:55
  • @RodSmith The link for how to convert Win 7 from MBT to GPT is now a bad one, going to a redirected page that's all about some marketing survey in mobile browsers and a blank black page in Firefox from Knoppix. Can you expand you answer to include the directions yourself, or find a new link. Thanks
    – user649240
    Oct 11, 2017 at 5:28
  • Microsoft recently released a tool to do this; see the Microsoft page on their tool. It's officially only for Windows 10, though.
    – Rod Smith
    Oct 11, 2017 at 12:51
0

Usually grub2-mkconfig > /tmp/test.file should show you what it found, if it actually finds the partition you can just write it in your grub.cfg with the following command:

sudo grub2-mkconfig > /boot/grub/grub.cfg

This should add your windows partition to the grub menu.

6
  • Nope, it didn't find it, seems like it only finds EFI partitions.
    – POPCORNS
    Jun 8, 2017 at 10:17
  • Have you installed your windows after ubuntu?
    – Ziazis
    Jun 8, 2017 at 10:20
  • Yeah, I think so.
    – POPCORNS
    Jun 8, 2017 at 10:21
  • Ah well, you will need a seperate boot partition then, since it has to be able to see the windows and ubuntu.
    – Ziazis
    Jun 8, 2017 at 10:24
  • Look into this question seems to be a duplicate then.
    – Ziazis
    Jun 8, 2017 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .