grub-script-check
validate GRUB configuration script syntax
TLDR
Check a GRUB script file for syntax errors
SYNOPSIS
grub-script-check [options] [file]
DESCRIPTION
grub-script-check validates GRUB configuration scripts for syntax errors. It parses the GRUB scripting language used in configuration files like grub.cfg and reports any syntax problems.
If no file path is provided, the tool reads from standard input. This is useful for validating generated configurations or testing script fragments before deployment.
PARAMETERS
-v, --verbose
Display each line of input after reading it--help
Display help message--version
Display version information
CAVEATS
Only checks syntax, not semantic correctness. Valid syntax doesn't guarantee the configuration will boot properly. Cannot verify that referenced files or modules exist.
HISTORY
grub-script-check is part of GRUB 2, providing validation for GRUB's configuration scripting language. The scripting capability was introduced in GRUB 2 to replace the simpler configuration format of GRUB Legacy.
SEE ALSO
grub-mkconfig(8), grub-install(8), update-grub(8)
