Commit Graph

296 Commits

Author SHA1 Message Date
Devin Teske
f697065fda Add a try-include word (which acts the same as "include") and use it to
conditionally include (but ignore failures) /boot/loader.rc.local and
/boot/menu.rc.local -- to make customizing the menu easier.

Reviewed by:	alfred
Discussed on:	-hackers
2013-11-17 18:12:17 +00:00
Devin Teske
c0264af94b Refactor draw-beastie function.
Discussed on:	-hackers
2013-11-17 18:07:10 +00:00
Devin Teske
546b5aacde Extend loader_delay as-documented in beastie.4th(8) and delay.4th(8), making it available to architectures that do not use or load the beastie
menu. This is reported to save headaches on some PPC systems where unload
followed by load does not produce the desired results wherein if-given
the opportunicy to abort the initial loading sequence, you can customize
the first load.

Reviewed by:    nwhitehorn, kan
Discussed on:   -current
2013-11-07 21:52:04 +00:00
Devin Teske
ea1ed0c224 Defer loading of kernel and modules if the beastie menu is enabled. Add a
kernel selection menu to the beastie menu. List of kernels is taken from
`kernels' in loader.conf(5) as a space (or comma) separated list of names
to display (up to 9). If not set, default value is "kernel kernel.old".
Does not validate that kernels exist because the next enhancement will be
to allow selection of the root device.

Discussed on:	-current
MFC after:	3 days
2013-11-04 20:28:10 +00:00
Gleb Smirnoff
a7a36fea40 Remove more remnants of ng_fec(4).
The ng_create_one() and ng_mkpeer() functions in network.subr are
now not used anywhere, but I left them, since they can be useful
in future in netgraph scripting.

Submitted by:	pluknet
2013-10-28 16:21:31 +00:00
Mark Murray
1a3c1f06dd Snapshot.
Looking pretty good; this mostly works now. New code includes:

* Read cached entropy at startup, both from files and from loader(8) preloaded entropy. Failures are soft, but announced. Untested.

* Use EVENTHANDLER to do above just before we go multiuser. Untested.
2013-10-06 22:45:02 +00:00
Devin Teske
f8dfdfbf4c Update copyright. 2013-08-27 06:09:28 +00:00
Devin Teske
e44da61e69 Building upon SVN r254237, disable automated activation of alternate layouts
and add support for default underride to $loader_version, acting as a way to
name a release. Release text is not displayed for the aforementioned feature
of alternate display layout (introduced in r254237); however, for all other
layouts (incl. default), the release name is displayed at lower-right.

See version.4th(8) for additional information and/or historical details.
NOTE: Also a minor edit to version.4th(8) while we're here.
2013-08-26 23:37:11 +00:00
Devin Teske
ea14379eaa Add optional support for default override of standard setup; but only if
corresponding functions are provided. If override function does not exist,
boot remains unmodified. This patch should not result in any changes.
2013-08-12 03:52:23 +00:00
Devin Teske
5b502b3b4c Update legacy static assignments in old code to support dynamic framing,
plotting, and alignment coinciding with enhancements in SVN r242667.
2013-08-08 22:34:00 +00:00
Devin Teske
5e82c321f8 Since the introduction of SVN r244048 and [follow-up] r244089, it is now
safe to build upon ``boot_serial?'' functionality to make safer UI choices.
2013-08-08 22:09:46 +00:00
Tim Kientzle
9759c7e7d2 Put in commented-out version of beastie menu commands
so that non-i386 users can easily experiment with this.
2013-07-27 18:19:28 +00:00
Andriy Gapon
e4616f7bfb default loader.conf: there is no need to load zpool.cache now
kernel does not need it for importing a root pool.

MFC after:	4 weeks
2013-07-09 08:40:05 +00:00
Devin Teske
9d93dba489 Fix a regression caused by SVN r222417.
Prior to r222417, setting `password' in loader.conf(5) did not prevent boot
but instead only prevented changes to boot options by prompting for password
if autoboot failed or the user interrupted the countdown sequence.
After r222417 the same machine with `password' set in loader.conf(5) would no
longer boot without _always_ entering the password.

This patch restores the old (8.x and older) functionality for password in
loader.conf(5) while adding a new bootlock_password feature to replace the
edge-case should anybody desire the regressed functionality (HINT: great for
PXE servers and/or private distributions).

loader.conf(5) was updated to be more clear with-respect to password setting
(previous text was misleading).

Documentation (loader.conf(5) and check-password.4th(8)) has been updated to
include notes on the new bootlock_password setting.

Special thanks to Alex Verbod for bringing this to my attention and helping to
refine the loader.conf(5) text.

PR:		conf/170110
Submitted by:	Vitaly Zakharov <ded3axap@gmail.com>
Reviewed by:	Alexander Verbod <alexander.verbod@gmail.com>
2012-12-12 17:49:01 +00:00
Devin Teske
f785f59861 Add support for comma-separated values (whitespace-separated still supported).
PR:		conf/121064
Submitted by:	koitsu
Reviewed by:	jh
2012-12-10 15:29:56 +00:00
Devin Teske
7a50e936c0 Use ASCII characters for box/line characters in frames.4th
Committed with changes to support the following from loader.conf(5):
+ console="vidconsole comconsole" (not just console="comconsole")
+ boot_serial="anything" (not just boot_serial="YES")
+ boot_multicons="anything" (unsupported in originally-submitted patch)

PR:		conf/121064
Submitted by:	koitsu
Reviewed by:	gcooper, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-12-09 15:25:34 +00:00
Devin Teske
a3ed1123db Discussed at-length on -arch.
Make the following interface changes to my beastie boot menu:
+ Move boot options to a submenu
+ Add a new "Boot Single" menu item
+ Make "Boot" item and new "Boot Single" item reverse when boot_single is set
+ Add new "Load Defaults" item (in new "Boot Options" submenu) for overridding
  loader.conf(5) provided values with system defaults.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-28 18:35:46 +00:00
Devin Teske
b98ba21ac2 + This patch does not change user experience or functionality
+ Cleanup syntax, slim-down code, and make things more readable
+ Introduce new +c! operator and ilk to reduce heap usage/allocations
+ Add safemode_enabled? safemode_enable and safemode_disable functions
+ Add singleuser_enabled? singleuser_enable singleuser_disable functions
+ Add verbose_enabled? verbose_enable and verbose_disable functions
+ Centralize strings (also to reduce heap usage)

Reviewed by:	peterj, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-16 01:24:11 +00:00
Devin Teske
d61579b8e7 Fix a stack leak in [unused] cycle_menuitem function while we're here
(required misconfiguration and/or missing environment vars to occur).

Reviewed by:	peterj, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-12 18:38:54 +00:00
Devin Teske
58ba7ef189 Fix funny comment.
Approved by:	adrian (co-mentor) (implicit)
2012-11-06 19:51:54 +00:00
Devin Teske
479617e7ff Fix c/p error in comment.
Approved by:	adrian (co-mentor) (implicit)
2012-11-06 19:50:45 +00:00
Devin Teske
c4a25e9646 Add ontop of my existing boot loader Forth code, including support for
submenus. See menusets.4th(8) for additional details including examples.

Discussed on arch and recommended for inclusion at the devsummit.

This change does not alter the appearance or user experience, only enhances
possibilities.

Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-11-06 19:26:36 +00:00
Attilio Rao
a42ac676f5 Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
2012-10-17 11:30:00 +00:00
Attilio Rao
26c3f6d7e2 Disconnect non-MPSAFE CODAFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 10:09:21 +00:00
Attilio Rao
4b0bdbfd9b Disconnect non-MPSAFE XFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 10:04:00 +00:00
Attilio Rao
55793cdccf Disconnect non-MPSAFE PORTALFS from the build in preparation for dropping
GIANT from VFS.

This is not targeted for MFC.
2012-10-16 09:59:10 +00:00
Devin Teske
55f9ff659d Since the introduction of the new advanced boot menu (r222417), options like
"boot verbose", "single user mode", "ACPI" and more are now stateful boolean
menuitems rather than direct action-items.

A short-coming in this new menu system is that when a user sets a non-default
value in loader.conf(5), this non-default state is not reflected in the menu
-- leading to confusion as to whether the option was taking effect or not.

This patch adds dynamic menuitem constructors _and_ the necessary Forth
callbacks to initialize these stateful menuitems -- causing the aforementioned
menuitems to adhere to loader.conf(5) settings.

PR:		bin/172529
Approved by:	adrian (co-mentor)
MFC after:	21 days
2012-10-14 06:52:49 +00:00
Devin Teske
3c9898d95c Fix a typo (s/prefix/suffix/) and comment.
NOTE: This is in an unused portion of the menu framework.

Reviewed by:	eadler, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-09 03:54:53 +00:00
Devin Teske
09bc77f513 Fix an oversight that cyclic menu items actually are zero-based and can
accommodate 10 different states.

Reviewed by:	eadler, adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-09 03:11:15 +00:00
Devin Teske
8d9cadfb22 Make the "Options:" separator-text configurable by setting $menu_optionstext.
Reviewed by:	eadler, adrian (co-mentor)
Approved by:	adrian (co-mentor)
MFC after:	3 days
2012-10-09 01:31:03 +00:00
Devin Teske
46aecc551b Add an echo to say we're "Booting..." when the overloaded "boot" Ficl word is
executed to better differentiate between loader-specific errors and kernel-
specific errors (if ever any of either).

This type of functionality hasn't been required before the introduction of the
advanced menu system (r222417). Adding this functionality will help different-
iate errors at the loader-level such as a BTX halt caused by heap exhaustion
and errors that may be involved with executing the kernel (wrong architecture
for example). A user can learn that messages before "Booting..." are related to
the loader(8) environment and it's Forth-ilk, while those after are not
related to loader(8) -- the point that loader(8) has ``left the building''.

This patch also includes a man-page update to color.4th(8) as the color logic
moves to a lower-level (from being included by beastie.4th to being included
by loader.4th).

After noticing a delay between execution of the overloaded "boot" FICL word and
the display of text on-screen, gcooper confirmed that the introduction of a
builtin memory test (disabled by adding hw.memtest.tests="0" to loader.conf(5))
was the cause of the delay.

This patch adds an echo to produce "Booting..." when the overloaded "boot" word
is executed (this includes from the interactive command-prompt on all arches,
from the menu system on arches that run the beastie menu, and even those arches
that run the menu but disable it by setting beastie_disable="YES" in
loader.conf(5)). When loader_color="YES" in loader.conf(5), the same message is
produced but in white text on a blue background (only the letters produced have
this background -- opposed to perhaps the entire line).
2012-10-08 23:02:35 +00:00
Devin Teske
999916a0d4 Comment and Copyright fixes/updates.
Reviewed by:	adrian (co-mentor)
Approved by:	adrian (co-mentor)
2012-10-07 15:37:30 +00:00
Devin Teske
d35c4b1d44 Fix domain.
Approved by:	emaste
2012-07-14 01:45:35 +00:00
Warren Block
344c81a166 Fixes to man8 groff mandoc style, usage mistakes, or typos.
PR:		168016
Submitted by:	Nobuyuki Koganemaru
Approved by:	gjb
MFC after:	3 days
2012-05-24 02:24:03 +00:00
Devin Teske
4c4947ad9d Update contact info.
PR:		N/A (mentor approved)
Submitted by:	dteske
Reviewed by:	dteske (mentor approved)
Approved by:	emaste (mentor)
MFC after:	1 week
2012-05-17 20:00:34 +00:00
Andriy Gapon
bec9e056eb retrofit Safe Mode loader menu item actions
The menu item is now made completely independent with the ACPI item - most
modern systems seem to require ACPI and become even more "unsafe"
without it.
Safe Mode no longer disables APIC for the same reason.
kbdmux is not disabled as this feature has proven itself stable.

New actions:
- SMP is disabled in the Safe Mode now
- eventtimers are forced to periodic mode (some real and virtual systems
  seem to have problems otherwise)
- geom extra vigorous integrity checking is disabled, this is to
  facilitate migration from previous versions

Possible short term to do:
- make SMP switch a separate menu item
- restore APIC switch as a separate menu item

Longer term to do:
- turn various tweaks into separate menu items in a Safe Mode sub-menu

Please consider adding a safety tweak to Safe Mode when introducing
new major features or changes that may cause instabilities.

Discussed with:	jhb, scottl, Devin Teske
MFC after:	3 weeks (stable/9 only)
2012-04-06 09:36:22 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Bjoern A. Zeeb
0566170f70 Provide wbwd(4), a driver for the watchdog timer found on various
Winbond Super I/O chips.

With minor efforts it should be possible the extend the driver to support
further chips/revisions available from Winbond.  In the simplest case
only new IDs need to be added, while different chipsets might require
their own function to enter extended function mode, etc.

Sponsored by:	Sandvine Incorporated ULC (in 2011)
Reviewed by:	emaste, brueffer
MFC after:	2 weeks
2012-03-06 18:44:52 +00:00
Glen Barber
9d496f5ab6 Whitespace cleanup:
o Wrap sentences on to new lines
 o Cleanup trailing whitespace

Found with:	textproc/igor
MFC after:	1 week
X-MFC-With:	r232157
2012-02-25 15:21:43 +00:00
Glen Barber
3102cfe2e2 Fix various typos in manual pages.
Submitted by:	amdmi3
PR:		165431
MFC after:	1 week
2012-02-25 14:31:25 +00:00
Sergey Kandaurov
146d5dc297 Clarify and improve the boot menu with some small changes:
- Enter instead of ENTER
- Remove colons
- Line up option values
- Use dots to provide a line to visually connect the menu
  selections with their values
- Replace Enabled/Disabled with off/On
  (bigger inital cap for "On" is a visual indicator)
- Remove confusing "Boot" from selections that don't boot.
- With loader_color=1 in /boot/loader.conf, use reverse video to
  highlight enabled options

PR:		misc/160818
Submitted by:	Warren Block <wblock wonkity com>
Reviewed by:	Devin Teske <devin dot teske fisglobal com>, current@
MFC after:	1 week
2012-01-25 18:36:01 +00:00
Eitan Adler
bae93530a7 - Document TheDraw splash screens in the default loader.conf
Submitted by:	Jason Hellenthal
Approved by:	glebius
MFC after:	3 days
2012-01-14 17:34:32 +00:00
Sergey Kandaurov
6791e4f442 Get rid of a spurious warning on the console when booting the kernel
from the interactive loader(8) prompt and beastie_disable="YES" is set
in loader.conf(5). In this case menu.rc is not evaluated and consequently
menu-unset does not have a body yet. This results in the ficl warning
"menu-unset not found" when try-menu-unset invokes menu-unset.

Check for beastie_disable="YES" explicitly, so that the try-menu-unset
word will not attempt to invoke menu-unset because the menu will have
never been configured. [1]
Use the sfind primitive as a last resort as an additional safer approach
conjuring a foreign word safely. [2]

PR:		kern/163938
Submitted by:	Devin Teske [1]
Reviewed by:	Devin Teske [2]
Reported and tested by:	dim
MFC after:	1 week
X-MFC with:	r228985
2012-01-09 20:25:14 +00:00
Sergey Kandaurov
744aebe369 Unset the environment variables associated with individual menu items
before invoking the kernel.

Quoting submitter:

The issue is with the new boot loader menu. It adds many loader variables
including ones that contain ANSI color escapes.

Obviously, these ANSI codes don't play well with serial consoles when
kenv(1) is executed without arguments (reports vary as to what happens,
but it's never pretty).

The net-effect is that kenv(1) no longer reports menu-related variables.

In essence, kenv(1) output should now appear the same as on RELENG_8
(which lacks the new boot loader and didn't use any such variables).
Thus, restoring serial console glory.

Submitted by:	Devin Teske <devin dott teske fisglobal.com>
MFC after:	2 weeks
2011-12-30 06:24:59 +00:00
Gleb Smirnoff
663222f1d2 - Rename if_carp.ko to carp.ko.
- carp.ko depends on sha1.c
2011-12-16 14:28:34 +00:00
Martin Wilke
c807217cf2 - Add new loader_logo orbbw to default.conf
PR:		162608
Submitted by:	manolis
Approved by:	rwatson (mentor)
MFC after:	3 Days
2011-11-19 14:44:29 +00:00
Sergey Kandaurov
3bedc94069 Remove the long reprecated ``/stand/sysinstall'' from the init_path.
It can be put back using the INIT_PATH config option or init_path
loader variable, if still needed (which I doubt).

MFC after:	1 week
2011-10-27 10:25:11 +00:00
Jaakko Heinonen
871ffe942d Restore behavior of the autoboot_delay="-1" boot menu setting to the
pre-r222417 state. The behavior was essentially reversed in r222417
which can cause confusion.

PR:		159775
Submitted by:	Devin Teske
Approved by:	re (kib)
2011-09-02 19:29:37 +00:00
Dmitry Morozovsky
796fc1b22f Add kern.cam.boot_delay description (with reasonable default) to
default/loader.conf

This should help people installing ${OS} to USB devices, where there are
frequently cases where kernel tries to mount root before actual umass sensing
is finished.

Reviewed by:	mav
Approved by:	re (kib)
MFC after:	1 week
2011-08-23 20:25:11 +00:00
Craig Rodrigues
ded85b3037 Document the tftp.blksize variable added in src/lib/libstand/tftp.c.
Approved by: re	(kib)
Requested by: maxim
2011-07-25 21:52:17 +00:00