Author Topic: EFI on a Windows 7 PC?  (Read 1544 times)

Offline littlenoodles

  • Full Member
  • ***
  • Posts: 68
Re: EFI on a Windows 7 PC?
« Reply #15 on: January 18, 2013, 07:30:58 AM »
Did some more poking around.  The EFI utility simply allows me to browse files on the drives.  Doesn't let me set EFI boot order, but there is an EFI boot order.  It's just that hard drives aren't included there individually.  Windows Boot Loader is first, followed by the various removable media.

I tried disabling SATA1 in the legacy boot order, but with SATA1 disabled, when I launch the Windows Boot Loader and select Windows 7, it says there's no OS.  In other words, it's trying to boot from SATA1, which is disabled.  Also, when I try to 'legacy boot' off of either SATA0 or SATA1, I get the PCLOS grub loader from SATA1.  I'm beginning to think that there's something in hardware making the system think SATA1 is[/] SATA0 (at boot time, at least).  How else to explain 'legacy boot' loading from SATA1 when I ask it to load from SATA0?  Unless the BIOS says 'there's no MBR on SATA0, so I guess he meant SATA1 - even though he said SATA0'.  Either way, the gparted rescue disk (and the EFI utility - for that matter) can both see both drives, so they are both individually addressable.

None of this addresses why the Windows Boot Loader in EFI mode insists on trying to boot the MBR from SATA1 instead of booting Windows 7.  Except that the Windows Boot Loader is some kind of mini-OS, and it must be labEling SATA1 as the C: drive when it's present and then following its instructions to boot from C:.  Again, when SATA1 is not present, Windows 7 boots normally - and labels the same drive in SATA3 as the F: drive.  Sheesh!!!

Offline littlenoodles

  • Full Member
  • ***
  • Posts: 68
Re: EFI on a Windows 7 PC?
« Reply #16 on: January 23, 2013, 11:15:30 AM »
I have a Windows 7 laptop with EFI and secure boot disabled.
It dual boots using GRUB on MBR just fine. I guess the problem will arise when secure boot is enabled. For now, you should be good.

And inside the Windows bootloader, I have setup an option using EasyBCD to boot PCLinuxOS. There were some reports of Windows update removing GRUB or something like that.

I do not know about GPT.

The fact that you're using EasyBCD makes me think you may have an EFI bootloader, but you don't have a GPT partitioning scheme - so you're operating in legacy mode.  EasyBCD doesn't support EFI (I tried using it - to no avail).  Anyway, I managed to get an EFI-compatible version of grub onto my system by installing the latest Linux Mint and using the Ubuntu 'boot repair' facility.  It was a major pain, but it ultimately worked.  And I found a nice EFI bootloadr called rEFInd, that handles multiple booting.  As an added bonus, the EFI grub is able to boot a BIOS-based linux as well.  So I can install PCLOS in a separate root partition and boot it via the Linux Mint EFI grub installation.  Which is a good thing, because I'm finding Linux Mint to be lacking in several key areas - basically the system setup tools don't hold a candle to PCLOS's Mandriva-derived 'drake' stuff.

I guess I'm wondering how the PCLOS devs intend to go forward, making the system installable on GPT/EFI disks.  It seems like you can't buy a computer that doesn't come that way these days, so it's a problem that has to be dealt with.

Extra credit question:  I still haven't gotten Windows to stop trying to boot grub off of my old disk when I plug it into SATA1.  I have copied off the /home filesystem by running rsync from a live CD, but I still want the thing as a data-only drive for both Windows and Linux - and I'd like not to wipe the whole drive.  I'm thinking I can somehow just wipe the bootloader from the MBR and preserve the partition table, and in that case maybe Windows will stop trying to boot it.  I found instructions that suggest that if you use dd to zero out just the first 446 bytes of the MBR, that will do the trick.  I guess I can use dd to save off the MBR before such an experiment and maybe get lucky.  Anybody think this has a chance of working (or is at least safe to try)?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: EFI on a Windows 7 PC?
« Reply #17 on: January 24, 2013, 10:37:54 AM »

Extra credit question:  I still haven't gotten Windows to stop trying to boot grub off of my old disk when I plug it into SATA1.  I have copied off the /home filesystem by running rsync from a live CD, but I still want the thing as a data-only drive for both Windows and Linux - and I'd like not to wipe the whole drive.  I'm thinking I can somehow just wipe the bootloader from the MBR and preserve the partition table, and in that case maybe Windows will stop trying to boot it.  I found instructions that suggest that if you use dd to zero out just the first 446 bytes of the MBR, that will do the trick.  I guess I can use dd to save off the MBR before such an experiment and maybe get lucky.  Anybody think this has a chance of working (or is at least safe to try)?

