[Solved] grub equivalent of append parameter in txt.cfg

Fang Asks: grub equivalent of append parameter in txt.cfg
We’re using a custom Ubuntu 20.04 and need to pass variables during boot. On 16.04, we were using ISOLINUX boot loader and our txt.cfg looked like this:

label m1
  menu label Install srv (SINGLE DISK)
  kernel /install/vmlinuz
  append auto file=/cdrom/preseed/srv_preseed _C=param1 _S=param2

param1 and param2 were then available as environment variables in the boot environment.

With Ubuntu 20.04 we then switched to UEFI and that made a change to grub necessary. Our grub.cfg looks like this:

menuentry "srv" {
                set gfxpayload=keep
                linux   /casper/vmlinuz _C=param1 "ds=nocloud;s=/cdrom/inst/" quiet autoinstall ---
                initrd  /casper/initrd

However, _C=param1 is not available in the boot environment.

What’s the correct way to pass these parameters? Is there anything else we’re missing?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.