Commits

Rodrigo Bistolfi  committed 33295cf

Run depmod before bootloader

  • Participants
  • Parent commits acb3e2f

Comments (0)

Files changed (2)

File vinstall/controller/automatic.py

         """
         grub = bootloader.Grub2(target=disk.path())
         with utils.Chroot("/mnt/TARGET"):
+            self.depmod()
             self.mkinitrd()
             grub.backup_config()
             grub.install()
             # initrd not supported
             LOG.info("Initrd not supported: %s", e)
 
+    def depmod(self):
+        command = "depmod -a"
+        sp.call(command.split())
+
     def install_kernels(self):
         """Copy the kernels from the initrd to the target"""
         src = self.config["install_media"]

File vinstall/controller/bootloader.py

         for system in bootloader.OperatingSystem.all():
             lilo.add_os(system)
         with utils.Chroot("/mnt/TARGET"):
+            self.depmod()
             self.mkinitrd()
             lilo.backup_config()
             lilo.write_config()
         LOG.debug("Installing Grub2 to %s", target)
         grub2 = bootloader.Grub2(target)
         with utils.Chroot("/mnt/TARGET"):
+            self.depmod()
             self.mkinitrd()
             grub2.backup_config()
             grub2.install()
             # initrd not supported
             LOG.info("Initrd not supported: %s", e)
 
+    def depmod(self):
+        command = "depmod -a"
+        sp.call(command.split())
+
     def set_bind_mounts(self):
         """Bind mount some paths into the target.
         Later steps will need this when we chroot there