Windows 7 and FreeBSD 9 Dual Boot

Installing and upgrading FreeBSD.

Windows 7 and FreeBSD 9 Dual Boot

Postby markfisher » 21 Jan 2012, 23:27

Hi
I have 2 hard drive installed on my machine. I installed Windows 7 on one hard drive and FreeBSD 9 on the other. I used GPT for my FreeBSD. My question is how can I install boot manager so that I can dual boot (In FreeBSD 8, sysinstall asks for boot manager but bsdinstall doesn't)?

Thanks
Mark
markfisher
Junior Member
 
Posts: 81
Joined: 19 Oct 2010, 15:46

Postby SR_Ind » 23 Jan 2012, 14:40

FreeBSD 9 will not dual boot with Windows Vista/7/2008.

If you start with FreeBSD, then later Windows Vista/7/2008 complains that no drive is present.

If you start with Windows Vista/7/2008, then the FreeBSD later complains that drive cannot be GPT partitioned.

Try setting up a dual boot system consisting Windows Vista/7/2008 and FreeBSD 8.2 and then try to update FreeBSD while booted inside FreeBSD 8.2.
SR_Ind
Member
 
Posts: 115
Joined: 07 Feb 2009, 14:36
Location: India, Kolkata

Postby kpa » 23 Jan 2012, 15:56

SR_Ind wrote:FreeBSD 9 will not dual boot with Windows Vista/7/2008.


What are you basing this on? I have successfully set up dual boot with Win7 on the first disk (MBR) and FreeBSD 9 on the 2nd disk (GPT). I used the [FILE]/boot/boot0[/FILE] bootloader on the first disk that is installed with [man=8]boot0cfg[/man]:

[CMD="#"]boot0cfg -B /dev/ada0[/CMD]

In my case [FILE]/dev/ada0[/FILE] was the first disk as seen from FreeBSD.
kpa
MFC'd
 
Posts: 3392
Joined: 05 Jul 2010, 13:19
Location: People's Technocratic Republic of Finland

Postby wblock@ » 23 Jan 2012, 16:04

SR_Ind wrote:FreeBSD 9 will not dual boot with Windows Vista/7/2008.


I'm reasonably sure that it will, but will require a third-party GPT boot loader if the Windows 7 disk uses GPT. Or maybe the Windows 7 loader can do it. (I don't have Windows 7 currently, and will not be buying it in the foreseeable future. If someone wants to provide me with a (legal) Windows 7 install package, I will write an article on dual-booting with Windows 7 and GPT.)

If the Windows 7 disk uses MBR, then install FreeBSD in an unused primary partition. At the end of the install, go into the shell and use [man=8]boot0cfg[/man] to install the multi-boot loader.

Incidentally, in some ways multi-booting is the worst of all possible worlds. Consider the alternative of installing just the primary operating system and running others in VMs.
User avatar
wblock@
Old Fart
 
Posts: 10169
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby SR_Ind » 23 Jan 2012, 17:11

@kpa

@wblock@

I'm a dual boot user. I did precisely that. The FreeBSD 9 bootloader fails to locate any OS on the first partition (i.e. Windows 2008).

On my laptop the combination tried was Windows 2008 + FreeBSD 9 and I finally settled on Windows 2008 + FreeBSD 8.2.

The combination of Windows 7 + FreeBSD 9 failed on my old desktop. Although I suspect there are some BIOS issues in the desktop's ASUS motherboard.
SR_Ind
Member
 
Posts: 115
Joined: 07 Feb 2009, 14:36
Location: India, Kolkata

Postby wblock@ » 23 Jan 2012, 20:55

I started to mention (but got distracted by something shiny) an example of a third-party boot loader, like [port]sysutils/grub2[/port].
User avatar
wblock@
Old Fart
 
Posts: 10169
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby SPlissken » 24 Jan 2012, 15:13

wblock@ wrote:Incidentally, in some ways multi-booting is the worst of all possible worlds. Consider the alternative of installing just the primary operating system and running others in VMs.


