Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overlay: coreos-autologin-generator: add /etc/issue.d for interactive live env #368

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

dustymabe
Copy link
Member

This issue.d will give the user some information about what is possible
to do in the interactive live environment, including some information
about installing to disk.

We have more reason than just audit to reduce the kernel console logging
level for the installer environment. For example here is a typical
kernel log message stream from an install run with the console logging
level set to debug:

```
$ sudo coreos-installer install /dev/sda --ignition-file example.ign --insecure --image-file ./fedora-coreos-31.20200415.dev.0-metal.x86_64.raw.gz
[  671.037750] audit: type=1101 audit(1588024067.253:192): pid=1219 uid=1000 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix acct="core" exe="/usr/bin/sudo" hostname=localhost.localdomain addr=? terminal=/dev/ttyS0 res=success'
[  671.043055] audit: type=1123 audit(1588024067.257:193): pid=1219 uid=1000 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/var/home/core" cmd=636F72656F732D696E7374616C6C657220696E7374616C6C202F6465762F736461202D2D69676E6974696F6E2D66696C65206578616D706C652E69676E202D2D696E736563757265202D2D696D6167652D66696C65202E2F6665646F72612D636F72656F732D33312E32303230303431352E6465762E302D6D6574616C2E7838365F36342E7261772E677A exe="/usr/bin/sudo" terminal=ttyS0 res=success'
[  671.050709] audit: type=1110 audit(1588024067.258:194): pid=1219 uid=0 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=localhost.localdomain addr=? terminal=/dev/ttyS0 res=success'
Copying image from ./fedora-core[  671.055157] audit: type=1105 audit(1588024067.259:195): pid=1219 uid=0 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe
="/usr/bin/sudo" hostname=localhost.localdomain addr=? terminal=/dev/ttyS0 res=success'
os-31.20200415.dev.0-metal.x86_64.raw.gz
Reading signature from ./fedora-coreos-31.20200415.dev.0-metal.x86_64.raw.gz.sig
Couldn't read signature file: No such file or directory (os error 2)
Signature not found; skipping verification as requested
> Read disk 712.8 MiB/712.8 MiB (100%)
[  713.522897] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  713.524261] GPT:5765119 != 41943039
[  713.525181] GPT:Alternate GPT header not at the end of the disk.
[  713.526378] GPT:5765119 != 41943039
[  713.526989] GPT: Use GNU Parted to correct GPT errors.
[  713.528026]  sda: sda1 sda2 sda3 sda4
[  713.765700] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts:
[  713.768073] ext4 filesystem being mounted at /tmp/coreos-installer-K6JNfW supports timestamps until 2038 (0x7fffffff)
Writing Ignition config
Install complete.
[  713.791893] audit: type=1106 audit(1588024110.006:196): pid=1219 uid=0 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_limits,pam_systemd,pam_unix acct="root" exe="/usr/bin/sudo" hostname=local
host.localdomain addr=? terminal=/dev/ttyS0 res=success'
[  713.798158] audit: type=1104 audit(1588024110.007:197): pid=1219 uid=0 auid=1000 ses=5 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_unix acct="root" exe="/usr/bin/sudo" hostname=localhost.localdomain addr=? terminal=/dev/ttyS0 res=success'
[  713.805239] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  713.806753] GPT:5765119 != 41943039
[  713.807544] GPT:Alternate GPT header not at the end of the disk.
[  713.808824] GPT:5765119 != 41943039
[  713.809562] GPT: Use GNU Parted to correct GPT errors.
[  713.810649]  sda: sda1 sda2 sda3 sda4
[core@localhost ~]$
```
@dustymabe
Copy link
Member Author

See also the first commit ( overlay: coreos-autologin-generator: update console log notes) where I update/clarify the comments around changing the kernel console debug logging.

@dustymabe
Copy link
Member Author

Preview:

coreos-installer

@dustymabe
Copy link
Member Author

hmm. from the screenshot it seems like the line continuation backslashes (\)aren't showing up. Will investigate.

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice! I like the idea of having a friendly welcome message in the live environment.

LGTM overall, just some minor nits.

@@ -32,12 +32,11 @@ ExecStart=-/sbin/agetty --autologin core -o '-p -f core' ${args} %I \$TERM
EOF
}

# We can remove this when we fix https://github.com/coreos/fedora-coreos-tracker/issues/220
silence_audit_on_console() {
mkdir -p /run/sysctl.d
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we lost this mkdir here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah - we should have cleaned it up in the other PR when we switched to /etc/ I can put it in a separate commit if that would be better.

--image-url https://example.com/image.raw.xz

You may configure networking via `sudo nmcli` or `sudo nmtui` and have
that configuration persist into an installed system by passing the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: s/an/the/ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


You may configure networking via `sudo nmcli` or `sudo nmtui` and have
that configuration persist into an installed system by passing the
`--copy-network` argument to `coreos-installer`. Please run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: coreos-installer install

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

that configuration persist into an installed system by passing the
`--copy-network` argument to `coreos-installer`. Please run
`coreos-installer install --help` for more information on the possible
options to `coreos-installer`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just "on the possible install options"? So we avoid repeating coreos-installer again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dustymabe
Copy link
Member Author

fixed

@imcleod
Copy link
Contributor

imcleod commented Apr 28, 2020

LGreatTM - The direct reference to install process in particular is a welcome addition. Cheers Dusty.

… live env

This issue.d will give the user some information about what is possible
to do in the interactive live environment, including some information
about installing to disk.
@dustymabe
Copy link
Member Author

thanks @imcleod @jlebon for the review!

@dustymabe dustymabe merged commit 6235773 into coreos:testing-devel Apr 28, 2020
@dustymabe dustymabe deleted the dusty-installer-etc-issue branch April 28, 2020 18:03
cat <<'EOF' > /etc/issue.d/80-interactive-live.issue

###########################################################################
Welcome to the Fedora CoreOS Live environment. This system is running
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. /usr/lib/os-release
echo "Welcome to ${PRETTY_NAME} Live ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't see this suggestion yesterday. Response over in #371 (comment)

install to disk via `coreos-installer`:

curl -O https://example.com/example.ign
sudo coreos-installer install /dev/sda \\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this as is but I think we also should link to upstream docs directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc links would be nice

dustymabe pushed a commit to jbtrystram/fedora-coreos-config that referenced this pull request Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants