FreeBSD & WINDOWS VISTA
Dual Booting Windows Vista & FreeBSD / Linux / Some other OS
The Problem
After installing Windows Vista Enterprise Edition, I very quickly wanted to get back to FreeBSD. As per previous versions of Windows, Vista does a great job of overwriting the Master boot record (MBR). Unlike previous versions of windows, you cannot just install a different boot loader in the MBR – so I found out the hard way. (It used to be sooo easy fdisk /mbr would fix any broken boot sectors, then just install your favourite boot loader).
Vista writes a unique disk id in the MBR. This unique id (UID) is used by Vista to determine what disk is what. It does make some sense, Hardware can shift around, but the UID should always be the same. This allows Vista to always know where it’s files are and to appropriate label drive C: as the correct drive.
Installing another boot loader, however (ie Grub, lilo, the FreeBSD boot0 / boot loader /boot manager) will overwrites the UID in the MBR and Vista fails to load with an error:
"unable to access \windows\winload.exe"
The error message is semi appropriate but very misleading. What it really should say is “I can’t work out which of my the drives has my files on it hence I can’t find winload.exe”.
- ‘Full details about the UID can be found at: http://multibooters.co.uk/mbr.html
Existing Solutions
Out on the web there is many solutions to the dreaded winload.exe. Many of them are misleading, some I believe are not even tested. Also many apply to Vista Release Candidate 1 (rc1) which I believe didn’t required the UID to be present in order to successfully boot. Below is some of the solutions that people say work (but Ifound didn’t).
Using Grub
- Ref: http://ubuntuforums.org/showthread.php?t=358175
- Ref: http://blogs.sun.com/moinakg/entry/vista_and_solaris_express_dual
Some say grub loading windows with something like:
Title Vista root (hd0,0) makeactive chainloader +1
will work – but grub still over writes the MBR hence the same issue will occur – though you may be lucky as the grub MBR is really small (and might leave the UID) untouched.
Using gag
There’s reports on a FreeBSD mailing list that gag will work, thought I’m running FreeBSD/amd64 which gag or grub for that matter won’t compile on. I know I could always install the lib32 compatability distribution to use it but I wanted the default FreeBSD boot loader.
Using the Vista Boot Loader
Many people have given up on trying to use a normal boot loader, and instead use the Vista boot loader.
The WinXP/NT bootloader (ntldr & config file boot.ini) have been replaced with files winboot.exe and bcedit.exefor configuration.
Theses commands could be setup to boot other operating systems though your milege may vary.
Commercial Software
Many people have decided it’s all too hard and gone and purchased software to handle it for them – there’s lots out there
- VistaBoot (http://vistabootpro.org)
- EasyBCD
Utilities
There is many utilities that claim to fix the issue. One such util is MBRFix.exe, this fixes the fact that vista won’t boot but it will clobber any boot loader you have got installed.
The Fix (That Worked)
- Obtained from: http://forum.onmac.net/showthread.php?t=1324
The simple fix is to tell Vista that the drive it boots off of will always be the drive it can find its files on. This way you can clobber the UID in the MBR as much as you want and Vista won’t care. To do this you run:
BCDEDIT /set {bootmgr} device boot BCDEDIT /set {default} device boot BCDEDIT /set {default} osdevice boot
This can be run from either the Vista repair cd, from within Vista, or from something likehttp://www.ultimatebootcd.com (For Windows).
Conclusion
Hence it IS possible to run Vista with any boot loader that you like – in my case the FreeBSD boot loader is the one of choice.
jaalvarez said,
I was getting the winlogon.exe not found error after installing PC-BSD with the BSD boot loader.
I was in the process of checking your fix. I booted from the Vista CD and chose the REPAIR option. It automatically identified an error in startup (partition not found). I opted to have it automatically correct the problem. After just a moment it asked that I reboot and then allowed me to boot into my Vista partition.
It did keep the BSD boot loader in place and functioning.
bice said,
Worked perfectly, Vista on drive0 FreeBSD 7.1 on drive1.
Igor said,
Very useful and well structured information. Thanks
DougRH said,
Hi,
I’m trying to get Windows XP Pro running a RAID 1 array off of a pair of IDE HDDs from a PCI card and Vista Ultimate running off of a PCIe1 card on a different pair of RAID 1 SATA HDDs but canNOT get a dual boot running!. I’ve edited with BcdEdit directly on Vista, have used Vista Boot Pro, EasyBCD and tried OSL2000 all with no success. I can get it to boot to Vista AND start to boot XP but it always hangs up and stalls at CRCdisk.Sys (I think the file is, though it may be CRC.sys) and sometimes hangs up at Mup.Sys. If I have both Vista and XP hooked up and it will boot to Vista, subsequently it will not complete the XP initiation with the Vista HDDs unhooked until I either ‘repair’ or ‘reInstall’ XP (I’ve already had to have Win XP Pro ‘reactivated’ twice!)
If I use EasyBCD and put the boot manager on the XP disks, then I can boot to XP, but Vista does not even show up in the boot menu.
I’ve wasted way to much time on this already and need to get it working ASAP and move on.
FYI – The PCIe1 card takes priority over the PCI card. It shows both during the boot up if I just have the XP array hooked up, but if I have it running Vista, the PCI/IDE card does not show up at all in the boot process.
Thanks in advance for any and all help (< 8)
DougRH
Benjamin Close said,
Since the pcie card is always found first you must put the boot loader on that disk. I think the problem may be related to how windows detects disks. Chances are your XP install is on your PCIHDD drive that XP considers to be C: however vista believes the PCIEXHDD drive is C:.
I’d say that the the problem may be resolved by making sure that XP has drivers for the PCIEX card at installation time. This way XP will probe the drives in order and consider it’s PCIHDD to be D: not C:. This hopefully will allow it to resolve it’s drives correctly at boot.
Good Luck!
DougRH said,
Hi Benjamin,
I am using the BCDedit.exe and the other utilities that I mentioned for editing & managing the (Vista) boot process on the Vista HDDs as when I try to do it on the XP drives, I am unable to edit with the Vista Boot manager/Utilities/files etc.
I have the drivers for both cards loaded when I install both operating system,
FYI: I know it is risky but out of desperation I have tried leaving the PCIe SATA RAID card in while installing XP, but don’t have the HDDs pluged into it. Once I am in XP I then I plug the SATA HDDs into the PCIe card then plug the power connector into the SATA HDDs. (Hot PnP) I can then reboot into XP, but then I can’t get into Vista )< 8)
When I load the drivers for the PCIe during the XP install, I utilize the XP *.Inf file and it recognizes it just fine.
When I load both of the drivers during teh Vista install, the most recent one is Windows 2003, which is working just fine for the PCIe card.
The PCIe card is a HighPoint Rocket RAID 2300.
THe PCI card is a Silicon Image Sil 0680R ATA-133 Medley RAID Controller.
Thus both RAID cards are recognized and work just fine once I am into both XP & Vista.
I have what you suggested covered and implemented but alas it doesn’t work.
Thanks anyway though (< 8)
DougRH
Benjamin Close said,
By not having the Vista HDD’s plugged in whilst installing XP, XP cannont enumerate those drives at install time – despite the fact you have the drivers loaded. Though Admittedly I’m guessing here.
http://discussions.hardwarecentral.com/showthread.php?t=167275 seems to indicate that ntldr & ntdetect.com play a role in things not working. Have you tried changing the boot order in bios? It’s possible this will reorder your drives allowing XP to boot.
DougRH said,
Hi Benjamin et all,
Sorry I didn’t respond sooner, but I couldn’t get onto this site for quite a while for unknown reasons ) OK
BCDEDIT /set {default} device boot —-> Error
BCDEDIT /set {default} osdevice boot –> Error
Thanks for everyone’s suggestions (< 8)
Regards,
DougRH
DougRH said,
My above response got butchered and most of it didn’t post so here goes another try:
I have tried pretty well everything that you suggested Benjamin without success before I read your reply.
Except for these: Inputting the 3 BSD commands below in a DOS window with administrative privileges within Windows results in the first command being accepted OK, but I get an error message for the second and third ones and it doesn’t accept them.
BCDEDIT /set {bootmgr} device boot —-> OK
BCDEDIT /set {default} device boot —-> Error
BCDEDIT /set {default} osdevice boot –> Error
Thanks again,
DougRH
Benjamin Close said,
Hi DougRH,
Sorry I’m out of ideas, if you do manage to work it out, please let me know as I’m interested in a working solution.
catfish said,
Thanks, I was able to get my system going.
In my case, I had installed FreeBSD and then installed Vista. I used easybcd to get back to FreeBSD. For a lark I installed boot0mgr. Attempting to reboot into Vista brought me here via google.
Anyway, for whatever reason, I too got errors when trying to run the BCDEDIT commands. I suspect it is because of EasyBCD. I found out the default BCD store is C:\boot\bcd. I added this to the above commands and successfully repaired Vista.
i.e.:
BCDEDIT /store C:\boot\BCD /set {bootmgr} device boot
etc.
Thanks for the handy guide!
wacky mixed up boot loader: Multi-booting Vista, Ubuntu and PCBSD said,
[…] only brought up Ubuntu and Windows. Next I followed the instructions at the end of this article http://www.clearchain.com/blog/posts…-windows-vista (don't ask why), specifically, entering this in the Command Prompt: BCDEDIT /set {bootmgr} device […]
DougRH said,
Hi,
You may note my series of inquiries here on multiple OS booting problems, specifically losing the capacity to boot to Vista 32
I was never able to ‘resurrect’ Vista to boot directly to it and ended up reinstalling it.
I was going to turn all booting controls over to Vista. BUT:
Hey, My HDD are mirrored arrays so why can’t I boot of at least one of them that I have confirmation of access and functionality from another OS.
So, I know the hardware is OK, but when the boot software is all messed up, it renders it a moot point.
Comes back to the same thing that it has been for over 30 years with personal computers: regardless of what hardware ‘flavor’ or configuration that they are:
BackUps! BakUps! BackUps!
This INCLUDES the BOOT software in some form or other: be it an OffLine mirrored HDD or an emergency repair disk.
Before I gave Vista total software control over all of the different OS’s booting from it, I stopped and scratched that itch niggling away at me from my subconscious mind:
So if I do give Vista the power to control all boot up OS, then if it crashes again, I’ve lost the capacity to boot to any of them! NOT good ! )( YET )< 8(
'nuf said!
DougRH said,
*The previous submission got SNAFU:
The Implemented Solution:
My BIOS has a Boot menu that doesn’t care what Vista does or doesn’t do to boot to any OS. Though it is a little inconvenient in that it defaults to (Re)Boot to Vista and not the other OS that I am on now and I can’t change this.
But this is the lesser of the two evils and I can live with this minor inconvenience in this environment but that ensures that I can still get up and running even if Vista (32) can’t boot to anything anymore.
I’m not ‘gun shy’ about using multiple boot software. I’ve used them successfully for many years.
But this way I’ve completely bypassed any such problems that will most likely and inevitably happen again at some point in time. *These ARE still computers after all!
But hey:
It used to take rebooting several times a day to get a full days work out of them. Happily not anymore.
At least PC/Macs etc have finally got to the point where they have enough Hardware capacity that we can actually do something useful such as utilizing great GUI interface and multi-task effectively with them now.
But I’m STILL glad the MicroSoft doesn’t make the OS that runs my vehicles! , , , )8 >( YET )< 8(
'nuf said!
Dual-Booting: Vista and Debian (missing winload.exe) | Find Answer said,
[…] from what I can tell this actualy has nothing to do with winload.exe (source) but with the above-mentioned "check-summing" behavior of Vista’s bootloader. I […]
Add A Comment