want to change default suspend mode from s2idle to deep. I added mem_sleep_default=deep to GRUB_CMDLINE_LINUX in /etc/default/grub. How I can apply that to the grub.cfg? Should I run grub2-mkconfig?
If I try grub2-mkconfig it fails with:
/usr/bin/grub2-probe: error: failed to get canonical path of `composefs'.
What is the correct way on ublue system to change the default boot options?
You do not use any grub commands or edit your grub config for kernel parameters.
The most comfortable way to do this in my opinion:
rpm-ostree kargs –editor
this will put you in a text editor, when you are done you save and exit the file
# Current kernel arguments are shown below, and can be directly edited.
# Empty or commented lines (starting with '#') will be ignored.
# Individual kernel arguments should be separated by spaces, and the order
# is relevant.
# Also, please note that any changes to the 'ostree=' argument will not be
# effective as they are usually regenerated when bootconfig changes.
rd.luks.uuid=luks-f5b9747d-fb9d-475f-9f02-767dcf87cbcf rhgb quiet root=UUID=6835cf5f-2d0e-45f2-bbdb-6af1aec7447c rootflags=subvol=root rw addyourthing=here
here are all the available options:
➜ rpm-ostree kargs --help
Usage:
rpm-ostree kargs [OPTION…]
Query or modify kernel arguments
Help Options:
-h, --help Show help options
Application Options:
--stateroot=STATEROOT Operate on provided STATEROOT
--deploy-index=INDEX Modify the kernel args from a specific deployment based on index. Index is in the form of a number (e.g. 0 means the first deployment in the list)
--reboot Initiate a reboot after operation is complete
--append=KEY=VALUE Append kernel argument; useful with e.g. console= that can be used multiple times. empty value for an argument is allowed
--replace=KEY=VALUE=NEWVALUE Replace existing kernel argument, the user is also able to replace an argument with KEY=VALUE if only one value exist for that argument
--delete=KEY=VALUE Delete a specific kernel argument key/val pair or an entire argument with a single key/value pair
--append-if-missing=KEY=VALUE Like --append, but does nothing if the key is already present
--delete-if-present=KEY=VALUE Like --delete, but does nothing if the key is already missing
--unchanged-exit-77 If no kernel args changed, exit 77
--import-proc-cmdline Instead of modifying old kernel arguments, we modify args from current /proc/cmdline (the booted deployment)
--editor Use an editor to modify the kernel arguments
--lock-finalization Prevent automatic deployment finalization on shutdown
--sysroot=SYSROOT Use system root SYSROOT (default: /)
--peer Force a peer-to-peer connection instead of using the system message bus
--version Print version information and exit
-q, --quiet Avoid printing most informational messages
Thank you very much. That worked. I was first not sure, if rpm-ostree kargs is the correct way, because of the switch to bootc. But it seems updates with bootc are unaffected by the changes.