Skip to content

Enable automatic UKI cmdline detection with GRUB fallback - #9

Merged
GlitchSlayed merged 1 commit into
mainfrom
codex/ensure-uki-config-auto-detects-cmdline
Mar 8, 2026
Merged

GlitchSlayed merged 1 commit into
mainfrom
codex/ensure-uki-config-auto-detects-cmdline

Conversation

@GlitchSlayed

Copy link
Copy Markdown
Owner

Motivation

  • Make the setup usable out-of-the-box by auto-detecting a bootable kernel cmdline instead of requiring manual CMDLINE edits before first run.
  • Recover relevant boot parameters from existing system state or legacy GRUB configuration when the running environment can provide them.
  • Keep a manual CMDLINE as a safe fallback and only prompt the user when autodetection is intentionally disabled and the placeholder remains.

Description

  • Default AUTO_DETECT_CMDLINE is now 1 and CMDLINE was changed to a clear fallback placeholder root=UUID=REPLACE-ME rw quiet rhgb.
  • Added sanitize_cmdline, read_grub_cmdline, and get_effective_cmdline logic that resolve the kernel cmdline in order from /proc/cmdline, /etc/kernel/cmdline, and GRUB_CMDLINE_LINUX in /etc/default/grub or /etc/default/grub.d/*.cfg, then fall back to CMDLINE if nothing bootable is found, and this is used when building the UKI.
  • The same detection/fallback behavior is injected into the generated /usr/local/sbin/uki-build.sh template so automated kernel-install hooks reuse the same resolution logic.
  • Updated the Phase 6 prompt to only warn when autodetect is disabled and the CMDLINE placeholder remains, and updated README.md to document the new defaults and detection order.

Testing

  • Ran bash -n uki-setup.sh tests/test_uki_setup.sh with no syntax errors reported.
  • Ran bash tests/test_uki_setup.sh and the repository test suite completed successfully.
  • Attempted shellcheck -P . uki-setup.sh tests/test_uki_setup.sh but shellcheck was not available in the environment (command not found).

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@GlitchSlayed
GlitchSlayed merged commit df770b0 into main Mar 8, 2026
0 of 2 checks passed
@GlitchSlayed GlitchSlayed mentioned this pull request Mar 15, 2026
@GlitchSlayed
GlitchSlayed deleted the codex/ensure-uki-config-auto-detects-cmdline branch March 19, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant