save_env

Command

save_env [--file file] var …

Save the named variables from the environment to the environment block file. See Environment block.

The --file option overrides the default location of the environment block.

This command will operate successfully even when environment variable check_signatures is set to enforce, since it writes to disk and does not alter the behavior of GRUB based on any contents of disk that have been read. It is possible to modify a digitally signed environment block file from within GRUB using this command, such that its signature will no longer be valid on subsequent boots. Care should be taken in such advanced configurations to avoid rendering the system un-bootable.