1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Windows 7 and FreeBSD 9 Dual Boot

Discussion in 'Installing and Upgrading FreeBSD' started by markfisher, Jan 21, 2012.

  1. markfisher

    markfisher New Member

    Messages:
    82
    Likes Received:
    0
    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
     
  2. SR_Ind

    SR_Ind New Member

    Messages:
    115
    Likes Received:
    0
    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.
     
  3. kpa

    kpa Member

    Messages:
    4,007
    Likes Received:
    9
    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 /boot/boot0 bootloader on the first disk that is installed with boot0cfg(8):

    # boot0cfg -B /dev/ada0

    In my case /dev/ada0 was the first disk as seen from FreeBSD.
     
  4. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,208
    Likes Received:
    15
    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 boot0cfg(8) 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.
     
  5. SR_Ind

    SR_Ind New Member

    Messages:
    115
    Likes Received:
    0
    @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.
     
  6. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,208
    Likes Received:
    15
    I started to mention (but got distracted by something shiny) an example of a third-party boot loader, like sysutils/grub2.
     
  7. SPlissken

    SPlissken New Member

    Messages:
    150
    Likes Received:
    0
    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.
     
  8. markfisher

    markfisher New Member

    Messages:
    82
    Likes Received:
    0
    @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
     
  9. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,208
    Likes Received:
    15
    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.
     
  10. SPlissken

    SPlissken New Member

    Messages:
    150
    Likes Received:
    0
    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.
     
  11. cuq

    cuq New Member

    Messages:
    33
    Likes Received:
    0
    Hi, just wanted to say that boot0cfg(8) 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 (ada0s4) and, after the instalation completed, I run boot0cfg -B /dev/ada0. Then reboot and now I can boot on W7Pro or FreeBSD without any issues.

    Cheers and thank you,
    cuq
     
  12. router54g

    router54g New Member

    Messages:
    8
    Likes Received:
    0
    boot0 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. boot0 works just fine in this case.
     
  13. wblock@

    wblock@ Administrator Staff Member Administrator Moderator Developer

    Messages:
    11,208
    Likes Received:
    15
    boot0 only works with MBR; it's from the era before GPT. sysutils/grub2 will do it. The process needs to be thoroughly documented.
     
  14. user1

    user1 New Member

    Messages:
    17
    Likes Received:
    0
    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 )
     
  15. user1

    user1 New Member

    Messages:
    17
    Likes Received:
    0
    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.
     
  16. zspider

    zspider New Member

    Messages:
    488
    Likes Received:
    0
    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.
     
  17. SirDice

    SirDice Moderator Staff Member Moderator

    Messages:
    17,392
    Likes Received:
    7
    It can. But you must use UEFI boot to boot the Windows 7 installer.
     
  18. user1

    user1 New Member

    Messages:
    17
    Likes Received:
    0
    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.
     
  19. kpa

    kpa Member

    Messages:
    4,007
    Likes Received:
    9
    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.
     
  20. nakal

    nakal Member

    Messages:
    206
    Likes Received:
    0
    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.
     
  21. rojiru

    rojiru New Member

    Messages:
    2
    Likes Received:
    0
    Windows 7 repair worked

    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 bootconfig 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!