Pre-boot execution environment mirror image file processing method and device, equipment and storage medium
By installing virtual machines in mobile devices and generating mirror files, the problem of high hardware cost in PXE technology is solved, and efficient remote installation configuration is achieved.
Patent Information
- Application Number
- CN202510574205.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-22
AI Technical Summary
The existing PXE technology requires a separate server to run, resulting in high hardware costs and inability to transfer, affecting remote installation efficiency.
By installing a virtual machine in a mobile device and configuring a PXE environment in the virtual machine, a mirror file is generated and sent to the terminal to be installed for direct configuration.
Reduces the time cost of remote installation, avoids additional hardware usage, and improves installation efficiency.
Smart Images

Figure CN120523554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for processing a pre-boot execution environment image file. Background Art
[0002] Currently, when a large number of computing devices need to be processed, installing the computing devices requires a lot of manual work and time.
[0003] Currently, PXE (Preboot Execution Environment) technology can be used for remote installation. However, the inventors have discovered that this technology has at least the following technical problems: PXE currently requires a separate server to run, consumes excessively high hardware costs, and cannot be transferred after installation. Summary of the Invention
[0004] The present application provides a pre-boot execution environment image file processing method, device, equipment and storage medium to at least solve the problem in the related art that PXE occupies too high hardware cost and cannot be transferred after installation.
[0005] The present application provides a method for processing a pre-boot execution environment image file, comprising: installing a target version of a virtual machine; disabling mandatory access control of the virtual machine; installing a dynamic host configuration protocol service in the virtual machine; installing a hypertext transfer protocol service, a simple file transfer protocol service, and a daemon service program in the virtual machine, and setting it to automatically start at boot; installing a boot loader and a kickstart file creation tool in the virtual machine; using the kickstart file creation tool to generate a kickstart file; storing the kickstart file in the virtual machine; generating an image file of the virtual machine; and sending the image file to a terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-boot execution environment.
[0006] The present application also provides a pre-boot execution environment image file processing device, including: a virtual machine installation module, used to install a target version of the virtual machine; a control shutdown module, used to turn off the mandatory access control of the virtual machine; a first installation module, used to install the Dynamic Host Configuration Protocol service in the virtual machine; a second installation module, used to install the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine, and set it to start automatically at boot; a third installation module, used to install the boot loader and the kickstart file creation tool in the virtual machine; a file generation module, used to use the kickstart file creation tool to generate a kickstart file; a file storage module, used to store the kickstart file in the virtual machine; an image file generation module, used to generate an image file of the virtual machine; an image file sending module, used to send the image file to the terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-boot execution environment.
[0007] The present application also provides a pre-boot execution environment image file processing device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above-mentioned pre-boot execution environment image file processing methods when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned pre-boot execution environment image file processing methods are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned pre-boot execution environment image file processing methods when executed by a processor.
[0010] The pre-boot execution environment image file processing method, device, equipment and storage medium of the present application install a virtual machine in the device and turn off the mandatory access control of the virtual machine to avoid the subsequent installed DHCP, TFTP and other services from being unable to run due to insufficient permissions. By installing the DHCP service, it is ensured that the device obtains the correct network configuration through DHCP, and then accesses the subsequent TFTP and HTTP services. By installing the boot loader, the hardware is initialized when the device or the terminal to be installed is started, the operating system is correctly loaded, and a kickstart file is generated so that the system can be installed in accordance with the user's requirements. The virtual machine is packaged into an image file so that it can be directly used when the terminal to be installed is actually used without additional settings, thereby reducing the time cost of remote installation. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 A schematic diagram of an application scenario of the pre-boot execution environment image file processing method provided in an embodiment of the present application;
[0013] Figure 2 A flowchart of a method for processing a pre-boot execution environment image file provided in an embodiment of the present application;
[0014] Figure 3 A schematic diagram of the structure of a pre-boot execution environment image file processing device provided in an embodiment of the present application;
[0015] Figure 4 A schematic diagram of the structure of a pre-boot execution environment image file processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0017] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0018] In scenarios where a large number of computing devices need to be deployed, traditional manual installation methods often consume a lot of time and costs.
[0019] Currently, PXE technology can be used to achieve remote batch installation. This technology, through a network boot mechanism, can significantly improve the efficiency of computing device installation and reduce the complexity and time investment of manual operations. However, PXE currently requires a separate server to run, resulting in high hardware costs and difficulty in migration.
[0020] In response to the above technical problems, the inventors proposed the following technical concept: by installing a virtual machine in a mobile device and configuring PXE in the virtual machine, and finally packaging the PXE-configured virtual machine into an image file, the packaged image file is sent to the terminal to be installed, so that the terminal to be installed can directly configure PXE.
[0021] This application is used in the context of processing pre-boot execution environment image files. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, storage, and display, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0022] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0023] Figure 1 Schematic diagram of the application scenario of the pre-boot execution environment image file processing method provided in the embodiment of the present application. Figure 1 , this scenario includes: a mobile device 101 and a device to be installed 102.
[0024] In a specific implementation process, the mobile device 101 may include a laptop computer, a tablet computer, or other mobile device that can be installed with a virtual machine.
[0025] The devices to be installed 102 may include computers, laptops, servers, clusters of multiple servers, and other devices that require PXE installation.
[0026] The mobile device 101 is used to install a virtual machine, configure the Dynamic Host Configuration Protocol, Hypertext Transfer Protocol service, Simple File Transfer Protocol service, etc. in the virtual machine, generate a kickstart file, complete the deployment of the PXE environment in the virtual machine, and package the virtual machine into an image file. The image file is transferred to any device to be installed, so that the device to be installed can directly obtain the virtual machine with PXE configured from the image file to complete the PXE configuration.
[0027] It is understood that the structure illustrated in the embodiment of this application does not constitute a specific limitation on the processing of pre-boot execution environment image files. In other feasible implementations of this application, the above architecture may include more or fewer components than shown in the figure, or combine or split certain components, or arrange the components differently. The specific configuration can be determined according to the actual application scenario and is not limited here. Figure 1The scenarios shown can be implemented by hardware, software, or a combination of software and hardware.
[0028] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0029] Figure 2 A flowchart of a method for processing a pre-boot execution environment image file provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, an embodiment of the present application provides a method for processing a pre-boot execution environment image file, which is described in detail, including:
[0030] S201: Install the target version of the virtual machine.
[0031] In this step, the target version of the virtual machine is adapted to the mobile device 101 .
[0032] S202: Disable mandatory access control of the virtual machine.
[0033] In this step, the mandatory access control of the virtual machine is turned off through the preset command.
[0034] The virtual machine can be a Linux system or other systems, with mandatory access control such as SElinux.
[0035] For example, you can use a preset command to temporarily set mandatory access control to permissive mode, or modify parameters in a virtual machine configuration file so that mandatory access control is not enabled for the virtual machine.
[0036] S203: Installing the Dynamic Host Configuration Protocol service in the virtual machine.
[0037] In this step, you can use the preset installation program to install the DHCP (Dynamic Host Configuration Protocol) service in the virtual machine.
[0038] S204: Installing a Hypertext Transfer Protocol service, a Simple File Transfer Protocol service, and a daemon service program in the virtual machine, and setting them to start automatically upon startup.
[0039] In this step, you can also use the pre-installed installation program to install the HTTP (Hypertext Transfer Protocol) service, TFTP (Trivial File Transfer Protocol) service, and daemon service program in the virtual machine. Setting up automatic startup can include modifying the corresponding program's configuration file to enable automatic startup.
[0040] The daemon service program may include xinetd.
[0041] S205: Install a boot loader and a kickstart file creation tool in the virtual machine.
[0042] In this step, the boot loader may include syslinux. A kickstart file creation tool such as the system-config-kickstart tool may also be obtained by downloading a program pre-written by an installation staff.
[0043] S206: Generate a kickstart file using a kickstart file creation tool.
[0044] In this step, the preset parameters are input into the kickstart file creation tool and the file is generated to obtain the kickstart file. The step may also include running the kickstart file creation tool so that the kickstart file creation tool automatically generates the kickstart file.
[0045] S207: Save the kickstart file to the virtual machine.
[0046] This step may include storing the kickstart file in a preset location of the virtual machine, or creating a folder in a preset directory, and storing the generated kickstart file in the folder.
[0047] S208: Generate an image file of the virtual machine.
[0048] In this step, the image file of the virtual machine may be generated by using a preset image file generation program.
[0049] The generated virtual machine image file can be in ISO format or IMG format.
[0050] S209: Sending the image file to the terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-start execution environment.
[0051] In this step, the image file can be sent to the terminal to be installed in the format of a data packet, a compressed package, etc., or the image file can be uploaded to a network disk and downloaded by the terminal to be installed, thereby sending the image file to the terminal to be installed.
[0052] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure install a virtual machine in the device and turn off the mandatory access control of the virtual machine to avoid the subsequent installation of DHCP, TFTP and other services from being unable to run due to insufficient permissions. By installing the DHCP service, it is ensured that the device obtains the correct network configuration through DHCP, and then accesses the subsequent TFTP and HTTP services. By installing the boot loader, the hardware is initialized when the device or the terminal to be installed is started, the operating system is correctly loaded, and a kickstart file is generated so that the system can be installed in accordance with the user's requirements. The virtual machine is packaged into a mirror file so that it can be used directly when the terminal to be installed is actually used, without occupying a separate server and without requiring additional settings, thereby reducing the cost of remote installation.
[0053] In a possible implementation, in the above step S204, after installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service, and the daemon service program in the virtual machine and setting the virtual machine to start automatically at boot, the following steps are further included:
[0054] S220: Obtain an Internet Protocol address.
[0055] In this step, the Internet Protocol address can be obtained through a preset command.
[0056] S221: Write the Internet Protocol address into the configuration file of the Dynamic Host Configuration Protocol.
[0057] This step includes writing the Internet Protocol address into a preset field of the configuration file of the Dynamic Host Configuration Protocol.
[0058] As can be seen from the description of the above embodiments, the embodiments of the present disclosure adapt the DHCP service to the current network parameters by acquiring an Internet Protocol address and writing the Internet Protocol address into a preset field of a configuration file of the Dynamic Host Configuration Protocol.
[0059] In a possible implementation, after the above step S221, the method further includes step S222: starting the DHCP service and checking whether the DHCP service is normally started, and checking whether the DHCP port is opened.
[0060] In a possible implementation, after installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine and setting the self-startup at startup, the method further includes: step S230.
[0061] S230: Modify the target parameter of the configuration file of the daemon service program to the executable file location of the Simple File Transfer Protocol.
[0062] In this step, the server field and the server_args field of the configuration file of the daemon service program are modified to the executable file location of the Simple File Transfer Protocol.
[0063] From the description of the above embodiments, it can be seen that the embodiment of the present disclosure modifies the target parameter of the configuration file of the daemon service program to the executable file location of the simple file transfer protocol, so that when the daemon service program receives a TFTP service request, it will accurately call the specified executable file to process the request, ensuring that the TFTP service runs as expected.
[0064] In a possible implementation, after step S230, the steps further include: starting the tftp.socket service and setting it to start at boot, starting the tftp.socket service and setting it to start at boot, starting the tftp.service service and setting it to start at boot, and checking whether a TFTP port exists.
[0065] In a possible implementation, the above step S204 installs the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine and sets the automatic startup, including: step S2041 and step S2042.
[0066] S2041: Use the target yum source to install the Hypertext Transfer Protocol service, Simple File Transfer Protocol service and daemon service program in the virtual machine.
[0067] In this step, the target yum source can be a yum source pre-set by the staff, and the installation packages of the Hypertext Transfer Protocol service, Simple File Transfer Protocol service and daemon service program are obtained and installed through the yum source.
[0068] S2042: Set the Hypertext Transfer Protocol service, Single File Transfer Protocol service and daemon service program to start automatically at boot.
[0069] The method of setting the automatic startup is similar to the above step S204 and will not be repeated here.
[0070] From the description of the above embodiments, it can be seen that the embodiment of the present disclosure uses the target yum source to install HTTP service, TFTP service and daemon service program. Since the target yum source pre-calibrated by the staff is used, the installation stability and reliability of each service program are guaranteed.
[0071] In a possible implementation, after installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine in step S204 and setting the system to start automatically upon startup, the method further includes: step S240.
[0072] S240: Change the network interface field of the default file under the Simple File Transfer Protocol service to the network interface of the virtual machine, and restart the Dynamic Host Configuration Protocol service.
[0073] This step includes obtaining the network interface of the virtual machine and writing the network interface into the network interface field of the default file under the Simple File Transfer Protocol service.
[0074] Wherein, writing the network interface field of the default file under the Simple File Transfer Protocol service may include writing the network interface into
[0075] From the description of the above embodiments, it can be seen that the embodiment of the present disclosure modifies the network interface field of the default file under the Simple File Transfer Protocol service to the network interface of the virtual machine, so that the TFTP service can accurately use the correct network interface on the virtual machine, thereby carrying out file transfer work normally.
[0076] In a possible implementation, after the above step S208 generates the image file of the virtual machine, the process further includes: steps S250 to S252.
[0077] S250: Calculate the hash value of the image file.
[0078] This step may include calculating MD5, SHA-256, SHA-512, etc. of the image file.
[0079] S251: Encrypt the hash value using the public key to obtain an encrypted hash value.
[0080] In this step, the private key corresponding to the public key may be pre-distributed to the virtual machine to be installed.
[0081] S252: Send the encrypted hash value and the image file to the terminal to be installed, so that the terminal to be installed uses the private key and the encrypted hash value to verify whether the image file has been tampered with. If the image file has not been tampered with, the image file is used to install the virtual machine containing the pre-boot execution environment.
[0082] In this step, the encrypted hash value and image file can be sent to the terminal to be installed using a message, compressed package, data package, etc. The encrypted hash value and image file can be sent together or in two batches. The terminal to be installed calculates the hash value of the received image file, decrypts the received encrypted hash value, and compares the two hash values to see if they are the same. If they are the same, the image file is used to install the virtual machine containing the pre-boot execution environment. Otherwise, it is determined that the image file has been tampered with.
[0083] From the description of the above embodiments, it can be seen that the embodiments of the present disclosure calculate the hash value of the image file, encrypt the hash value using a public key, obtain an encrypted hash value, and then send the encrypted hash value and the image file to the terminal to be installed, so that the terminal to be installed can verify the security of the image file and then perform a virtual machine containing a pre-boot execution environment, thereby increasing the security of the pre-boot execution environment configured by the terminal to be installed.
[0084] In a possible implementation, after the mandatory access control of the virtual machine is disabled in step S202 , the method further includes: step S260 .
[0085] S260: Turn off the firewall of the virtual machine.
[0086] In this step, you can use the corresponding command to shut down the firewall according to the type of firewall.
[0087] As can be seen from the description of the above embodiments, the embodiments of the present disclosure open the firewall to all connection requests from the network, thereby facilitating subsequent data processing, data transmission and other operations.
[0088] In one possible implementation, the method in the above embodiment further includes importing key configuration files, which include boot files, kernel files, boot menus (menu files for selecting startup items after booting up), boot menu configuration files, one of the two window modules that come with the system, window prompt information files, and window background images.
[0089] In one possible implementation, the method of any of the above embodiments further includes: restarting the DHCP service. After completion, connecting the network cable to the network port of the laptop and the network card of any host (this network card needs to support the PXE function), restarting the host, pressing F11 in the BIOS interface to enter the boot manager management interface, selecting this host network card to start, and entering the PXE installation mode.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0091] Figure 3 This is a schematic diagram of the structure of the pre-boot execution environment image file processing device provided in the embodiment of the present application. Figure 3 As shown, the pre-boot execution environment image file processing device 300 provided in an embodiment of the present application includes: a virtual machine installation module 301, a control shutdown module 302, a first installation module 303, a second installation module 304, a third installation module 305, a file generation module 306, a file storage module 307, an image file generation module 308 and an image file sending module 309.
[0092] A virtual machine installation module 301 is used to install a target version of the virtual machine;
[0093] A control shutdown module 302 is used to disable mandatory access control of the virtual machine;
[0094] A first installation module 303 is used to install a dynamic host configuration protocol service in the virtual machine;
[0095] The second installation module 304 is used to install the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine, and set it to start automatically when the machine is turned on;
[0096] The third installation module 305 is used to install the boot loader and kickstart file creation tool in the virtual machine;
[0097] A file generation module 306 is used to generate a kickstart file using a kickstart file creation tool;
[0098] File storage module 307, used for storing the kickstart file in the virtual machine;
[0099] An image file generating module 308 is used to generate an image file of a virtual machine;
[0100] The image file sending module 309 is configured to send the image file to the terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-boot execution environment.
[0101] In a possible implementation, the pre-boot execution environment image file processing device 300 further includes: an address writing module 310 .
[0102] The address writing module 310 is used to obtain an Internet Protocol address and write the Internet Protocol address into a configuration file of the Dynamic Host Configuration Protocol.
[0103] In a possible implementation, the pre-boot execution environment image file processing device 300 further includes: a parameter modification module 311 .
[0104] Modify the target parameter of the daemon service program's configuration file to the executable file location of the Simple File Transfer Protocol.
[0105] In one possible implementation, the second installation module 304 is specifically used to install the Hypertext Transfer Protocol service, Simple File Transfer Protocol service and Daemon service program in the virtual machine using the target yum source; and set the Hypertext Transfer Protocol service, Simple File Transfer Protocol service and Daemon service program to start automatically at boot.
[0106] In a possible implementation, the pre-boot execution environment image file processing apparatus 300 further includes: a service restart module 312 .
[0107] Change the Network Interface field of the default file under the Simple File Transfer Protocol service to the network interface of the virtual machine and restart Dynamic Host Configuration Protocol.
[0108] In one possible implementation, the image file sending module 309 is specifically used to calculate the hash value of the image file; encrypt the hash value using a public key to obtain an encrypted hash value; and send the encrypted hash value and the image file to the terminal to be installed, so that the terminal to be installed uses the private key and the encrypted hash value to verify whether the image file has been tampered with. If the image file has not been tampered with, the image file is used to install a virtual machine containing a pre-boot execution environment.
[0109] In a possible implementation, the pre-boot execution environment image file processing apparatus 300 further includes: a firewall closing module 313 .
[0110] The firewall closing module 313 is used to close the firewall of the virtual machine.
[0111] For the description of the features in the embodiment corresponding to the pre-boot execution environment image file processing device, please refer to the relevant description of the embodiment corresponding to the pre-boot execution environment image file processing method, which will not be repeated here.
[0112] Figure 4 This is a schematic diagram of the structure of the pre-boot execution environment image file processing device provided by this application. Figure 4 As shown, the pre-boot execution environment image file processing device 40 provided in this embodiment includes: at least one processor 401 and a memory 402. Optionally, the pre-boot execution environment image file processing device 40 also includes a communication component 403. The processor 401, the memory 402, and the communication component 403 are connected via a bus.
[0113] In a specific implementation process, at least one processor 401 executes the computer execution instructions stored in the memory 402, so that the at least one processor 401 executes the above-mentioned embodiment of the pre-boot execution environment image file processing method.
[0114] The specific implementation process of the processor 401 can be found in the above method embodiment. Its implementation principle and technical effects are similar and will not be repeated here in this embodiment.
[0115] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.
[0116] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage.
[0117] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, and control buses. For ease of illustration, the buses in the drawings of this application are not limited to just one bus or just one type of bus.
[0118] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above-mentioned XX method embodiments when run.
[0119] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0120] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned pre-boot execution environment image file processing method embodiments are implemented.
[0121] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned pre-boot execution environment image file processing method embodiments.
[0122] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0123] The above is a detailed introduction to the pre-boot execution environment image file processing method, device, equipment and storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for processing a pre-boot execution environment image file, characterized in that: include: Install the target version of the virtual machine; Turn off mandatory access control of the virtual machine; Installing a Dynamic Host Configuration Protocol service in the virtual machine; Installing a Hypertext Transfer Protocol service, a Simple File Transfer Protocol service, and a daemon service program in the virtual machine, and setting them to start automatically upon startup; Installing a boot loader and a kickstart file creation tool in the virtual machine; Using the kickstart file creation tool to generate a kickstart file; Storing the kickstart file in the virtual machine; Generate an image file of the virtual machine; The image file is sent to the terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-start execution environment.
2. The method according to claim 1, characterized in that After installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine and setting the system to start automatically upon startup, the following steps are further included: Obtaining Internet Protocol addresses; The Internet Protocol address is written into the configuration file of the Dynamic Host Configuration Protocol.
3. The method according to claim 1, characterized in that After installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine and setting the system to start automatically upon startup, the following steps are further included: The target parameter of the configuration file of the daemon service program is modified to be the executable file location of the simple file transfer protocol.
4. The method according to claim 1, wherein The virtual machine is installed with a Hypertext Transfer Protocol service, a Simple File Transfer Protocol service, and a daemon service program, and is configured to start automatically upon startup, including: Using a target yum source to install the hypertext transfer protocol service, the single file transfer protocol service and the daemon service program in the virtual machine; The Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program are set to start automatically upon startup.
5. The method according to claim 1, wherein After installing the Hypertext Transfer Protocol service, the Simple File Transfer Protocol service and the daemon service program in the virtual machine and setting the system to start automatically upon startup, the following steps are further included: The network interface field of the default file under the Simple File Transfer Protocol service is set to the network interface of the virtual machine, and the Dynamic Host Configuration Protocol service is restarted.
6. The method according to claim 1, characterized in that After generating the image file of the virtual machine, the method further includes: Calculating a hash value of the image file; Encrypting the hash value using a public key to obtain an encrypted hash value; The encrypted hash value and the image file are sent to the terminal to be installed, so that the terminal to be installed uses a private key and the encrypted hash value to verify whether the image file has been tampered with. If the image file has not been tampered with, the image file is used to install the virtual machine containing the pre-boot execution environment.
7. The method according to claim 1, characterized in that After disabling the mandatory access control of the virtual machine, the method further includes: Disable the firewall of the virtual machine.
8. A pre-boot execution environment image file processing device, characterized in that: include: Virtual machine installation module, used to install the target version of the virtual machine; A control shutdown module, used to disable mandatory access control of the virtual machine; A first installation module, configured to install a dynamic host configuration protocol service in the virtual machine; A second installation module is used to install a Hypertext Transfer Protocol service, a Simple File Transfer Protocol service and a daemon service program in the virtual machine, and set it to start automatically when the machine is powered on; A third installation module is used to install a boot loader and a kickstart file creation tool in the virtual machine; A file generation module, used for generating a kickstart file using the kickstart file creation tool; A file storage module, used for storing the kickstart file in the virtual machine; An image file generation module, configured to generate an image file for the virtual machine; The image file sending module is used to send the image file to the terminal to be installed, so that the terminal to be installed uses the image file to install the virtual machine containing the pre-start execution environment.
9. A pre-boot execution environment image file processing device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the pre-boot execution environment image file processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the pre-boot execution environment image file processing method according to any one of claims 1 to 7 are implemented.