On a Debian-style GRUB 2 system, inspect the generated configuration loaded as the boot menu.
Use the common path for the generated file.
Which file is the generated configuration?
/boot/grub/grub.cfg is GRUB 2's generated menu configuration. It should normally be regenerated rather than edited directly.
Detailed explanation
/etc/default/grubIncorrect. /etc/default/grub is an input file for generation, not the generated menu itself.
Incorrect. /etc/default/grub is an input file for generation, not the generated menu itself.
/boot/grub/grub.cfgCorrect. /boot/grub/grub.cfg is the generated GRUB 2 configuration on this layout.
Correct. /boot/grub/grub.cfg is the generated GRUB 2 configuration on this layout.
/etc/fstabIncorrect. /etc/fstab describes filesystem mounts.
Incorrect. /etc/fstab describes filesystem mounts.
/etc/inittabIncorrect. /etc/inittab is a SysVinit configuration file.
Incorrect. /etc/inittab is a SysVinit configuration file.
Try it yourself
An example you can run in a temporary verification environment.
test -r /boot/grub/grub.cfg && head -n 3 /boot/grub/grub.cfg || echo 'GRUB configuration is not exposed'Expected result
生成済みgrub.cfgの先頭、または最小環境で未表示の通知Key points
- grub.cfg is generated
- Avoid direct edits
- Paths vary by distribution
Notes
- Environment: GRUB 2 / Debian系パス
- 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.