Dual Booting FreeBSD and WinXP
I have a similar setup and I thot that this would help someone sometime........:-)
4 easy steps
---------------
* First install the port
#cd /usr/ports/sysutils/grub
#make install clean
* Create the "menu.lst" file
#vi /boot/grub/menu.lst
---snip---
# For booting FreeBSD
title FreeBSD
root (hd0,1,a)
kernel /boot/loader
# For booting Win XP
title Win XP
root (hd0,0)
makeactive
chainloader +1
boot
---snip---
(**) This will make FreeBSD the default OS
* Make MBR writable
#sysctl kern.geom.debugflags=16
NOTE: if you do not use the above command then you will not be able to run the grub-install script, it will dump out with something like this:-
--------snip-------------
[zaphod] /boot/grub# grub-install hd0
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,1,a)
Filesystem type is ufs2, partition type 0xa5
grub> setup --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/ufs2_stage1_5" exists... yes
Running "embed /boot/grub/ufs2_stage1_5 (hd0)"... failed (this is not fatal)
Running "embed /boot/grub/ufs2_stage1_5 (hd0,1,a)"... failed (this is not fatal)
Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst "... failed
Error 29: Disk write error
grub> quit
--------snip-------------
* grub-install script
The grub-install script saves you from having to install the various components manually using the grub command line interface.
#grub-install hd0
NOTE: hd0 is listed in the /boot/grub/device.map file to map to the correct device (i.e. /dev/ad0)
More info is available here:-
http://www.gnu.org/software/grub/
4 easy steps
---------------
* First install the port
#cd /usr/ports/sysutils/grub
#make install clean
* Create the "menu.lst" file
#vi /boot/grub/menu.lst
---snip---
# For booting FreeBSD
title FreeBSD
root (hd0,1,a)
kernel /boot/loader
# For booting Win XP
title Win XP
root (hd0,0)
makeactive
chainloader +1
boot
---snip---
(**) This will make FreeBSD the default OS
* Make MBR writable
#sysctl kern.geom.debugflags=16
NOTE: if you do not use the above command then you will not be able to run the grub-install script, it will dump out with something like this:-
--------snip-------------
[zaphod] /boot/grub# grub-install hd0
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,1,a)
Filesystem type is ufs2, partition type 0xa5
grub> setup --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/ufs2_stage1_5" exists... yes
Running "embed /boot/grub/ufs2_stage1_5 (hd0)"... failed (this is not fatal)
Running "embed /boot/grub/ufs2_stage1_5 (hd0,1,a)"... failed (this is not fatal)
Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/grub/menu.lst "... failed
Error 29: Disk write error
grub> quit
--------snip-------------
* grub-install script
The grub-install script saves you from having to install the various components manually using the grub command line interface.
#grub-install hd0
NOTE: hd0 is listed in the /boot/grub/device.map file to map to the correct device (i.e. /dev/ad0)
More info is available here:-
http://www.gnu.org/software/grub/
0 Comments:
Post a Comment
<< Home