From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040518 Firefox/0.8 Description of problem: Grubby has never worked for me, so I started wondering why. It always says: Unable to find a suitable template. That's because it's trying to --copy-default, and fails here: if (access(fullName, R_OK)) return 0; in function suitableImage in grubby.c ...which happens because fullName looks like this: /boot(hd0,0)/vmlinuz-2.6.6-1.403 which I assume access does not like. And here's the config entry I have for the default kernel: title Fedora Linux (2.6.6 Vanilla 403) root (hd0,6) kernel (hd0,0)/vmlinuz-2.6.6-1.403 ro selinux=0 enforcing=0 root=/dev/hda7 rootflags=quota initrd (hd0,0)/initrd-2.6.6-1.403.img It seems that grubby should resolve the device reference, mount it if not mounted, and not append /boot prefix everywhere.. Version-Release number of selected component (if applicable): mkinitrd-3.5.23-1 How reproducible: Always Steps to Reproduce: 1. Put device reference in default kernel path line 2. Run grubby 3. Additional info:
This is still broken and has been about 50 days since filed. Why? It doesn't seem hard to fix...
Accepting patches :) This isn't the default way we configure things and my todo list is on the long side. I'll hopefully get to it before FC3 is released, but it's not something I can really promise.
Should be fixed in mkinitrd-4.0.2
Great to hear that this has been resolved. Will there be a new RPM (or a patch) for those of us on RHEL using mkinitrd-3.5.13-1?
Still doesn't work AFAICS. RPM is mkinitrd-4.0.2-1 [root@cobra tmp]# /sbin/grubby --default-kernel [root@cobra tmp]# (btw this should print out a warning rather than just exit) with this entry: title Fedora Core (2.6.7-1.503) root (hd0,6) kernel (hd0,0)/vmlinuz-2.6.7-1.503 ro root=/dev/hda7 rootflags=quota selinux=1 enforcing=0 initrd (hd0,0)/initrd-2.6.7-1.503.img while it works fine with this entry: [root@cobra tmp]# /sbin/grubby --default-kernel /boot/vmlinuz-2.6.7-1.503 [root@cobra tmp]# title Fedora Core (2.6.7-1.503) root (hd0,0) kernel /vmlinuz-2.6.7-1.503 ro root=/dev/hda7 rootflags=quota selinux=1 enforcing=0 initrd /initrd-2.6.7-1.503.img ==============
By the way I realize now that the root directive is for internal grub use and not for setting the root fs, so I can use that to make it work, but that doesn't mean it's right the way it is... but I can see why it's low priority for you. I tried looking at the code some time ago but the bootPrefix stuff didn't make sense to me - it just gets ignored by most of the functions.
Added handling for --default-kernel bit.
That's good, but it still doesn't work. You can't --remove-kernel by path when prefixed with the device label. You can only remove it by "TITLE=". Since you can remove kernels by path when not prefixed, this is a bug.
Ok I'm happy (for now). Fixed.