fe20
![]() |
|
|
|
|
|||||||
| Howtos & FAQs (Moderated) Would you like to share some of your solutions for certain problems? Tips or tricks? Post here. All new topics are automatically moderated. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Since bsdinstall is geared towards GPT installations, it's not so easy to dual-boot a fresh install of FreeBSD with an existing install of Windows on the same drive. I'm assuming here that you have an existing installation of Windows under an MBR structure. If you're running 64-bit Windows 7 under a UEFI motherboard, there's a fair chance your drive is operating under GPT. You can check this with GParted (under drive information, partition style should read 'msdos' if it is MBR-structured).
This tutorial will result in a FreeBSD installation with a UFS root partition. This does not cover ZFS. The bootselect code will be the minimalist boot0 code as installed by previous versions of FreeBSD. Sorry, fancy bootselect fans. The following only applies under MBR! Back up anything you don't want to lose! This worked for me but it may not work for you! Assuming you have Windows installed, start your already-prepared FreeBSD installer from CD or USB. Follow the prompts as per the Handbook's instructions for bsdinstall until you come to the first partitioning prompt. You are given the choice of Guided, Manual or Shell partition setup. Select Manual. You should see a hierarchy of your storage devices. From here I will assume that your installation target drive is ada0. If it is ad0 or otherwise, be sure to substitute. You may want to note the name of the storage device for later on. On ada0, you should see an NTFS or FAT partition, named ada0s1 or similar. Select the parent (ada0) and Create and hit Enter to create your FreeBSD MBR partition. Change Type to "freebsd". Change size to the total intended size of all your FreeBSD slices, including Swap space. Don't enter a mountpoint. Select OK. From here, make sure the first slice you create is your root slice, otherwise your install will not boot. bsdinstall does not appear to modify the order of slices from how you enter them, so you have to make the root slice first to ensure your installation is bootable. To do this, select ada0s2 (the partition you created before) and select create. Then enter Code:
Type: freebsd-ufs Size: <desired size postfixed with MB or GB> Mountpoint: / Label: <whatever pleases you> Then, again by selecting ada0s2 and selecting Create, make a swap slice: Code:
Type: freebsd-swap Size: <whatever you like, I prefer 2x RAM> Mountpoint and Label are greyed out. Select OK. Login to root (or login with a user and su to root), and then bearing in mind you should replace 'ada0' with your HDD's device if different, execute Code:
boot0cfg -B ada0 Rebooting, you should now be able to boot into Windows and FreeBSD. Last edited by DutchDaemon; January 15th, 2012 at 02:28. |
| The Following 7 Users Say Thank You to nsth For This Useful Post: | ||
BJwojnowski (February 10th, 2013), BSD_Addict (March 13th, 2012), markfisher (January 26th, 2012), protondonor (March 12th, 2013), scottro (January 12th, 2013), vand777 (January 15th, 2012) | ||
|
#2
|
|||
|
|||
|
Thanks for the excelent article!
Just want to make a small contribution: I erased my Notebook, to correctly create the sizes of the partitions. Then I installed firts Windows 7. After that, with FreeBSD 9.0 DVD, when I started the Manual in the partition part, the system didn“t show me Windows 7 partition. So I created it, using type NTFS, and then created the rest of the partitions as you told in the article. The final partition schema was: Code:
ada0
ada0s1 nfts
ada0s2 BSD
ada0s2a /
ada0s2b swap
After the Windows installation, I rebooted again with the FreeBSD 9 DVD, entered the LiveCD and executed the boot0cfg -B ada0. Everything is working just fine!!! PS: sorry about my poor english... ;-) Last edited by SirDice; July 19th, 2012 at 08:02. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#3
|
|||
|
|||
|
Sorry for grave digging, but how would someone remove FreeBSD without having to mess up Windows?
|
|
#4
|
||||
|
||||
|
Back up the entire disk first. The FreeBSD boot selector can be overwritten with Windows' fixboot command. Or fixmbr; I've never been clear on the difference. Windows should be able to see the FreeBSD slice, and eager to format it. It will then show up as another drive.
|
|
#5
|
|||
|
|||
|
I had the same idea, thinking FOXBOOT and FIXMBR were basically the same. Then i discovered somethign interesting this morning.
During my dual install issues i went into WinXP recovery and got the following results. C:\>FIXBOOT FIXBOOT cannot find the system drive, or the drive specified is not valid. so I then ran the other C:\>FIXMBR ** CAUTION ** This computer appears to have a non-standard or invalid master boot record. FIXMBR may damage your partition tables if you proceed. Are you sure you want to write a new MBR? So, it would seem, FIXBOOT stops because it doesnt find a valid MBR, but FIXMBR wants to fix the situations? |
|
#6
|
|||
|
|||
|
I think that C:\> fixboot doesn't need for Windows XP to fix master boot record, and just need C:\> fixmbr.
But for Windows 7, it needs both commands; C:\>bootrec /fixboot C:\>bootrec /fixmbr |
|
#7
|
|||
|
|||
|
Having been away from FreeBSD for awhile, I was having a lot of trouble with BSD install and partitioning under an MBR when not using the same disk. This was the first thing I came across that fixed it for me, thank you. I did it under Linux, but it didn't (using 9.1) install the bootloader--not sure what step I missed. However, I was able to easily boot by adding it to a Linux grub2.
Most of what I found prior to this assumed that either one was using the whole disk or at least wanted to use GPT. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How To: Dual Boot Windows 7 and FreeBSD | BSD_User | Howtos & FAQs (Moderated) | 4 | March 13th, 2012 08:38 |
| [Solved] Dual-boot Windows XP and FreeBSD using gpart | troberts | Installing & Upgrading | 4 | May 17th, 2011 12:11 |
| [Solved] Windows 7 FreeBSD Dual Boot Woes | kcbowhunter | Installing & Upgrading | 3 | January 26th, 2011 00:23 |
| Dual boot freeBSD / Windows 7 | gwb | Installing & Upgrading | 10 | October 27th, 2010 00:55 |
| FreeBSD Windows XP Dual-boot problem | Paradoxium2004 | Installing & Upgrading | 2 | August 4th, 2010 11:33 |