Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2004 15:05:04 -0800 (PST)
From:      Dan Strick <strick@covad.net>
To:        freebsd-stable@freebsd.org
Cc:        dan@mist.nodomain
Subject:   Re: FreeBSD BOOT
Message-ID:  <200402062305.i16N54W2000840@mist.nodomain>

next in thread | raw e-mail | index | archive | help
>>
> Hi... i have the FreeBSD and Windows XP in my computer.... my the 
> windows had removed my FreeBSD boot ...
> Anyone know how to boot in freebsd and restore the boot sector? No MBR!!!
>>

I assume you mean that you first installed FreeBSD in one disk slice
(i.e. MBR partition) and then installed WinXP in another slice and after
installing WinXP you discovered that your system always boots WinXP and
doesn't offer you the option of booting FreeBSD instead.  This is because
the WinXP installation replaced the FreeBSD bootstrap program in the MBR
sector of the disk drive.

There is a messy way of configuring XP to give you the option of booting
FreeBSD but it is easier to just reinstall the standard FreeBSD master
bootstrap program.  If you have (or can make) the live file system CD
for a recent release of FreeBSD (from the file ...-i386-disc2.iso), boot
the installation floppy or CD for that release, go into fixit mode using
the live file system CD, and issue the command

	boot0cfg -B ad0

where "ad0" is the disk on which you installed both FreeBSD and WinXP.

If you don't have the live file system CD, instead of going into fixit
mode you can select the "custom installation" menu option and then select
the menu option for allocating disk space for FreeBSD (i.e. the option
for editing MBR partition tables).  Select the disk drive on which you
previously installed FreeBSD and WinXP.  Verify that the MBR partition
table that it fetches from the disk drive is correct and issue the
undocumented "W" command.  Then exit the installation procedure without
doing an installation and reboot.

Dan Strick
strick@covad.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402062305.i16N54W2000840>