From owner-freebsd-questions@FreeBSD.ORG Sat Oct 9 18:59:20 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B3A71065673 for ; Sat, 9 Oct 2010 18:59:20 +0000 (UTC) (envelope-from dteske@vicor.com) Received: from postoffice.vicor.com (postoffice.vicor.com [69.26.56.53]) by mx1.freebsd.org (Postfix) with ESMTP id 509198FC16 for ; Sat, 9 Oct 2010 18:59:20 +0000 (UTC) Received: from [71.202.142.31] (port=61947 helo=[192.168.1.149]) by postoffice.vicor.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71) (envelope-from ) id 1P4edX-0005Ie-70; Sat, 09 Oct 2010 11:59:19 -0700 Mime-Version: 1.0 (Apple Message framework v1081) From: Devin Teske In-Reply-To: <20101009175835.GA12910@dan.emsphone.com> Date: Sat, 9 Oct 2010 11:59:14 -0700 Message-Id: <418CD5AF-A9F5-41BA-96C4-8E11BC5B59FB@vicor.com> References: <20101009020948.GB91654@hal.rescomp.berkeley.edu> <20101009175835.GA12910@dan.emsphone.com> To: Dan Nelson X-Mailer: Apple Mail (2.1081) X-Scan-Signature: f0579e9e1bd2c380568564df96d2cc64 X-Scan-Host: postoffice.vicor.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Hac Phan , freebsd-questions@freebsd.org Subject: Re: Boot loader/kernel error X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2010 18:59:20 -0000 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 <-