Re: boot0 / LILO / GRUB: dual boot FreeBSD and Linux



I'm getting a new desktop through my university which will come
installed with Windows Vista. Obviously, my first action item will be
removing Vista and installing a reasonable OS. Due to the need to be
up-and-running immediately with an OS that I'm comfortable with, I'll
be installing Linux (probably Ubuntu). But I'd like to set-up FreeBSD
also.

Which of the boot managers do you suggest I use? Which OS should I
install first? Since I've never set-up a FreeBSD/Linux dual-boot
system, I don't know what, if any, pitfalls to avoid. I'm hoping some
of you will have experience I can learn from. Any relevant advice
would be greatly appreciated.


Hi, I'm primarily an Ubuntu Linux user, but I've experimented with
FreeBSD desktops and servers quite a bit (servers especially). One
thing I found to be really cool is the FreeBSD boot manager. I would
strongly recommend using the FreeBSD boot manager because it's
completely standalone; it does not depend on any files or data sitting
in your partitions. The boot manager sits within the first 512 bytes
of your hard drive (the MBR) and it does not need any other data to
function. The way it works is simple. Well first a disclaimer. What
I describe here, I'm pretty confident that I know what I'm talking
about, but there is a chance that my knowledge is wrong. In that case
please correct me, someone.

The FreeBSD boot manager (I don't know the official name for it off
the top of my head), when run, looks at the partitions on the hard
drive. It then presents a menu, where you press a function key to
select which partition to boot. It basically delegates the booting to
the boot record on the partition of your choice.

The way to set this up is as follows. Well, I'm sure it's possible to
install FreeBSD first and then Linux, but I will describe it the other
way.

First install Linux normally (well leaving space on your hard drive
for a FreeBSD partition, which needs to be primary and not extended).
After you install Linux, boot up and do some magic where you install
the boot manager (such as Grub or Lilo) onto the boot record of the
Linux parttion. Normally the boot manager for Linux will be installed
in the MBR, but put it on the partition's boot sector as well.

Now install FreeBSD. Install the FreeBSD boot manager. It will not
touch the Linux partition at all, the FreeBSD install will only write
to the FreeBSD partition and to the MBR.

I would not recommend using Grub as a boot manager (for the MBR)
because it depends on files sitting on your Linux partition as far as
I know. So when you wipe your Linux partition for some reason you
won't be able to boot any more. Same goes for Lilo I think. The
FreeBSD boot manager does not depend on any data outside of the MBR,
so it will continue working properly after you wipe a partition clean.

See here: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/boot-blocks.html
It appears that the boot manager is called boot0.

If you ever want to back up your MBR for some reason, which includes
the partition table and the boot program, you can do something like
this:

dd if=/dev/hda of=my-mbr-saved-file bs=512 count=1

where "/dev/hda" would be changed depending on OS and hard disk
configuration. Then you can restore the MBR:

dd if=my-mbr-saved-file of=/dev/hda bs=512 count=1

But restoring should be done with extreme caution because it will
rewrite your partition table and could lead to lost data because of
that.

I have installed the FreeBSD boot manager by using dd after combining
the 446-byte long program with an existing partition table
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Partition and Dual Boot Vol IV (Options/Inclinations)
    ... installations of W98 and it's an easy way to achieve that. ... > to Create the otther Partitions (the Extended Partition & the Logical ... That doesn't achieve what he wants, without a boot manager anyway. ... >> allows you to install W98 on the new active drive. ...
    (uk.people.silversurfers)
  • Dual Boot - Last Step?
    ... I have Windows XP Pro installed on the second partition of drive A. ... did not like the GRUB boot manager but did like the XP boot manager, ... I put in the install CD, ... My goal is to somehow direct the Windows XP boot manager to find and load FC ...
    (linux.redhat.install)
  • Re: Installing WinXp on a 2nd Hard Disk, on a System with w98(SE)
    ... > I'm a bit confused why you think a boot manager introduces ... You think that manually changing the active partition is easier!!! ... >> Partitioning thing in the WinXP Install Routine, ... Partition that is Marked as Active on the first Physical Hard Disk ...
    (uk.people.silversurfers)
  • Re: Dual Boot - Last Step?
    ... > Then I installed Fedora Core 2 on the fourth partition of drive A. ... > boot manager to my master boot record. ... I put in the install CD, ...
    (linux.redhat.install)
  • Re: Adding a second FreeBSD installation
    ... The FreeBSD boot manager ... but instead the boot manager locked ... mixing install floppies across versions. ... Bill Vermillion - bv @ wjv. ...
    (comp.unix.bsd.freebsd.misc)

Loading