Advertisement

bootloader fun

Started by July 16, 2004 08:04 PM
12 comments, last by Xori 20 years, 3 months ago
Situation: Master drive (40GB): WinXP Home NTFS partition (marked active) Slave drive (4GB): 1GB XP swap partition, 3GB FreeBSD partition (marked active) Booting up what I get is: F1: ? (this happens to boot to a silly Dell DOS mini-partition diagnostic thing) F2: ? (this happens to boot to windows fine) Both of the above are on the first drive--the second drive isn't showing up on the bootloader menu. I've tried putting the BSD bootloader on the first drive and standard mbr on the second, and I've tried butting the BSD bootloader on both. Not sure why it's saying a "?" for those two choices, maybe it has something to do with the overall problem. It couldn't be something silly like the BSD install needing to be the first partition on my second drive, could it? So basically, I can't seem to get the thing to "see" my BSD install. Any idea what I screwed up?
Hmm not really sure what's going on.

You have to install the FreeBSD bootloader on your first disk in the system.

I'd launch sysinstall from the CD again and make sure I've installed the bootloader on the right devices. Which, I think should be ad0 (WinXP) if your using IDE hardware.

The "???" means the FreeBSD bootloader doesn't have a short description for the file system listed. NTFS will cause this. A FAT* file system might show MS-DOS.

Have no idea on the Dell thing.


Advertisement
Tebriel,

There are two ways that I would personally advise you to do this.

1. use the windows bootloader. This is REALLY easy with FreeBSD. I believe I followed these steps: Copy /boot/boot1 to your windows drive. In Windows XP, you will want to add a line under [operating systems] that goes something like c:\boot1="FreeBSD". My windows bootloader file on my notebook (the only machine I have windows on at the moment) looks like:

[boot loader]
timeout=5
default=c:\boot1.zd7000
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="MS Windows XP Pro" /fastdetect
c:\boot1.zd7000="FreeBSD 5.2.1-R"

That works splendidly for me.

2. If you don't want to rely on the Windows bootloader, I would advise using GRUB. (http://www.gnu.org/software/grub/) Boot with a live FreeBSD cd, mount your drives, and chroot to get into your system. It is in the ports tree (ie. cd /usr/ports/sysutils/grub, make install clean). I would like to instruct you on how to use grub, but unfortunately, every time I use it I read the directions :) The good news is, I have never had trouble getting it to work!

I hope I have not offended or wasted your time by telling you things you already knew :|
Actually I did install the FreeBSD bootloader on the first (0) disk. I tried a few combinations of different bootloaders on the second drive as well (read something about that) but that didn't help either. The "?" I can understand for the NTFS partition, but the "Dell" partition looks like a standard DOS fat partition (according to what one program sees it as, I forget which.)

I think the Windoze bootloader is probably the one I want to use too, but I've already hosed it. :) I guess I can try restoring it and using that. If I can restore it, your suggestion in getting that to work seems simple enough.
Whoops, that was me.
I use the Windows boot loader, and have found that works best when dual booting WinXP/2000 with Linux.

Just make a copy of your boot partition where you have grub/lilo/etc installed to. Mine is /boot

dd IF=/boot OF=/boot.bin SIZE=512 COUNT=1

Or something like that. And copy it to C:\ and put the entry in your boot.ini file for windows boot loader c:\boot.bin="Linux"
Advertisement
Question:

When you copied /boot/boot1 to your root directory, was it the same file that's on the install CD? If it is, how will it "know" which partition BSD is on? (It's on a totally different drive.) If it's supposed to come from the installed BSD partition, I have no way (that I know of) to get to that file without booting to BSD in the first place (which I can't do).

I'd love to try using the Windows bootloader but my situation is a little less typical. With FreeBSD I install the FreeBSD bootloader, not LILO or Grub. :( And of course it's on a weird partition on the second hard drive.

I could just wipe the drive, swap my little (first on drive) partition with the BSD one, reinstall BSD to the FIRST parition on the 2nd drive, and see if that helps...but any other options?
While I am not a Linux guru. All you should need to do is copy the first 512 bytes of the partition that you would boot from (ie /boot, /hdd/, or whatever) using the steps I mentioned.

When you copy /boot or whatever, it is copying the partition where the boot loader (lilo, grub, etc) is placed. It is not a file.
Tebriel,

I'm at work so I have to make this fast, my explanation will be shoddy at best, and probably full of incorrect terms. However, it will give you the general idea. I will reply better this evening or tomorrow morning if you need it.

Here we go:

/boot/boot1 is stage one of a bootloader. What it accomplishes once called is to find the FreeBSD dislabel, then find boot2 on that slice, and then execute boot2.

As far as I can tell, /boot/boot1 ought to be the same as on the CD. Remember that boot1 does not ALREADY KNOW where your FreeBSD bootloader is, it just knows how to find it and run it!

Nonetheless, you can get to your drives just as explained before. I think the FreeBSD install CD spawns a rescue console. Use it to mount your drives, and if you do it like your /etc/fstab would have to do it, you can chroot, start your favorite shell, source your rc files, and be good to go as far as your paths and all that. If that won't work, use Knoppix, I think it has UFS support. Been a while since I used it though.

Good luck, I'll try to answer more questions if you have them.
OH, so the entire /boot directory should be put in C:
Sounds a little messy, but I'll see if that helps.

This topic is closed to new replies.

Advertisement