Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2005 04:06:18 -0800
From:      "Loren M. Lang" <lorenl@alzatex.com>
To:        rax@rakhesh.com
Cc:        Joe Kraft <hishadow@netcabo.pt>
Subject:   Re: Booting FreeBSD-5.3 from NTLDR
Message-ID:  <20050130120618.GA21695@alzatex.com>
In-Reply-To: <38b3f6e4050130033551e43818@mail.gmail.com>
References:  <38b3f6e40501292247696b96b@mail.gmail.com> <38b3f6e4050129231132f8e743@mail.gmail.com> <41FCA314.3070602@netcabo.pt> <38b3f6e4050130033551e43818@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 30, 2005 at 03:35:45PM +0400, Rakhesh Sasidharan wrote:
> Hi Joe!
> 
> Thanks for that. I'll try that today evening from home, and see how it
> goes. :))
> 
> But now here's something else. A doubt actually, based on what you
> said. I didn't mention this in my previous post -- but I had infact
> copied the "/boot/boot0" file to my WinXP partition (though I can't
> recollect if I renamed the file like you said), and poof!! my whole
> parition table and MBR was overwritten!! Suddenly there's no more
> WinXP, and all my partitions there are gone, and all I can boot into
> is FreeBSD!
> 
> Thankfully I had Fedora, and using that I searched the net for
> partition unerasing programs, found a demo version which would just
> show me all the deleted paritions (thank god!), booted with a DOS
> floppy and used this program to find the sector numbers of all my
> paritions, and then used Linux fdisk to recreate those partitions and
> move on. :D
> 
> At that time I reasoned out that since "/boot/boot0" is a copy of the
> FreeBSD, maybe somehow it overwrote my "/dev/ad0" MBR when I copied
> the file over (possibly this file is special or something) and that's
> how things got messed up. Could you throw some light on what could
> have made things happen that way? Is the fact that I copied "boot0"
> without renaming what caused all these problems? Is "boot0" a special
> file or something?

No, boot0 is just a normal file that is 512 bytes long.  There is
nothing special about it.  In it is a bootloader program that can be
used to boot FreeBSD, and if you run it during boot, it will read the
partition table and look for all OSes.  I think it will modify the
partition table, though, marking the last OS you booted into, but that's
the program running doing that, the file itself is harmless.

> 
> Thanks,
> Rakhesh
> 
> On Sun, 30 Jan 2005 09:04:20 +0000, Joe Kraft <hishadow@netcabo.pt> wrote:
> > Rakhesh Sasidharan wrote:
> > > I didnt see a copy of this mail returned to me, so am sure if it has
> > > reached the list. Since I just subscribed, its possible something is
> > > wrong -- and so am resending it.
> > >
> > > Sorry for the inconv. :))
> > >
> > > On Sun, 30 Jan 2005 10:47:41 +0400, Rakhesh Sasidharan
> > > <rakhesh.s@gmail.com> wrote:
> > >
> > >>Hi,
> > >>
> > >>Are there any issues in booting FreeBSD using NTLDR? My machine has
> > >>Windows XP, Fedora Core 3, and FreeBSD-5.3, and while I know I can use
> > >>GRUB to boot FreeBSD, I want to try booting it using NTLDR. Just for
> > >>kicks -- its something I haven't tried so far. :))
> > >>
> > >>My ad0 disk has WinXP (and NTLDR), while ad1 has FreeBSD. I tried the
> > >>usual suggestions of extracting the first 512 bytes of "/dev/ad1"
> > >>(using "dd") into a file and telling NTLDR to use that file for
> > >>booting. But it doesn't work. Then I tried extracting 512 bytes from
> > >>other locations like "/dev/ad1s1" and "/dev/ad1s1a" and "/dev/ad1s1c",
> > >>but to no avail. Finally I even tried copying over copying
> > >>"/boot/boot1" (and even "/boot/boot2" and "/boot/loader" coz I was at
> > >>my wits end) to a file, and telling NTLDR to use that file for booting
> > >>-- but again nada! Most of the times I'd get a "Boot Error" message,
> > >>while at other times nothing happens.
> > >>
> > >>Searching around on Google, I found a post to freebsd-stable that asks
> > >>the same question
> > >>(http://www.mail-archive.com/freebsd-stable@freebsd.org/msg64950.html).
> > >>The reply given there was to use this program called BOOTPART (can be
> > >>run from Windows, it extracts the bootsector of any partition you
> > >>specify, which can then be used to boot into that partition using
> > >>NTLDR). Using that program does allow me extract the bootsectors of
> > >>the FreeBSD partition, and use that from NTLDR to boot into it -- but
> > >>I am still stumped -- how does this program manage to extract the
> > >>bootsectors, while "dd" is not? I've used the "dd" method to
> > >>successfully boot into Fedora Core 3 using NTLDR, so I know it
> > >>generally does the job.
> > >>
> > >>Any suggestions folks? Is there some incompatibility thing with NTLDR,
> > >>or am I going wrong somewhere?
> > >>
> > >>Thanks,
> > >>Rakhesh
> > >>
> > >
> > >
> > >
> > 
> > I'm doing it with Win2k, I haven't tried it yet with XP though.  And
> > I'll preface this, with I'm doing this from memory because I can't find
> > the web page they originally came from.
> > 
> > I had Win2k set up already with an empty partition for FBSD.  A fresh
> > backup of the windows part, and the magic "recovery disk" may ease
> > concerns of trashing what you have, but I like to live dangerously so I
> > didn't have them.
> > 
> > Boot the FBSD install CD and install, when you're setting up the
> > partition I've tried to get the installer to leave the boot loader
> > alone, but NTLDR gets clobbered every time.
> > 
> > When you've got FBSD running, save a copy of /boot/boot0 somewhere you
> > will be able to get to it from Windows.
> > 
> > Now you've bot FBSD but not windows, now go back to your Win2k install
> > CD and "repair" your current installation, all you should have do do is
> > the 'inspect boot files" part.
> > 
> > Once windows restarts, as "administrator" you need to edit boot.ini to
> > add an entry for FBSD.  Mine looks like (the last line wrapped, but
> > should be a single line):
> > 
> > [root@slug mnt]# cat boot.ini
> > [boot loader]
> > timeout=10
> > default=C:\freebsd.boot
> > [operating systems]
> > C:\freebsd.boot="FreeBSD"
> > multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows 2000
> > Professional" /fastdetect
> > 
> > Then copy the boot0 file to C: drive (I called it freebsd.boot).
> > Restart the computer and you should have two choices in the list and you
> > can choose to boot windows or FBSD.
> > 
> > Best of luck,
> > Joe.
> > 
> > 
> 
> 
> -- 
> 				Rakhesh
> 				rax@rakhesh.com
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"

-- 
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD  835A FAF3 7A46 E4A3 280C
 



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