Commit Graph

52 Commits

Author SHA1 Message Date
Lennart Poettering 2f3dfc6fb4 verity: add support for setting up verity-protected root disks in the initrd
This adds a generator and a small service that will look for "roothash="
on the kernel command line and use it for setting up a very partition
for the root device.

This provides similar functionality to nspawn's existing --roothash=
switch.
2016-12-21 19:09:30 +01:00
Lennart Poettering 91214a37ef fstab-generator: add support for volatile boots
This adds support for a new kernel command line option "systemd.volatile=" that
provides the same functionality that systemd-nspawn's --volatile= switch
provides, but for host systems (i.e. systems booting with a kernel).

It takes the same parameter and has the same effect.

In order to implement systemd.volatile=yes a new service
systemd-volatile-root.service is introduced that only runs in the initrd and
rearranges the root directory as needed to become a tmpfs instance. Note that
systemd.volatile=state is implemented different: it simply generates a
var.mount unit file that is part of the normal boot and has no effect on the
initrd execution.

The way this is implemented ensures that other explicit configuration for /var
can always override the effect of these options.  Specifically, the var.mount
unit is generated in the "late" generator directory, so that it only is in
effect if nothing else overrides it.
2016-12-21 19:09:29 +01:00
Lennart Poettering 1d84ad9445 util-lib: various improvements to kernel command line parsing
This improves kernel command line parsing in a number of ways:

a) An kernel option "foo_bar=xyz" is now considered equivalent to
   "foo-bar-xyz", i.e. when comparing kernel command line option names "-" and
   "_" are now considered equivalent (this only applies to the option names
   though, not the option values!). Most of our kernel options used "-" as word
   separator in kernel command line options so far, but some used "_". With
   this change, which was a source of confusion for users (well, at least of
   one user: myself, I just couldn't remember that it's systemd.debug-shell,
   not systemd.debug_shell). Considering both as equivalent is inspired how
   modern kernel module loading normalizes all kernel module names to use
   underscores now too.

b) All options previously using a dash for separating words in kernel command
   line options now use an underscore instead, in all documentation and in
   code. Since a) has been implemented this should not create any compatibility
   problems, but normalizes our documentation and our code.

c) All kernel command line options which take booleans (or are boolean-like)
   have been reworked so that "foobar" (without argument) is now equivalent to
   "foobar=1" (but not "foobar=0"), thus normalizing the handling of our
   boolean arguments. Specifically this means systemd.debug-shell and
   systemd_debug_shell=1 are now entirely equivalent.

d) All kernel command line options which take an argument, and where no
   argument is specified will now result in a log message. e.g. passing just
   "systemd.unit" will no result in a complain that it needs an argument. This
   is implemented in the proc_cmdline_missing_value() function.

e) There's now a call proc_cmdline_get_bool() similar to proc_cmdline_get_key()
   that parses booleans (following the logic explained in c).

f) The proc_cmdline_parse() call's boolean argument has been replaced by a new
   flags argument that takes a common set of bits with proc_cmdline_get_key().

g) All kernel command line APIs now begin with the same "proc_cmdline_" prefix.

h) There are now tests for much of this. Yay!
2016-12-21 19:09:08 +01:00
Lennart Poettering f582cbca00 firstboot: add kernel cmdline option to disable firstboot wizard
If booting with systemd.firstboot=0 the wizard will be skipped.
2016-12-20 20:00:09 +01:00
Zbigniew Jędrzejewski-Szmek 72ccee50d0 man: move description of kernel vconsole.conf overrides to vconsole.conf(5)
They were outdated, and this way it's less likely that they'll get out of sync
again. Anyway, it's easier for the reader to have the kernel and config file
options next to one another.
2016-07-31 22:52:04 -04:00
Ivan Shapovalov dcd6145002 core: parse `rd.rescue` and `rd.emergency` as initrd-specific shorthands (#3488)
Typing `rd.rescue` is easier than `rd.systemd.unit=rescue.target`.
2016-06-13 16:28:42 +02:00
tblume 959718c621 core: set start job timeout from the kernel commandline (#3112)
Add the boot parameter: systemd.default_timeout_start_sec to allow modification
of the default start job timeout at boot time.
2016-04-26 17:10:36 +02:00
Nils Carlson ee48dbd55f core: Add machine-id setting
Allow for overriding all other machine-ids which may be present on
the system using a kernel command line systemd.machine_id or
--machine-id= option.

This is especially useful for network booted systems where the
machine-id needs to be static, or for containers where a specific
machine-id is wanted.
2016-01-12 22:10:41 +00:00
kayrus af105d0314 Fixed kernel-command-line links 2015-11-06 14:59:42 +01:00
Lennart Poettering b9e74c3994 core: rework crash handling
This introduces a new systemd.crash_reboot=1 kernel command line option
that triggers a reboot after crashing.

This also cleans up crash VT handling. Specifically, it cleans up the
configuration setting, to be between 1..63 or a boolean. This is to
replace the previous logic where "-1" meant disabled. We continue to
accept that setting, but only document the boolean syntax instead.

This also brings the documentation of the default settings in sync with
what actually happens.

The CrashChVT= configuration file setting is renamed to CrashChangeVT=,
following our usual logic of not abbreviating unnecessarily. The old
setting stays support for compat reasons.

Fixes #1300
2015-09-29 21:55:51 +02:00
Tom Gundersen 12b42c7667 man: revert dynamic paths for split-usr setups
This did not really work out as we had hoped. Trying to do this upstream
introduced several problems that probably makes it better suited as a
downstream patch after all. At any rate, it is not releaseable in the
current state, so we at least need to revert this before the release.

 * by adjusting the path to binaries, but not do the same thing to the
   search path we end up with inconsistent man-pages. Adjusting the search
   path too would be quite messy, and it is not at all obvious that this is
   worth the effort, but at any rate it would have to be done before we
   could ship this.

 * this means that distributed man-pages does not make sense as they depend
   on config options, and for better or worse we are still distributing
   man pages, so that is something that definitely needs sorting out before
   we could ship with this patch.

 * we have long held that split-usr is only minimally supported in order
   to boot, and something we hope will eventually go away. So before we start
   adding even more magic/effort in order to make this work nicely, we should
   probably question if it makes sense at all.
2015-06-18 19:47:44 +02:00
Filipe Brandenburger 681eb9cf2b man: generate configured paths in manpages
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions
like Debian which still have not adopted a /usr merge setup.

Use XML entities from man/custom-entities.ent to replace configured paths while
doing XSLT processing of the original XML files. There was precedent of some
files (such as systemd.generator.xml) which were already using this approach.

This addresses most of the (manual) fixes from this patch:
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220

The idea of using generic XML entities was presented here:
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html

This patch solves almost all the issues, with the exception of:
- Path to /bin/mount and /bin/umount.
- Generic statements about preference of /lib over /etc.

These will be handled separately by follow up patches.

Tested:
- With default configure settings, ran "make install" to two separate
  directories and compared the output to confirm they matched exactly.
- Used a set of configure flags including $CONFFLAGS from Debian:
  http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules
  Installed the tree and confirmed the paths use /lib/systemd instead of
  /usr/lib/systemd and that no other unexpected differences exist.
- Confirmed that `make distcheck` still passes.
2015-05-28 19:28:19 +02:00
Zbigniew Jędrzejewski-Szmek d6a12e7ca3 man: remove 'fs' from 'rootfsflags'
rootfsflags does not appear anywhere else.
2015-04-08 11:28:45 -04:00
Zbigniew Jędrzejewski-Szmek 3ba3a79df4 man: fix a bunch of links
All hail linkchecker!
2015-03-13 23:42:18 -04:00
Zbigniew Jędrzejewski-Szmek 798d3a524e Reindent man pages to 2ch 2015-02-03 23:11:35 -05:00
Jan Janssen baade8cc23 cryptsetup-generator: Add support for naming luks devices on kernel cmdline 2014-12-05 01:29:45 +01:00
Zbigniew Jędrzejewski-Szmek 203af57fcd man: make udev.event-timeout more visible
Evidently some people had trouble finding it in the documentation.
2014-10-23 00:12:50 -04:00
Lennart Poettering f280bcfb21 man: document the new "rescue" kernel command line option 2014-10-09 18:27:36 +02:00
Ruben Kerkhof 06b643e7f5 Fix a few more typos 2014-08-30 13:46:07 -04:00
Ivan Shapovalov d2c68822c4 hibernate-resume-generator: add a generator for instantiating the resume unit.
hibernate-resume-generator understands resume= kernel command line parameter
and instantiates the systemd-resume@.service accordingly if it is passed.

This enables resume from hibernation using device specified on the kernel
command line, and it may be specified either as "/dev/disk/by-foo/bar"
or "FOO=bar", not only "/dev/sdXY" which is understood by the in-kernel
implementation.

So now resume= is brought on par with root= in terms of possible ways to
specify a device.
2014-08-26 22:19:56 +02:00
Zbigniew Jędrzejewski-Szmek 5aded36978 man: add a mapping for external manpages
It is annoying when we have dead links on fd.o.

Add project='man-pages|die-net|archlinux' to <citerefentry>-ies.

In generated html, add external links to
http://man7.org/linux/man-pages/man, http://linux.die.net/man/,
https://www.archlinux.org/.

By default, pages in sections 2 and 4 go to man7, since Michael
Kerrisk is the autorative source on kernel related stuff.

The rest of links goes to linux.die.net, because they have the
manpages.

Except for the pacman stuff, since it seems to be only available from
archlinux.org.

Poor gummiboot gets no link, because gummitboot(8) ain't to be found
on the net. According to common wisdom, that would mean that it does
not exist. But I have seen Kay using it, so I know it does, and
deserves to be found. Can somebody be nice and put it up somewhere?
2014-07-07 18:36:55 -04:00
Lennart Poettering 3c5a87a879 debug-generator: add new kernel cmdline option systemd.wants= to add units to the initial transaction 2014-06-20 13:36:28 +02:00
Lennart Poettering 52c611b776 man: add new kernel command line switches to kernel-command-line(7) 2014-06-19 16:54:40 +02:00
Holger Hans Peter Freyther f1f0198cb6 fsck: Allow to specify the fsck repair option in the cmdline
Some unattended systems do not have a console attached and entering
the default rescue mode will not be too helpful. Allow to specify
the "-y" option to attempt to fix all filesystem errors.

Manually verified by downloading an image.gz of e2fsprogs, using
losetup and running systemd-fsck on the loop device and varying
the fsck.repair=preen|yes|no option.
2014-05-16 18:33:59 +02:00
Sebastian Thorarensen 40b71e89ba journald: add support for wall forwarding
This will let journald forward logs as messages sent to all logged in
users (like wall).

Two options are added:
 * ForwardToWall (default yes)
 * MaxLevelWall (default emerg)
'ForwardToWall' is overridable by kernel command line option
'systemd.journald.forward_to_wall'.

This is used to emulate the traditional syslogd behaviour of sending
emergency messages to all logged in users.
2014-03-14 22:05:25 +01:00
Jan Engelhardt 19aadacf92 man: wording and grammar updates
This is a recurring submission and includes corrections to various
issue spotted.
2013-10-21 20:50:46 -04:00
Tom Gundersen 295edddf5a kerne-command-line: introduce option 'systemd.restore_state'
When set to 0 this will stop tools like the backlight and rfkill tools to
restore state from previous boot. This is useful in case the stored state
is bogus to the extent that it is preventing you from resetting it (e.g.,
the backlight settings cause the screen to be off on boot on a system where
the backlight can not be adjusted directly from the keyboard).
2013-10-19 00:46:10 +02:00
Jan Engelhardt 775657712d man: document the -b special boot option 2013-10-15 09:57:26 -04:00
Tom Gundersen ecd1e54ca6 man: document luks.options kernel commandline
This should have been part of commit 7ab064a6d
2013-09-13 21:04:59 +02:00
Jan Engelhardt 409dee2e44 man: more grammar improvements
- place commas
- expand contractions (this is written prose :)
- add some missing words
2013-07-03 08:19:20 -04:00
Lukas Nykryn 9749cd77bc core: read "debug" from kernel commandline and set log level 2013-05-30 00:43:39 -04:00
Zbigniew Jędrzejewski-Szmek a057be1fcc man: mention net.ifnames in kernel-command-line(3) 2013-05-22 21:13:57 -04:00
Harald Hoyer 951657bd0a cryptsetup-generator: add support for rd.luks.key=
Also clarify rd.luks.uuid and luks.uuid in the manual.

https://bugzilla.redhat.com/show_bug.cgi?id=905683
2013-04-18 02:45:01 +02:00
Zbigniew Jędrzejewski-Szmek ccc9a4f9ff man: extend systemd.directives(7) to all manual pages
New sections are added: PAM options, crypttab options, commandline
options, miscellaneous. The last category will be used for all
untagged <varname> elements.

Commandline options sections is meant to be a developer tool: when
adding an option it is sometimes useful to be able to check if
similarly named options exist elsewhere.
2013-01-26 11:36:53 -05:00
Ramkumar Ramachandra 2ab38e24e5 man: fix some spelling mistakes 2012-11-30 14:02:03 +01:00
Thomas Hindoe Paaboel Andersen c53158818d man: fix a bunch of typos in docs
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:34:24 +02:00
Shawn Landden 97f4e88750 man: typo 2012-07-22 23:53:48 +02:00
Lennart Poettering 34511ca7b1 man: reword man page titles
Make sure the man page titles are similar in style and capitalization so
that our man page index looks pretty.
2012-07-16 18:08:25 +02:00
Lennart Poettering 627e4bb29f man: update man pages to reflect the driver= to load-modules= rename 2012-07-04 01:12:53 +02:00
Lennart Poettering a32f224aaf man: document systemd-fsck 2012-06-27 00:37:36 +02:00
Lennart Poettering 93a1d735ac units: rename fsck@.service to systemd-fsck@.service
The rule is that units that encapsulate our own code are prefixed with
"systemd-". Since the fsck units invoke our own code, hence add the
missing prefix. Since a long long time the fsck units didn't invoke the
naked fsck binaries anymore, and it is unlikely that this well ever
change. On the opposite: the code in systemd-fsck will probably get more
complex over time to handle fsck progress to plymouth forwarding.

Same for quotacheck (but not quotaon!)
2012-06-25 14:28:50 +02:00
Lennart Poettering eab367b9e5 man: add more references to k-c-l(7) 2012-06-22 16:59:32 +02:00
Lennart Poettering c7a5e7cfde man: fix references to udev man page 2012-06-22 16:57:13 +02:00
Lennart Poettering 99166f29ec man: add reference to bootparam(7) even though it is terribly out of date 2012-06-22 16:57:01 +02:00
Lennart Poettering 2a91f5f09f man: mention other initrd implementations in kernel-command-line(7) 2012-06-22 16:29:26 +02:00
Lennart Poettering d081dffbd3 core: remove sysv_console option
This option never made much sense. It was originally intended to make
sure that the usual startup output of sysv scripts goes to the terminal.
However, since SysV scripts started from a terminal would not output to
that terminal, but rather /dev/console this effect was more often than
not actually taking place. Nowadays systemd has much nicer boot time
status output than SysV which makes the sysv output redundant. Finally,
all output of services goes to the journal anyway, and is not lost.

Hence, let's drop this option, and simplify things a bit.
2012-06-22 13:16:28 +02:00
Lennart Poettering 03658d4fd6 modules-load: parse driver=/rd.driver= kernel command line option
This generalizes logic that already has been available in dracut before.
2012-06-22 11:39:04 +02:00
Lennart Poettering 9473414219 fstab-generator: support fstab=/rd.fstab= kernel cmdline
This generalizes functionality already available in dracut.
2012-06-22 10:27:05 +02:00
Lennart Poettering 2488799b35 man: add more links to kernel-command-line(7) 2012-06-22 10:13:50 +02:00
Lennart Poettering 66a78c2b95 cryptsetup: allow configuration of LUKS disks via the kernel cmdline
This generalizes a bit of the functionality already available in dracut.
2012-06-22 10:11:06 +02:00