![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Dual boot WinXP & FreeBSD on 2nd HD with boot.ini
Maybe there are more simple ways to do this, but I did not see the
need to install an additional boot manager. For what it's worth, here it is... maybe this will save someone else some time. I saw references for dual booting FreeBSD using WinXP's boot.ini, but only when FreeBSD was located on another partition of the first hard drive. In my case, the PC came with WinXP pre-installed. I then added a second hard drive and installed FreeBSD from the CD. I did not muck with the master boot block on the first hard drive. My layout: Hard drives: disk 0 (ad0) - Win XP disk 1 (ad1s1) - FreeBSD installed via CDROM mbr option was "none" I can now boot FreeBSD on the second hard drive using WinXP's boot.ini. Here is how I solved the problem: Step 1: Install FreeBSD on the second hard drive. I put FreeBSD on the first partition, disk2s1a. Boot FreeBSD from the second hard drive using the installation CD. a) Boot the CD b) Choose 6 (Escape to loader prompt) c) Type: set currdev=disk2s1a boot Step 2, from FreeBSD, as root: Create a mbr for the first drive, however it is *not* actually written to the first hard drive. It is written to the second hard drive from where it will be copied for use by WinXP's boot.ini. a) Create a mbr for the first hard drive: # boot0cfg -Bv -d 0x80 -s 5 -o setdrv,noupdate -t 1 /dev/ad1 This creates a mbr with a default of F5 (boot from second drive) and a timeout of 1 tick. This mbr is written to the *second* hard drive (ad1). It will not matter that the partition table is for the second hard drive since it switches to the second hard drive immediately. b) Copy this mbr to a file: # dd if=/dev/ad1 of=FreeBSD.boot count=1 c) Write the correct mbr to the second hard drive. This mbr will boot FreeBSD. # boot0cfg -Bv -d 0x81 -s 1 -o setdrv,noupdate -t 1 /dev/ad1 This creates a mbr with a default of F1 (boot from the first partition) and a timeout of 1 tick. If you have other bootable partitions on the second hard drive, you will probably want to omit the '-t 1' option. Since this mbr *is* actually written to the second hard drive, it will be loaded by the mbr created in step a) above. This mbr will then boot from the first partition of the second hard drive, /dev/ad1s1a. d) Copy the file "FreeBSD.boot" somewhere from which you can access it after booting WinXP. I used a floppy: # mount -t msdos /dev/fd0 /mnt # cp FreeBSD.boot /mnt # umount /mnt I was not able to just copy the file to WinXP's ntfs file system. I got an error, and I did not pursue this approach since a floppy works. Step 3: a) Remove all media and boot WinXP. b) Copy the "FreeBSD.boot" file from step 2d) to C:\FreeBSD.boot c) Use notepad (or any text editor) to edit C:\boot.ini and add the following line: C:\FreeBSD.boot="FreeBSD 6.2" Conclusion: When you boot, you will now see an option for "FreeBSD 6.2" from WinXP's boot screen. When you select "FreeBSD", the mbr that was created in step 2a) is loaded and run. After a timeout of 1 tick, it uses the default F5 (boot from second drive), and loads the mbr created in step 2c). This mbr then uses the default F1 and boots FreeBSD from the first partition. Dave Bodenstab |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: Dual boot WinXP & FreeBSD on 2nd HD with boot.ini
Dave Bodenstab wrote:
> Maybe there are more simple ways to do this, but I did not see the > need to install an additional boot manager. For what it's worth, > here it is... maybe this will save someone else some time. [...] Thanks for that, Dave. I've been considering installing FreeBSD instead of Slackware on one of my drives, but I've hesitated because of uncertainty over dual boot. I'll certainly be giving this a try. ![]() Steve. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: Dual boot WinXP & FreeBSD on 2nd HD with boot.ini
Steve Adam wrote:
> Dave Bodenstab wrote: >> Maybe there are more simple ways to do this, but I did not see the >> need to install an additional boot manager. For what it's worth, >> here it is... maybe this will save someone else some time. > [...] > I'll certainly be giving this a try. ![]() Yep.. It works for me too on NT4. Steve. |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: Dual boot WinXP & FreeBSD on 2nd HD with boot.ini
Dave Bodenstab wrote:
> Maybe there are more simple ways to do this, but I did not see the > need to install an additional boot manager. For what it's worth, > here it is... maybe this will save someone else some time. > > I saw references for dual booting FreeBSD using WinXP's boot.ini, > but only when FreeBSD was located on another partition of the first > hard drive. In my case, the PC came with WinXP pre-installed. I > then added a second hard drive and installed FreeBSD from the CD. > I did not muck with the master boot block on the first hard drive. [snip] There is a section that covers this in the FAQ. However, while the directions for windows/freebsd on the same (1) drive are very easy (done it myself), the directions for when they are on different drives is a tad confusing. These directions, more or less, do the same thing but the step by step is much more concise and clear. Easy to understand and follow. I really like things simple, as I'm kinda simple myself. :-) -Jason |
|
|
|
#5 |
|
Newbie
Join Date: Dec 2008
Age: 39
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: Dual boot WinXP & FreeBSD on 2nd HD with boot.ini
Thanks so much Dave--this solved a problem I've had for months. The FreeBSD FAQ just assumes you'll use the FreeBSD boot manager if you have a second drive--which amounts to saying you can't use NTLDR to boot FreeBSD off a second drive. (Or can use NTLDR, but still have to go through two boot menus every time you start FreeBSD--the NTLDR menu and the FreeBSD menu--which could become annoying.)
If these instructions were put in Chapter 9 section 10 of the FAQ, it could help rank beginners like me. Though doing this manually was a net positive for me as I learned more about how MBRs work, I lost my taste for novice exploration after hosing my MBR once and having to use TestDisk to recover my XP partition. These instructions were exactly what I was looking for and now that I've figured out exactly what they're doing, I feel ready to explore further. A little detailed guidance is a good thing! These instructions worked fine for me--I just had to change ad1 to ar1 since I have RAID partitions, and instead of a floppy I used the FFS file system driver for Windows to access /dev/ar1 directly from XP and copy FreeBSD.boot to C:\. I now have a dual boot XP/FreeBSD 7.0 system that presents only one boot selection menu--the NTLDR menu--at startup. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Just Want to make boot cd from WinXP | Cowtoon | Windows XP | 5 | 02-09-2007 08:29 PM |
| dual boot with WinXP Pro as both OS's | TBW | Windows XP | 6 | 28-08-2007 01:48 AM |
| Set up DOS to dual boot WinXP | DWalker | Windows XP | 5 | 17-08-2007 02:28 PM |
| 2 Options To Boot to WinXP | SFOExPat | Windows XP | 4 | 16-08-2007 10:07 PM |
| Problems while changing from dual-boot (XP and Linux) to single boot (XP) | Sairam | Windows XP | 4 | 16-08-2007 03:21 PM |
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |