Advertisement

bootloader fun

Started by July 16, 2004 08:04 PM
12 comments, last by Xori 20 years, 1 month ago
Still no good, I get "boot error" when I try to boot with the BSD option.

Kinda didn't think it'd be that easy....it's just TOO easy!
How about this--what if I reinstall BSD to a smaller partition, and then throw Linux Mandrake (w/Lilo) on after that install is finished. Will Mandrake probably detect BSD? I've never had problems with LILO in the past so maybe that's an idea.
Advertisement
Quote: Original post by Tebriel
OH, so the entire /boot directory should be put in C:
Sounds a little messy, but I'll see if that helps.


Definately not. What you do is install lilo or grub to your /boot partition table, and then you copy those 512 bytes to C:/
Follow the directions I supplied exactly, and you should have good results unless I made some grievous error that I am currently not seeing.

You want boot1 from /boot in your FreeBSD install to be copied to your c: drive, or wherever your boot.ini is. You want to add the lines that I described. Don't DD anything. Don't copy any directories. JUST copy boot1, as it is stage 1 of the FreeBSD bootloader, and that is precisely what the Windows bootloader needs to use!

In Linux, you can dd stuff from /boot because the 512 bytes at the beginning of /boot is the stage 1! That is because in Linux /boot is a DIFFERENT PARTITION. This is nice. It is actually a very good idea (if you wonder why I will explain later), but it is not how it is done in FreeBSD. In FreeBSD, /boot is a *directory* in the root directory, not a partition. They make it easy for you by giving you the boot1 file for free, no need to mess with anything else.

Right now, there these options:

1. boot into your FreeBSD install by using a live CD, mounting your drives appropriately, and chrooting, sourcing whatever configs necessary for your favorite shell, then using Ports to install Grub.
- OR -
2. use boot1 straight from the FreeBSD install CD (or do as I suggested above and copy /boot/boot1 to a floppy) to the (windows) drive where boot.ini exists.
- OR -
3. if you really want to dd stuff around, you need to dd the first 512 bytes of the disk slice that you mount to /.

Here is some evidence that what I just said works:

root@nowhere# mount
/dev/ad0s1a on / (ufs, local)
.
. (stuff cut out from here because it is long)
.
root@nowhere# dd if=/dev/ad0s1a of=/tmp/booty bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.244138 secs (2097 bytes/sec)
root@nowhere# md5 /tmp/booty
MD5 (/tmp/booty) = b5d26ebe13faa7d8a73745afdb25e48d
root@nowhere# md5 /boot/boot1
MD5 (/boot/boot1) = b5d26ebe13faa7d8a73745afdb25e48d

PS. You do not need Mandrake or anything else on there, since you can do these steps and it will work - or you can install Grub.

[Edited by - Xori on July 20, 2004 1:01:16 PM]

This topic is closed to new replies.

Advertisement