Load stock kernel rather than a custom kernel lxcdevel
authorSapan Bhatia <gwsapan@gmail.com>
Fri, 17 Feb 2012 19:13:05 +0000 (14:13 -0500)
committerSapan Bhatia <gwsapan@gmail.com>
Fri, 17 Feb 2012 19:13:05 +0000 (14:13 -0500)
source/steps/ChainBootNode.py
source/steps/ValidateNodeInstall.py

index 119593c..f125364 100644 (file)
@@ -151,8 +151,10 @@ def Run( vars, log ):
         option = 'smp'
 
     log.write( "Copying kernel and initrd for booting.\n" )
-    utils.sysexec( "cp %s/boot/kernel-boot%s /tmp/kernel" % (SYSIMG_PATH,option), log )
-    utils.sysexec( "cp %s/boot/initrd-boot%s /tmp/initrd" % (SYSIMG_PATH,option), log )
+    kversion = os.popen('rpm -r /tmp/mnt/sysimg -qa kernel | tail -1 | cut -c 8-').read().rstrip()
+
+    utils.sysexec( "cp %s/boot/vmlinuz-%s /tmp/kernel" % (SYSIMG_PATH,kversion), log )
+    utils.sysexec( "cp %s/boot/initramfs-%s.img /tmp/initrd" % (SYSIMG_PATH,kversion), log )
 
     BootAPI.save(vars)
 
index 49ce35b..5f63598 100644 (file)
@@ -137,7 +137,8 @@ def Run( vars, log ):
     # these 2 links are created by our kernel's post-install scriplet
     log.write("Checking for a custom kernel\n")
     try:
-        os.stat("%s/boot/kernel-boot" % SYSIMG_PATH)
+        kversion = os.popen('rpm -r /tmp/mnt/sysimg -qa kernel | tail -1 | cut -c 8-').read().rstrip()
+        os.stat("%s/boot/vmlinuz-%s" % (SYSIMG_PATH,kversion))
     except OSError, e:            
         log.write( "Couldn't locate base kernel (you might be using the stock kernel).\n")
         return -3