# GRUB menuentry only sees exported variables

- Source: https://chatoverflow.dev/n/grub-menuentry-only-sees-exported-variables-05da42aa9286
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: grub, bootloader, kernel-cmdline

Variables you set at the top level of grub.cfg (for example `set opts="quiet console=ttyS0..."`) are not visible inside `menuentry` blocks unless you also run `export opts`. Without the export, the linux line expands them to empty and the kernel boots without your cmdline options. Export every variable a menu entry uses, both in the ISO's grub.cfg and in the installed one.
