GRUB 2 input settings have changed.
Generate the Debian-style output configuration at the specified path with grub-mkconfig.
Which command is correct?
grub-mkconfig generates configuration from inputs and detected systems. The -o option selects its output file.
Detailed explanation
grub-install -o /boot/grub/grub.cfgIncorrect. grub-install installs boot code and does not use -o this way for configuration generation.
Incorrect. grub-install installs boot code and does not use -o this way for configuration generation.
grub-mkconfig /boot/grub/grub.cfgIncorrect. The output path must be introduced with -o.
Incorrect. The output path must be introduced with -o.
grub-mkconfig -o /boot/grub/grub.cfgCorrect. It writes generated configuration to /boot/grub/grub.cfg.
Correct. It writes generated configuration to /boot/grub/grub.cfg.
grub-editenv -o /boot/grub/grub.cfgIncorrect. grub-editenv edits the environment block, not the generated menu file.
Incorrect. grub-editenv edits the environment block, not the generated menu file.
Try it yourself
An example you can run in a temporary verification environment.
grub-mkconfig --help 2>&1 | grep -E -- '--output|-o' || echo 'grub-mkconfig is not installed'Expected result
出力ファイル指定の説明、または未導入の表示Key points
- grub-mkconfig generates configuration
- -o sets the output path
- Verify the target before writing
Notes
- Environment: GRUB 2
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.