grub-menulst2cfg
Convert GRUB Legacy menu.lst to GRUB2 cfg
SYNOPSIS
grub-menulst2cfg [OPTION...] [MENU_LST_FILE]
PARAMETERS
--output=FILE, -o FILE
Redirects the generated GRUB 2 configuration to FILE instead of standard output.
--id=ID, -i ID
Specifies a unique identifier for the converted menuentries, which can be useful in multi-boot scenarios.
--help, -h
Displays a help message and exits.
--version, -V
Prints the version information and exits.
DESCRIPTION
grub-menulst2cfg is a utility designed to aid in the migration from GRUB Legacy (version 0.9x) to the newer GRUB 2 bootloader. Its primary function is to convert a GRUB Legacy configuration file, typically named menu.lst, into a GRUB 2-compatible configuration file, grub.cfg.
GRUB Legacy and GRUB 2 use vastly different configuration syntaxes. While menu.lst uses a simpler, line-based format, grub.cfg is a more powerful, script-like language. This command attempts to translate the entries and settings from the older format to the new one, helping users adapt their existing boot configurations without having to manually rewrite them from scratch.
It's particularly useful when upgrading a system that previously used GRUB Legacy to a distribution that now defaults to GRUB 2, or when setting up a dual-boot environment where one OS might still rely on the older GRUB. However, due to the complexity and differences between the two GRUB versions, the conversion may not always be perfect, and manual review of the generated grub.cfg is often necessary to ensure all boot entries and options are correctly translated.
CAVEATS
This command is specific to converting configurations from the older GRUB Legacy to GRUB 2. It does not replace the primary GRUB 2 configuration generation tool, grub-mkconfig.
The conversion process is an approximation. Due to the significant differences in syntax and features between GRUB Legacy and GRUB 2, not all menu.lst constructs can be perfectly or automatically translated. Manual verification and potential adjustments of the resulting grub.cfg file are highly recommended to ensure correct boot behavior.
It's important to understand that this command only converts the configuration file; it does not install or update the GRUB bootloader itself.
INPUT AND OUTPUT
By default, grub-menulst2cfg reads its input from standard input (stdin) if no MENU_LST_FILE is specified, and writes the converted grub.cfg content to standard output (stdout). This allows for flexible piping and redirection of data. The --output option can be used to direct the output to a specific file.
HISTORY
The grub-menulst2cfg command emerged as part of the transition from GRUB Legacy (versions 0.9x) to GRUB 2 (versions 1.9x and newer), a significant rewrite of the GRUB bootloader. GRUB 2 introduced a modular design, a more powerful scripting language for configuration, and many new features, leading to a completely different configuration file format (grub.cfg) compared to GRUB Legacy's simpler menu.lst.
This utility was developed to ease the migration path for users and distributions. It provided a bridge, allowing existing GRUB Legacy configurations to be translated, albeit imperfectly, into the new GRUB 2 format, thus reducing the manual effort required to adapt to the new bootloader environment. Its relevance has diminished over time as GRUB 2 has become the standard, but it remains a useful tool for systems still transitioning or dealing with legacy setups.
SEE ALSO
grub-mkconfig(8), grub-install(8), grub(8), grub.cfg(5), menu.lst