Booting multiple choice, and pause to read bootup info
J. Porter Clark
jpc at porterclark.com
Tue Jun 29 16:23:43 UTC 2010
On Tue, Jun 29, 2010 at 04:00:21AM -0500, Robert Bonomi wrote:
> >
> > 1. I'd like to be able to expand the list of choices in the
> > boot menu (the menu with single user mode, safe mode, etc.) to
> > include booting in any of several different environments, e.g.,
> > home wired, home wireless, work wired, work wireless. Hacking
> > the FORTH code isn't entirely out of the question, but before
> > I even try it, I need to know how I could tell the system to
> > switch among different rc.conf files (if that's even possible)
> > from the loader. Offhand, I don't see a mechanism for doing so.
> > Cleverer ideas welcome.
>
> There's no 'built in' mechanism.
>
> There's no "easy" way.
>
> Closest thing -to- an 'easy way' is to set an environment variable
> _very_early_ in the boot process, and then use it to 'conditionalize'
> (how -that- for an ugly word? :) the setting of various stuff in rc.conf
> e.g.:
> case $USER_ENV in
> home) USE_LDAP="no"
> ;;
> work) USE_LDAP="yes"
> ;;
> esac
I wasn't aware that setting an environment variable inside the
loader would propagate into the rc.conf environment. Is this
so?
> > 2. Usually, when the system boots, there are several lines
> > showing the kernel and various modules loading, possibly with
> > diagnostics. Is there a way to pause after that stage, so that
> > those lines can be read? Or is there any way to retrieve them
> > after the system has booted?
>
> I havven't tried it on FBSD, in a long time, but most PC "BSDs" will pause
> the boot screen if you hit [CTL-S], or the PAUSE key.
>
> Alternatively, does dmesg(8), used 'reasonably soon' after booting, give
> you what you want?
>
> Note: a typical installation will have syslogd putting _most_ of those
> messsages in the system log file, too.
Y'all are way off base here: it's not the lines from the kernel
itself booting, it's the lines *before* that, where the loader
is loading the kernel and various modules. Occasionally, I
see error messages here, but they vanish pretty quickly on my
machines, too fast to be caught reliably with CTL-S, SCROLL
LOCK, etc. I could set up a serial console, but it seems like a
lot of work just to see these messages.
--
J. Porter Clark <jpc at porterclark.com>
More information about the freebsd-questions
mailing list