Exemple #1
0
 def _generate_new_iso(self):
     """
     Method to create a new ISO based on the modified CD/DVD.
     """
     self.log.debug("Generating new ISO")
     # NOTE: Windows 2008 is very picky about which arguments to genisoimage
     # will generate a bootable CD, so modify these at your own risk
     subprocess_check_output(
         [
             "genisoimage",
             "-b",
             "cdboot/boot.bin",
             "-no-emul-boot",
             "-c",
             "BOOT.CAT",
             "-iso-level",
             "2",
             "-J",
             "-l",
             "-D",
             "-N",
             "-joliet-long",
             "-relaxed-filenames",
             "-v",
             "-v",
             "-V",
             "Custom",
             "-udf",
             "-o",
             self.output_iso,
             self.iso_contents,
         ]
     )
Exemple #2
0
 def _generate_new_iso(self):
     """
     Method to create a new ISO based on the modified CD/DVD.
     """
     self.log.debug("Generating new ISO")
     subprocess_check_output(
         [
             "genisoimage",
             "-b",
             "cdboot/boot.bin",
             "-no-emul-boot",
             "-boot-load-seg",
             "1984",
             "-boot-load-size",
             "4",
             "-iso-level",
             "2",
             "-J",
             "-l",
             "-D",
             "-N",
             "-joliet-long",
             "-relaxed-filenames",
             "-v",
             "-v",
             "-V",
             "Custom",
             "-o",
             self.output_iso,
             self.iso_contents,
         ]
     )
Exemple #3
0
 def _generate_new_iso(self):
     """
     Method to create a new ISO based on the modified CD/DVD.
     """
     self.log.info("Generating new ISO")
     subprocess_check_output(["genisoimage", "-r", "-V", "Custom",
                             "-J", "-cache-inodes",
                             "-b", "Boot/cdrom.img",
                             "-c", "Boot/boot.cat",
                             "-v", "-v", "-o", self.output_iso,
                             self.iso_contents])
Exemple #4
0
 def _generate_new_iso(self):
     """
     Method to create a new ISO based on the modified CD/DVD.
     """
     self.log.info("Generating new ISO")
     subprocess_check_output(["genisoimage", "-r", "-V", "Custom",
                              "-J", "-l", "-no-emul-boot",
                              "-b", "isolinux/isolinux.bin",
                              "-c", "isolinux/boot.cat",
                              "-boot-load-size", "4",
                              "-cache-inodes", "-boot-info-table",
                              "-v", "-v", "-o", self.output_iso,
                              self.iso_contents])
Exemple #5
0
 def _generate_new_iso(self):
     """
     Method to create a new ISO based on the modified CD/DVD.
     """
     self.log.info("Generating new ISO")
     subprocess_check_output(["genisoimage", "-r", "-V", "Custom",
                              "-J", "-no-emul-boot",
                              "-b", "boot/" + self.tdl.arch + "/loader/isolinux.bin",
                              "-c", "boot/" + self.tdl.arch + "/loader/boot.cat",
                              "-boot-load-size", "4",
                              "-boot-info-table", "-graft-points",
                              "-iso-level", "4", "-pad",
                              "-allow-leading-dots", "-l",
                              "-o", self.output_iso,
                              self.iso_contents])
Exemple #6
0
    def _generate_new_iso(self):
        """
        Method to create a new ISO based on the modified CD/DVD.
        """
        self.log.info("Generating new ISO")

        isolinuxdir = ""
        if self.tdl.update in ["2007.0", "2008.0"]:
            isolinuxdir = self.mandriva_arch

        isolinuxbin = join(isolinuxdir, "isolinux/isolinux.bin")
        isolinuxboot = join(isolinuxdir, "isolinux/boot.cat")

        subprocess_check_output(["genisoimage", "-r", "-V", "Custom",
                                 "-J", "-l", "-no-emul-boot",
                                 "-b", isolinuxbin,
                                 "-c", isolinuxboot,
                                 "-boot-load-size", "4",
                                 "-cache-inodes", "-boot-info-table",
                                 "-v", "-v", "-o", self.output_iso,
                                 self.iso_contents])
Exemple #7
0
    def _modify_iso(self):
        """
        Method to make the boot ISO auto-boot with appropriate parameters.
        """
        self.log.debug("Modifying ISO")

        outname = join(self.iso_contents, "auto_inst.cfg")
        if self.auto == generate_full_auto_path("mandrake-" + self.tdl.update + "-jeos.cfg"):

            def _cfg_sub(line):
                """
                Method that is called back from oz.ozutil.copy_modify_file() to
                modify preseed files as appropriate for Mandrake.
                """
                if re.search("'password' =>", line):
                    return "			'password' => '" + self.rootpw + "',\n"
                else:
                    return line

            copy_modify_file(self.auto, outname, _cfg_sub)
        else:
            shutil.copy(self.auto, outname)

        syslinux = join(self.icicle_tmp, 'syslinux.cfg')
        with open(syslinux, 'w') as f:
            f.write("""\
default customiso
timeout 1
prompt 0
label customiso
  kernel vmlinuz
  append initrd=cdrom.rdz ramdisk_size=32000 root=/dev/ram3 automatic=method:cdrom vga=788 auto_install=auto_inst.cfg
""")

        cdromimg = join(self.iso_contents, "Boot", "cdrom.img")
        subprocess_check_output(["mcopy", "-n", "-o", "-i", cdromimg, syslinux, "::SYSLINUX.CFG"])