A method for customizing a trusted operating system installation package

By modifying and replacing the operating system image file, combined with the SquashFS and createrepo tools, the problem of low efficiency in the production of operating system installation packages in the existing technology is solved, the production of fast and low-resource operating system installation packages is realized, and the Xinchuang operation is improved. System production speed and efficiency.

CN118192999BActive Publication Date: 2024-09-03SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410598509.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2024-09-03
Estimated Expiration
2044-05-15

AI Technical Summary

Technical Problem

The existing technology is inefficient when quickly producing and modifying operating system installation packages, takes up a lot of resources, and cannot meet the rapidly changing needs of the Xinchuang operating system.

Method used

By modifying the operating system image file, replacing and regenerating the installation package, files and bootloader, using the steps of mounting, decompressing, replacing and regenerating, combined with SquashFS and createrepo tools, you can quickly create an operating system installation package.

Benefits of technology

It realizes the production of operating system installation packages quickly and with low resource consumption, which improves the production speed and efficiency of Xinchuang operating system installation packages without affecting system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118192999B
    Figure CN118192999B
Patent Text Reader

Abstract

The present invention relates to the field of operating system technology, and in particular to a method for customizing a trusted operating system installation package. The method for customizing a trusted operating system installation package modifies the operating system image file, modifies and replaces the files, software packages, boot programs, and installation configurations in the installation package, regenerates the image file and installation configuration file, completes the functional design, implements the logic, data configuration, and test execution, and realizes the production of the operating system installation package. The method for customizing a trusted operating system installation package has relatively low requirements for system performance and resource occupancy, and can quickly realize the production of the operating system installation package without affecting the function and performance, greatly improving the production speed and efficiency of the trusted operating system installation package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operating system technology, and in particular to a method for customizing a trusted computing operating system installation package. Background Art

[0002] With the development of hardware, the functions of hardware are increasing, and the functions related to operating systems are also increasing. In particular, the development of various application requirements has led to the increasing complexity of operating systems, the increasing number of functions, the increasing number of corresponding software packages, and the increasing size of a single software package. The operating system has gradually developed from being able to be installed on a floppy disk to the current size of several hundred M bytes, even several G bytes, and more than ten G bytes. Now, a streamlined operating system also requires a high-density CD (Compact Disc) to install. For a non-streamlined operating system, at least one DVD disc is required to install it. For a complete operating system, multiple high-density digital video discs DVD (Digital Video Disc) discs or large-capacity USB flash drives or disks are required to install it. As the size of the operating system becomes larger and larger, the requirements for the production of operating system installation packages are also getting higher and higher, especially for the rapid production of operating system installation packages.

[0003] In recent years, with the development of domestic central processing units (CPUs) and various hardware, domestic operating systems have also developed rapidly and gradually matured. Especially with the development of the information and innovation industry, domestic operating systems have been widely used. The widespread use of domestic operating systems has spawned a variety of technologies for making operating system installation packages, each with its own characteristics. Some start with source code compilation. To compile all the required installation packages, the demand for resources is very large and the speed is very slow. To modify relatively small functions, it is also necessary to start from source code compilation, and it is impossible to quickly make operating system installation packages. Some are made from the installation package, which also requires a complete production process. If a certain package is not available, the installation package needs to be recompiled, which takes a long time and is inefficient. In addition, after the installation package is made, installation verification is required. If it can pass once, it is fine. If it fails once, the re-production process is very time-consuming.

[0004] Based on the above situation, the present invention proposes a method for customizing a trusted operating system installation package. Summary of the invention

[0005] In order to remedy the deficiencies of the prior art, the present invention provides a simple and efficient method for customizing a trusted operating system installation package.

[0006] The present invention is achieved through the following technical solutions:

[0007] A method for customizing a trusted operating system installation package, characterized by: modifying the operating system image file, modifying and replacing the files, software packages, boot programs and installation configurations in the installation package, regenerating the image file and installation configuration files, completing functional design, implementing logic, data configuration and test execution, and realizing the production of the operating system installation package;

[0008] The following steps are involved:

[0009] Step S1, mount the image file;

[0010] Mount the ISO disc image file to an empty folder to unpack the ISO disc image file installation package;

[0011] Step S2, copy all the contents of the image to a new directory;

[0012] Copy all files from the folder mounted in step S1, including the folder and its subfolders and files, to a temporary directory;

[0013] Step S3, replacing the installation package and files;

[0014] Replace the installation packages and files that need to be replaced in the temporary directory with new installation packages and files;

[0015] Step S4, modify the existing file content;

[0016] Modify the files that need to be modified and save them after modification;

[0017] Step S5, copy the installation boot file install.img in the system installation image file to a temporary folder;

[0018] Step S6, decompress the installation boot file install.img, modify and replace the files and installation packages in the installation boot file install.img, and save;

[0019] Step S7, regenerate the installation boot file install.img;

[0020] Step S8: regenerate the configuration file and the image file.

[0021] In the step S1, the mount command is used to decompress the ISO disc image file installation package.

[0022] In step S5, if the installation boot file install.img needs to be modified, the file needs to be copied to an empty temporary folder first; if no modification is required, step S5 is skipped.

[0023] In the step S6, the installation boot file install.img is decompressed using the unSquashFS command for decompressing the SquashFS compressed read-only file system.

[0024] In the step S7, a new installation boot file install.img is generated by using the command mkSquashFS to create a SquashFS compressed read-only file system; after the generation is completed, the original file is replaced with the newly generated installation boot file install.img.

[0025] In step S8, the installation configuration file is regenerated using the repository creation tool createrepo.

[0026] In step S8, the image file making command mkisofs is used to regenerate the installation package file.

[0027] A device for implementing a method for customizing a trusted computing operating system installation package, characterized in that it includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method steps described above when executing the computer program.

[0028] A readable storage medium, characterized in that: a computer program is stored on the readable storage medium, and when the computer program is executed by a processor, the method steps described above are implemented.

[0029] The beneficial effect of the present invention is that the method of customizing the trusted operating system installation package has relatively low requirements for system performance and resource utilization, and can quickly realize the production of the operating system installation package without affecting the function and performance, thereby greatly improving the production speed and efficiency of the trusted operating system installation package. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Attached Figure 1 A schematic diagram of a method for customizing a trusted operating system installation package according to the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0033] This method of customizing the trusted operating system installation package supports different central processing unit CPU architectures such as AMD64 / C86 / ARM64 / loongarch, and this implementation use case is tested using the ARM64 architecture.

[0034] The method for customizing the trusted operating system installation package modifies the operating system image file, modifies and replaces the files, software packages, boot programs and installation configurations in the installation package, regenerates the image file and installation configuration files, completes the functional design, implements the logic, data configuration and test execution, and realizes the production of the operating system installation package;

[0035] The following steps are involved:

[0036] Step S1, mount the image file;

[0037] Mount the ISO disc image file to an empty folder to unpack the ISO disc image file installation package;

[0038] ISO file is a standardized disc image file format, which can contain operating system, programs, data, etc., and is used to create CD or DVD images.

[0039] Step S2, copy all the contents of the image to a new directory;

[0040] Copy all files from the folder mounted in step S1, including the folder and its subfolders and files, to a temporary directory;

[0041] Step S3, replacing the installation package and files;

[0042] Replace the installation packages and files that need to be replaced in the temporary directory with new installation packages and files;

[0043] Step S4, modify the existing file content;

[0044] Modify the files that need to be modified and save them after modification;

[0045] Step S5, copy the installation boot file install.img in the system installation image file to a temporary folder;

[0046] Step S6, decompress the installation boot file install.img, modify and replace the files and installation packages in the installation boot file install.img, and save;

[0047] Step S7, regenerate the installation boot file install.img;

