Skip to content

Commit 983ffa0

Browse files
authored
Merge pull request #392 from mvo5/clarify-kargs
docs: clarify that `--karg` can be passed multiple times
2 parents bae7e0d + c7a9f02 commit 983ffa0

File tree

6 files changed

+140
-8
lines changed

6 files changed

+140
-8
lines changed

docs/src/man/bootc-install-to-disk.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ disabled but where the target does have SELinux enabled.
9696

9797
**\--karg**=*KARG*
9898

99-
: Add a kernel argument
99+
: Add a kernel argument. This option can be provided multiple times.
100+
101+
Example: \--karg=nosmt \--karg=console=ttyS0,114800n8
100102

101103
**\--root-ssh-authorized-keys**=*ROOT_SSH_AUTHORIZED_KEYS*
102104

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# NAME
2+
3+
bootc-install-to-existing-root - Perform an installation to the host
4+
root filesystem
5+
6+
# SYNOPSIS
7+
8+
**bootc-install-to-existing-root** \[**\--replace**\]
9+
\[**\--source-imgref**\] \[**\--target-transport**\]
10+
\[**\--target-imgref**\] \[**\--enforce-container-sigpolicy**\]
11+
\[**\--target-ostree-remote**\] \[**\--skip-fetch-check**\]
12+
\[**\--disable-selinux**\] \[**\--karg**\]
13+
\[**\--root-ssh-authorized-keys**\] \[**\--generic-image**\]
14+
\[**-h**\|**\--help**\] \[**-V**\|**\--version**\] \[*ROOT_PATH*\]
15+
16+
# DESCRIPTION
17+
18+
Perform an installation to the host root filesystem
19+
20+
# OPTIONS
21+
22+
**\--replace**=*REPLACE* \[default: alongside\]
23+
24+
: Configure how existing data is treated\
25+
26+
\
27+
*Possible values:*
28+
29+
> - wipe: Completely wipe the contents of the target filesystem. This
30+
> cannot be done if the target filesystem is the one the system is
31+
> booted from
32+
>
33+
> - alongside: This is a destructive operation in the sense that the
34+
> bootloader state will have its contents wiped and replaced.
35+
> However, the running system (and all files) will remain in place
36+
> until reboot
37+
38+
**\--source-imgref**=*SOURCE_IMGREF*
39+
40+
: Install the system from an explicitly given source.
41+
42+
By default, bootc install and install-to-filesystem assumes that it runs
43+
in a podman container, and it takes the container image to install from
44+
the podmans container registry. If \--source-imgref is given, bootc uses
45+
it as the installation source, instead of the behaviour explained in the
46+
previous paragraph. See skopeo(1) for accepted formats.
47+
48+
**\--target-transport**=*TARGET_TRANSPORT* \[default: registry\]
49+
50+
: The transport; e.g. oci, oci-archive. Defaults to \`registry\`
51+
52+
**\--target-imgref**=*TARGET_IMGREF*
53+
54+
: Specify the image to fetch for subsequent updates
55+
56+
**\--enforce-container-sigpolicy**
57+
58+
: This is the inverse of the previous
59+
\`\--target-no-signature-verification\` (which is now a no-op).
60+
Enabling this option enforces that \`/etc/containers/policy.json\`
61+
includes a default policy which requires signatures
62+
63+
**\--target-ostree-remote**=*TARGET_OSTREE_REMOTE*
64+
65+
: Enable verification via an ostree remote
66+
67+
**\--skip-fetch-check**
68+
69+
: By default, the accessiblity of the target image will be verified
70+
(just the manifest will be fetched). Specifying this option
71+
suppresses the check; use this when you know the issues it might
72+
find are addressed.
73+
74+
A common reason this may fail is when one is using an image which
75+
requires registry authentication, but not embedding the pull secret in
76+
the image so that updates can be fetched by the installed OS \"day 2\".
77+
78+
**\--disable-selinux**
79+
80+
: Disable SELinux in the target (installed) system.
81+
82+
This is currently necessary to install \*from\* a system with SELinux
83+
disabled but where the target does have SELinux enabled.
84+
85+
**\--karg**=*KARG*
86+
87+
: Add a kernel argument. This option can be provided multiple times.
88+
89+
Example: \--karg=nosmt \--karg=console=ttyS0,114800n8
90+
91+
**\--root-ssh-authorized-keys**=*ROOT_SSH_AUTHORIZED_KEYS*
92+
93+
: The path to an \`authorized_keys\` that will be injected into the
94+
\`root\` account.
95+
96+
The implementation of this uses systemd \`tmpfiles.d\`, writing to a
97+
file named \`/etc/tmpfiles.d/bootc-root-ssh.conf\`. This will have the
98+
effect that by default, the SSH credentials will be set if not present.
99+
The intention behind this is to allow mounting the whole \`/root\` home
100+
directory as a \`tmpfs\`, while still getting the SSH key replaced on
101+
boot.
102+
103+
**\--generic-image**
104+
105+
: Perform configuration changes suitable for a \"generic\" disk image.
106+
At the moment:
107+
108+
\- All bootloader types will be installed - Changes to the system
109+
firmware will be skipped
110+
111+
**-h**, **\--help**
112+
113+
: Print help (see a summary with -h)
114+
115+
**-V**, **\--version**
116+
117+
: Print version
118+
119+
\[*ROOT_PATH*\] \[default: /target\]
120+
121+
: Path to the mounted root; its expected to invoke podman with \`-v
122+
/:/target\`, then supplying this argument is unnecessary
123+
124+
# VERSION
125+
126+
v0.1.0

docs/src/man/bootc-install-to-filesystem.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ disabled but where the target does have SELinux enabled.
9898

9999
**\--karg**=*KARG*
100100

101-
: Add a kernel argument
101+
: Add a kernel argument. This option can be provided multiple times.
102+
103+
Example: \--karg=nosmt \--karg=console=ttyS0,114800n8
102104

103105
**\--root-ssh-authorized-keys**=*ROOT_SSH_AUTHORIZED_KEYS*
104106

docs/src/man/bootc-install.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ bootc-install-to-filesystem(8)
3535

3636
: Install to the target filesystem
3737

38+
bootc-install-to-existing-root(8)
39+
40+
: Perform an installation to the host root filesystem
41+
3842
bootc-install-print-configuration(8)
3943

4044
: Output JSON to stdout that contains the merged installation

lib/src/install.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,10 @@ pub(crate) struct InstallConfigOpts {
133133
#[serde(default)]
134134
pub(crate) disable_selinux: bool,
135135

136-
// Only occupy at most this much space (if no units are provided, GB is assumed).
137-
// Using this option reserves space for partitions created dynamically on the
138-
// next boot, or by subsequent tools.
139-
// pub(crate) size: Option<String>,
136+
/// Add a kernel argument. This option can be provided multiple times.
137+
///
138+
/// Example: --karg=nosmt --karg=console=ttyS0,114800n8
140139
#[clap(long)]
141-
/// Add a kernel argument
142140
karg: Option<Vec<String>>,
143141

144142
/// The path to an `authorized_keys` that will be injected into the `root` account.

xtask/src/xtask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ fn man2markdown(sh: &Shell) -> Result<()> {
118118
.file_stem()
119119
.and_then(|name| name.to_str())
120120
.ok_or_else(|| anyhow!("Expected filename in {path:?}"))?;
121-
let target = format!("docs/src/{filename}.md");
121+
let target = format!("docs/src/man/{filename}.md");
122122
cmd!(
123123
sh,
124124
"pandoc --from=man --to=markdown --output={target} {path}"

0 commit comments

Comments
 (0)