On various clouds, systems may be built from snapshots from different
machines. The result is BLS entries from the old system that do not
correspond to anything on the new system. When grubby is used to sort
or update or set a particular entry as the default, it may set too
high an index for the entry, which then fails to boot.
Use the machine-id to only list and manipulate entries that correspond
to the machine.
When updating args for ALL kernels, grubby clobbers all variables
in /etc/default/grub that start with GRUB_CMDLINE_LINUX and renders
that line multiple times, for each variable that exists. This breaks
using recovery mode. Fix so this doesn't happen anymore.
Resolves: #RHEL-12853
Signed-off-by: Marta Lewandowska <mlewando@redhat.com>
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>
Fix so that --args are not passed by default if copy-default is not used.
Set root when --args are passed without copy-default.
Resolves: #1900829
Signed-off-by: Marta Lewandowska <mlewando@redhat.com>
Signed-off-by: Nicolas Frayer <nfrayer@redhat.com>