More fixes for uki (#455)

This commit is contained in:
Itxaka 2023-09-25 21:47:14 +02:00 committed by GitHub
parent 11862509a5
commit c85141e7d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 13 deletions

View File

@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.0.11"
version: "1.0.12"

View File

@ -12,7 +12,7 @@ stages:
if: '[ ! -e "/sbin/systemctl" ] && [ ! -e "/usr/bin/systemctl" ] && [ ! -e "/usr/sbin/systemctl" ] && [ ! -e "/usr/bin/systemctl" ]'
commands:
- mount bpffs -o rw,nosuid,nodev,noexec,relatime,mode=700 /sys/fs/bpf -t bpf
- if: '[ ! -f "/run/cos/recovery_mode" ] && [ ! -e "/run/cos/uki_boot_mode" ] || [ ! -e "/run/cos/uki_install_mode" ]'
- if: '[ -e "/run/cos/active_mode" ] || [ -e "/run/cos/passive_mode" ]'
name: "Layout configuration for active/passive mode"
environment_file: /run/cos/cos-layout.env
environment:
@ -51,7 +51,7 @@ stages:
/usr/share/pki/trust/anchors
/var/lib/ca-certificates
PERSISTENT_STATE_BIND: "true"
- if: '[ -f "/run/cos/recovery_mode" ]'
- if: '[ -e "/run/cos/recovery_mode" ]'
# omit the persistent partition on recovery mode
name: "Layout configuration for recovery mode"
environment_file: /run/cos/cos-layout.env
@ -94,7 +94,7 @@ stages:
/var/lib/ca-certificates
PERSISTENT_STATE_BIND: "true"
rootfs.after:
- if: '[ -r /run/cos/custom-layout.env ] && [ ! -f "/run/cos/recovery_mode" ] && [ ! -f /run/cos/live_mode ]'
- if: '[ -r /run/cos/custom-layout.env ] && [ ! -f "/run/cos/recovery_mode" ] && [ ! -f /run/cos/live_mode ] && [ ! -f /run/cos/uki_install_mode]'
name: "add custom bind and ephemeral mounts to /run/cos/cos-layout.env"
commands:
- |
@ -110,14 +110,6 @@ stages:
echo RW_PATHS=\"${RW_PATHS}\" >> /run/cos/cos-layout.env
echo "# persistent state paths with user ephemeral mounts" >> /run/cos/cos-layout.env
echo PERSISTENT_STATE_PATHS=\"${PERSISTENT_STATE_PATHS}\" >> /run/cos/cos-layout.env
- if: '[ ! -f /run/cos/recovery_mode ] && [ ! -f /run/cos/live_mode ]'
name: "Grow persistent"
layout:
device:
label: COS_PERSISTENT
expand_partition:
# Size 0 is required to specify all remaining space
size: 0
initramfs:
- name: "Create journalctl /var/log/journal dir"
if: '[ -e "/sbin/systemctl" ] || [ -e "/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'

View File

@ -1,7 +1,8 @@
name: "Root autologin"
stages:
initramfs:
- if: |
- name: "Autologin for live mode"
if: |
[ ! $(cat /proc/cmdline | grep -q "interactive-install") ] && \
[ -f /run/cos/live_mode ] && \
( [ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] )
@ -18,3 +19,18 @@ stages:
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
permissions: 0644
- name: "Autologin for UKI install medium"
if: '[ -f "/run/cos/uki_install_mode" ] && ( [ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] )'
files:
- path: /etc/systemd/system/serial-getty@ttyS0.service.d/override.conf
content: |
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
permissions: 0644
- path: /etc/systemd/system/getty@tty1.service.d/override.conf
content: |
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM
permissions: 0644