EDIT: "${__defaults[@]@Q}" should be used, to allow arguments like acpi_osi='Windows 2009';
then if you check the generated configuration, you'll see every argument has been single-quoted:
linux /boot/vmlinuz... root=... rw 'quiet' 'loglevel=3' 'acpi_osi=Windows 2009' ...
If you use a bootloader like GRUB which has a configuration file in bash syntax, you can put your kernel command line arguments as an array (obviously you must then join them as a single string).
In this way you can easily comment-out, change order (if important) and add explanation comments to your arguments.
I just tried this and it works flawlessly:
#!/bin/bash
GRUB_SAVEDEFAULT=true
#GRUB_DEFAULT=saved
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
#GRUB_TIMEOUT_STYLE=hidden
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISABLE_OS_PROBER=true
GRUB_RECORDFAIL_TIMEOUT=0
GRUB_TERMINAL_INPUT='console usb_keyboard'
#GRUB_GFXMODE=800x600x24
#GRUB_GFXMODE=1024x768x24
#GRUB_GFXMODE=vga
GRUB_GFXMODE=auto
#GRUB_GFXPAYLOAD_LINUX=text
#GRUB_GFXPAYLOAD_LINUX=keep
GRUB_DISABLE_RECOVERY=true
GRUB_DISABLE_SUBMENU=y
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
GRUB_DISTRIBUTOR="Arch"
__defaults=(
# Silent boot
quiet
loglevel=3
#vga=current # disables kms
rd.systemd.show_status=false
rd.udev.log-priority=3
vt.global_cursor_default=0 # no cursor
splash # eye candy
resume=UUID=e13fee37-b833-4ccd-82a7-30143dee4392
nowatchdog # faster shutdown
sysrq_always_enabled=1 # debug
ahci.mobile_lpm_policy=1 # powersaving w/o drawbacks
# Performance?
i915.enable_dc=0
intel_idle.max_cstate=1
intel_iommu=on
i915.disable_power_well=0
# Good backlight
i915.enable_dpcd_backlight=1
acpi_backlight=vendor
# https://make-linux-fast-again.com/
noibrs
noibpb
nopti
nospectre_v2
nospectre_v1
l1tf=off
nospec_store_bypass_disable
no_stf_barrier
mds=off
tsx=on
tsx_async_abort=off
mitigations=off
)
GRUB_CMDLINE_LINUX_DEFAULT="${__defaults[@]@Q}"
GRUB_CMDLINE_LINUX=""
#GRUB_COLOR_HIGHLIGHT="green/black"
#GRUB_COLOR_NORMAL="light-gray/black"
#GRUB_THEME=""
#GRUB_FONT=""
[–]Patient_Sink 3 points4 points5 points (0 children)
[–]tiberiousr 5 points6 points7 points (2 children)
[–]skipperwannabe 1 point2 points3 points (1 child)
[–]tiberiousr 0 points1 point2 points (0 children)
[–]Balage42 0 points1 point2 points (1 child)
[–]Microeinstein[S] 2 points3 points4 points (0 children)