I don't think the same, but that s not the question.
I m facing the same issue as markfisher on a new laptop with Window 7.
I want to keep Window 7, it could be usefull one day.
I think i will apply the solution given by SR_Ind, install first 8.2 that should let me decide where to install the bootloader then update to FreeBSD 9.
Then install GAG (http://gag.sourceforge.net/) which i already use on my previous laptop to boot WinXP, Debian and FreeBSD 8.2.

I will keep you inform if it works.
FreeBSD sp-freebsd 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Sun Dec 23 18:57:51 CET 2012 root@sp-freebsd:/usr/obj/usr/src/sys/SPKERNEL amd64
User avatar
SPlissken
Member
 
Posts: 150
Joined: 16 Nov 2008, 21:35
Location: France

Postby markfisher » 24 Jan 2012, 15:26

@wblock@
I installed windows 7 first (MBR) on the first hard drive.
Then I installed FreeBSD (GPT) on the second hard drive.
In my case since I'm using 2 separate hard drives I can use motherboard boot menu to choose from which hard drive I want to boot. I will give your boot0cfg a shot to see if it's going to work.

Thanks
Mark
markfisher
Junior Member
 
Posts: 81
Joined: 19 Oct 2010, 15:46

Postby wblock@ » 24 Jan 2012, 16:42

I haven't tested boot0 (the multi-boot loader) with GPT. It might work (because of the GPT's protective MBR). It might not work to install it on a GPT disk. Or it might not work at all. Multiple drives is less complicated than one drive with multiple partitions.

Using the BIOS boot menu is safer. If that's working for you, stick with it. If not, please make full backups, including MBR and partition tables, before trying other configurations.
User avatar
wblock@
Old Fart
 
Posts: 10169
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby SPlissken » 29 Jan 2012, 20:03

Finally I used PCBSD to install a basic FreeBSD 9 release, then install GAG and now I can boot Win7, LinuxMint and FreeBSD on my new laptop.
Have to install all the stuff for FreeBSD.
FreeBSD sp-freebsd 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #1: Sun Dec 23 18:57:51 CET 2012 root@sp-freebsd:/usr/obj/usr/src/sys/SPKERNEL amd64
User avatar
SPlissken
Member
 
Posts: 150
Joined: 16 Nov 2008, 21:35
Location: France

Postby cuq » 30 Jan 2012, 15:12

Hi, just wanted to say that [man=8]boot0cfg[/man] dual boot worked fine in my configuration:

I installed Windows 7 Pro, liberated space with GParted on the disk, installed FreeBSD 9 on the slice created with GParted ([FILE]ada0s4[/FILE]) and, after the instalation completed, I run [FILE]boot0cfg -B /dev/ada0[/FILE]. Then reboot and now I can boot on W7Pro or FreeBSD without any issues.

Cheers and thank you,
cuq
cuq
Junior Member
 
Posts: 30
Joined: 22 Feb 2010, 04:11

Postby router54g » 01 Mar 2012, 23:27

[FILE]boot0[/FILE] seems to work just fine with MBR partitions, cuq. The problem is using GPT. If your Win7 is already installed with GPT, it seems like the only easy way to get it working is to reinstall using legacy BIOS (MBR) and then install FreeBSD with MBR slices. [FILE]boot0[/FILE] works just fine in this case.
router54g
Junior Member
 
Posts: 8
Joined: 19 Feb 2012, 02:34

Postby wblock@ » 02 Mar 2012, 00:09

[file]boot0[/file] only works with MBR; it's from the era before GPT. [port]sysutils/grub2[/port] will do it. The process needs to be thoroughly documented.
User avatar
wblock@
Old Fart
 
Posts: 10169
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby user1 » 08 Nov 2012, 20:10

I was searching google for dual boot threads and came across this one.

To dual boot Windows 7 and FreeBSD9 install FreeBSD first then install Windows. Windows will remove FreeBSD from the MBR when it installs. To get FreeBSD back on the MBR download/install EasyBCD from download.com (its free) and add FreeBSD back to the MBR.




Now if you install Windows first and FreeBSD second (or ruin your dual boot by reformatting the FreeBSD partition like I did) its not as easy of a solution. I'm trying to figure out how to fix it now. I think I can burn EasyBCD onto a cd and boot from it but I'm trying to figure out the command that the handbook suggested ( http://www5.us.freebsd.org/doc/handbook/boot-blocks.html )
user1
Junior Member
 
Posts: 17
Joined: 05 Nov 2012, 18:40

Postby user1 » 08 Nov 2012, 21:25

Just wanted to the add that FreeBSD is located on ad0 partition 1 partition 2 is windows system reserved(100mb) and partition 3 the main windows partition.

I tried using the windows 7 bootdisk to repair the windows MBR. My thought was I'd use their restore feature then add an entry with EasyBCD but without an entry the boot disk doesn't recognize that windows is installed.
user1
Junior Member
 
Posts: 17
Joined: 05 Nov 2012, 18:40

Postby zspider » 08 Nov 2012, 23:03

I didn't even do any of that recently. I installed FreeBSD with MBR partitions(Windows 7 would not let me install to a GPT partitioned drive) and left half the space unallocated, I then installed Windows in the other half. Then I put the FreeBSD DVD back in and dropped into a console and re-installed FreeBSD's boot manager. When I rebooted I have both Windows and FreeBSD as options and they both work.
User avatar
zspider
Member
 
Posts: 461
Joined: 16 Jun 2010, 16:50

Postby SirDice » 09 Nov 2012, 08:11

zspider wrote:(Windows 7 would not let me install to a GPT partitioned drive)

It can. But you must use UEFI boot to boot the Windows 7 installer.
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
User avatar
SirDice
Old Fart
 
Posts: 16161
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands

Postby user1 » 09 Nov 2012, 13:25

To resolve this I ended up removing the windows partition and reinstalling it then adding FreeBSD to the MBR with EasyBCD. Have it working now. Thanks.
user1
Junior Member
 
Posts: 17
Joined: 05 Nov 2012, 18:40

Postby kpa » 17 Nov 2012, 12:00

Please provide some more details to back up your claim. I have set up numerous machines to dual boot with win 7 and FreeBSD 9. It's true that dual boot on a GPT partitioned disk is much harder to set up but it's not impossible either. Then there's always the option of reverting to MBR partitioning which makes dual booting a piece of cake.
kpa
MFC'd
 
Posts: 3392
Joined: 05 Jul 2010, 13:19
Location: People's Technocratic Republic of Finland

Postby nakal » 17 Nov 2012, 15:27

Of course it will boot. The only problem is that if you don't use its original boot record, Windows seems not to be able to find it's own partition anymore (it stops with a BSOD in this case with some obscure numbers). This can be fixed by BCDEDIT or EASYBCD.

Just because you could not manage to get it to work, it does not necessarily mean that it is impossible.
User avatar
nakal
Member
 
Posts: 171
Joined: 16 Nov 2008, 16:31
Location: Germany

Windows 7 repair worked

Postby rojiru » 26 Aug 2013, 01:08

I am just now getting around to getting FreeBSD installed again. I had Windows 7 dual booting with Slackware using LILO for boot manager, which worked fine. Unfortunately I have to keep Windows 7 for work requirement, and a VM won't cut it for me right now. Possibly I can work something out in the future using a virtual environment. When I can get my hands on a powerful enough computer to run a virtual environment. :e

I installed FreeBSD 9, and the installer never did install a boot manager like times past. A reboot only gets me into Windows with LILO. I reboot to the FreeBSD DVD, and run [CMD]bootconfig[/CMD] to set up the boot manager. After a reboot, I can boot FreeBSD, but not Windows. I found this thread during the search. To fix the problem I just ran a repair from the Windows 7 DVD. This fixed the problem, and did not cause any others. Windows 7 boots, FreeBSD 9 boots. All is good. Now on to updating and installing packages/ports.

Thanks!
rojiru
Junior Member
 
Posts: 2
Joined: 15 Jun 2009, 16:14


Return to Installing & Upgrading

Who is online

Users browsing this forum: No registered users and 0 guests