Commit graph

79 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek db81144428 tree-wide: BLS and DPS are now on uapi-group website 2022-11-21 12:26:35 +01:00
Zbigniew Jędrzejewski-Szmek b66a6e1a58 man: "the initial RAM disk" → "the initrd"
In many places we spelled out the phrase behind "initrd" in full, but this
isn't terribly useful. In fact, no "RAM disk" is used, so emphasizing this
is just confusing to the reader. Let's just say "initrd" everywhere, people
understand what this refers to, and that it's in fact an initramfs image.

Also, s/i.e./e.g./ where appropriate.

Also, don't say "in RAM", when in fact it's virtual memory, whose pages
may or may not be loaded in page frames in RAM, and we have no control over
this.

Also, add <filename></filename> and other minor cleanups.
2022-09-20 16:48:50 +02:00
Zbigniew Jędrzejewski-Szmek 15102ced42 man: similar → similarly
Something *is* similar
Something *works* similarly
Something does something, similarly to how something else does something

See https://sites.ulethbridge.ca/roussel/2017/11/29/similar-and-similarly-are-they-similar/
for a clear explanation.
2022-08-23 12:14:58 +02:00
Rene Hollander d9bdb29bf5 Add --efi-boot-option-description argument to bootctl to control the name of the boot
entry.

By default an entry named "Linux Boot Manager" is created (which is the
previous behavior). With the flag the name of the entry can be
controlled, which is useful when installing systemd-boot to multiple ESP
partitions and having uniquely named entries.

Fixes #17044.
2022-08-19 14:55:31 +02:00
Luca Boccassi 02d06ba180 bootctl: add --install-source=auto|image|host
When using --root=/--image= the binaries to install/update will be
picked from the directory/image. Add an option to let the caller
choose.
By default (auto) the image is tried first, and if nothing is found
then the host. The other options allow to strictly try the image
or host and ignore the other.
2022-07-08 16:58:51 +01:00
Luca Boccassi 80a2381d5c bootctl: add --root and --image
Operate on image/directory, and also take files to install from it
2022-07-08 16:58:15 +01:00
Jan Janssen 6e9165397f bootctl: Add EFI arch detection support 2022-05-21 15:11:13 +01:00
Zbigniew Jędrzejewski-Szmek 14e6e444dd bootctl: add --quiet
It's useful for installation scripts and suchlike.
Raised in https://bugzilla.redhat.com/show_bug.cgi?id=2079784#c9.
2022-05-05 12:30:06 +02:00
Zbigniew Jędrzejewski-Szmek 18eb56c3c0 bootctl: support --graceful in is-installed 2022-05-05 12:30:06 +02:00
Zbigniew Jędrzejewski-Szmek 76c068b77c man: cross-advertize bootctl and systemctl boot loader support 2022-04-28 16:44:40 +02:00
Zbigniew Jędrzejewski-Szmek e12335ba60 man: add annotated example for bootctl status & list
This is based on the output on my laptop, with various manual adjustments.
If people have other types of entries, it'd be useful to add them here. In
particular, some dual-boot entries would be nice.
2022-04-04 21:19:20 +02:00
Zbigniew Jędrzejewski-Szmek db9eabd675 man: fix tag syntax
Strangely enough, having <varlistenetry>s outside of <variablelist> wasn't
causing visual problems. But having two <listitem>s in one <varlistentry>
resulted in the paragraphs running together in the rendered man page.
2022-04-04 21:19:20 +02:00
Lennart Poettering 0d1506d4a8 bootctl: optionally, output entries in JSON format
Replaces: #18387
Fixes: #18094
2022-03-28 16:00:25 +02:00
Lennart Poettering f337f903df bootctl: update to new kernel-install semantics
This makes a bunch of closely related changes:

