Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tuned fails to add realtime grub parameters when using alternate grub config on realtime kernel #528

Open
cement-cloud opened this issue May 3, 2023 · 1 comment

Comments

@cement-cloud
Copy link

cement-cloud commented May 3, 2023

OS: Ubuntu 22.04.2 LTS - 5.15.0-1037-realtime

Setup: Specify the cores to be isolated in the realtime-variables.conf profile, apply the profile with sudo tuned-adm profile realtime, confirm that the profile is the current active. Reboot, then run sudo cat /proc/cmdline which returns:

BOOT_IMAGE=/vmlinuz-5.15.0-1037-realtime root=/dev/mapper/ubuntu--vg-ubuntu--lv ro with none of the params from the realtime profile applied.

Based on the output it seems like this is related to grub version and the filepath for grub.cfg.

'2023-05-03 16:27:37,733 INFO     tuned.daemon.daemon: static tuning from profile 'realtime' applied
^C2023-05-03 16:28:32,819 INFO     tuned.daemon.controller: terminating controller
2023-05-03 16:28:32,819 INFO     tuned.daemon.daemon: stopping tuning
2023-05-03 16:28:32,825 INFO     tuned.daemon.daemon: terminating Tuned, rolling back all changes
2023-05-03 16:28:32,825 INFO     tuned.plugins.plugin_script: calling script '/usr/lib/tuned/realtime/script.sh' with arguments '['stop', 'full_rollback']'
2023-05-03 16:28:32,833 INFO     tuned.plugins.plugin_bootloader: removing grub2 tuning previously added by Tuned
2023-05-03 16:28:32,834 INFO     tuned.plugins.plugin_bootloader: cannot find grub.cfg to patch
2023-05-03 16:28:32,834 ERROR    tuned.utils.commands: Executing grub2-editenv error: [Errno 2] No such file or directory: 'grub2-editenv'
2023-05-03 16:28:32,834 WARNING  tuned.plugins.plugin_bootloader: cannot update grubenv: '

I know Ubuntu is using Grub2 but the directory is at /boot/grub, not grub2. I think tuned is using grub2-mkconfig -o /boot/grub2/grub.cfg which would require a different grub command AND a different path. Is there a known workaround for this?

@adriaan42
Copy link
Contributor

Similar things happen on Debian. There already is a proposed patch to find the correct config: #387

And then also the executable (grub-editenv instead of grub2-editenv): https://salsa.debian.org/debian/tuned/-/blob/debian/unstable/debian/patches/find-alternative-executable-for-grub2-editenv.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants