FreeBSD boot menu is missing

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Wed Nov 26 12:35:17 PST 2008


On Wed, 26 Nov 2008 10:46:29 -0800
"Peter Steele" <psteele at maxiscale.com> wrote:

> I have a procedure for converting a FreeBSD box to use a mirrored slice
> for the OS. Everything working fine except that after I've made the
> conversion I am no longer getting the normal boot menu, the one that
> counts down 10 seconds waiting for the user to pick on option. 
>
> I see a single line showing that the BTX 1.01 loader has been launched,
> but from there the system simply boots directly with no menu being
> displayed. I'm obviously missing a step when using gmirror to convert a
> system over to use mirroring but I'm not sure what. My basic approach is
> to install the OS onto the first drive, setting it to use the standard
> boot manager, and then setup the second drive using gmirror and copy the
> file systems over to the mirror. I then set boot.config to boot off this
> drive and it comes up fine, there just isn't any boot menu. 

The phrase "and copy the file systems over to the mirror" worries
me. Do you actually copy the file systems, or do you let the mirror
system do it for you? In particular, are you mirroring file systems or
the entire disk? Because the boot blocks aren't part of any file
system, so you won't have copied them over, hence you'll be getting
whatever boot software the second drive has installed.

My recommendation for gmirror is to set up one drive to boot from,
then us gmirror label to create a gmirror device on each partition
(excluding swap). Edit /etc/fstab to use the gmirror devices thus
created, and reboot to make sure it's working properly. It will
initially boot from the disk device (pretty much required until
gmirror is started), then switch to the mirrored root partition.  Now
use gmirror insert to add the matching partitions on the second disk,
and let gmirror update the bits on the second drive. You'll need to
copy the boot blocks from the first drive to the second drive by hand
if you want to boot off the second drive.

Alternatively, you can mirror the entire drive instead of each
partition. That will mirror the boot blocks as well, but means you
have to resilver the entire drive instead of the partitions if you
have a failure that corrupts a partition. It also makes getting crash
dumps more interesting. I did this for a while, but eventually
switched to mirroring partitions.

FWIW, these days I use ZFS on 64 bit systems in preference to UFS and
gmirror.


Final comment: if you didn't ask on -questions first, this would have
been more appropriate there than here.

	<mike

-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


More information about the freebsd-hackers mailing list