Bug 546134

Summary: appliance-creator gets the initramfs wrong when configuring grub
Product: [Fedora] Fedora Reporter: Wade Brainerd <wadetb>
Component: appliance-toolsAssignee: David Huff <dhuff>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dhuff, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-09 18:54:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wade Brainerd 2009-12-10 05:25:33 UTC
I'm using F11.   The kernel from @base uses an initramfs named like initramfs-<version>.rd.

When appliance-creator writes the grub configuration, it writes initrd-<version>.rd.  This causes the appliance to fail to boot.

The problem line is here:
http://git.et.redhat.com/?p=act.git;a=blob;f=appcreate/appliance.py;h=a6d3a4e04590ce179e01cefad90a18f5639efb4b;hb=HEAD#l234

Here is a patch which works around the issue, but I believe it will break users whose kernel uses a different naming scheme.  Is there a way to make this generic?  

--- /home/wadeb/appliance.py.orig	2009-12-09 23:39:25.267581292 -0500
+++ appliance.py	2009-12-09 23:40:34.171605565 -0500
@@ -231,7 +231,7 @@
             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/initrd-%s.img\n" % (prefix, v)
+            grub += "        initrd %s/initramfs-%s.img\n" % (prefix, v)
 
         logging.debug("Writing grub config %s/boot/grub/grub.conf" % self._instroot)
         cfg = open(self._instroot + "/boot/grub/grub.conf", "w")

Comment 1 David Huff 2009-12-10 14:43:06 UTC
Thanks for the report, I think the problem is that dracut introduced in F12 has a different naming scheme than the older mkinitrd. I will have to introduce some logic to test what version of mkinitrd was used.

I'll try to get to this next week when I plan on adding a couple of fixes to AC and doing a new build.

-D

Comment 2 David Huff 2010-02-09 18:54:47 UTC

*** This bug has been marked as a duplicate of bug 551469 ***