enter single user mode from boot menu

Teske, Devin Devin.Teske at fisglobal.com
Mon Apr 29 15:20:18 UTC 2013


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 mode 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" -- thus 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 unresponsive.


Try compiling ipfw into your kernel by adding these great options…

dteske at oos0a.lbxrich.vicor.com<mailto:dteske at oos0a.lbxrich.vicor.com> ~ $ config -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… the secret is to manually configure your kernel with "config -C -g MYGENERIC" (replacing MYGENERIC with whatever your kernel config filename is).


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


Yet, it wasn't booting [fully to multiuser mode] either, correct? Quoting from 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 becoming unresponsive"

Well…

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-user mode you have to be able to invoke init(8) at the very least and it doesn'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 commands (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 "path".

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 and 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 example.



I think that because the ipfw modules were loaded before the boot process got 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 confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.


More information about the freebsd-questions mailing list