Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Oct 2010 11:59:14 -0700
From:      Devin Teske <dteske@vicor.com>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        Hac Phan <hacos@rescomp.berkeley.edu>, freebsd-questions@freebsd.org
Subject:   Re: Boot loader/kernel error
Message-ID:  <418CD5AF-A9F5-41BA-96C4-8E11BC5B59FB@vicor.com>
In-Reply-To: <20101009175835.GA12910@dan.emsphone.com>
References:  <20101009020948.GB91654@hal.rescomp.berkeley.edu> <20101009175835.GA12910@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Oct 9, 2010, at 10:58 AM, Dan Nelson wrote:

> In the last episode (Oct 08), Hac Phan said:
>> I'm having trouble with a machine that was recently rebooted and will =
no
>> longer boot correctly.
>>=20
>> The boot process hangs with the following screen:
>> Loading /boot/defaults/loader.conf
>> -
>>=20
>> The cursor does not move and no other text is displayed. After about =
10
>> minutes, the boot finishes (without the splash screen) and displays =
the
>> login prompt.  I tried to login but it timed out after 300 seconds.
>=20
> That behaviour is consistent with having a serial console setup in
> /boot/loader.conf .  As soon as the loader sees "console=3Dcomconsole", =
it
> will switch its output and the kernel's output to com1.  If com1 =
doesn't
> exist, it will take a long time to boot.  When the kernel finally =
finishes,
> init still start a getty on the physical console, which is when you =
see the
> login prompt.  If you can boot your fixit CD and get the root =
filessytem
> mountd read/write, try commenting out that comconsole line.
>=20
> Most bad loader.conf problems can be fixed by hitting space just =
before the
> loader starts up the kernel and unsetting the bad variable, but =
"comconsole"
> is one of the commands that it runs immediately, and I don't think you =
can
> stop the loader from parsing loader.conf.

In `/boot/loader.rc', I'm reviewing the ANS FICL (that's `Forth Inspired =
Command Language') and I see that it does indeed parse =
`/boot/loader.con' before throwing up the menu (once the menu is up, =
then you can escape to the loader prompt by selecting the appropriate =
numeric option -- in the new loader, the old loader you simply had to =
press space-bar during the count-down to boot).

The bread-crumbs in `/boot/loader.rc' lead us off to `/boot/loader.4th' =
if you want to know precisely how `/boot/loader.conf' is read into the =
environment (note: real work for `comconsole=3Dblah' is done in =
`/boot/support.4th' in the chain: include_conf_files -> load_conf -> =
process_conf -> process_assignment -> set_environment_variable; and the =
last part of that chain reveals that the internal FICL word `set' is =
used to set an environment variable, so comconsole should be visible at =
the interactive prompt via the `show' keyword).

So, in reality, one ought to be able to do the following to deconfigure =
the comconsole setting...

1. Boot up the machine
2. Interrupt the boot loader (older FreeBSD, hit space, newer menu-based =
loader, choose the menu option to escape to the loader prompt)
3. Enter: show
4. Verify that comconsole is set (because loader.rc shows us =
`/boot/loader.conf' is loaded before the menu is thrown up)
5. Enter: unset comconsole
6. Enter: show
7. Verify that comconsole is no longer set
8. Enter: boot
NOTE: If you prefer to boot into single-user mode, enter instead: boot =
-s
NOTE: Boot should no longer be dumping to serial and instead you should =
see a normal boot process on the console.
9. Login and change /boot/loader.conf to remove comconsole=3D...

NOTE: I do realize that in /boot/loader.4th, the FICL native `boot' =
keyword has been overridden, but it doesn't appear that anything is =
munged in the environment prior to execution of the loaded kernel, so =
the kernel should inherit the environment variables just as they appear =
when `show' is executed at the loader prompt.
--
Devin

(full sig at bottom)

>=20
> --=20
> 	Dan Nelson
> 	dnelson@allantgroup.com
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to =
"freebsd-questions-unsubscribe@freebsd.org"

--
Cheers,
Devin Teske

-> CONTACT INFORMATION <-
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske@fisglobal.com

-> LEGAL DISCLAIMER <-
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

-> END TRANSMISSION <-




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?418CD5AF-A9F5-41BA-96C4-8E11BC5B59FB>