Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2013 15:20:01 +0000
From:      "Teske, Devin" <Devin.Teske@fisglobal.com>
To:        Joe <fbsd8@a1poweruser.com>
Cc:        Devin Teske <dteske@freebsd.org>, "<freebsd-questions@FreeBSD.org>" <freebsd-questions@FreeBSD.org>
Subject:   Re: enter single user mode from boot menu
Message-ID:  <13CA24D6AB415D428143D44749F57D7201F2E06F@ltcfiswmsgmb21>
In-Reply-To: <517E5EE9.1010605@a1poweruser.com>
References:  <517DA65E.8050706@a1poweruser.com> <13CA24D6AB415D428143D44749F57D7201F2B7F9@ltcfiswmsgmb21> <517E5EE9.1010605@a1poweruser.com>

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

On Apr 29, 2013, at 4:52 AM, Joe wrote:

Teske, Devin wrote:
On Apr 28, 2013, at 3:44 PM, Joe wrote:
running 9.1 and can not figure how to get into single user mode or safe mod=
e from the BOOT menu.
After hitting the 5 or 6 keys to select those options, what do you do next =
to continue?
Based on your description it sounds like you have the following boot menu (=
regardless of color):
http://twitpic.com/b1pkz1
Pressing 5 or 6 changes the status from "off" to "On"
Hitting enter key just boots the system without regard to options selected.
Pressing ENTER is supposed to boot with the displayed options.

Yes this is what I was experiencing.


Can not find usage of boot menu in the handbook.
The 4th files are heavily documented in man-pages as well as by loader and =
boot manuals.
--
Devin
P.S. There have been enhancements already that will come down with 9.2 that=
 add a top-level "Boot single user mode" option simply by pressing "s" -- t=
hus making it like the boot menus of 6.x, 7.x, and 8.x ("s" to boot single =
user).

Devin

Background info. I had put load commands for ipfw modules into /boot/loader=
.conf to test if this would work with a kernel that has vimage compiled in.=
 The boot process would start normally and progress to the point where the =
usb messages get displayed and them the system would freeze up becoming unr=
esponsive.


Try compiling ipfw into your kernel by adding these great options=85

dteske@oos0a.lbxrich.vicor.com<mailto:dteske@oos0a.lbxrich.vicor.com> ~ $ c=
onfig -x `sysctl -n kern.bootfile`|grep -i ipf
options IPFIREWALL # Enable support for `ipfw'
options IPDIVERT # Enable support for `ipfw divert'
options IPFIREWALL_NAT # Enable support for `ipfw nat'
options IPFIREWALL_FORWARD # Enable transparent proxy support
options IPFIREWALL_DEFAULT_TO_ACCEPT # Allow everything by default


This is partly how we're using ipfw in vimage jails.

NOTE: You might be wondering how exactly we got comments into our embedded =
configf-file=85 the secret is to manually configure your kernel with "confi=
g -C -g MYGENERIC" (replacing MYGENERIC with whatever your kernel config fi=
lename is).


Figured I would just reboot and go in single user mode and remove the state=
ments from loader.conf. But no matter what I tried the boot menu would no g=
o into single user mode.


Yet, it wasn't booting [fully to multiuser mode] either, correct? Quoting f=
rom above:

"The boot process would start normally and progress to the point where the =
usb messages get displayed and them (sic) the system would freeze up becomi=
ng unresponsive"

Well=85

It's not that the menu was ignoring your choice to enter single-user mode, =
it was that it couldn't make it to single-user mode. To make it to single-u=
ser mode you have to be able to invoke init(8) at the very least and it doe=
sn't sound like you made it that far (let alone invoking /etc/rc and ilk).



The solution was to take a testing disk that had 9.1-rc3 on it and cable it=
 as master and the original disk as slave.

I would have just dropped to the loader-prompt and used the built-in comman=
ds (not even any Forth, but easy-to-use loader commands that are documented=
 in loader(8)):

unload

That will unload the kernel and your ipfw.ko that was loaded by your loader=
.conf preference.

The way kernels and modules are loaded has always been to load them before =
the menu. You should see this as you are booting. The "unload" command lets=
 you discard these things and change your game plan.

A few other commands that are good to know on the loader prompt:

ls

or

ls path

Good for exploring for things to "load" (the next command):

load path

Can load a kernel or load a module.

boot

or

boot path

Can boot the loaded kernel (just "boot" by itself) or boot a kernel at "pat=
h".

more path

Can read a file (for example "more /boot/loader.conf").

See loader(8) for more details. (HINT: according to loader(8) there's also =
an "lsmod" command)



In this configuration the system booted correctly and I mounted the slave a=
nd corrected loader.conf. Recabled the original disk as master and was back=
 in business.


Good. Rescue discs are good for this too. My own "FreeBSD Druid" for exampl=
e.



I think that because the ipfw modules were loaded before the boot process g=
ot to the boot menu is what caused the boot menu to not function correctly.=
 Don't see a PR in this case.


Correct -- No PR needed; the boot menu functions properly (however it can't=
 affect boot if you _can't_ in-fact boot).



Thanks to all who replied.


Cheers.
--
Devin

_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
 that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.



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