CN109165023B - Method, device and equipment for modifying ISO (International organization for standardization) mirror image file - Google Patents

Method, device and equipment for modifying ISO (International organization for standardization) mirror image file Download PDF

Info

Publication number
CN109165023B
CN109165023B CN201810808820.1A CN201810808820A CN109165023B CN 109165023 B CN109165023 B CN 109165023B CN 201810808820 A CN201810808820 A CN 201810808820A CN 109165023 B CN109165023 B CN 109165023B
Authority
CN
China
Prior art keywords
file
mirror image
iso
modifying
image file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810808820.1A
Other languages
Chinese (zh)
Other versions
CN109165023A (en
Inventor
孙海龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
New H3C Information Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Information Technologies Co Ltd filed Critical New H3C Information Technologies Co Ltd
Priority to CN201810808820.1A priority Critical patent/CN109165023B/en
Publication of CN109165023A publication Critical patent/CN109165023A/en
Application granted granted Critical
Publication of CN109165023B publication Critical patent/CN109165023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order

Abstract

The disclosure provides a method, a device and equipment for modifying an ISO (International organization for standardization) image file, belonging to the technical field of operating systems. According to the method, the device and the equipment for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function can be obtained only by modifying the target ISO mirror image file, and the ISO mirror image file does not need to be packaged and manufactured again, so that the processing speed can be increased. Meanwhile, compared with the prior art, a temporary directory does not need to be generated, so that the storage space is saved.

Description

Method, device and equipment for modifying ISO (International organization for standardization) mirror image file
Technical Field
The present disclosure relates to the field of operating system technologies, and in particular, to a method, an apparatus, and a device for modifying an ISO image.
Background
Currently, the installation images provided by the operating system are files of ISO (International Organization for Standardization) type, and in this document, ISO is an image file format specified by the International Organization for Standardization. Normally, when the operating system is installed by directly using the ISO image, the user is required to input some necessary information, such as selecting a language, a time zone, selecting a disk, setting a user name and a password. In order to install the operating system more conveniently, the ISO image file needs to be customized and modified so as to have the function of automatic installation. The modification method comprises the following steps: adding an automatic response file in the original ISO image file, and simultaneously adding corresponding parameters in a Bootloader (boot) configuration file in the original ISO image file so as to use the automatic response file when installing an operating system.
Disclosure of Invention
In view of this, an object of the present disclosure is to provide a method, an apparatus, and a device for modifying an ISO image, which can improve processing speed and save storage space.
In order to achieve the above purpose, the technical scheme adopted by the disclosure is as follows:
in a first aspect, the present disclosure provides a method for modifying an ISO image, which is applied to a device for producing the ISO image, and the method includes:
storing an automatic response file corresponding to a target ISO mirror image file to a first area of a system reserved area of the target ISO mirror image file;
modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file;
storing the modified boot configuration file to a second area of the system reserved area;
modifying parameters in the corresponding file description structure according to the file sizes and the initial positions of the automatic response file and the modified guide configuration file respectively to obtain an ISO mirror image file with an automatic response function; the file description structure is used for recording the size parameter of the file and the starting position parameter of the file.
In a second aspect, the present disclosure provides an apparatus for modifying an ISO image, which is applied to a device for producing the ISO image, and includes:
the system comprises a first storage module, a second storage module and a third storage module, wherein the first storage module is used for storing an automatic response file of a target ISO mirror image file to a first area of a system reserved area of the target ISO mirror image file;
the configuration file modification module is used for modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file;
the second storage module is used for storing the modified boot configuration file to a second area of the system reserved area;
the parameter modification module is used for modifying parameters in the corresponding file description structure according to the file sizes and the initial positions of the automatic response file and the modified guide configuration file respectively to obtain an ISO mirror image file with an automatic response function; the file description structure is used for recording the size parameter of the file and the starting position parameter of the file.
In a third aspect, the present disclosure provides an apparatus for modifying an ISO image, including a processor and a memory connected to the processor; the memory stores machine executable instructions executable by the processor to perform the method of the first aspect.
In a fourth aspect, the present disclosure provides a machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to carry out the method of the first aspect.
According to the method, the device and the equipment for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function can be obtained only by modifying the target ISO mirror image file, and the ISO mirror image file does not need to be packaged and manufactured again, so that the processing speed can be increased. Meanwhile, compared with the prior art, a temporary directory does not need to be generated, so that the storage space is saved.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for modifying an ISO image according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another method for modifying an ISO image provided by an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a target ISO mirror used in embodiments of the present disclosure;
FIG. 4 is a schematic structural diagram of an ISO mirror image file with an automatic response function modified by the method provided by the embodiment of the present disclosure;
fig. 5 is a block diagram illustrating a structure of an apparatus for modifying an ISO image according to an embodiment of the present disclosure;
FIG. 6 is a block diagram of another apparatus for modifying an ISO mirror according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a device for modifying an ISO image according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
At present, the production of an ISO image with an automatic installation function generally includes the following steps: extracting the content in the original ISO file to a temporary directory; putting the automatic response file into the temporary directory, and modifying the Bootloader configuration file under the temporary directory; and repackaging the content under the temporary directory to manufacture a new ISO mirror image file. The process of extracting and analyzing the ISO mirror image file and repackaging the ISO mirror image file is slow, and the temporary directory occupies extra space. Based on the method, the device and the equipment, the method, the device and the equipment for modifying the ISO image file are provided. The following first provides a detailed description of a method for modifying an ISO image according to an embodiment of the present disclosure.
Fig. 1 shows a flowchart of a method for modifying an ISO image according to an embodiment of the present disclosure. The method is applied to equipment for manufacturing the ISO image file, such as equipment of a computer or a server. As shown in fig. 1, the method comprises the steps of:
step S102, storing the automatic response file corresponding to the target ISO mirror image file to a first area of a system reserved area of the target ISO mirror image file.
Wherein the first area may be a randomly selected or user-designated area for storing the auto-answer file. The size of the first area may be determined according to the size of the auto-answer file. The target ISO mirror image file is an ISO mirror image file without an automatic installation function. For example, the target ISO image file may be in the format of ISO9660 (e.g., installation files for Linux systems, VMware systems, Xen systems, etc.). ISO9660 is a general optical disc file system established by the international organization for standardization.
The target ISO mirror image file is modified into an ISO mirror image file with an automatic installation function, and a configuration file, namely an automatic response file, needs to be added into the target ISO mirror image file. The auto-answer file is preset, and may be selected from existing auto-answer files. The formats of the auto-answer files corresponding to different operating systems are different, so that the auto-answer file corresponding to the target ISO image file is selected to be stored in the first area of the system reserved area of the target ISO image file. The system reserved area of the ISO image is typically located at the beginning of the ISO image.
And step S104, modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file.
The boot configuration file is also called Bootloader configuration file, and is a boot file when the operating system is installed. After adding the automatic response file in the system reserved area of the target ISO mirror image file, modifying the Bootloader configuration file of the target ISO mirror image file, wherein parameters corresponding to the automatic response file are added in the Bootloader configuration file, and the parameters comprise the file name of the automatic response file. The format of the automatic response file is different for different operating systems, and the parameters added in the Bootloader configuration file are also different. For example, for a Linux system, the parameters added in the Bootloader configuration file may be: ks ═ isolinux/splash. Png is the file name of the auto-answer file.
And step S106, storing the modified guide configuration file to a second area of the system reserved area.
Since it is difficult to directly overlay the Bootloader configuration file in the target ISO image file, the modified Bootloader configuration file may be stored to the second area in the system reserved area. Wherein, the second region and the first region are two non-overlapping regions. The size of the second area is determined according to the size of the Bootloader configuration file.
Step S108, parameters in the corresponding file description structure are modified according to the file sizes and the initial positions of the automatic response file and the modified guide configuration file respectively, so that the ISO mirror image file has an automatic response function; wherein, the file description structure is used for recording the size parameter of the file and the starting position parameter of the file.
The file description structure is also denoted as Directory Record structure, and is a Directory Record of files, where parameters include file name, file size, start position, and the like. When the system analyzes the ISO mirror image file, the initial position of the file is determined according to the Directory Record structure corresponding to the file, and the specific data of the file is read from the storage space corresponding to the initial position.
The size parameter and the initial position parameter in the Directory Record structure of the automatic answer file can be modified according to the file size and the initial position of the automatic answer file; and modifying the size parameter and the initial position parameter in the Directory Record structure of the Bootloader configuration file according to the file size and the initial position of the modified Bootloader configuration file.
According to the method for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function can be obtained only by modifying the target ISO mirror image file, and the ISO mirror image file does not need to be packaged and manufactured again, so that the processing speed can be increased. Meanwhile, compared with the prior art, a temporary directory does not need to be generated, so that the storage space is saved.
The method for modifying an ISO image file provided by the embodiments of the present disclosure is further described below by taking an example of modifying an ISO image file in an ISO9660 format. As shown in fig. 2, the method comprises the steps of:
step S202, the target ISO mirror image file is analyzed.
In an ISO image file of ISO9660 format, the first 32KB bytes of content are typically system reserved areas. The content in the system reserved area of most ISO images is 0. Some information, such as ISO Hybrid function information, is recorded in a system reserved area of a small part of the ISO image file. This information is typically recorded in the first partial area (less than 10KB), and the contents of the remaining part of the system reserved area are all 0.
And analyzing the target ISO mirror image file to obtain the structure of the target ISO mirror image file. Fig. 3 shows a schematic structural diagram of a target ISO image obtained by parsing. As shown in fig. 3, the contents in the system reserved area (32KB) of the target ISO image are all 0, and there is no occupied area. The Bootloader configuration file in the target ISO image file includes an isolinux.cfg file and a grub.cfg file, and the two files are respectively used in different modes. Wherein the isilinux.cfg file is used in Legacy BIOS mode and grub.cfg file is used in UEFI mode. Png file in fig. 3 is a non-functional temporary file in the target ISO image file. The non-functional temporary files in the target ISO image file also include Release Notes, copyright description files, ISO description files, background picture files, and the like. In the target ISO image file, the Directory Record structure of the file and the specific data of the file may not be saved together, and the file size and the start position of the corresponding file are specified in the Directory Record structure.
Step S204, judging whether a system reserved area of the target ISO mirror image file has an occupied area; if yes, go to step S208, if no, go to step S206.
In order to avoid conflict of information coverage or storage space existing in the system reserved area when the auto-answer file is saved, whether the system reserved area has an occupied area or not can be judged from the analyzed target ISO image file. If the system reserved area has non-0 information, it indicates that the system reserved area has an occupied area, and if the system reserved area does not have the non-0 information, it indicates that the system reserved area does not have an occupied area.
Step S206 selects a first area and a second area from the system reserved area.
Step S208 selects a first zone and a second zone from the system reserved zone outside the occupied zone.
The first region and the second region may be selected from the entire system reserved area if no occupied region exists in the system reserved area of the target ISO image. If there is an occupied zone in the system reserved zone of the target ISO image file, the first zone and the second zone may be selected from the system reserved zone outside the occupied zone.
The first area is used for storing the automatic answer file, the size of the first area is a first designated value, and the first designated value is larger than or equal to the size of the automatic answer file. The second area is used for storing a Bootloader configuration file, and the size of the second area is a second designated value. If the Bootloader profile includes an isolinux.cfg file and a grub.cfg file, the second region may include a first sub-region for storing the isolinux.cfg file in the Bootloader profile and a second sub-region for storing the grub.cfg file. The size of the second specified value is greater than or equal to the sum of the sizes of the isilinux.cfg file and the grub.cfg file.
The order of selecting the first region and the second region is not limited, and the first region may be selected first and then the second region may be selected, the second region may be selected first and then the first region may be selected, or the first region and the second region may be selected at the same time.
For example, if the first 10KB of the system reserved area of the target ISO image file has non-0 information, the second 22KB of storage space of the system reserved area may be used to store the modified isilinux.cfg file, grub.cfg file, and the auto-answer file, wherein the isilinux.cfg file, grub.cfg file each occupy 2KB, and the auto-answer file occupies 18 KB. Under the condition of automatic installation, the isilinux.cfg file and the grub.cfg file are simple, each file only needs a few lines of codes, and the storage space of 2KB can ensure that the files are stored sufficiently. An auto-answer file typically includes about 100 lines of code, and 18KB of storage space may be sufficient to store the auto-answer file.
Step S210, storing the auto-answer file corresponding to the target ISO image file to the first area of the system reserved area of the target ISO image file.
And step S212, modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file.
In the ISO image file of ISO9660 format, the Directory Record structures have an organization relationship similar to a file tree, and it is simple to modify an existing Directory Record structure in an ISO image file, while it is difficult to newly add a Directory Record structure. For the target ISO mirror image file, the automatic response file is a new file, so a Directory Record structure needs to be added. It is very difficult to newly add a Directory Record structure, so that an existing Directory Record structure in the target ISO image file can be used as the Directory Record structure of the auto-answer file.
Considering that the target ISO image file contains non-functional temporary files, the temporary files are not used in the process of installing the operating system, and the installation of the operating system is not influenced by changing the Directory Record structure of the files. Therefore, the Directory Record structure of one temporary file can be designated as the Directory Record structure of the auto-answer file, and the file name of the designated temporary file can be designated as the file name of the auto-answer file. And adding access parameters corresponding to the file names in the Bootloader configuration file of the target ISO mirror image file. For example, a background picture file may be selected as the designated temporary file. The file name of the designated temporary file splash. The parameter ks ═ isolinux/splash. png is added in the isolinux.cfg file and in the grub.cfg file.
Step S214, storing the modified boot configuration file to a second area of the system reserved area.
Step S216, modifying the parameters in the corresponding Directory Record structure according to the file size and the initial position of the auto-answer file and the modified boot configuration file, so that the ISO mirror image file has an auto-answer function.
And modifying the size parameter and the starting position parameter in the Directory Record structure of the specified temporary file according to the file size and the starting position of the automatic response file. After modification, when the operating system is installed, the Directory Record structure will be guided to the automatic answer file, thereby completing the automatic installation of the system.
The size parameter and the starting position parameter in the Directory Record structure of the isolinux.cfg file are modified according to the file size and the starting position of the modified isolinux.cfg file.
And modifying the size parameter and the starting position parameter in the Directory Record structure of the grub.cfg file according to the file size and the starting position of the modified grub.cfg file.
Fig. 4 shows a structural diagram of a modified ISO image file, and as shown in fig. 4, the auto-answer file is stored in a first area of the reserved area of the system, which starts at 0x3200 and has a size of 10 KB. The automatic answering file uses the file name of the appointed temporary file splash.png, the Directory Record structure of the automatic answering file is the Directory Record structure of the original temporary file splash.png, the size parameter of the automatic answering file is modified to 10240, and the initial position parameter of the automatic answering file is modified to 0x 3200. Cfg file modified isolinux has a starting position of 0x2800 and a size of 1 KB. Cfg file modified to start at 0x3000 and size 1 KB. The original isolinux.cfg file, the original grub.cfg file and the original splash.png remain in place.
According to the method for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function can be obtained only by modifying the target ISO mirror image file, and the ISO mirror image file does not need to be packaged and manufactured again, so that the processing speed can be increased. For example, the current ISO image for each operating system is close to 4GB in size, and some are even close to 8GB in size, in which case, if the ISO image with auto-answer function is made according to the existing method, it takes almost 10 minutes on a PC of ordinary configuration. According to the method for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function is generated and can be completed within a few seconds.
Meanwhile, compared with the prior art, the method for modifying the ISO mirror image file provided by the embodiment of the disclosure does not need to generate a temporary directory, so that the storage space is saved. In addition, the modified ISO image file reserves the original Bootloader configuration file (namely the isolinux.cfg file and the grub.cfg file), and if the automatic installation function is not needed, the ISO image file can be restored as before.
It should be noted that the above method embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
Corresponding to the above method embodiment, referring to fig. 5, an apparatus for modifying an ISO image, which is applied to a device for making an ISO image, includes:
a first storage module 51, configured to store an auto-answer file of a target ISO image file to a first area of a system reserved area of the target ISO image file;
a configuration file modification module 52, configured to modify the boot configuration file of the target ISO image file according to the filename of the auto-answer file;
a second storage module 53, configured to store the modified boot configuration file in a second area of the system reserved area;
a parameter modification module 54, configured to modify parameters in a corresponding file description structure according to the file size and the starting position of the auto-answer file and the modified boot configuration file, respectively, so that the ISO image file has an auto-answer function; the file description structure is used for recording the size parameter of the file and the starting position parameter of the file.
Wherein, the configuration file modification module 52 may be further configured to: taking the file name of the designated temporary file in the target ISO mirror image file as the file name of the automatic response file; and adding an access parameter corresponding to the file name in the guide configuration file of the target ISO mirror image file.
The parameter modification module 54 may also be configured to: modifying a size parameter and a starting position parameter in a file description (Directory Record) structure of the designated temporary file according to the file size and the starting position of the automatic response file; and modifying the size parameter and the starting position parameter in the Directory Record structure of the guide configuration file according to the file size and the starting position of the modified guide configuration file.
In an alternative embodiment, as shown in fig. 6, the apparatus further includes a file parsing module 61, and the file parsing module 61 is connected to the first storage module 51. The file parsing module 61 is configured to: analyzing whether a system reserved area of a target ISO mirror image file has an occupied area (for example, non-0 information); selecting said first zone and said second zone, if any, from a reserved area of the system outside said occupied zone.
According to the device for modifying the ISO mirror image file, the ISO mirror image file with the automatic response function can be obtained only by modifying the target ISO mirror image file, and the ISO mirror image file does not need to be packaged and manufactured again, so that the processing speed can be increased. Meanwhile, compared with the prior art, a temporary directory does not need to be generated, so that the storage space is saved.
The embodiment provides equipment for modifying an ISO (International Mobile organization) image file, which corresponds to the method embodiment. Fig. 7 is a schematic structural diagram of the apparatus, and as shown in fig. 7, the apparatus includes a processor 701 and a memory 702; the memory 702 is configured to store one or more computer instructions that are executed by the processor to implement the method for modifying an ISO image described above.
The device shown in fig. 7 further comprises a bus 703, the processor 701 and the memory 702 being connected via the bus 703. The device that modifies the ISO image may be a computer or the like.
The Memory 702 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Bus 703 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.
The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present disclosure may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
The embodiments of the present disclosure also provide a machine-readable storage medium, where the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the method for modifying an ISO image file, and specific implementation may refer to method embodiments, and is not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (9)

1. A method for modifying an ISO image, the method being applied to a device for producing the ISO image, the method comprising:
storing an automatic response file corresponding to a target ISO mirror image file to a first area of a system reserved area of the target ISO mirror image file;
modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file;
storing the modified boot configuration file to a second area of the system reserved area;
modifying parameters in the corresponding file description structure according to the file size and the initial position of the automatic response file and the modified guide configuration file respectively so that the ISO mirror image file has an automatic response function; the file description structure is used for recording the size parameter of the file and the initial position parameter of the file;
according to the file name of the automatic answer file, modifying the guide configuration file of the target ISO mirror image file, wherein the step comprises the following steps:
taking the file name of the designated temporary file in the target ISO mirror image file as the file name of the automatic response file;
and adding an access parameter corresponding to the file name in the guide configuration file of the target ISO mirror image file.
2. The method of claim 1, wherein prior to the step of adding an auto-answer file for the target ISO image to the first region of the system reserved area of the target ISO image, the method further comprises:
analyzing whether a system reserved area of a target ISO mirror image file has an occupied area or not;
selecting said first zone and said second zone, if any, from a reserved area of the system outside said occupied zone.
3. The method of claim 2, wherein the second region comprises a first sub-region for storing an isolinux.cfg file and a second sub-region for storing a grub.cfg file in a boot profile.
4. The method according to claim 1, wherein the step of modifying parameters in the corresponding file description structure according to the file size and the start position of the auto-answer file and the modified boot configuration file, respectively, comprises:
modifying a size parameter and an initial position parameter in a file description structure of the specified temporary file according to the file size and the initial position of the automatic response file;
and modifying the size parameter and the initial position parameter in the file description structure of the guide configuration file according to the file size and the initial position of the modified guide configuration file.
5. An apparatus for modifying an ISO image, the apparatus being applied to a device for producing the ISO image, the apparatus comprising:
the system comprises a first storage module, a second storage module and a third storage module, wherein the first storage module is used for storing an automatic response file of a target ISO mirror image file to a first area of a system reserved area of the target ISO mirror image file;
the configuration file modification module is used for modifying the guide configuration file of the target ISO mirror image file according to the file name of the automatic response file;
the second storage module is used for storing the modified boot configuration file to a second area of the system reserved area;
the parameter modification module is used for modifying parameters in the corresponding file description structure according to the file size and the initial position of the automatic response file and the modified guide configuration file respectively so that the ISO mirror image file has an automatic response function; the file description structure is used for recording the size parameter of the file and the initial position parameter of the file;
the configuration file modification module is further configured to:
taking the file name of the designated temporary file in the target ISO mirror image file as the file name of the automatic response file;
and adding an access parameter corresponding to the file name in the guide configuration file of the target ISO mirror image file.
6. The apparatus of claim 5, further comprising:
the file analysis module is used for analyzing whether a system reserved area of the target ISO mirror image file has an occupied area or not; selecting said first zone and said second zone, if any, from a reserved area of the system outside said occupied zone.
7. The apparatus of claim 5, wherein the parameter modification module is further configured to:
modifying a size parameter and an initial position parameter in a file description structure of the specified temporary file according to the file size and the initial position of the automatic response file;
and modifying the size parameter and the initial position parameter in the file description structure of the guide configuration file according to the file size and the initial position of the modified guide configuration file.
8. An apparatus for modifying an ISO image, comprising a processor and a memory coupled to the processor; the memory stores machine executable instructions executable by the processor to perform the method of any one of claims 1 to 4.
9. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1 to 4.
CN201810808820.1A 2018-07-20 2018-07-20 Method, device and equipment for modifying ISO (International organization for standardization) mirror image file Active CN109165023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810808820.1A CN109165023B (en) 2018-07-20 2018-07-20 Method, device and equipment for modifying ISO (International organization for standardization) mirror image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810808820.1A CN109165023B (en) 2018-07-20 2018-07-20 Method, device and equipment for modifying ISO (International organization for standardization) mirror image file

Publications (2)

Publication Number Publication Date
CN109165023A CN109165023A (en) 2019-01-08
CN109165023B true CN109165023B (en) 2022-02-11

Family

ID=64898030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810808820.1A Active CN109165023B (en) 2018-07-20 2018-07-20 Method, device and equipment for modifying ISO (International organization for standardization) mirror image file

Country Status (1)

Country Link
CN (1) CN109165023B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427339A (en) * 2019-06-29 2019-11-08 苏州浪潮智能科技有限公司 A kind of method and apparatus for converting automatic response file format

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304965B1 (en) * 1998-09-29 2001-10-16 Phoenix Technologies Ltd. Method and device for booting a CD-ROM from a single disk image having multiple emulations
CN101770468A (en) * 2008-12-30 2010-07-07 环达电脑(上海)有限公司 Self-modifying method of WinCE map file
CN104216721A (en) * 2013-05-31 2014-12-17 上海博达数据通信有限公司 Method for issuing configuration before starting of operating system
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
CN106406951A (en) * 2016-09-20 2017-02-15 杭州昆海信息技术有限公司 An installing method and device for an operating system
CN107291486A (en) * 2016-04-11 2017-10-24 紫光华山信息技术有限公司 The installation method and device of a kind of operating system
CN107643959A (en) * 2016-07-19 2018-01-30 紫光华山信息技术有限公司 Image file treating method and apparatus
CN108121590A (en) * 2017-11-29 2018-06-05 杭州九略智能科技有限公司 The method and device of ESXI virtual machine automatic deployment installation systems

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8346886B2 (en) * 2004-09-08 2013-01-01 Red Hat, Inc. System, method, and medium for configuring client computers to operate disconnected from a server computer while using a master instance of the operating system
CN103577201B (en) * 2012-07-20 2018-04-06 上海斐讯数据通信技术有限公司 The update method and system of Embedded Double system
CN103810422B (en) * 2014-02-20 2017-05-17 东莞中国科学院云计算产业技术创新与育成中心 Safety virtualization isolation method based on mirror image intelligent management

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304965B1 (en) * 1998-09-29 2001-10-16 Phoenix Technologies Ltd. Method and device for booting a CD-ROM from a single disk image having multiple emulations
CN101770468A (en) * 2008-12-30 2010-07-07 环达电脑(上海)有限公司 Self-modifying method of WinCE map file
CN104216721A (en) * 2013-05-31 2014-12-17 上海博达数据通信有限公司 Method for issuing configuration before starting of operating system
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
CN107291486A (en) * 2016-04-11 2017-10-24 紫光华山信息技术有限公司 The installation method and device of a kind of operating system
CN107643959A (en) * 2016-07-19 2018-01-30 紫光华山信息技术有限公司 Image file treating method and apparatus
CN106406951A (en) * 2016-09-20 2017-02-15 杭州昆海信息技术有限公司 An installing method and device for an operating system
CN108121590A (en) * 2017-11-29 2018-06-05 杭州九略智能科技有限公司 The method and device of ESXI virtual machine automatic deployment installation systems

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"Adding domain data to code profiling tools to debug workflow parallel execution";Vítor Silva等;《Future Generation Computer Systems》;20180613;第110卷;第422-439页 *
基于Shell脚本的IBM Cell/B.E.模拟环境的自动安装与测试;闫格 等;《漳州师范学院学报(自然科学版)》;20090930;第22卷(第03期);第33-36页 *
基于定制Linux系统的自动化部署方法设计与实现;浦燕红 等;《电信快报》;20170910(第09期);第19-23页 *

Also Published As

Publication number Publication date
CN109165023A (en) 2019-01-08

Similar Documents

Publication Publication Date Title
CN107608689B (en) Method and device for updating application program on client and electronic equipment
CN110764791B (en) Channel adaptation method and device for applet and electronic equipment
JP4772282B2 (en) Program for providing media filter management
CN107506221B (en) Application program upgrading method, device and equipment
US10599413B2 (en) Method and device for identifying file
US20130067459A1 (en) Order-Independent Deployment Collections with Dependency Package Identifiers
CN111131352B (en) Theme switching method and device
US10282185B2 (en) Method and apparatus for firmware virtualization
CN106933887B (en) Data visualization method and device
CN105138376A (en) Mixed model application, webpage resource upgrading method thereof, mobile terminal and system
US20180059978A1 (en) Virtual disk expansion method and apparatus
WO2020177429A1 (en) Method and apparatus for embedding codes in application, and electronic device
CN111061643A (en) SDK cluster compatibility detection method and device, electronic equipment and storage medium
US20230266958A1 (en) Method for creating private image in public cloud and related device
US8196093B2 (en) Apparatus and method for componentizing legacy system
CN109165023B (en) Method, device and equipment for modifying ISO (International organization for standardization) mirror image file
CN114637519A (en) Method and device for installing infrastructure and service
US20140298316A1 (en) Managing method for application program installation and electronic device
CN114647548A (en) Log generation method and device
KR20180098584A (en) Method and apparatus for executing APP program
CN112068895B (en) Code configuration method, device, video playing equipment and storage medium
JP5906906B2 (en) Log management method, log management system, and information processing apparatus
CN106843921B (en) Resource loading method and device
CN113590179A (en) Plug-in detection method and device, electronic equipment and storage medium
CN111273940B (en) Method and device for uploading program file to code warehouse

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 310000 11/F, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Xinhua Sanxin Information Technology Co., Ltd.

Address before: 310000 11/F, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Huashan Information Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant