Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2008 08:52:26 -0800
From:      "Nerius Landys" <nlandys@gmail.com>
To:        FreeBSD-questions@freebsd.org
Subject:   Re: sysinstall and bsdlabel/boot
Message-ID:  <560f92640801150852s32ee4b24ud6b19ad8b8211f0c@mail.gmail.com>
In-Reply-To: <20080115144508.204f0c77@anthesphoria.net>
References:  <560f92640801142157n7194be23u8c4eac084ed474c9@mail.gmail.com> <20080115144508.204f0c77@anthesphoria.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>
> > I was trying to install 7.0RC1 (hope it's OK to post this here,
> > because I believe that older versions of FreeBSD have this same
> > limitation) and came across a gotcha.  I had an MBR on disk that I
> > wanted to keep.  It was Lilo and all it did was boot a selected
> > slice, it was configured to function the same as FreeBSD's `boot0'.
> > So, the install of FreeBSD came to the area where it asks what to do
> > with the MBR.  There are three choices: 1) boot manager, 2) simple
> > MBR, and 3) do nothing.  I chose to do nothing because I wanted to
> > keep Lilo in the MBR.  But, by choosing this option, I expected
> > sysinstall to install the /boot/boot code to the beginning of the
> > FreeBSD slice.  Well, no such boot code was installed, apparently,
> > unless I totally missed something.  Basically, after the install,
> > when I delegated Lilo to boot the chosen [FreeBSD] slice, it did not
> > find any boot code on that slice.
>
> Have you configured lilo properly? In the past, I used to use something
> like this:
>
> other=/dev/hda2
>        table=/dev/hda
>        loader=/boot/chain.b
>        label=FreeBSD
>

My complete lilo.conf was this:

=====
 boot=/dev/hda
prompt
timeout=50

other=/dev/hda1
        table=/dev/hda
        label=Ubuntu

other=/dev/hda2
        table=/dev/hda
        label=FreeBSD
=====

I have Grub installed at the beginning of /dev/hda1, and Lilo [when I had it
installed before changing it to `boot0'] passed control to Grub just fine
when booting ``Ubuntu''.  You can see that the logic for ``FreeBSD'' is
identical except for the slice it uses.  When choosing ``FreeBSD'' from the
boot menu, nothing happened.  This led me to conclude that /boot/boot as not
installed at the beginning of /dev/hda2.

>
> (Actually, you can delete "loader=/boot/chain.b" since FreeBSD and
> Linux share the same disk in your case -- and I assume you use lilo to
> dual-boot Linux and FreeBSD.)
>
> > My workaround for this was to choose option 1) boot manager.  I ended
> > up using boot0 (the boot manager) which I feel is superior to Lilo
> > because it is more modular, simpler.  However, some users may not
> > want this.  I didn't find any option in sysinstall to install just
> > the /boot/boot code to the beginning of the FreeBSD slice.  Am I
> > missing something?
>
> You don't have to go through sysinstall. Just for the case, reinstall
> bootstrap code of your FreeBSD slice (say, ad0s1):
>
>  # bsdlabel -B /dev/ad0s1
>
> (the code will come from /boot/boot by default), and then reinstall
> lilo from Linux, with the aforementioned configuration.
>

Yes, I figured using  `bsdlabel' would install /boot/boot to the beginning
of the slice.  However, I cannot [easily] run `bsdlabel' without being
booted into the FreeBSD OS.  I can't run the OS without /boot/boot being
installed to the beginning of the FreeBSD slice.  Chicken and egg problem.
Actually, I could probably run `bsdlabel' from the live disc, but a newbie
[like myself] would probably have a hard time figuring this out.

P.S.  I hope I'm doing the quoting thing ``properly'', not "incorrectly".



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