1. The "entry-token" concept already introduced in kernel-install is now
   made use of. i.e. specifically there's a new option --entry-token=
   that can be used to explicitly select by which ID to identify boot
   loader entries: the machine ID, or some OS ID (ID= or IMAGE_ID= from
   /etc/os-release, or even some completely different string. The
   selected string is then persisted to /etc/kernel/entry-token, so that
   kernel-install can find it there.

2. The --make-machine-id-directory= switch is renamed to
   --make-entry-directory= since after all it's not necessarily the
   machine ID the dir is named after, but can be any other string as
   selected by the entry token.

3. This drops all code to make automatic changes to /etc/machine-info.
   Specifically, the KERNEL_INSTALL_MACHINE_ID= field is now more
   generically implemented in /etc/kernel/entry-token described above,
   hence no need to place it at two locations. And the
   KERNEL_INSTALL_LAYOUT= field is not configurable by user switch or
   similar anyway in bootctl, but only read from
   /etc/kernel/install.conf, and hence copying it from one configuration
   file to another appears unnecessary, the second copy is fully
   redundant. Note that this just drops writing these fields, they'll
   still be honoured when already set.
2022-03-11 11:39:34 +01:00
Zbigniew Jędrzejewski-Szmek 1ff493d5c1 bootctl: deprecate --make-machine-id-directory=auto
Now that kernel-install creates the machine-id directory, we don't need to do
this is 'bootctl install', and in fact it's better not to do this since it
might never be necessary. So let's change the default behaviour to 'no'.

I kept support for 'auto' to maintain backwards compatibility, even though the
default was changed. Previous behaviour can be requested by specifying
--make-machine-id-directory=auto.
2021-12-17 18:48:08 +01:00
Davide Cavalca ba38a24de3 man: do not install sd-boot man pages when -Dgnu-efi=false is set 2021-12-14 00:08:55 +00:00
Дамјан Георгиевски 12caf72716 bootctl: optionally install .signed efi file
if /usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed exists
install that instead of /usr/lib/systemd/boot/efi/systemd-bootx64.efi

the idea is that SecureBoot tooling can create the efi.signed file
whenever /usr/lib/systemd/boot/efi/systemd-bootx64.efi from the package
is updated.
2021-12-08 22:21:34 +01:00
Jan Janssen ee4fd9cbd4 sd-boot: Add support to boot last selected entry
Fixes: #18994
2021-10-29 13:57:24 +02:00
Jan Janssen 0c674ce5f2 sd-boot: Allow glob patterns for default and oneshot EFI vars too 2021-10-29 13:57:24 +02:00
Jan Janssen 39ddc32a86 bootctl: Add set-timeout verb
Fixes: #18766
2021-10-08 15:32:50 +02:00
Lennart Poettering e5a8b4b593 bootctl: tweak "bootctl update" to be a NOP when boot loader is already current and --graceful is given
Previously, the "bootctl update" logic would refrain from downrgading a
boot loader, but if the boot loader that is installed already matched
the version we could install we'd install it anyway, under the
assumption this was effectively without effect. This behaviour was handy
while developing boot loaders, since installing a modified boot loader
didn't require a version bump.

However, outside of the systems of boot loader developers I don't think
this behaviour makes much sense: we should always emphasize doing
minimal changes to the ESP, hence when an update is supposedly not
necessary, then don't do it. Only update if it really makes sense, to
minimize writes to the ESP. Updating the boot loader is a good thing
after all, but doing so redundantly is not.

Also, downgrade the message about this to LOG_NOTICE, given this
shouldn't be a reason to log.

Finally, exit cleanly in this cases (or if another boot loader is
detected)
2021-07-30 16:48:24 +02:00
Zbigniew Jędrzejewski-Szmek be0d27ee0c man: fix assorted issues reported by the manpage-l10n project
Fixes #20297.
2021-07-27 09:43:29 +02:00
Christian Hesse 9fff026d60 man: fix tag type
This is an option, not a command.
2021-05-27 12:50:57 +09:00
Lennart Poettering 7eea910d24 bootctl: extend --make-machine-id-directory= documentation a bit
The directory might not be created in the ESP but in the extended boot
loader partition, hence don#t claim otherwise.

Also, give a brief reason why the concept exists at all.

Link up machine-id man page.

Follow-up for: 6a3fff75ba
2021-05-11 14:32:42 +09:00
наб 6a3fff75ba
bootctl: take --make-machine-id-directory=yes|no|auto and make/remove \$MACHINE_ID accordingly
auto resolves to yes if /etc/machine-id resides on non-tmpfs

This effectively reverts commit 31e57550b5
2021-05-05 14:35:00 +02:00
Yu Watanabe 48e0abb535 tree-wide: fix typo 2020-11-25 09:48:17 +01:00
Yu Watanabe ca91ce3a33 man: bootctl set-default/oneshot accept an empty string 2020-11-24 11:17:37 +01:00
Yu Watanabe db9ecf0501 license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
Дамјан Георгиевски c4b843473a bootctl: add @current/@oneshot/@default targets to set-default/set-oneshot
Using `bootctl set-default @current` will set the default loader entry
to the currently booted entry as read from the `LoaderEntrySelected` EFI
variable.

Also `bootctl set-oneshot @current` will set the oneshot loader entry to
the current booted entry.

Correspondingly `@default` and `@oneshot` can be used to read from the
LoaderEntryDefault and LoaderEntryOneshot EFI variables.
2020-10-20 15:02:58 +02:00
Lennart Poettering 64a7fcc5cd bootctl: separate boot loader specific commands in man and --help
bootctl implements three types of operation: those that work with an EFI
boot loader, those which work with any EFI boot loader that implements
the boot loader spec + interface, and finally those specific to sd-boot.
Previously the --help text and the man page mixed them all up. Let's put
them clearly in three separate sections however, to communicate clearly
what is supposed to work everywhere, and what is specific to
systemd-boot or boot loaders implementing the two specs.

This adjusts wording here and there, but is mostly just about
re-ordering existing docs, and putting them under new sections.
2020-10-14 19:40:39 +02:00
Lennart Poettering 002914e688 bootctl: add simple, low-level reboot-to-firmware verb for controlling the flag 2020-05-29 15:41:50 +02:00
Lennart Poettering 351de38e4b bootctl: make 'random-seed' handle inability to write system token EFI variable gracefully
Apparently some firmwares don't allow us to write this token, and refuse
it with EINVAL. We should normally consider that a fatal error, but not
really in the case of "bootctl random-seed" when called from the
systemd-boot-system-token.service since it's called as "best effort"
service after boot on various systems, and hence we shouldn't fail
loudly.

Similar, when we cannot find the ESP don't fail either, since there are
systems (arch install ISOs) that carry a boot loader capable of the
random seed logic but don't mount it after boot.

Fixes: #13603
2019-11-21 19:55:17 +01:00
Zbigniew Jędrzejewski-Szmek 2536752dda Rename "system-options" to "systemd-efi-options"
This makes the naming more consistent: we now have
bootctl systemd-efi-options,
$SYSTEMD_EFI_OPTIONS
and the SystemdOptions EFI variable.

(SystemdEFIOptions would be redundant, because it is only used in the context
of efivars, and users don't interact with that name directly.)

bootctl is adjusted to use 2sp indentation, similarly to systemctl and other
programs.

Remove the prefix with the old name from 'bootctl systemd-efi-options' output,
since it's redundant and we don't want the old name anyway.
2019-11-18 20:20:58 +01:00
Zbigniew Jędrzejewski-Szmek e1fac8a68a Move the Commands section above Options section
For executables which take a verb, we should list the verbs first, and
then options which modify those verbs second. The general layout of
the man page is from general description to specific details, usually
Overview, Commands, Options, Return Value, Examples, References.
2019-10-08 18:21:26 +02:00
Zbigniew Jędrzejewski-Szmek 4e5aa79185 bootctl: add "system-options" verb 2019-09-16 18:08:54 +02:00
Lennart Poettering 93f5910078 docs: add longer document about systemd and random number seeds 2019-07-25 18:31:20 +02:00
Lennart Poettering 7fb0c61580 man: extend on the --print-boot-path description a bit 2019-07-25 18:31:20 +02:00
Lennart Poettering a2aa605d22 bootctl: add is-installed verb
Fixes: #9428
2019-07-25 18:31:20 +02:00
Lennart Poettering 39867bb9fb man: document the systemd-random-seed rework 2019-07-25 18:31:20 +02:00
Zbigniew Jędrzejewski-Szmek aa467bcae1 bootctl: do not allow -x and -p to be used together
-x already prints the path to ESP in some circumstances, and allowing
both to be printed seems confusing.
2019-05-19 12:01:32 +02:00
Zbigniew Jędrzejewski-Szmek fba4e94506 bootctl: add -x shortcut for --print-boot-path
It's a quite useful option, let's match -p.
2019-05-19 11:55:36 +02:00
Zbigniew Jędrzejewski-Szmek 3a54a15760 man: use same header for all files
The "include" files had type "book" for some raeason. I don't think this
is meaningful. Let's just use the same everywhere.

$ perl -i -0pe 's^..DOCTYPE (book|refentry) PUBLIC "-//OASIS//DTD DocBook XML V4.[25]//EN"\s+"http^<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\n  "http^gms' man/*.xml
2019-03-14 14:42:05 +01:00
Zbigniew Jędrzejewski-Szmek 0307f79171 man: standarize on one-line license header
No need to waste space, and uniformity is good.

$ perl -i -0pe 's|\n+<!--\s*SPDX-License-Identifier: LGPL-2.1..\s*-->|\n<!-- SPDX-License-Identifier: LGPL-2.1+ -->|gms' man/*.xml
2019-03-14 14:29:37 +01:00
Lennart Poettering 3da2b703d9 man: document XBOOTLDR partition logic in bootctl's man page 2019-03-01 12:41:32 +01:00
Lennart Poettering 2fe8213230 docs: migrate boot loader interface from fdo wiki to git
This imports
https://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface/
into our sources, and extends it substantially with various variables
now supported.
2018-11-16 17:43:59 +01:00
Lennart Poettering a0848495f3 man: change all github links to use systemd.io domain instead
We shouldn't push people towards the git UI, but instead just refernce
the public version on the systemd.io domain.
2018-10-12 14:07:11 +02:00
Lennart Poettering bd2865caf6 bootctl: include boot entries discovered by the boot loader but not in $BOOT in the "list" output
Let's use the new LoaderEntries efi var for this, and show all entries
we couldn't find via the config snippets.
2018-10-08 21:40:44 +02:00
Lennart Poettering d88c96ffe5 bootctl: add new verbs for setting the default boot/oneshot entry
Fixes: #5739 #8574
2018-10-08 21:40:44 +02:00
Lennart Poettering 8cbb7d8783 efi: allow ESP validity checks to be turned off
let's add an env var for this, as this really shouldn't be a top-level
feature, as it turning off the validity checks certainly isn't
advisable.

Fixes: #4925
2018-10-08 21:40:44 +02:00
Lennart Poettering 4eb5636b6c man: various updates to the bootctl man page 2018-10-08 21:40:44 +02:00