FreeBSD 11.1 installer overwriting windows boot partition

After installing FreeBSD, I was unable to boot Windows 7.
Could it be possible that the FreeBSD installer had overwrittten the windows boot loader?

If so, how can I install FreeBSD while avoiding the destruction of my windows installation / boot partition ?
 
After installing FreeBSD, I was unable to boot Windows 7.
Could it be possible that the FreeBSD installer had overwrittten the windows boot loader?

If so, how can I install FreeBSD while avoiding the destruction of my windows installation / boot partition ?

How did you install it? What options did you choose, namely, when it came to disk partitioning?
 
How did you install it? What options did you choose, namely, when it came to disk partitioning?

I used ZFS, and selected a separate harddrive for freebsd in the installer, but the Installer broke my Windows EFI / Boot partition which was not on the drive selected
 
FreeBSD Installation has Ruined my Windows XP Three Times

I have now suffered this same problem three times after installing BSD V11.1 on an internal Hard Drive with Windows XP installed. [N. B. It was also a newly installed Windows system so I didn't lose any Windows stuff. I had previously tried out Linux Debian which did not cause this problem, and created a Menu to choose to boot from either Linux or Windows.]

I don't want to make a fourth attempt without knowing it will work. I had used the Guided Partition option which I assume is the problem. What exactly do I do in the Manual Partition to create a Boot Menu for both BSD and Windows XP?
 
I had already read that Thread. It doesn't provide an answer as to whether the FreeBSD Installer can create a Boot Menu with Windows. The one guy (gwb) used Linux to create a Boot Menu. I'm trying to determine if BSD can create one. I don't recall seeing any GRUB2 in the BSD Installer. The BSD Installation Guide claims that it will work with Windows on a partitioned Drive.
 
I use grub2 menu from devuan for booting. But have to enter stanza for freebsd manually. Freebsd has few ports. Check which one suits you & sees windows.
 
Hi Terry, I am interested in the same thing and used the answers from HL1234 to get further.
His first link to the handbook doc states:

3.7.
Can Windows® co-exist with FreeBSD?
If Windows® is installed first, then yes. FreeBSD's boot manager will then manage to boot Windows® and FreeBSD. If Windows® is installed afterwards, it will overwrite the boot manager. If that happens, see the next section.

Then it's said in Thread 14222 by Dr_Phoenix that:
The problem is in the Win7, this OS will not allow you to make changes in it's boot sector, so if FreeBSD or Linux replaces it's by self BootManager win7 will not run and showing you the critical error message at the boot time.

And then he suggests a method working for him which involves doing the partitioning before having any OS installed at all.

Another solution in the same thread is posted by rden:
If they are all on disk0 why bother with grub - it's an unessesary extra step with zero gain, just copy out FreeBSD's boot1 and load it from win7 boot manager. Fast, simple, elegant and user-friendliest boot selection.
(Used to have XP, FBSD and Win7 all booting from Win7 boot manager - until I removed Win7 and went back to XP's boot manager.)

Which to me seems like the most convenient setting.

- - - - -
The rest can be found in the handbook under https://www.freebsd.org/doc/handbook/bsdinstall-partitioning.html.
Take note that I read in one of our threads that the "Guided Partitioning" overwrote the files to the other OS (not sure if he went to install on whole disk or partition only) and if this is the case you should pick "Manual Partitioning" to make sure that the other OS will not be overwritten when installing FreeBSD to a partition.

Also asys makes a terrific job explaining the difference between partitioning with Windows or FreeBSD in this thread: Thread 59633.

If you take time and decide to go forth with this I will be glad to follow your updates in this thread. :)

Cheers! :beer:
 
I use grub2 menu from devuan for booting. But have to enter stanza for freebsd manually. Freebsd has few ports. Check which one suits you & sees windows.
The terms 'grub2', 'devuan' and 'stanza' are not familiar to me, and sound like features or Distros in Linux. I don't recommend using the Linux Grub Menu with FreeBSD. BSD needs to provide its own Menu.

Hi Terry, I am interested in the same thing and used the answers from HL1234 to get further.
...
If you take time and decide to go forth with this I will be glad to follow your updates in this thread. :)
Hi Michael,
The statement in Paragraph 3.7 of the Guide is not proving correct: "If Windows® is installed first, then yes. FreeBSD's boot manager will then manage to boot Windows® and FreeBSD". The Guided Partition tool renders Windows XP unbootable. I advise you to not attempt installing FreeBSD unless you have first backed up everything on your Hard Drive. You don't want to risk losing anything.

If I cannot get an answer as to how to do this right now with Version 11 then I'll have to install BSD on a second 'slave' Hard Drive, and use the Computer's BIOS Menu to boot from the slave Drive to load BSD. My preference is to have the Windows and BSD OS' on the master Drive, and then store my Files on the slave Drive to protect them against OS malfunctions such as the Windows Bluescreen horror which recently caused me a nightmare.

I recommend to the FreeBSD Foundation that they delay the release of Version 12 until it can incorporate a Boot Menu for different Operating Systems on one Drive -- just like Linux provides. FreeBSD is going to have a hard time finding converts if it cannot provide users the ability to boot either BSD or Windows from one Hard Drive.
 
Terry:
I think you are missing some important points in the post I did.
I also went in the line of avoiding the "Guided Partitioning" and doing the "Manual Partitioning" instead. This step can be found in the installation chapter of the handbook I linked you.

Also, in my opinion, the safest route would be to just install FreeBSD that way and then try to copy the necessary boot files into Windows 7's own Boot Manager. Not sure how you missed that but no harm in being more precise.

I am certainly sure that they will not postpone the release date only to enable FreeBSD's Boot Manager to boot other systems apart from FreeBSD when according to handbook it already should be possible + that there are fixes for this issue in the forum. I would say that, that would not be their foucus, but I can be wrong. :p

Lastly I can make sure that I will try to set this up myself as soon as I have time and a proper backup on my files and then I will get back to you with exactly what I did to make it work, or not work for that sake. :)

On a sidenote I can go with the custom and recommend you to contribute to FreeBSD and look into the Boot Manager and see if you can modify it correctly to boot other systems for your need and then be a part of the development.
 
Some of the above problems are due to Microsoft initially using a single sector bootloader (WinXP/Win7) and later using the first 2 sectors for the bootloader. Grub2 or FreeBSD gtp/efi, typically install on the first 2 sectors. On an existing WinXP/Win7 install, the start of the Windows partition would be over-written by the 2 sector bootloader. Using the single sector MBR disk scheme, as suggested by Phishfry, should work as long as your hardware does not demand EFI.
 
Through some more digging I found this excellent thread on the subject, describing exactly how to do it with boot0cfg, as Phishfry and shepper proposed: Thread 28925.
Together with some eye-candy:

At this point I feel so sure I could even go on with this without having a backup, lol. (Will not though.)

Thank you both for stepping in and pointing in the direction of boot0cfg. Highly appreciated. :D
 
... the safest route would be to just install FreeBSD that way and then try to copy the necessary boot files into Windows 7's own Boot Manager. Not sure how you missed that but no harm in being more precise. ...
My Windows version is XP which may respond differently from 7.

... I am certainly sure that they will not postpone the release date only to enable FreeBSD's Boot Manager to boot other systems apart from FreeBSD when according to handbook it already should be possible + that there are fixes for this issue in the forum. I would say that, that would not be their foucus, but I can be wrong. :p ...
You need to consider this problem from the perspective of an 'average' computer user o_O -- not 'advanced' users. Manually setting up a Boot Menu is way too complicated for the average user. I personally want to see FreeBSD become much more widespread so that Software Developers will write Software for BSD. This necessitates that the BSD installation process be completely idiot-proof. It's not acceptable from a programming perspective that installing FreeBSD would ruin the existing Windows installation. The BSD Programmers should have tested out the Installer Partition Tool with different Windows versions to verify whether or not it creates a Boot Menu. If it doesn't work with Windows XP then there should be a warning message in the Installer. This problem with XP should have been discovered by BSD Programmers fifteen years ago.

Some of the above problems are due to Microsoft initially using a single sector bootloader (WinXP/Win7) and later using the first 2 sectors for the bootloader. Grub2 or FreeBSD gtp/efi, typically install on the first 2 sectors. On an existing WinXP/Win7 install, the start of the Windows partition would be over-written by the 2 sector bootloader. ...
Thanks for this information. This is undoubtedly my problem. Over-writing the second Sector (1) would corrupt a major Windows System File, and this problem would be irreparable. I'll have to go with installing BSD on my slave Hard Drive which I can select from the BIOS Boot Menu.
 
... Over-writing the second Sector (1) would corrupt a major Windows System File, and this problem would be irreparable. ...
I think I figured out a way to get around this problem of BSD using the Second Sector for the Boot Menu. When installing Windows, you can create 3 Partitions with the First being a Dummy Partition of the smallest size possible (a few Kilobytes), the Second being for the Windows Installation, and the Third unformatted space for the FreeBSD installation. When the BSD installer erases the Second Sector it will only impact the Dummy Partition -- leaving the Windows Partition unaffected. However, I am reluctant to now try this out because it would take about four hours to reformat and reinstall Windows and BSD. If Michael or someone tries this out please let us know the results.
 
