help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More Direct Windows Booting?


From: Jake Thomas
Subject: More Direct Windows Booting?
Date: Mon, 4 Jun 2012 14:16:43 -0700 (PDT)

Hello fellow Grubers,


     I understand that I can boot Windows with Grub by chainloading the 
partition with the Windows bootloader in its first sector (the VBR).

If I remember right, it goes like this: load VBR's Windows bootloader which 
loads bootmgr which loads winload.exe which loads Windows. At least that's how 
it works on a BIOS machine. There is a winload.efi which I guess provides a 
more direct boot path on EFI machines.


Personally, I stay away from Windows whenever I can, but I would still like to 
know if I can more directly boot Windows with Grub for recovery purposes.


Let's say a computer is running Win7. Then someone shrinks the Windows 
partition over, making space for a Linux partition, installs Linux and Grub, 
making it a dual boot between Win7 and Linux. Now let's say there's this other 
partition that needs a little more space, so someone has to scoot the Win7 
partition over to the right some. Now the VBR bootloader in the Win7 loader 
partition no longer points at the beginning of the Win7 partition. Now Win7 
can't be booted until this is fixed (or can it?). This is very easy to fix with 
a Windows recovery disc, but what if a recovery disc didn't come with the 
computer (which, as I understand it, is actually pretty common)?


Well, Grub is already installed. If one could just hit "c" to get to the Grub 
commandline and directly load winload.exe or winload.efi or bootmgr, that would 
be pretty slick. Just edit grub.cfg (or its governing files) to boot Windows 
that way, and you never will have to fix the Win7 VBR bootloader, in fact, 
you'll be booting Windows in a more direct way.

I actually ran into this situation (not too recently, it's long-fixed now) when 
my mom and I were installing Linux onto her laptop. We didn't have a repair CD. 
I knew it could be fixed with a repair CD, but I was hoping I could just do a 
quick fix with Grub and not have to wait until we got a CD. So I tried booting 
bootmgr and winload.exe with Grub, neither worked. We did get the repair CD and 
fixed it that way, but for future usage, it would be nice to have a quick fix 
with Grub. Also, if a UUID is used to speciy the partition, Grub would be a 
permanent fix and would work for booting Windows no matter how partitions are 
moved around, stretched, or added...if it could boot bootmgr or winload.exe or 
winload.efi.

I tried doing "chainloader (hd0,msdos3)/Windows/System32/winload.exe" at the 
command line, but got "invalid signature".

So then I tried "chainloader --force 
(hd0,msdos3)/Windows/System32/winload.exe". After entering "boot", I just got a 
blinking white dash in the upper-left corner of my screen.

I also tried doing "chainloader (hd0,msdos3)/bootmgr" and again got "invalid 
signature", so I tried with the "force" option which again got the blinking 
dash.



Honestly, I don't even know if any of that is even _supposed_ to work. I was 
just trying things. But this would be nice to do for such recovery situations. 
I think I even heard that you can fix the VBR within Windows if you manage to 
boot into it.


One fun thing to think about is winload.efi. If I loaded an efi core in Grub 
compiled with --enable-efiemu running on a BIOS machine, could I then load 
winload.efi? I didn't have an efi core laying around to test it.

If it helps, when at the blinking line, Ctrl+Alt+Del does nothing. Nor does esc 
or enter. I have to hit the power button.

So, is it possible to more directly boot Windows with Grub than by chainloading 
the partition?


Cheers,
Jake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]