You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Handle missing GRUB variables in /etc/default/grub gracefully (#711)
`updateDefaultGrubFileKernelCommandLineArgs()` hard-errors when a
variable like `GRUB_CMDLINE_LINUX` is missing from `/etc/default/grub`,
blocking all kernel command-line modifications (SELinux, verity, etc.)
on images that use `grub-mkconfig` but lack the file or variable.
The fix introduces a sentinel error `errDefaultGrubFileVarNotFound` and
a tolerant wrapper `getDefaultGrubFileLinuxArgsOrEmpty()` that treats a
missing variable as empty. `updateDefaultGrubFileKernelCommandLineArgs`,
`addExtraCommandLineToDefaultGrubFile` now uses this wrapper and
`UpdateDefaultGrubFileVariable` (which creates the variable if absent)
instead of `replaceDefaultGrubFileVarAssign` (which assumed it exists).
Behavior is unchanged when the variable is present.
0 commit comments