Description of problem: I found a bug in appliance-creator, exactly in appcreate/appliance.py, line 234: 230 for v in versions: 231 grub += "title %s (%s)\n" % (self.name, v) 232 grub += " root (hd0,%d)\n" % bootdevnum 233 grub += " kernel %s/vmlinuz-%s ro root=%s %s\n" % (prefix, v, rootdev, options) 234 grub += " initrd %s/initrd-%s.img\n" % (prefix, v) 235 236 logging.debug("Writing grub config %s/boot/grub/grub.conf" % self._instroot) 237 cfg = open(self._instroot + "/boot/grub/grub.conf", "w") 238 cfg.write(grub) 239 cfg.close() Fedora 12 is using dracut to generate initrd files and initrd is a wrong name for those files from now. The new name is initramfs, so line 234 should look like: 234 grub += " initrd %s/initramfs-%s.img\n" % (prefix, v) Version-Release number of selected component (if applicable): [oddthesis@lolek-f12 cirras]$ rpm -q appliance-tools appliance-tools-004.4-3.fc12.noarch How reproducible: Always.
One thought: Fixing this is not simple as changing only line 234. We should use "initramfs" only for Fedora in version 12 or higher, in other cases use "initrd".
Maybe we should check what ramdisk is installed? --- appliance.py.orig 2010-01-02 09:40:03.373786038 +0100 +++ appliance.py 2010-01-02 09:58:38.482721695 +0100 @@ -227,11 +227,16 @@ for version in kernels[kernel]: versions.append(version) + if int(os.system("ls " + self._instroot + "/boot/initramfs* 2> /dev/null | wc -l")) > 0: + initrd = "initramfs" + else: + initrd = "initrd" + for v in versions: grub += "title %s (%s)\n" % (self.name, v) grub += " root (hd0,%d)\n" % bootdevnum grub += " kernel %s/vmlinuz-%s ro root=%s %s\n" % (prefix, v, rootdev, options) - grub += " initrd %s/initramfs-%s.img\n" % (prefix, v) + grub += " initrd %s/%s-%s.img\n" % (prefix, initrd, v) logging.debug("Writing grub config %s/boot/grub/grub.conf" % self._instroot) cfg = open(self._instroot + "/boot/grub/grub.conf", "w")
Scratch my above comment (I'm not a Python programmer), check out this one: --- appliance.py.orig 2010-01-02 09:40:03.373786038 +0100 +++ appliance.py 2010-01-02 11:22:44.204771295 +0100 @@ -227,11 +227,16 @@ for version in kernels[kernel]: versions.append(version) + if int(subprocess.Popen("ls " + self._instroot + "/boot/initramfs* | wc -l", shell=True, stdout=subprocess.PIPE).communicate()[0].strip()) > 0: + initrd = "initramfs" + else: + initrd = "initrd" + for v in versions: grub += "title %s (%s)\n" % (self.name, v) grub += " root (hd0,%d)\n" % bootdevnum grub += " kernel %s/vmlinuz-%s ro root=%s %s\n" % (prefix, v, rootdev, options) - grub += " initrd %s/initramfs-%s.img\n" % (prefix, v) + grub += " initrd %s/%s-%s.img\n" % (prefix, initrd, v) logging.debug("Writing grub config %s/boot/grub/grub.conf" % self._instroot) cfg = open(self._instroot + "/boot/grub/grub.conf", "w")
*** Bug 546134 has been marked as a duplicate of this bug. ***
committed: http://git.fedorahosted.org/git/?p=appliance-tools.git;a=commit;h=fefab1b2475fce7ec1c9af54dceb7798e4024c5c
appliance-tools-004.5-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/appliance-tools-004.5-1.fc12
appliance-tools-004.5-1.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update appliance-tools'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1777
appliance-tools-004.5-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.