You are not logged in.

#1 2013-07-30 16:54:08

Mox
Member
Registered: 2012-02-07
Posts: 32

[solved] Can grub2-efi chainload a bios target?

Hi,
my laptop runs arch in efi-mode which works fine for me for everyday use. However (its summer break) I would like to install windows for some gaming.
Since my internal hard drive is occupied by linux and data, I tried to install to an external hard drive, following this guide. To make matters worse, since there is no windows on my laptop, I did this using virtual box, which does not allow booting windows in uefi mode, so I'm stuck with a bios windows install on my external hard drive that I would like to chainload from grub2-efi. Is this possible, and if yes, how?
I tried the commands from the wiki page:

menuentry "Windows" {
set root=(hd1,1)
chainloader --force +1
}

but this gives me an error, saying that the efi path is invalid (not a big surprise)

Last edited by Mox (2013-08-05 17:33:24)

Offline

#2 2013-07-30 17:47:52

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] Can grub2-efi chainload a bios target?

Okay, so is the windows installation on bare-metal or not?  You say you did this via virtualbox, but that would imply that there is no reason to have to chainload from grub to bios mode.  So I am a bit confused here.  (And by bare-metal, I just mean not in a virtual machine image, I know that it is on an external drive at least).

I have not come across any documentation that suggests that this is a possibility from grub2-efi.  That doesn't mean that there is no way to do this, but I do not think that there is a legitimate (read "supported") way to do this.  rEFInd, Rod Smith's fork of rEFIt, is supposedly able to handle the bios boot sector, but it is not totally reliable unless you are using a Mac, for which this functionality was actually designed.

I have seen tutorials about how to convert windows from bios to UEFI or vice versa though. So that may be an option.

On my system, I can set the machine to use both UEFI and bios modes at the same time.  It then also gives me a choice of which should be the preferred method in the event that both methods are available.  So if I were to have this setup, where Linux (or whatever) is configured to boot with UEFI, and another operating system (not just limited to windows) is configured to use bios mode, then I could quite easily make both available.  What I would need to do is to configure the system to use my UEFI bootloader using a firmware entry. That is it would need a direct nvram entry created using something like efibootmgr.  Then I would set the bios to use 'both" (UEFI and legacy bios) and give preference to legacy bios. That way I could select that created entry to boot the UEFI thing (in your case grub-efi), while also having the option of booting from the disk itself to get to the bios booting OS.

But unfortunately, every firmware is different, and I have heard of many machines that don't offer such functioanlity. This method would also require that I would have to potentially deal with two boot managers.  So I could hold (on my machine) F12 and select the windows disk, or let it boot the default UEFI entry and get grub (or gummiboot in my case).

Offline

#3 2013-07-31 00:05:21

Mox
Member
Registered: 2012-02-07
Posts: 32

Re: [solved] Can grub2-efi chainload a bios target?

Hi,
thank You for the reply. The Windows should be 'bare-metal' on the external disk. I did install it there by hooking the external disk up to the windows inside the virtual box and installed to it from there. After closing the VM, I was able to mount the disk in arch and there were a lot of windows files on it, so I think everything should be fine there.

However, if there is no really supported way of chainloading a bios-target from grub-efi, I will make some space on my internal disk and install to it natively. I was mainly curious whether I had overlooked something in my search (the kind of thing thats obvious for someone who knows it, but eludes the beginner).

Offline

#4 2013-07-31 00:13:33

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] Can grub2-efi chainload a bios target?

No I don't think there is an obvious way of doing this.  But the way that I proposed (if your bios allows for similar settings) is not by any means difficult.

So you haven't even booted the thing?

Offline

#5 2013-07-31 14:21:45

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [solved] Can grub2-efi chainload a bios target?

Windows tends to be very finicky about its hardware, so I'm skeptical that your installation approach would work at all. At best, Windows would need to make a boatload of changes when it finds itself on "new" hardware, which might entail a dozen reboots before anything would work.

If you want to try it, though, your best bet is to try rEFInd, as WonderWoofy says. You'll need to edit the "scanfor" line in the refind.conf file and ensure that it includes "biosexternal", or possibly "hdbios" if the Windows boot loader is installed to the MBR of the internal disk.

Another option is to convert Windows from a BIOS-mode to an EFI-mode boot. This page describes how to do this. There may be some extra tricks to doing it with Windows on an external hard disk, though.

The usual solution to your problem is to resize your Linux partition(s) to make room for Windows, and install Windows on the internal disk. If your Linux partition(s) are so full that you can't clear up enough space for Windows, then you need to upgrade your hard disk or move some of your data to an external drive. Since you say you've got such a disk, moving some of your data to it may make sense. Also, you can configure Windows to use the external disk for some of its storage needs, even if the OS itself is installed on your internal disk.

Offline

#6 2013-08-05 17:32:41

Mox
Member
Registered: 2012-02-07
Posts: 32

Re: [solved] Can grub2-efi chainload a bios target?

Sorry for the long time to respond. I did clear enough space on my internal hard drive and installed the uefi version of windows to it. Thank You all for Your replies.

Offline

Board footer

Powered by FluxBB