If you are in no hurry I will set this up in due time. Although I, and the others in this thread, has told you the specific steps to take and I don't think that your scenario will be any different than mine.
 
I wondered if one of the opensource parition managers (GParted), could shrink the windows partition by one sector from the start of the NTFS patition and then enlarge the boot partition by one sector?
GParted Manual
 
... Although I, and the others in this thread, has told you the specific steps to take and I don't think that your scenario will be any different than mine.
There has been no definitive suggestion for safely installing FreeBSD with Windows XP. The suggestions haven't been determined absolutely safe. There was a suggestion for using 'foreign' OS Boot Menus like Linux's GRUB. However, I'm trying to determine a safe process within BSD. Using a foreign Menu is rather tacky.

I wondered if one of the opensource parition managers (GParted), could shrink the windows partition by one sector from the start of the NTFS patition and then enlarge the boot partition by one sector?
I think the problem with this suggestion would be that the Second Sector (1) is already used by Windows, and there's no way to undo that once Windows is installed.
 
I think I figured out a way to get around this problem of BSD using the Second Sector for the Boot Menu. When installing Windows, you can create 3 Partitions with the First being a Dummy Partition of the smallest size possible (a few Kilobytes), the Second being for the Windows Installation, and the Third unformatted space for the FreeBSD installation. ...
Well, this method doesn't work because the 'FreeBSD Installer / Partition Editor' is somehow deficient rendering it incapable of recognizing the unused Disk space. I reformatted and reinstalled Windows XP (after Windows screwed-up on me again) on a 12GB 2nd Partition on my 19.5GB Hard Drive. The 1st Windows Partition is just the 8MB minimum. The following summary is what the 'FreeBSD Installer / Partition Editor' provided:
ada0 19GB MBR
ada0s1 7.8MB ntfs
ada0s2 19GB EBR
ada0s5 12GB ntfs
ada0s3 7.9MB BSD

For some reason the 2nd Windows Partition (Slice in BSD) is numbered as Slice 5 as a subpartition to Slice 2. The BSD Slice / Partition is numbered as "3", but is only 7.9 MEGA Bytes because the BSD Partition Editor is not recognizing the 7.5 GIGA Bytes of unused space on the Drive which has been subsumed into Slice 2. If someone can explain what is happening here I will be most delighted. It appears to me as if Windows XP created a second Boot Record (EBR) for Partition 2. However, Windows does recognize the 7.5GB of unused space in its Disk Manager. Why isn't the BSD Partition Editor recognizing it?

~~~~~
On a separate issue; prior to reformatting I noticed that, when BSD first starts right after the Computer's BIOS concludes, when you press the <DOWN ARROW> Key the following comes on the Screen:
-
FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/loader
boot:_

This 'boot' prompt responds with "No" when entering anything other than "/boot/loader" -- which begins loading FreeBSD. What is this prompt? Is this the FreeBSD Boot Menu?
 
As far as your post considering, I think you should not install Windows on a second partition in an already Windows install, no? Because now you have this first Windows dummy you are speaking of, as a main install showing the hdd capacity to total 19 Gig and then you have another install of Windows, in another partition, showing the total of 19 Gig in hdd space.

If you want that to even work remotely you will have to install FreeBSD in a partition under ada0s2. instead of ada0, and then target ada0s2 with boot0cfg as the installation is complete. In this case you would have at total 6~ Gig of free space and you'd also like to set up a proper swap on this system.

WARNING: Why I am saying that this may "remotely" work is because I don't know how boot0cfg will treat your method since the targeted drive is now an EBR and not an MBR, as you clearly can understand when you look in the FreeBSD installer. So your options are as follows:

1. Try this method I present to you, targetting ada0s2.
2. Ditch your dummy partition: Make a proper clean install of Windows XP so you have only one Windows on your hdd as an MBR record and after that follow the guides and advices that you have been presented. Essentially for you this means that you will do the same thing that you have done but the installer will show the free space in ada0 (where you'd want it considering your post) instead of in ada0s2, where it is at the moment.

Question of curosity: What will you use your 6~ Gig FreeBSD system (discounting swap space) for?
 
On a second thought it may be very hard to accomplish this in ada0s2 since the FreeBSD will most likely put it's booter in ada0s2 and as far as my knowledge goes your system may boot into the MBR environment of ada0. I lack sufficient skills to tell if your system boots from ada0s2 or ada0 at this point.

So I think you can remove the first option above and go with option number 2.

Good luck.

Ps. Or you could always try option 1 and see if it works (you know it works if your system boots into FreeBSD and not Windows) but I'd suggest option 2.

Still not sure why you 2018 want to Dual-OS on an 19,5 GB hard drive, but that is actually none of my business.

Also: Don't think this thread should be used anymore regarding this subject because from the start I viewed you as the TS but later I realised that was not the case so I should give an apology to xforce for occupying his thread.
 
As far as your post considering, I think you should not install Windows on a second partition in an already Windows install, no? ...
I tried creating this Dummy Partition because FreeBSD was screwing-up my Windows installation when it was the 1st Partition, and so I thought this would avoid the problem caused by a 2-Sector Boot Loader mentioned in Post #13. I have no idea why Windows XP created that EBR. I have 7.5GB for the BSD installation which allows for 3GB for 'swap'. I intend to use a second 40GB Slave Hard Drive for storing all my personal files (Windows and BSD) to protect them against OS failures.

If you want that to even work remotely you will have to install FreeBSD in a partition under ada0s2. instead of ada0, and then target ada0s2 with boot0cfg as the installation is complete. In this case you would have at total 6~ Gig of free space and you'd also like to set up a proper swap on this system. ...
I tried this, and it doesn't work. The Partition Editor will only allow you to create the BSD Partition at 'ada0'.

...
2. Ditch your dummy partition: Make a proper clean install of Windows XP so you have only one Windows on your hdd as an MBR record and after that follow the guides and advices that you have been presented. Essentially for you this means that you will do the same thing that you have done but the installer will show the free space in ada0 (where you'd want it considering your post) instead of in ada0s2, where it is at the moment. ...
I will try this for about the sixth time once someone in the know can tell me how to have BSD create a Boot Menu like Linux. Nobody has yet provided an answer to this within FreeBSD. That 'boot0cfg' Command appears to only change the Partition which boots up. It does not seem to create a Boot Menu like Linux. Also, if the BSD Boot Loader uses two Sectors instead of one, then there is no way for BSD to be installed on a Partition with Windows because it will irreparably screw-up Windows.

Question of curosity: What will you use your 6~ Gig FreeBSD system (discounting swap space) for?
For starters I wish to switch to BSD for all of my Internet work since the Windows XP Firewall is no longer safe. My Windows system was hacked and corrupted while on the Internet last December which is what led me to search for another OS. I had installed Linux Debian in February which successfully set up a working Boot Menu -- the first time, but when running Debian it screwed up my older Monitor which led me to try out FreeBSD. I'm afraid that it's looking like FreeBSD might turn into a dud as well.

...
Ps. Or you could always try option 1 and see if it works (you know it works if your system boots into FreeBSD and not Windows) but I'd suggest option 2.
No this does not mean that it's working. This is exactly the problem with the FreeBSD Installer: it corrupts the Windows installation rendering it unbootable. I, and every other user who wishes to use a Windows / BSD Partition Drive, expect BSD to provide a Boot Menu to select either Windows or BSD -- just as Linux does! Absolutely nobody here has yet confirmed as to whether or not FreeBSD can provide such a Boot Menu. It seems not.

Still not sure why you 2018 want to Dual-OS on an 19,5 GB hard drive, ...
Also: Don't think this thread should be used anymore regarding this subject because from the start I viewed you as the TS but later I realised that was not the case ...
Yes this is the proper Thread to use for this topic of the BSD Installer screwing-up the Windows installation. The Forum administrators don't like duplicate Threads on a single topic / problem.
 
Some of the above problems are due to Microsoft initially using a single sector bootloader (WinXP/Win7) and later using the first 2 sectors for the bootloader. Grub2 or FreeBSD gtp/efi, typically install on the first 2 sectors. On an existing WinXP/Win7 install, the start of the Windows partition would be over-written by the 2 sector bootloader. Using the single sector MBR disk scheme, as suggested by Phishfry, should work as long as your hardware does not demand EFI.
Are you certain this is accurate? According to 'dririan' on his Blog "Using boot0cfg on FreeBSD to configure the bootloader / July 14, 2012" (https://dririan.com/2012/07/using-boot0cfg/); FreeBSD's boot0 "fits entirely in the MBR’s boot code area (which is 440 bytes)". Doesn't this mean that the BSD Boot Code fits entirely within Sector 0?

~~~~~
Is there anyone here with knowledge who can answer my question from Post #21:
when BSD first starts right after the Computer's BIOS concludes, when you press the <DOWN ARROW> Key the following comes on the Screen:
-
FreeBSD/x86 boot
Default: 0:ad(0,a)/boot/loader
boot:_

This 'boot' prompt responds with "No" when entering anything other than "/boot/loader" -- which begins loading FreeBSD. What is this prompt? Is this the FreeBSD Boot Menu?
 
Back
Top