grub-menulst2cfg
Convert GRUB Legacy menu.lst to GRUB2 cfg
SYNOPSIS
grub-menulst2cfg [OPTION]... [MENU.LST]
PARAMETERS
-h, --help
display this help message and exit
-V, --version
print version information and exit
-o, --output=FILE
write output to FILE instead of stdout
--bash-completion
output bash completion script and exit
DESCRIPTION
grub-menulst2cfg is a utility in the GRUB2 package designed to convert boot menu configurations from the legacy GRUB (version 0.97 and earlier) menu.lst format to the modern GRUB2 grub.cfg format. It automates much of the migration process when upgrading bootloaders, translating old directives like title, root, kernel, and initrd into GRUB2's menuentry, linux, and initrdfs equivalents.
This tool outputs a functional grub.cfg snippet that can be integrated into a full GRUB2 configuration, saving time for users with complex custom entries. However, due to syntax differences, advanced features, or scripts in legacy configs, the output may need manual tweaks. It's commonly used during distro upgrades or manual GRUB2 installations on systems previously using GRUB Legacy.
CAVEATS
Conversion is approximate; complex legacy features like chainload or embedded scripts may require manual editing.
Always verify generated grub.cfg before booting.
Not intended as full grub-mkconfig replacement.
USAGE EXAMPLE
grub-menulst2cfg /boot/grub/menu.lst -o /tmp/grub.cfg
Integrate output into full /boot/grub/grub.cfg under menuentry blocks.
DEFAULT BEHAVIOR
If no MENU.LST specified, reads from /boot/grub/menu.lst.
Outputs to stdout for piping.
HISTORY
Introduced in GRUB2 (version 1.97+, circa 2009) by the GRUB development team to facilitate transition from GRUB Legacy (0.97), which used menu.lst. Evolved with minor enhancements in later GRUB2 releases for better compatibility.
SEE ALSO
grub-mkconfig(8), grub.cfg(5), grub-editenv(1), update-grub(8)


