Description of problem: Update of kernel fails on Fedora 16 ppc64 Beta installation because /boot/etc/yaboot.conf image path does not start with a '/' Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Install Fedora 16 Beta ppc64 beta. 2. yum update 3. Actual results: Update does not alter /boot/etc/yaboot.conf. Expected results: Update does add new kernel to /boot/etc/yaboot.conf Additional info:
Snippets from a recreate attempt: ~]# yum update kernel.ppc64 Loaded plugins: langpacks, presto, refresh-packagekit Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package kernel.ppc64 0:3.1.5-6.fc16 will be installed --> Finished Dependency Resolution ... Setting up and reading Presto delta metadata kernel-3.1.5-6.fc16.ppc64.rpm | 27 MB 00:56 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID 10d90a9e: NOKEY Public key for kernel-3.1.5-6.fc16.ppc64.rpm is not installed Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-ppc64 ... Running Transaction Check Running Transaction Test Transaction Test Succeeded Running Transaction Installing : kernel-3.1.5-6.fc16.ppc64 1/1 grubby fatal error: unable to find a suitable template Installed: kernel.ppc64 0:3.1.5-6.fc16 Complete! And per inspection, the 3.1.5-6.fc16 kernel is _not_ added to yaboot.conf.
Enabled verbose, and dded a set -x ; set +x to /sbin/new-kernel-package to debug a bit deeper. Failing command looks like so: /sbin/new-kernel-pkg --package kernel --install 3.1.5-6.fc16.ppc64 initrdfile is /boot/initrd-3.1.5-6.fc16.ppc64.img making it the default based on config does not exist, not running grubby for grub 0.97 does not exist, not running grubby for grub 2 does not exist, not running grubby for grub 2 with UEFI adding 3.1.5-6.fc16.ppc64 to /etc/yaboot.conf + /sbin/grubby --add-kernel=/boot/vmlinuz-3.1.5-6.fc16.ppc64 --copy-default --make-default --title 3.1.5-6.fc16.ppc64 '--args=root=/dev/mapper/vg_9590145-lv_root ' --remove-kernel=TITLE=3.1.5-6.fc16.ppc64 --yaboot grubby fatal error: unable to find a suitable template + set +x running /sbin/ybin running grubby under strace shows: strace -e trace=file /sbin/grubby --add-kernel=/boot/vmlinuz-3.1.5-6.fc16.ppc64 --copy-default --make-default --title 3.1.5-6.fc16.ppc64 '--args=root=/dev/mapper/vg_9590145-lv_root ' --remove-kernel=TITLE=3.1.5-6.fc16.ppc64 --yaboot execve("/sbin/grubby", ["/sbin/grubby", "--add-kernel=/boot/vmlinuz-3.1.5"..., "--copy-default", "--make-default", "--title", "3.1.5-6.fc16.ppc64", "--args=root=/dev/mapper/vg_95901"..., "--remove-kernel=TITLE=3.1.5-6.fc"..., "--yaboot"], [/* 25 vars */]) = 0 [snip...] stat("/boot", {st_mode=S_IFDIR|0555, st_size=1024, ...}) = 0 open("/etc/yaboot.conf", O_RDONLY) = 3 access("/bootvmlinuz-3.1.0-7.fc16.ppc64", R_OK) = -1 ENOENT (No such file or directory) access("/bootvmlinuz-3.1.0-7.fc16.ppc64", R_OK) = -1 ENOENT (No such file or directory) grubby fatal error: unable to find a suitable template This access entry in particular looks bad: access("/bootvmlinuz-3.1.0-7.fc16.ppc64", R_OK) = -1 ENOENT (No such file or directory) looks like a "/" got lost on a strcat operation?
ha, I see the same grubby error on s390, will check the strace output ...
By the way, grubby now has a --debug flag for sorting these things out... Anyway, yes, the missing '/' is the problem. pjones has a patch that should land in grubby shortly.
Created attachment 556094 [details] Patch to test Here's a patch to test.
Created attachment 556362 [details] Better patch to test. Previous patch had a logic error; this one should work better.
grubby-8.10-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/grubby-8.10-1.fc17
Package grubby-8.10-1.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing grubby-8.10-1.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-3892/grubby-8.10-1.fc17 then log in and leave karma (feedback).
grubby-8.11-1.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/grubby-8.11-1.fc17
grubby-8.11-1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.