Skip to content

Check for existing Mint GRUB snippet before using default GRUB#6

Open
ddimitrovv wants to merge 1 commit intolinuxmint:masterfrom
ddimitrovv:Use_Mint_GRUB_snippet_if_present_fallback_to_default_GRUB
Open

Check for existing Mint GRUB snippet before using default GRUB#6
ddimitrovv wants to merge 1 commit intolinuxmint:masterfrom
ddimitrovv:Use_Mint_GRUB_snippet_if_present_fallback_to_default_GRUB

Conversation

@ddimitrovv
Copy link

@ddimitrovv ddimitrovv commented Feb 6, 2026

Summary

Ensure the Boot Menu page correctly reflects existing GRUB settings
by preferring the Mint‑managed snippet /etc/default/grub.d/98_mintsysadm.cfg
and only falling back to /etc/default/grub when the snippet doesn’t exist.

Motivation

On systems upgraded from older Mint releases, the default /etc/default/grub
file contains valid GRUB settings, but the tool did not display them
because it only looked for the Mint snippet. This change improves UX
by making the Boot menu page reflect actual GRUB configuration.

Implementation

  • Add get_existing_grub_path() helper to choose the correct file.
  • Update get_boot_config() to use this choice.
  • No change to writing logic — only reading fallback behavior.

This ensures that mintsysadm reads the Mint-specific GRUB
configuration first (/etc/default/grub.d/98_mintsysadm.cfg),
falling back to the default GRUB file only if the snippet
does not exist. Improves consistency with actual system settings.
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.

1 participant