Windows doesn't try to boot Grub   ???

Apparently Grub is installed to that disk, and the disk is listed as a higher priority boot disk than the one you wish to boot.

I would try to change the boot order to put that disk down the list.

Yes zero-ing the MBR while leaving the partition table intact should also achieve a similar result ....  but would not be the option I would choose.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline littlenoodles

  • Full Member
  • ***
  • Posts: 68
Re: EFI on a Windows 7 PC?
« Reply #18 on: January 24, 2013, 12:23:24 PM »
Windows doesn't try to boot Grub   ???

Apparently Grub is installed to that disk, and the disk is listed as a higher priority boot disk than the one you wish to boot.

I would try to change the boot order to put that disk down the list.

Yes zero-ing the MBR while leaving the partition table intact should also achieve a similar result ....  but would not be the option I would choose.
That makes sense, but it doesn't seem to work that way.  I've changed the boot order.  I've even tried telling the BIOS specifically to boot off of disk 0.  The Windows 7 Boot Loader does load from disk 0 (it's the only disk that has a WBL).  But when I tell the WBL to boot Windows, the WBL says "Windows is loading files" and then proceeds to load grub instead of windows.  In the EFI world, a boot loader is a mini OS, and god knows what the Windows bootloader does.  But I think the BIOS is out of the loop at that point...

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11064
  • MLUs Forever!
Re: EFI on a Windows 7 PC?
« Reply #19 on: January 24, 2013, 12:35:10 PM »
Windows doesn't try to boot Grub   ???

Apparently Grub is installed to that disk, and the disk is listed as a higher priority boot disk than the one you wish to boot.

I would try to change the boot order to put that disk down the list.

Yes zero-ing the MBR while leaving the partition table intact should also achieve a similar result ....  but would not be the option I would choose.
That makes sense, but it doesn't seem to work that way.  I've changed the boot order.  I've even tried telling the BIOS specifically to boot off of disk 0.  The Windows 7 Boot Loader does load from disk 0 (it's the only disk that has a WBL).  But when I tell the WBL to boot Windows, the WBL says "Windows is loading files" and then proceeds to load grub instead of windows.  In the EFI world, a boot loader is a mini OS, and god knows what the Windows bootloader does.  But I think the BIOS is out of the loop at that point...


From what you say above the Win bootloader launches and then calls Grub on the other disk ...  or is there another Grub it could be calling?

That sounds like the incorrect information is in the Win bootloader's settings ...  one possibility

I have no experience with Win 7 bootloader .....  but used to be able to edit the bootloader on Win2K (& XP IIRC) .....

If possible I would try to confirm the correct entries in the Win bootloader.

MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline littlenoodles

  • Full Member
  • ***
  • Posts: 68
Re: EFI on a Windows 7 PC?
« Reply #20 on: January 25, 2013, 09:31:22 AM »
From what you say above the Win bootloader launches and then calls Grub on the other disk ...  or is there another Grub it could be calling?
That sounds like the incorrect information is in the Win bootloader's settings ...  one possibility
I have no experience with Win 7 bootloader .....  but used to be able to edit the bootloader on Win2K (& XP IIRC) .....
If possible I would try to confirm the correct entries in the Win bootloader.
Yeah, that's exactly what's happening.  Grub is definitely on the second SATA1 disk - it's a PCLinuxOS branded graphical grub menu, and that's the only disk with PCLinuxOS.  The Win7 bootloader isn't configurable in that way - well, maybe it would be if I could get windows up in a way where the second disk is visible as SATA1...

Anyway, I tried the 'zero the first 446 bytes of /dev/sdb' trick, and it works - kind of.  I can boot Windows exactly once with the second disk plugged into SATA1.  After that, it again tries to boot from the second disk - except that this time it gives me a 'no OS found' error.  And the funny think is that if I compare the zeroed MBR from before booting windows to the MBR after booting windows, it has changed:
Quote
# cmp -l mbr.beforewindows mbr.afterwindows
441   0 161
442   0 342
443   0 312
444   0  50
Apparently Windows, in its infinite wisdom has modified the blank MBR.  According to Wikipedia locations 440-443 are a '32-bit Disk signature (optional, UEFI, Windows NT/2000/Vista/7 and other OSes)' and location 444 is supposed to b 0.  So, Windows 7 seems to see the drive and determine that it ought to be bootable, messing up its own ability to boot with the drive present.  Bravo, Microsoft!

Well maybe on that first boot where Windows does come up, I can see the drive in its Device Manager and tell Windows not to try to boot from it...