uki fixes for cc files (#608)

This commit is contained in:
Itxaka
2024-01-09 16:21:19 +01:00
committed by GitHub
parent 6396b1b362
commit 65f386da73
4 changed files with 11 additions and 7 deletions

View File

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

View File

@@ -22,7 +22,7 @@ stages:
# the boot stage.
- name: "Remove GRUB sentinels"
if: |
cat /proc/cmdline | grep -q "active.img"
cat /proc/cmdline | grep -q "active.img" && grep -vq "rd.immucore.uki" /proc/cmdline
commands:
- |
mount -o rw,remount /run/initramfs/cos-state
@@ -31,7 +31,7 @@ stages:
mount -o ro,remount /run/initramfs/cos-state
- name: "Create upgrade failure sentinel if necessary"
if: |
cat /proc/cmdline | grep -q "upgrade_failure"
cat /proc/cmdline | grep -q "upgrade_failure" && grep -vq "rd.immucore.uki" /proc/cmdline
files:
- path: /run/cos/upgrade_failure
content: "1"
@@ -44,6 +44,7 @@ stages:
- &statemount
name: "Mount state"
if: grep -vq "rd.immucore.uki" /proc/cmdline
commands:
- |
STATEDIR=/tmp/mnt/STATE
@@ -56,7 +57,7 @@ stages:
- &customhook
name: "Hook boot assessment grub configuration"
if: |
! grep -q "grub_boot_assessment" /tmp/mnt/STATE/grubcustom
! grep -q "grub_boot_assessment" /tmp/mnt/STATE/grubcustom && grep -vq "rd.immucore.uki" /proc/cmdline
commands:
- |
cat << 'EOF' >> /tmp/mnt/STATE/grubcustom
@@ -75,6 +76,7 @@ stages:
# This configuration is separated so it can be tracked separately from the install hook
- &bootgrub
name: "Add boot assessment grub configuration"
if: grep -vq "rd.immucore.uki" /proc/cmdline
files:
- path: "/tmp/mnt/STATE/grub_boot_assessment"
owner: 0
@@ -100,11 +102,12 @@ stages:
fi
- &grubinstall
name: "Grub branding"
if: '[ -e "/etc/kairos/branding/grubmenu.cfg" ]'
if: '[ -e "/etc/kairos/branding/grubmenu.cfg" ] && grep -vq "rd.immucore.uki" /proc/cmdline'
commands:
- cp -rfv /etc/kairos/branding/grubmenu.cfg /tmp/mnt/STATE/grubmenu
- &stateumount
name: "umount state"
if: grep -vq "rd.immucore.uki" /proc/cmdline
commands:
- umount /tmp/mnt/STATE
@@ -113,6 +116,7 @@ stages:
after-upgrade:
- <<: *statemount
- name: "Set upgrade sentinel"
if: grep -vq "rd.immucore.uki" /proc/cmdline
commands:
- |
grub2-editenv /tmp/mnt/STATE/boot_assessment set enable_boot_assessment=yes

View File

@@ -17,7 +17,7 @@ stages:
groups:
- "admin"
- name: "Set user password if running in live or uki"
if: "[ -e /run/cos/live_mode ] || [ -e /run/cos/uki_install_mode ] || [ -e /run/cos/uki_boot_mode ]"
if: "[ -e /run/cos/live_mode ] || [ -e /run/cos/uki_install_mode ]"
users:
kairos:
passwd: "kairos"

View File

@@ -3,7 +3,7 @@ stages:
initramfs:
- if: |
grep -qv "interactive-install" /proc/cmdline && \
[ -f /run/cos/live_mode ] && \
[ -f /run/cos/live_mode ] || [ -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