Fedora Account System
Red Hat Associate
Red Hat Customer
sdubby is blocked when config_file is empty Reproducible: Always Steps to Reproduce: 1. grubby --update-kernel=ALL --args="rd.driver.blacklist=nouveau" 2. 3. Actual Results: Command is blocked Expected Results: It should update the bootargs as appropriate and handle cases to avoid blocking. Using bash -x on the command shows: ++ set -- --update-kernel ALL --args rd.driver.blacklist=nouveau -- + '[' 5 -gt 0 ']' + case "$1" in + info_kernel=ALL + shift 1 + shift + '[' 3 -gt 0 ']' + case "$1" in + modify_args=rd.driver.blacklist=nouveau + utilmode=add + shift 1 + shift + '[' 1 -gt 0 ']' + case "$1" in + shift + '[' 0 -gt 0 ']' + case "$utilmode" in ++ bootctl list ++ grep -B7 -A2 '.*linux:.*ALL' ++ grep '^.*source:' ++ cut -d: -f2- + config_file= + grep rd.driver.blacklist=nouveau bootctl list attached...
Side note, I need the --update-kernel=ALL options in compatibility with grubby Also it seems like the "ALL" in grep -B7 -A2 '... {ALL}' is bogus. But the info_kernel=ALL is appropriate...
Created attachment 2044532 [details] bootctl list
Hi, Your running this by hand, or there is a utility using grubby this way? The usage doc in updateloaderentries.sh is obviously wrong, because the "ALL" parameter actually only works with --info. This probably isn't hard to fix... But i'm asking the above because the goal with sdubby isn't 100% compatibility with grubby, but rather a shim for existing utilities/etc which are using grubby rather than updating bls files themselves or with some other utility. Since AFAIK the long term goal is to remove grubby too. For example adding a rd.driver.blacklist might be better done simply by updating the kernel parameters in /etc/kernel/cmdline and letting the systemd kernel install/update process set the bls entries rather than using grubby, or just using the utility in merge mode to update everything with the new cmdline options.
Right, because the other way to have the same effect should be without the --update-kernel= parameter. `grubby --args="rd.driver.blacklist=nouveau"` But like I mentioned it looks like just converting "ALL" to unset for add/remove is probably an easy fix.
See if this fixes it for you: https://src.fedoraproject.org/fork/jlinton/rpms/sdubby/blob/test_args_all/f/updateloaderentries.sh just replace the one on your filesystem with that one after backing up the existing file.
(In reply to Jeremy Linton from comment #4) > Right, because the other way to have the same effect should be without the > --update-kernel= parameter. > > `grubby --args="rd.driver.blacklist=nouveau"` It's looks relevant, but this doesn't work with the original grubby script. So I need to specify the --update-kernel=ALL argument there. This is in the context of nvidia packaging for rpmfusion. The fix in test_args_all works fine Hopefully this can be propagated to branches. Thanks.
I've built a rawhide version, and am going to dupe this against the earlier request to support =ALL *** This bug has been marked as a duplicate of bug 2271533 ***