The boot module¶
Almost everything the machine does before it reaches a login prompt is one
configurable unit: the boot@ module, enabled on a fresh install as
boot@system. Hostname, timezone, keymap, console font, which filesystems get
assembled and mounted, how many consoles start, whether a firewall is loaded.
It comes from the boot@-66serv package, and its template lives at
/usr/share/66/service/boot/boot@.
Look at what you have¶
The boot tree, the group it belongs to, and every service the module
activated.
Read and change the configuration¶
# 66 configure -L boot@system # list the current values
# 66 configure -r TTY=4 boot@system # change one value
# 66 configure -e $EDITOR boot@system # edit the whole file
Editing is only half the job. The enabled definition still holds the old values until you push them through:
reconfigure re-runs the module's own configure script and parses the module
again, which is what turns your new values into an actual set of services. It
prints the resulting list, so you can see what your change turned on or off.
Because this module lives in a tree of the boot group, reconfigure only
parses and leaves the running boot sequence alone, so the change applies at
the next boot. For an ordinary daemon the answer is different, 66 reload
rather than 66 reconfigure, see
Everyday commands.
The settings¶
Identity and console¶
| Key | Default | Meaning |
|---|---|---|
HOSTNAME |
obarunS6 |
The machine's hostname |
TZ |
GMT |
Timezone, from /usr/share/zoneinfo |
TTY |
2 |
Number of consoles to start, 0 for none, maximum 11 |
KEYMAP |
us |
Console keymap, see loadkeys(8) |
FONT |
lat9w-16 |
Console font, see setfont(8) |
FONT_MAP, FONT_UNIMAP |
unset | Console map and unimap |
SETUPCONSOLE |
yes |
no makes every key above inert |
HARDWARECLOCK |
UTC |
UTC or localtime |
tty@tty12 is started regardless of TTY. See
Consoles and tty12.
Storage¶
| Key | Default | Meaning |
|---|---|---|
FSTAB |
yes |
Mount what /etc/fstab lists |
SWAP |
no |
Activate swap |
LVM |
no |
Activate LVM volume groups |
DMRAID |
no |
Activate dmraid disks |
MDRAID |
no |
Activate mdraid arrays |
BTRFS |
no |
Activate btrfs devices |
ZFS |
no |
Mount ZFS filesystems |
ZFS_IMPORT |
zpoolcache |
scan or zpoolcache, inert when ZFS=no |
CRYPTTAB |
no |
Activate encrypted devices |
FORCECHCK |
no |
Force a filesystem check |
If you install onto LVM or add an encrypted volume later, this is where you turn it on. Forgetting is a common cause of a system that boots to an emergency console after a disk change.
System¶
| Key | Default | Meaning |
|---|---|---|
UDEV |
yes |
Device management. no also disables console setup, LVM, dmraid, btrfs and crypttab |
SYSCTL |
yes |
Apply kernel configuration with sysctl |
MODULE_KERNEL |
yes |
Load kernel modules |
MODULE_SYSTEM |
yes |
Load modules listed in modules.d files |
TMPFILE |
yes |
Apply tmpfiles.d configuration |
RANDOMSEED |
yes |
Populate the random seed |
CGROUPS |
yes |
Mount cgroups |
MNT_PROC, MNT_SYS, MNT_DEV, MNT_RUN, MNT_TMP, MNT_PTS, MNT_SHM, MNT_NETFS |
yes |
Mount the pseudo filesystems |
POPULATE_SYS, POPULATE_DEV, POPULATE_RUN, POPULATE_TMP |
yes |
Populate them once mounted |
LOCAL |
no |
Run /etc/66/rc.local at the end of the boot |
FIREWALL |
unset | iptables, ip6tables, nftables, ebtables or arptables. Commented out means no firewall |
CHECK_CONFIGURATION |
yes |
Check the configuration for errors |
CONTAINER |
no |
Boot inside a container. Disables the hardware-specific keys |
The template file itself carries a comment for every key. Read it:
rc.local¶
With LOCAL=yes, /etc/66/rc.local runs at the end of the boot as a oneshot
service. Put your own commands there.
It is a oneshot
Do not start a daemon from rc.local. Nothing supervises it, and nothing
stops it cleanly. Write a service instead.
Remember the shebang: the shipped file has none, and the script will not run without one.
Several boot configurations¶
Nothing restricts you to one module instance. Disable the current one, enable another under a different name, and configure it separately:
# 66 disable boot@system
# 66 enable boot@laptop
# 66 configure -e $EDITOR boot@laptop
# 66 reconfigure boot@laptop
Disabling a module does not delete it, so switching back is one 66 enable
away.
See also¶
- Modules, for what a module is in general.
- Boot output, for
/etc/66/init.conf. - The 66 documentation on modules and on the boot process.