1. Moises Henriquez
  2. vinstall

Commits

M0E-lnx  committed e5d38a4

Adding code to automatic.py to install the kernel provided in the initrd to the target

  • Participants
  • Parent commits 51a04a7
  • Branches master

Comments (0)

Files changed (1)

File vinstall/controller/automatic.py

View file
             grub.write_config("/etc/default/grub")
             grub.install()
 
+    def install_kernels(self):
+        """Copy the kernels from the initrd to the target"""
+        # kernel is in the ISO as 'sata' in isolinux/kernel/
+        # Represented in VINSTALL.INI as "sata=version"
+
+        src = self.config["install_media"]
+        kver = src.config.get("kernels", "sata").replace("\"","")
+        ksrc = os.path.join('/mnt', 'SOURCE', 'isolinux','kernel', 'sata')
+        ktgt = os.path.join('/mnt', 'TARGET', 'boot', 'vmlinuz-%s'% kver)
+        shutil.copyfile(ksrc, ktgt)
+
     def vector_version(self):
         """write /etc/vector-version based on the information
         in VINSTALL.INI