[0048] Step S8: regenerate the configuration file and the image file.

[0049] In the step S1, the mount command is used to decompress the ISO disc image file installation package.

[0050] In step S5, if the installation boot file install.img needs to be modified, the file needs to be copied to an empty temporary folder first; if no modification is required, step S5 is skipped.

[0051] SquashFS is a read-only compressed file system designed for Linux systems that allows the entire file system or a single directory to be compressed into a single file.

[0052] In the step S6, the installation boot file install.img is decompressed using the unSquashFS command for decompressing the SquashFS compressed read-only file system.

[0053] In the step S7, a new installation boot file install.img is generated by using the command mkSquashFS to create a SquashFS compressed read-only file system; after the generation is completed, the original file is replaced with the newly generated installation boot file install.img.

[0054] In step S8, the installation configuration file is regenerated using the repository creation tool createrepo.

[0055] In step S8, the image file making command mkisofs is used to regenerate the installation package file.

[0056] The device for implementing the method of customizing the trusted computing operating system installation package includes a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method steps described above when executing the computer program.

[0057] The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described above are implemented.

[0058] Compared with the prior art, the method for customizing the Xinchuang operating system installation package has the following characteristics:

[0059] Create a new installation package based on the modification of the existing operating system installation package, realize the modification and replacement of files in the installation package, and modify the boot image in the installation package;

[0060] The requirements for system performance and resource utilization are relatively low, and it does not require a large amount of resources and supporting software. It can effectively improve the speed and efficiency of the production of the trusted operating system installation package without affecting the functions and performance; especially when the amount of changes is very small, it can greatly improve the speed and efficiency of the production of the trusted operating system installation package.

[0061] The embodiment described above is only one specific implementation of the present invention. Common changes and substitutions made by those skilled in the art within the scope of the technical solution of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for customizing a trusted operating system installation package, characterized in that: Modify the operating system image file, modify and replace the files, software packages, boot programs and installation configurations in the installation package, regenerate the image file and installation configuration files, complete the functional design, implementation logic, data configuration and test execution, and realize the production of the operating system installation package; The following steps are involved: Step S1, mount the image file; Mount the ISO disc image file to an empty folder to unpack the ISO disc image file installation package; Step S2: Copy all the contents of the image to a new directory Copy all files from the folder mounted in step S1, including the folder and its subfolders and files, to a temporary directory; Step S3, replacing the installation package and files; Replace the installation packages and files that need to be replaced in the temporary directory with new installation packages and files; Step S4, modify the existing file content; Modify the files that need to be modified and save them after modification; Step S5, copy the installation boot file install.img in the system installation image file to a temporary folder; If the installation boot file install.img needs to be modified, the file needs to be copied to an empty temporary folder first; if no modification is required, skip step S5; Step S6, using the command unSquashFS to decompress the SquashFS compressed read-only file system to decompress the installation boot file install.img, and modify and replace the files and installation packages in the installation boot file install.img, and save; Step S7, regenerate the installation boot file install.img; Use the command mkSquashFS to generate a new installation boot file install.img. After the generation is complete, replace the original file with the newly generated installation boot file install.img. Step S8: regenerate the configuration file and the image file.

2. The method for customizing a trusted operating system installation package according to claim 1, characterized in that: In the step S1, the mount command is used to decompress the ISO disc image file installation package.

3. The method for customizing a trusted operating system installation package according to claim 1, characterized in that: In step S8, the installation configuration file is regenerated using the repository creation tool createrepo.

4. The method for customizing a trusted operating system installation package according to claim 1, characterized in that: In step S8, the image file making command mkisofs is used to regenerate the installation package file.

5. A device for implementing a method for customizing a trusted operating system installation package, characterized in that: The method comprises a memory and a processor; the memory is used to store a computer program, and the processor is used to implement the method steps as claimed in any one of claims 1 to 4 when executing the computer program.

6. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps according to any one of claims 1 to 4 are implemented.