stages/grub2: set GRUB_CMDLINE_LINUX default
Set the "GRUB_CMDLINE_LINUX" variable in /etc/default/grub to the kernel command line options. This is used by `grub2-mkconfig` to assemble the full kernel command line when generating the menu entires. NB: `GRUB_CMDLINE_LINUX` does NOT include the root fs bits (`root=...`), since that is generated by grub2-mkconfig itself.
This commit is contained in:
parent
846b3274e3
commit
850ee4466f
1 changed files with 4 additions and 1 deletions
|
|
@ -388,7 +388,10 @@ def main(tree, options):
|
|||
if write_defaults:
|
||||
os.makedirs(f"{tree}/etc/default", exist_ok=True)
|
||||
with open(f"{tree}/etc/default/grub", "w") as default:
|
||||
default.write("GRUB_TIMEOUT=0\n"
|
||||
# NB: The "GRUB_CMDLINE_LINUX" variable contains the kernel command
|
||||
# line but without the `root=` part, thus we just use `kernel_opts`.
|
||||
default.write(f'GRUB_CMDLINE_LINUX="{kernel_opts}"\n'
|
||||
"GRUB_TIMEOUT=0\n"
|
||||
"GRUB_ENABLE_BLSCFG=true\n")
|
||||
|
||||
os.makedirs(f"{tree}/boot/grub2", exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue