Cc: Peter Jones <pjones@xxxxxxxxxx> On 06/06/2014 09:59 AM, Junxiao Bi wrote: > When using the following command to add an initrd for the kernel. > grubby --update-kernel=/boot/vmlinuz-2.6.32-431.17.1.el6.x86_64.debug > --initrd /boot/initramfs-2.6.32-431.17.1.el6.x86_64.debug.img > --add-multiboot=/boot/tboot.gz > The multiboot image /boot/tboot.gz is used as the key to search the > configure entry in grub.conf, this is wrong. There may be other kernels > also configure multiboot with the same name tboot.gz, if their index are > smaller than the target one, then that will make the initrd added to the > wrong kernel. Fix it to use kernel name as the search key. > > Signed-off-by: Junxiao Bi <junxiao.bi@xxxxxxxxxx> > --- > grubby.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/grubby.c b/grubby.c > index 88a1f08..2d7ab62 100644 > --- a/grubby.c > +++ b/grubby.c > @@ -3309,7 +3309,7 @@ int addMBInitrd(struct grubConfig * cfg, const char *newMBKernel, > > if (!image) return 0; > > - for (; (entry = findEntryByPath(cfg, newMBKernel, prefix, &index)); index++) { > + for (; (entry = findEntryByPath(cfg, image, prefix, &index)); index++) { > kernelLine = getLineByType(LT_MBMODULE, entry->lines); > if (!kernelLine) continue; > _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list