Commit Graph
19 Commits
Author SHA1 Message Date
Lennart Poettering ce8d684ed8 sysinstall: optionally, automatically pick target block device after a settle timeout
Let's make sysinstall useful for truly unattended installations, and let
it it automatically pick a target disk after some settlement time-out.
2026-09-23 10:14:25 +02:00
felix h a11144d0a9 tree-wide: format man page references as foo(1) 2026-08-28 06:34:45 +09:00
Zbigniew Jędrzejewski-Szmek 1cf40c9c72 shared/verbs: stop requiring an explicit program name
Almost all programs are simple and have only a single command. When
printing options, let's just use the first COMMAND block found by default.
This means we can drop the explicit program-name argument and reduce
copy&paste boilerplate.
2026-08-24 13:45:07 +02:00
Yu Watanabe 4430adbd76 sysinstall: refuse multiple requests
Otherwise, that triggers memory leak and double free.
2026-08-19 03:45:14 +09:00
Yu Watanabe 90481c0b1b tree-wide: add missing assertions
Found by coccinelle.
2026-08-18 06:30:10 +09:00
Zbigniew Jędrzejewski-Szmek 2805c192f9 sysinstall: convert to VERB_COMMAND and add --introspect-cli
The custom help() is replaced by a COMMAND() description, and
--introspect-cli is added. The abstract is changed to use the imperative
form ("Install …" instead of "Installs …"), consistent with the other
commands. This also fixes the doubled colon in the "Options::" heading.
2026-08-17 13:21:31 +02:00
Zbigniew Jędrzejewski-Szmek 9d8f8d55ed sysinstall: don't ask whether to erase a disk that contains no partitions
When the target disk carried no partitions, the installer still asked:

    Please type 'keep' to install the OS in addition to what the disk
    already contains, or 'erase' to erase all data on the disk:

The question is meaningless in that case: there's nothing on the disk
worth preserving, and both answers lead to the same result.

Modify fsystemd-repart to report in the dry-run reply of
io.systemd.Repart.Run() the number of partitions currently on the disk.
The field is only included if the existing partition table was actually
read, i.e. in the 'refuse' and 'allow' empty modes, and omitted
otherwise.

Make systemd-sysinstall skip the erase question if the reply positively
indicates that there are no partitions, proceeding as if 'keep' was
selected.
2026-07-17 09:18:33 +02:00
Zbigniew Jędrzejewski-Szmek efbc4481cb sysinstall: suppress 'no' prompt to begin installation
The user has to type 'yes', but it doesn't mean that the default of
'no' is ever useful. Suppress it, so the user doesn't have to press
backspace twice.
2026-07-17 09:15:09 +02:00
Yu Watanabe 4c0d8d9673 tree-wide: embed dlopen notes into individual executables
Previously, when a library was dynamically loaded via a helper function
inside libsystemd-shared.so, the resulting dlopen ELF note was not
propagated to the invoking executable's ELF metadata.

This commit explicitly annotates each executable with the relevant
dlopen ELF notes for any optional dependencies it might potentially
load. This ensures that package managers and build systems can properly
discover runtime dependencies that are triggered indirectly.
2026-07-10 16:35:19 +09:00
Julian Sparber d9c0d7974e sysinstall: Disable timeout for connection with repart
The repart connection was timeing out when fetching candidate devices.
Therfore disable the timeout and keep the connection open till the user
disconnects.
2026-07-08 08:27:13 +02:00
Lennart Poettering 79c6e4fed2 Add varlink interface for sysinstall (#42261)
Allow graphical installers to use system sysinstall. This will be used
by gnome-setup to install GNOME OS and ideally installers of other
distributions talk to the same varlink interface.
2026-07-03 16:04:25 +02:00
Julian Sparber c17d0c7e85 sysinstall: Add varlink interface
Allow graphical installers to use system sysinstall.
This will be used by gnome-setup to install GNOME OS and ideally installers
of other distributions talk to the same varlink interface.
2026-07-03 11:16:46 +02:00
Julian Sparber 98b875b2ac sysinstall: Look for valid kernel image before installing
Instead of failing the installation after creating the partitions and
doing almost the entire installation, and then failing if we don't have
a kernel image. Look for it before we start doing modifications to the disk.
This way we tell the user as soon as possible that we can't install the
OS because of the missing kernel image.
2026-07-03 11:16:46 +02:00
Lennart Poettering 77ee077dfe shared: add a generic prompt_loop_yes_no() helper
Factor a yes/no variant of prompt_loop() out into prompt-util.[ch], so the
various interactive tools can share a single implementation, and convert
systemd-sysinstall's installation confirmation question over to it.
2026-06-27 17:28:39 +02:00
Lennart Poettering 85d47bfa92 firstboot: make clear where the full screen console wizards end
The three first boot screens are visually separated from the console
output before them via the "chome" and welcome strings and sufficient
whitespace. But so far they weren't from the output after them. This is
sometimes a big confusing. Let's add a bit of a separator between the
end and what comes next, too.

Just cosmetics, nothing else.
2026-05-21 09:09:38 +09:00
Lennart Poettering 706de22cba sysinstall: prefill firmware variable question with 'yes' 2026-05-20 16:38:18 +02:00
Lennart Poettering a80024e96d ask-string: support prefilling a string query with an explicit string 2026-05-20 16:34:21 +02:00
Lennart Poettering 324fab7ed6 firstboot,sysinstall,hostnamed: always show FANCY_NAME=
This makes sure that whenever we want to show the OS name we can show
the fancy name. Thus this moves the escaping/validation of the fancy
name out of hostnamed into generic code, and then makes use of it in
sysinstall,firstboot,prompt-util.
2026-05-12 00:07:42 +01:00
Lennart Poettering 5fbc7a7b12 sysinstall: new component 2026-05-05 15:09:47 +02:00