Linux system installation method, device, system, computer equipment and storage medium
Through the boot boot program provided by the PXE server and scripts in the virtual root file system, the automatic Linux system installation of the magnetic resonance imaging system control terminal is realized, solving the problems of low manual installation efficiency and misconfiguration, and improving installation efficiency and accuracy.
Patent Information
- Application Number
- CN202110864339.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-07-29
AI Technical Summary
In the control terminal of the magnetic resonance imaging system, manually installing the Linux system is inefficient and prone to configuration errors.
Through the boot boot program provided by the PXE server, the first PXE terminal obtains configuration files, Linux kernel and virtual root file system, and uses scripts in the virtual root file system to automatically parse and download the real root file system, and finally completes the system configuration through the third script to achieve automatic installation.
It improves the installation efficiency of Linux systems, avoids errors caused by manual configuration, and lowers the technical threshold.
Smart Images

Figure CN113672243B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of system installation, and in particular to a Linux system installation method, device, system, computer equipment and storage medium. Background Art
[0002] Magnetic resonance imaging (MRI) technology is one of the most advanced medical imaging methods today, and has been increasingly widely used in clinical practice and scientific research. Typically, a magnetic resonance imaging system includes a magnetic resonance device and a control terminal, in which the control terminal is installed with control software for the magnetic resonance device and imaging software for magnetic resonance images.
[0003] In actual use, a professional installer needs to install the Linux system in the control terminal first before installing the above software in the control terminal based on the Linux system.
[0004] However, in the actual installation process, when the Linux system is installed by the installer, there will be problems such as low installation efficiency and occasional manual configuration errors. Summary of the invention
[0005] Based on this, it is necessary to provide a Linux system installation method, device, system, computer equipment and storage medium that can improve installation efficiency and avoid manual configuration errors in response to the above technical problems.
[0006] In a first aspect, a Linux system installation method is provided, which is applied to a first PXE terminal, and the method includes:
[0007] Obtain configuration files, Linux kernel and virtual root file system from the PXE server based on the pre-obtained boot program, and install the virtual root file system according to the Linux kernel;
[0008] Parsing the configuration file using the first script set in the virtual root file system, and acquiring the second script and the third script from the PXE server according to the parsing result;
[0009] Using the second script to obtain the real root file system from the PXE server and install the real root file system;
[0010] The third script is used to configure the real root file system and complete the Linux system installation.
[0011] In a second aspect, a Linux system installation method is provided, which is applied to a PXE server, and the method includes:
[0012] After the first PXE terminal executes the boot program, a configuration file, a Linux kernel and a virtual root file system are sent to the first PXE terminal, so that the first PXE terminal can install the virtual root file system according to the Linux kernel;
[0013] After the first PXE terminal uses the first script set in the virtual root file system to parse the configuration file to obtain a parsing result, the second script and the third script are sent to the first PXE terminal according to the parsing result;
[0014] During the execution of the second script by the first PXE terminal, the real root file system is sent to the first PXE terminal so that the first PXE terminal can install the real root file system; wherein the third script is used to perform system configuration on the real root file system.
[0015] In a third aspect, a Linux system installation method is provided, the method comprising:
[0016] The first PXE terminal sends a first acquisition request to the PXE server based on the pre-acquired boot program;
[0017] The PXE server sends a configuration file, a Linux kernel, and a virtual root file system to the first PXE terminal according to the first acquisition request;
[0018] The first PXE terminal installs a virtual root file system according to the Linux kernel, parses the configuration file using a first script set in the virtual root file system, and sends a second acquisition request to the PXE server according to the parsing result;
[0019] The PXE server sends the second script and the third script to the first PXE terminal according to the second acquisition request;
[0020] The first PXE terminal executes the second script and sends a third acquisition request to the PXE server;
[0021] The PXE server sends a real root file system to the first PXE terminal according to the third acquisition request;
[0022] The first PXE terminal receives the real root file system, installs the real root file system, and uses the third script to perform system configuration on the real root file system to complete the Linux system installation.
[0023] In a fourth aspect, a Linux system installation device is provided, which is applied to a first PXE terminal, and the device includes:
[0024] The first installation module is used to obtain a configuration file, a Linux kernel and a virtual root file system from a PXE server based on a pre-acquired boot program, and install the virtual root file system according to the Linux kernel;
[0025] A script acquisition module, used to parse the configuration file using the first script set in the virtual root file system, and acquire the second script and the third script from the PXE server according to the parsing result;
[0026] A second installation module, used for obtaining a real root file system from the PXE server using a second script, and installing the real root file system;
[0027] The system configuration module is used to perform system configuration on the real root file system using the third script to complete the Linux system installation.
[0028] In a fifth aspect, a Linux system installation device is provided, which is applied to a PXE server, and the device includes:
[0029] A first sending module is used to send a configuration file, a Linux kernel and a virtual root file system to the first PXE terminal after the first PXE terminal executes a boot program, so that the first PXE terminal can install the virtual root file system according to the Linux kernel;
[0030] A second sending module is used for, after the first PXE terminal uses the first script set in the virtual root file system to parse the configuration file to obtain a parsing result, sending the second script and the third script to the first PXE terminal according to the parsing result;
[0031] The third sending module is used to send the real root file system to the first PXE terminal during the execution of the second script by the first PXE terminal, so that the first PXE terminal can install the real root file system; wherein the third script is used to perform system configuration on the real root file system.
[0032] In a sixth aspect, a Linux system installation system is provided, the system comprising a first PXE terminal and a PXE server;
[0033] The first PXE terminal is used to implement the steps of the method described in the first aspect;
[0034] The PXE server is used to implement the steps of the method described in the second aspect.
[0035] In a seventh aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect or the second aspect when executing the computer program.
[0036] In an eighth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0037] In the above-mentioned Linux system installation method, apparatus, system, computer equipment and storage medium, the first PXE terminal obtains the configuration file, Linux kernel and virtual root file system from the PXE server based on the pre-acquired boot program, and installs the virtual root file system according to the Linux kernel; parses the configuration file using the first script set by the system in the virtual root file, and obtains the second script and the third script from the PXE server according to the parsing result; obtains the real root file system from the PXE server using the second script, and installs the real root file system; and performs system configuration on the real root file system using the third script to complete the Linux system installation. Through the disclosed example, the first PXE terminal completes the automatic installation of the Linux system using the pre-set first script and second script, thereby improving the installation efficiency of the Linux system; and completes the automatic configuration of the Linux system using the third script, thereby avoiding the problem of errors caused by manual configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 An application environment diagram of a Linux system installation method in one embodiment;
[0039] Figure 2 One of the flowcharts of the Linux system installation method in one embodiment;
[0040] Figure 3 A schematic diagram of a flow chart of steps for obtaining a configuration file, a Linux kernel, and a virtual root file system in one embodiment;
[0041] Figure 4 A flowchart of the steps of obtaining a second script and a third script from a PXE server in one embodiment;
[0042] Figure 5 The second flowchart of the Linux system installation method in one embodiment;
[0043] Figure 6 The third flowchart of the Linux system installation method in one embodiment;
[0044] Figure 7 One of the flowcharts of the Linux system installation method in another embodiment;
[0045] Figure 8 The second flowchart of the Linux system installation method in another embodiment;
[0046] Fig. 9 The third flowchart of the Linux system installation method in another embodiment;
[0047] Fig.10 A flowchart of a Linux system installation method in another embodiment
[0048] Fig.11 It is a structural block diagram of a Linux system installation device in one embodiment;
[0049] Fig.12 It is a structural block diagram of a Linux system installation device in another embodiment;
[0050] Fig.13 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0052] The Linux system installation method provided in this application can be applied to Figure 1 The application environment shown in FIG. The application environment includes a first PXE (Preboot eXecution Environment) terminal 101 and a PXE server 102, wherein the first PXE terminal is a terminal for installing a Linux system and magnetic resonance software, and the first PXE terminal 101 communicates with the PXE server 102 through a network. The first PXE terminal 101 may be, but is not limited to, various personal computers, laptops, and tablet computers, and the PXE server 102 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0053] In one embodiment, the application environment may further include a second PXE terminal 103, wherein the second PXE terminal may be a research and development terminal, and the research and development personnel obtain the Linux kernel, the virtual root file system and the real root file system in advance in the second PXE terminal, and perform corresponding configuration to obtain the configuration file, and then compress and package the Linux kernel, the virtual root file system, the real root file system and the configuration file together and send them to the PXE server 102, so that the PXE server 102 can interact with the first PXE terminal to achieve the effect of automatically installing the Linux system. The above-mentioned second PXE terminal 103 may be, but is not limited to, various personal computers, laptops and tablet computers.
[0054] The PXE is also called the Pre-Execution Environment, which provides a mechanism for starting a computer using a network interface (Network Interface). This mechanism allows the computer to start without relying on a local data storage device (such as a hard disk) or a locally installed operating system.
[0055] The above Linux, full name GNU / Linux, is a free to use and freely disseminated Unix-like operating system. It is a POSIX-based multi-user, multi-tasking operating system that supports multi-threading and multiple CPUs (Central Processing Unit).
[0056] In one embodiment, Figure 2 As shown, a Linux system installation method is provided, which is applied to Figure 1 The application in the first PXE terminal is taken as an example to illustrate, including the following steps:
[0057] Step 201: obtain a configuration file, a Linux kernel, and a virtual root file system from a PXE server based on a pre-acquired boot program, and install the virtual root file system according to the Linux kernel.
[0058] The first PXE terminal can obtain a boot program from the PXE server in advance, and execute the boot program to obtain a configuration file, a Linux kernel, and a virtual root file system from the PXE server. Afterwards, the first PXE terminal executes the Linux kernel to install the virtual root file system in the first PXE terminal.
[0059] The boot program mentioned above may be a pxelinux.0 file, which is not limited in the embodiments of the present disclosure.
[0060] The above Linux kernel may include several parts: storage management, CPU and process management, file system, device management and driver, network communication, as well as system initialization (booting), system call, etc.
[0061] The virtual root file system is a file system that exists in the memory when the Linux system starts. It is to divide the Linux kernel into two parts: keep the minimum and most basic startup code in the Linux kernel, and then put the support for various hardware devices in the virtual root file system in the form of modules, so that the required modules can be loaded from the virtual root file system during the startup process. One advantage of this treatment is that different hardware can be flexibly supported by modifying the content of the virtual root file system while keeping the Linux kernel unchanged.
[0062] Step 202: parse the configuration file using the first script set by the system in the virtual root file, and obtain the second script and the third script from the PXE server according to the parsing result.
[0063] The virtual root file system is provided with a first script, after the virtual root file system is installed, the first script is executed, and the first script can parse the configuration file to obtain a parsing result. Afterwards, the first PXE terminal obtains the second script and the third script from the PXE server according to the parsing result.
[0064] Step 203: Obtain the real root file system from the PXE server using the second script, and install the real root file system.
[0065] After the first PXE terminal obtains the second script from the PXE server, it executes the second script, and thus can obtain the real root file system from the PXE server, and install the real root file system in the first PXE terminal.
[0066] Step 204: Use the third script to perform system configuration on the real root file system to complete the Linux system installation.
[0067] After the first PXE terminal installs the real root file system, the third script is executed, and the real root file system can be configured, such as configuring the user name, system password, etc. After the real root file system is configured, the Linux system installation is ended.
[0068] In one embodiment, after the Linux system is installed, the following steps may be performed: downloading magnetic resonance software and installing the magnetic resonance software.
[0069] The magnetic resonance software may include control software of the magnetic resonance device and imaging software of the magnetic resonance image, etc., which is not limited in the embodiments of the present disclosure.
[0070] In the above Linux system installation method, the first PXE terminal obtains the configuration file, Linux kernel and virtual root file system from the PXE server based on the pre-acquired boot program, and installs the virtual root file system according to the Linux kernel; the configuration file is parsed using the first script set by the system in the virtual root file, and the second script and the third script are obtained from the PXE server according to the parsing result; the real root file system is obtained from the PXE server using the second script, and the real root file system is installed; the real root file system is configured by the third script to complete the Linux system installation. Through the disclosed example, the first PXE terminal completes the automatic installation of the Linux system using the pre-set first script and second script, thereby improving the installation efficiency of the Linux system; and the automatic configuration of the Linux system is completed using the third script, thereby avoiding the problem of errors caused by manual configuration.
[0071] In one embodiment, Figure 3 As shown, the above steps of obtaining a configuration file, a Linux kernel, and a virtual root file system from a PXE server based on a pre-obtained boot program, and installing the virtual root file system according to the Linux kernel may include:
[0072] Step 2011, execute the boot program and send a configuration request to the PXE server.
[0073] The configuration request is used to instruct the PXE server to send a configuration file.
[0074] After the first PXE terminal obtains the boot program, it executes the boot program and sends a configuration request to the PXE server. The PXE server receives the configuration request and sends a configuration file to the first PXE terminal according to the configuration request. The configuration file may include kernel boot parameters for subsequent download and installation of the Linux system.
[0075] Step 2012: receiving a configuration file, and downloading a compressed package of a Linux kernel and a virtual root file system from a PXE server according to the configuration file.
[0076] After the PXE server sends the configuration file, the first PXE terminal receives the configuration file and downloads the compressed package of the Linux kernel and the virtual root file system from the PXE server according to the kernel startup parameters in the configuration file.
[0077] Step 2013, executing the Linux kernel, decompressing the compressed package of the virtual root file system to obtain the virtual root file system.
[0078] After downloading the compressed packages of the Linux kernel and the virtual root file system, the first PXE terminal executes the Linux kernel, decompresses the compressed package of the virtual root file system, and obtains the virtual root file system.
[0079] In the above embodiment, the first PXE terminal executes the boot program and sends a configuration request to the PXE server; receives the configuration file, and downloads the compressed package of the Linux kernel and the virtual root file system from the PXE server according to the configuration file; executes the Linux kernel, decompresses the compressed package of the virtual root file system, and obtains the virtual root file system. Through the disclosed embodiment, the first PXE terminal can automatically obtain the configuration file, the Linux kernel, and the compressed package of the virtual root file system from the PXE terminal using the boot program, thereby realizing the automatic installation of the virtual root file system. Since the installation process is completed automatically, the installation efficiency can be improved.
[0080] In one embodiment, Figure 4As shown, the above step of parsing the configuration file using the first script set in the virtual root file system and obtaining the second script and the third script from the PXE server according to the parsing result may include:
[0081] Step 2021, execute the first script, parse the kernel startup parameters in the configuration file, and obtain the first parameter and the second parameter.
[0082] After obtaining the virtual root file system, the first PXE terminal executes the first script set in the virtual root file system. The first script can parse the kernel startup parameters of the configuration file to obtain the first parameter and the second parameter.
[0083] For example, the first script parses the kernel startup parameters of the configuration file to obtain the first parameter uih.rootfsinit and the second parameter uih.appinit.
[0084] Step 2022: Obtain from the PXE server the second script specified by the first parameter and the third script specified by the second parameter.
[0085] The first parameter specifies the second script, and the second parameter specifies the third script. The second script is used to download and install the real root file system, and the third script is used to perform system configuration on the real root file system.
[0086] After the first PXE terminal parses out the first parameter, it obtains the second script from the PXE server according to the first parameter; after the first PXE terminal parses out the second parameter, it obtains the third script from the PXE server according to the second parameter.
[0087] In the above embodiment, the first PXE terminal executes the first script, parses the kernel startup parameters in the configuration file, and obtains the first parameter and the second parameter; and obtains the second script specified by the first parameter and the third script specified by the second parameter from the PXE server. Through the embodiment of the present disclosure, the first PXE terminal can obtain the second script and the third script by using the pre-set first script, so as to automatically perform system installation and system configuration later, thereby improving the installation efficiency of the Linux system.
[0088] In one embodiment, the above-mentioned step of obtaining the real root file system from the PXE server using the second script and installing the real root file system may include: executing the second script, and when determining to install the system, performing a hard disk configuration operation on the first PXE terminal to obtain a target hard disk partition, downloading the real root file system from the PXE server, and installing the real root file system to the target hard disk partition.
[0089] After the first PXE terminal obtains the second script from the PXE server, the second script is executed. During the execution process, it is first determined whether to perform system installation. If it is determined to perform system installation, a hard disk configuration operation is performed on the first PXE terminal to obtain a target hard disk partition, and a real root file system is downloaded and installed from the PXE server. If it is determined to perform system startup instead of system installation, there is no need to perform hard disk configuration operations and download and install the real root file system.
[0090] In one embodiment, the process of performing hard disk configuration operation on the first PXE terminal to obtain target hard disk partitions may include: formatting the hard disk of the first PXE terminal; and partitioning the formatted hard disk to obtain target hard disk partitions.
[0091] In one of the examples, the process of downloading the real root file system from the PXE server and installing the real root file system to the target hard disk partition may include: downloading a compressed package of the real root file system from the PXE; decompressing the compressed package of the real root file system, and installing the decompressed real root file system to the target hard disk partition.
[0092] After executing the second script, the first PXE terminal obtains a compressed package of the real root file system from the server, then decompresses the compressed package of the real root file system to obtain the decompressed real root file system, and then installs the real root file system to the target hard disk partition, thereby realizing the installation of the real root file system.
[0093] In the above embodiment, the first PXE terminal uses the second script to automatically download and install the real root file system, thereby improving the installation efficiency of the Linux system. In addition, the first PXE terminal downloads a compressed package of the real root file system, thereby improving the transmission efficiency during the transmission of the real root file system.
[0094] In one embodiment, the above-mentioned use of the third script to perform system configuration on the real root file system includes: executing the third script, and when it is determined to perform system configuration, performing configuration operations on the real root file system; wherein the configuration operations at least include user configuration operations and password configuration operations.
[0095] During the execution of the third script by the first PXE server, it is first determined whether to perform system configuration. If it is determined to perform system configuration, user configuration operations and password configuration operations are performed on the real root file system, and the user name, system password, etc. are configured for the real root file system. If it is determined that only the system is started, it is not system configuration, and no configuration operation is performed on the real root file system.
[0096] The above configuration operation may also include other operations, which are not limited in the embodiments of the present disclosure.
[0097] In the above embodiment, the first PXE terminal uses the third script to realize automatic configuration of the real root file system, which not only improves the configuration efficiency of the Linux system, but also avoids the problem of errors caused by manual configuration.
[0098] In one example, if Figure 5 As shown, before the above step of obtaining a configuration file, a Linux kernel, and a virtual root file system from a PXE server based on the pre-acquired boot program, the embodiment of the present disclosure may further include:
[0099] Step 205, after entering the PXE network to start, an address allocation request is sent to the PXE server through the DHCP (Dynamic Host Configuration Protocol) service, and a target network address allocated to the first PXE terminal by the PXE server according to the address allocation request is received through the DHCP service.
[0100] The first PXE terminal first enters the PXE network to start, and then sends an address allocation request to the PXE server through the DHCP service. The PXE server receives the address allocation request and allocates a target network address to the first PXE terminal according to the address allocation request. Afterwards, the PXE server feeds back the target network address through the DHCP service, and the first PXE terminal receives the target network address fed back by the PXE server.
[0101] The above-mentioned DHCP is a network protocol for a local area network, which means that a range of IP (Internet Protocol) addresses is controlled by a server. When a client terminal logs into the server, it can automatically obtain the IP address and subnet mask assigned by the server.
[0102] Step 206: Send a program transfer request to the PXE server through a TFTP (Trivial File Transfer Protocol) service, and receive a boot program sent by the PXE server according to the program transfer request through the TFTP service.
[0103] The PXE server can also feed back a trigger instruction to the first PXE terminal while feeding back the target network address. After receiving the trigger instruction, the first PXE terminal sends a program transfer request to the PXE server through the TFTP service. The PXE server receives the program transfer request and feeds back a boot program to the first PXE terminal through the TFTP service according to the program transfer request.
[0104] The first PXE terminal receives the boot program fed back by the PXE server. Then, the first PXE terminal executes the boot program to obtain a configuration file, a Linux kernel and a virtual root file system from the PXE server.
[0105] The above-mentioned TFTP is a protocol in the TCP / IP protocol family used for simple file transfer between a client terminal and a server, providing a simple and low-cost file transfer service.
[0106] In the above embodiment, after the first PXE terminal enters the PXE network and starts, it sends an address allocation request to the PXE server through the DHCP service, and receives the target network address allocated to the first PXE terminal by the PXE server according to the address allocation request through the DHCP service; sends a program transfer request to the PXE server through the TFTP service, and receives the boot program sent by the PXE server according to the program transfer request through the TFTP service. Through the embodiment of the present disclosure, the first PXE terminal can obtain the target network address through the DHCP service using the PXE network, and obtain the boot program through the TFTP service, so that the system can be automatically installed and configured later, thereby improving the installation efficiency of the Linux system.
[0107] In one embodiment, Figure 6 As shown, before the step of sending an address allocation request to the PXE server through the DHCP service, the embodiment of the present disclosure may further include:
[0108] Step 207, after the computer is turned on, a pre-set BIOS (Basic Input Output System) program is executed, and the BIOS program enters the PXE network boot according to the preset boot items.
[0109] After the first PXE terminal is turned on, the BIOS program pre-set on the motherboard will be executed, and the BIOS program will determine whether the preset boot item is PXE network boot. If the preset boot item is PXE network boot, then enter PXE network boot. It can be understood that the user needs to set the preset boot item to PXE network boot in the first PXE terminal in advance.
[0110] After entering the PXE network startup, the first PXE terminal can obtain the target network address through the DHCP service and obtain the startup boot program through the TFTP service.
[0111] In the above embodiment, after the first PXE terminal is turned on, it can enter the PXE network boot through the BIOS program, so as to use the PXE network to automatically install and configure the Linux system, thereby improving the installation efficiency of the Linux system.
[0112] In one embodiment, Figure 7 As shown, a Linux system installation method is provided, which is applied to Figure 1 The following steps are used to illustrate the PXE server in the example:
[0113] Step 301, after the first PXE terminal executes the boot program, a configuration file, a Linux kernel and a virtual root file system are sent to the first PXE terminal, so that the first PXE terminal can install the virtual root file system according to the Linux kernel.
[0114] After the first PXE terminal executes the boot program, it sends a configuration request to the PXE server. The PXE server receives the configuration request sent by the first PXE terminal, and sends a configuration file to the first PXE terminal according to the configuration request. Afterwards, the first PXE terminal obtains the Linux kernel and the virtual root file system according to the configuration file. Correspondingly, the PXE server sends a compressed package of the Linux kernel and the virtual root file system to the first PXE terminal, so that the first PXE terminal can execute the Linux kernel, and decompress the compressed package of the virtual root file system to obtain the virtual root file system. Specifically, the first PXE terminal receives the compressed package of the Linux kernel and the virtual root file system, executes the Linux kernel, and decompresses the compressed package of the virtual root file system to obtain the virtual root file system.
[0115] Step 302: After the first PXE terminal uses the first script set in the virtual root file system to parse the configuration file to obtain a parsing result, a second script and a third script are sent to the first PXE terminal according to the parsing result.
[0116] After the first PXE terminal obtains the virtual root file system, it executes the first script in the virtual root file system, the first script parses the configuration file to obtain the first parameter and the second parameter, obtains the second script from the PXE server according to the first parameter, and obtains the third script from the PXE server according to the second parameter. Correspondingly, the PXE server sends the second script and the third script to the first PXE terminal.
[0117] Step 303: During the process of executing the second script on the first PXE terminal, the real root file system is sent to the first PXE terminal, so that the first PXE terminal can install the real root file system.
[0118] The second script is used to download and install the real root file system, and the third script is used to perform system configuration on the real root file system.
[0119] After the first PXE terminal obtains the second script and the third script, it executes the second script, performs hard disk configuration operations on the first PXE terminal to obtain the target hard disk partition, and obtains the real root file system from the PXE server. Correspondingly, the PXE server sends a compressed package of the real root file system to the first PXE terminal, and the first PXE terminal decompresses the compressed package of the real root file system after receiving it to obtain the real root file system. Then, the second script installs the real root file system to the target hard disk partition.
[0120] Afterwards, the first PXE terminal executes the third script to perform system configuration on the real root file system, thereby completing the installation of the Linux system.
[0121] In the above embodiment, after the first PXE terminal executes the boot program, the PXE server sends the configuration file, the Linux kernel and the virtual root file system to the first PXE terminal, so that the first PXE terminal can install the virtual root file system according to the Linux kernel; after the first PXE terminal uses the first script set in the virtual root file system to parse the configuration file to obtain the parsing result, the PXE server sends the second script and the third script to the first PXE terminal according to the parsing result; during the execution of the second script by the first PXE terminal, the PXE server sends the real root file system to the first PXE terminal, so that the first PXE terminal can install the real root file system. Through the embodiment of the present disclosure, the configuration file, the Linux kernel and the virtual root file system are set in advance in the PXE server. When the first PXE terminal installs and configures the system, the PXE server can provide the first PXE terminal with the corresponding files, so that the first PXE terminal can automatically install and configure the system, thereby improving the installation efficiency of the Linux system.
[0122] In one embodiment, Figure 8 As shown, before the above step of sending the configuration file, the Linux kernel and the virtual root file system to the first PXE terminal, the embodiment of the present disclosure may further include:
[0123] Step 304: receiving an address allocation request sent by the first PXE terminal through the DHCP service, and sending a target network address to the first PXE terminal according to the address allocation request.
[0124] Before obtaining the configuration file, the first PXE terminal first sends an address allocation request to the PXE server through the DHCP service. Correspondingly, the PXE server receives the address allocation request sent by the first PXE terminal and allocates the target network address to the first PXE terminal according to the address allocation request.
[0125] Step 305: receiving a program transfer request sent by the first PXE terminal through the TFTP service, and sending a boot program to the first PXE terminal according to the program transfer request.
[0126] The PXE server may also send a trigger instruction to the first PXE terminal while sending the target network address to the first PXE terminal. After receiving the trigger instruction, the first PXE terminal sends a program transfer request to the PXE server through the TFTP service. Correspondingly, the PXE server receives the program transfer request and sends a boot program to the first PXE terminal according to the program transfer request.
[0127] In the above embodiment, the PXE server receives the address allocation request sent by the first PXE terminal through the DHCP service, and sends the target network address to the first PXE terminal according to the address allocation request; receives the program transfer request sent by the first PXE terminal through the TFTP service, and sends the boot program to the first PXE terminal according to the program transfer request. Through the embodiment of the present disclosure, the PXE server allocates the target network address to the first PXE terminal and transmits the boot program, which facilitates the subsequent automatic system installation and configuration of the first PXE terminal, thereby improving the installation efficiency of the Linux system.
[0128] In one embodiment, Fig. 9 As shown, in the above-mentioned process of executing the boot program on the first PXE terminal, before the step of sending the configuration file, the Linux kernel and the virtual root file system to the first PXE terminal, the embodiment of the present disclosure may also include:
[0129] Step 306: Obtain a boot program, a configuration file, a Linux kernel, a virtual root file system, and a real root file system from the second PXE terminal.
[0130] Among them, the boot program is extracted by the second PXE terminal from the pre-downloaded software package; the configuration file is pre-set in the second PXE terminal; the Linux kernel and the virtual root file system are obtained by pre-installing the Linux system in the second PXE terminal; the real root file system is obtained by compressing and packaging the hard disk files by the second PXE terminal.
[0131] The second PXE terminal is a development terminal. During the development process, the second PXE terminal downloads a software package and extracts a boot program from the software package. The software package may be a syslinux software package, and the boot program may be a pxelinux.0 file.
[0132] Afterwards, the second PXE terminal can install the Linux system in a hard disk boot mode. After the installation is complete, the second PXE terminal can obtain the Linux kernel and the virtual root file system. When installing the Linux system, you can choose the smallest Linux system installation package or other Linux system installation packages, which is not limited in the disclosed embodiment.
[0133] Next, the configuration file in the second PXE terminal can be set, for example, the kernel startup parameters in the configuration file and the script specified by the kernel startup parameters can be set. A fourth script can also be added to the / script directory of the virtual root file system. The fourth script is used to parse the IP address of the PXE server, parse the second script and the third script specified by the kernel startup parameters, and download the second script and the third script through the TFTP service. The disclosed embodiment does not limit the role of the fourth script.
[0134] Finally, a systemd service that starts at boot can be added to the Linux system installed in the second PXE terminal, and the hard disk file of the second PXE terminal is compressed and packaged to obtain a real root file system. Adding the systemd service may include: creating a new uihbootup.service file in the / etc / systemd / system / directory and setting the systemd service to start at boot. The systemd service can execute the fifth script specified by the kernel startup parameter uihbootup.sh, and the fifth script is used to call and execute the third script specified by the second parameter.
[0135] After the second PXE terminal obtains the configuration file, Linux kernel, virtual root file system and real root file system, it compresses and packages the configuration file, Linux kernel, virtual root file system and real root file system, and sends the packaged files to the PXE server. In this way, when the first PXE terminal installs the Linux system, it can obtain the configuration file, Linux kernel, virtual root file system and real root file system from the PXE server.
[0136] In the above embodiment, the PXE server obtains the boot program, configuration file, Linux kernel, virtual root file system and real root file system from the second PXE terminal in advance. In this way, when the first PXE terminal performs system installation and configuration, the configuration file, Linux kernel, virtual root file system and real root file system can be provided to the first PXE terminal, thereby realizing automatic installation and configuration of the Linux system by the first PXE terminal, and improving the installation efficiency of the Linux system.
[0137] In one embodiment, Fig.10As shown, a Linux system installation method is provided, which may include the following steps:
[0138] Step 401: After the first PXE terminal is powered on, a preset BIOS program is executed, and the BIOS program enters the PXE network boot according to the preset boot items.
[0139] Step 402: After entering the PXE network and starting, an address allocation request is sent to the PXE server through the DHCP service.
[0140] Step 403: The PXE server receives an address allocation request sent by the first PXE terminal through the DHCP service, and sends a target network address to the first PXE terminal according to the address allocation request.
[0141] Step 404: The first PXE terminal receives the target network address assigned by the PXE server through the DHCP service.
[0142] Step 405: The first PXE terminal sends a program transfer request to the PXE server through the TFTP service.
[0143] Step 406: The PXE server receives the program transfer request sent by the first PXE terminal through the TFTP service, and sends a boot program to the first PXE terminal according to the program transfer request.
[0144] Step 407: The first PXE terminal sends a first acquisition request to the PXE server based on the pre-acquired boot program.
[0145] The first acquisition request may be the configuration request in the above embodiment.
[0146] Step 408: The PXE server sends the configuration file, the Linux kernel, and the virtual root file system to the first PXE terminal according to the first acquisition request.
[0147] Step 409: the first PXE terminal installs a virtual root file system according to the Linux kernel, parses the configuration file using a first script set in the virtual root file system, and sends a second acquisition request to the PXE server according to the parsing result.
[0148] Step 410: The PXE server sends the second script and the third script to the first PXE terminal according to the second acquisition request.
[0149] Step 411: The first PXE terminal executes the second script and sends a third acquisition request to the PXE server.
[0150] Step 412: The PXE server sends the real root file system to the first PXE terminal according to the third acquisition request.
[0151] Step 413: The first PXE terminal receives the real root file system, installs the real root file system, and uses the third script to perform system configuration on the real root file system to complete the Linux system installation.
[0152] In the above embodiment, the first PXE terminal interacts with the PXE server, and uses the PXE network, DHCP service, TFTP service, the first script, the second script, and the third script to realize the first PXE terminal to automatically install and configure the Linux system, which not only improves the installation efficiency of the Linux system, but also avoids the problem of errors caused by manual configuration, thereby lowering the technical threshold. Furthermore, the installation and startup of the Linux system can use the same Linux kernel and virtual root file system, which is convenient for maintenance and low in maintenance cost.
[0153] It should be understood that although Figures 2 to 10 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figures 2 to 10 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0154] In one embodiment, Fig.11 As shown, a Linux system installation device is provided, which is applied to a first PXE terminal, and the device includes:
[0155] The first installation module 501 is used to obtain a configuration file, a Linux kernel and a virtual root file system from a PXE server based on a pre-acquired boot program, and install the virtual root file system according to the Linux kernel;
[0156] The script acquisition module 502 is used to parse the configuration file using the first script set in the virtual root file system, and acquire the second script and the third script from the PXE server according to the parsing result;
[0157] The second installation module 503 is used to obtain the real root file system from the PXE server using the second script and install the real root file system;
[0158] The system configuration module 504 is used to perform system configuration on the real root file system using the third script to complete the Linux system installation.
[0159] In one embodiment, the script acquisition module 502 is specifically used to execute the first script, parse the kernel startup parameters in the configuration file to obtain the first parameter and the second parameter; and obtain the second script specified by the first parameter and the third script specified by the second parameter from the PXE server.
[0160] In one embodiment, the second installation module 503 is specifically used to execute the second script. When it is determined that the system is to be installed, a hard disk configuration operation is performed on the first PXE terminal to obtain a target hard disk partition, a real root file system is downloaded from the PXE server, and the real root file system is installed to the target hard disk partition.
[0161] In one embodiment, the second installation module 503 is specifically used to format the hard disk of the first PXE terminal; and partition the formatted hard disk to obtain a target hard disk partition.
[0162] In one embodiment, the second installation module 503 is specifically used to download a compressed package of the real root file system from PXE; decompress the compressed package of the real root file system, and install the decompressed real root file system to the target hard disk partition.
[0163] In one embodiment, the system configuration module 504 is specifically used to execute the third script, and when it is determined to perform system configuration, perform configuration operations on the real root file system; wherein the configuration operations at least include user configuration operations and password configuration operations.
[0164] In one of the embodiments, the first installation module 501 is specifically used to execute a boot program and send a configuration request to a PXE server; the configuration request is used to instruct the PXE server to send a configuration file; receive the configuration file, and download a compressed package of a Linux kernel and a virtual root file system from the PXE server according to the configuration file; execute the Linux kernel, decompress the compressed package of the virtual root file system, and obtain the virtual root file system.
[0165] In one embodiment, the device further comprises:
[0166] An address acquisition module is used to send an address allocation request to a PXE server through a DHCP service after entering the PXE network to start, and receive a target network address allocated by the PXE server to the first PXE terminal according to the address allocation request through the DHCP service;
[0167] The program acquisition module is used to send a program transfer request to the PXE server through the TFTP service, and receive a boot program sent by the PXE server according to the program transfer request through the TFTP service.
[0168] In one embodiment, the device further comprises:
[0169] The startup module is used to execute the preset BIOS program after booting, and the BIOS program enters the PXE network startup according to the preset startup items.
[0170] In one embodiment, the device further comprises:
[0171] The software installation module is used to download and install the magnetic resonance software.
[0172] In one embodiment, Fig.12 As shown, a Linux system installation device is provided, which is applied to a PXE server, and the device includes:
[0173] The first sending module 601 is used to send a configuration file, a Linux kernel and a virtual root file system to the first PXE terminal after the first PXE terminal executes the boot program, so that the first PXE terminal can install the virtual root file system according to the Linux kernel;
[0174] The second sending module 602 is used for, after the first PXE terminal uses the first script set in the virtual root file system to parse the configuration file to obtain a parsing result, sending the second script and the third script to the first PXE terminal according to the parsing result;
[0175] The third sending module 603 is used to send the real root file system to the first PXE terminal when the first PXE terminal executes the second script, so that the first PXE terminal can install the real root file system; wherein the third script is used to perform system configuration on the real root file system.
[0176] In one of the embodiments, the first sending module 601 is specifically used to receive a configuration request sent by a first PXE terminal, and send a configuration file to the first PXE terminal according to the configuration request; send a compressed package of a Linux kernel and a virtual root file system to the first PXE terminal so that the first PXE terminal can execute the Linux kernel, and decompress the compressed package of the virtual root file system to obtain the virtual root file system.
[0177] In one embodiment, the device further comprises:
[0178] An address allocation module, configured to receive an address allocation request sent by a first PXE terminal through a DHCP service, and send a target network address to the first PXE terminal according to the address allocation request;
[0179] The program transmission module is used to receive a program transmission request sent by the first PXE terminal through the TFTP service, and send a boot program to the first PXE terminal according to the program transmission request.
[0180] In one embodiment, the device further comprises:
[0181] A file acquisition module is used to acquire a boot program, a configuration file, a Linux kernel, a virtual root file system and a real root file system from a second PXE terminal;
[0182] Among them, the boot program is extracted by the second PXE terminal from the pre-downloaded software package; the configuration file is pre-set in the second PXE terminal; the Linux kernel and the virtual root file system are obtained by pre-installing the Linux system in the second PXE terminal; the real root file system is obtained by compressing and packaging the hard disk files by the second PXE terminal.
[0183] For the specific definition of the Linux system installation device, please refer to the definition of the Linux system installation method above, which will not be repeated here. Each module in the above Linux system installation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0184] In one embodiment, a Linux system installation system is provided, such as Figure 1 As shown, the system includes a first PXE terminal and a PXE server;
[0185] The first PXE terminal is used in the steps of the above Linux system installation method;
[0186] The PXE server is used to implement the steps of the above Linux system installation method.
[0187] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.13As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a Linux system installation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0188] Those skilled in the art will understand that Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0189] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0190] Obtain configuration files, Linux kernel and virtual root file system from the PXE server based on the pre-obtained boot program, and install the virtual root file system according to the Linux kernel;
[0191] Parsing the configuration file using the first script set in the virtual root file system, and acquiring the second script and the third script from the PXE server according to the parsing result;
[0192] Using the second script to obtain the real root file system from the PXE server and install the real root file system;
[0193] The third script is used to configure the real root file system and complete the Linux system installation.
[0194] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0195] Execute the first script to parse the kernel startup parameters in the configuration file to obtain the first parameter and the second parameter;
[0196] The second script specified by the first parameter and the third script specified by the second parameter are respectively obtained from the PXE server.
[0197] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0198] The second script is executed, and when it is determined to perform system installation, a hard disk configuration operation is performed on the first PXE terminal to obtain a target hard disk partition, a real root file system is downloaded from the PXE server, and the real root file system is installed to the target hard disk partition.
[0199] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0200] Formatting the hard disk of the first PXE terminal;
[0201] Perform partition processing on the formatted hard disk to obtain the target hard disk partition.
[0202] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0203] Download the compressed package of the real root file system from PXE;
[0204] The compressed package of the real root file system is decompressed, and the decompressed real root file system is installed to the target hard disk partition.
[0205] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0206] The third script is executed, and when it is determined to perform system configuration, a configuration operation is performed on the real root file system; wherein the configuration operation at least includes a user configuration operation and a password configuration operation.
[0207] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0208] Execute the boot program and send a configuration request to the PXE server; the configuration request is used to instruct the PXE server to send a configuration file;
[0209] Receive the configuration file, and download the compressed package of Linux kernel and virtual root file system from the PXE server according to the configuration file;
[0210] The Linux kernel is executed to decompress the compressed package of the virtual root file system to obtain the virtual root file system.
[0211] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0212] After entering the PXE network to start, sending an address allocation request to the PXE server through the DHCP service, and receiving through the DHCP service the target network address allocated by the PXE server to the first PXE terminal according to the address allocation request;
[0213] A program transfer request is sent to the PXE server through the TFTP service, and a boot program is received from the PXE server according to the program transfer request through the TFTP service.
[0214] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0215] After booting up, the pre-set BIOS program is executed, and the BIOS program enters the PXE network boot according to the preset boot items.
[0216] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0217] Download the MRI software and install the MRI software.
[0218] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0219] Obtain configuration files, Linux kernel and virtual root file system from the PXE server based on the pre-obtained boot program, and install the virtual root file system according to the Linux kernel;
[0220] Parsing the configuration file using the first script set in the virtual root file system, and acquiring the second script and the third script from the PXE server according to the parsing result;
[0221] Using the second script to obtain the real root file system from the PXE server and install the real root file system;
[0222] The third script is used to configure the real root file system and complete the Linux system installation.
[0223] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0224] Execute the first script to parse the kernel startup parameters in the configuration file to obtain the first parameter and the second parameter;
[0225] The second script specified by the first parameter and the third script specified by the second parameter are respectively obtained from the PXE server.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0227] The second script is executed, and when it is determined to perform system installation, a hard disk configuration operation is performed on the first PXE terminal to obtain a target hard disk partition, a real root file system is downloaded from the PXE server, and the real root file system is installed to the target hard disk partition.
[0228] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0229] Formatting the hard disk of the first PXE terminal;
[0230] Perform partition processing on the formatted hard disk to obtain the target hard disk partition.
[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0232] Download the compressed package of the real root file system from PXE;
[0233] The compressed package of the real root file system is decompressed, and the decompressed real root file system is installed to the target hard disk partition.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0235] The third script is executed, and when it is determined to perform system configuration, a configuration operation is performed on the real root file system; wherein the configuration operation at least includes a user configuration operation and a password configuration operation.
[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0237] Execute the boot program and send a configuration request to the PXE server; the configuration request is used to instruct the PXE server to send a configuration file;
[0238] Receive the configuration file, and download the compressed package of Linux kernel and virtual root file system from the PXE server according to the configuration file;
[0239] The Linux kernel is executed to decompress the compressed package of the virtual root file system to obtain the virtual root file system.
[0240] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0241] After entering the PXE network to start, sending an address allocation request to the PXE server through the DHCP service, and receiving through the DHCP service the target network address allocated by the PXE server to the first PXE terminal according to the address allocation request;
[0242] A program transfer request is sent to the PXE server through the TFTP service, and a boot program is received from the PXE server according to the program transfer request through the TFTP service.
[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0244] After booting up, the pre-set BIOS program is executed, and the BIOS program enters the PXE network boot according to the preset boot items.
[0245] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0246] Download the MRI software and install the MRI software.
[0247] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0248] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0249] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A Linux system installation method, characterized in that: Applied to a first PXE terminal, the method comprises: Obtaining a configuration file, a Linux kernel and a virtual root file system from a PXE server based on a pre-acquired boot program, and installing the virtual root file system according to the Linux kernel; the virtual root file system includes a module for supporting various hardware devices; Parsing the configuration file using the first script set in the virtual root file system, and acquiring a second script and a third script from the PXE server according to the parsing result; Obtaining a real root file system from the PXE server using the second script, and installing the real root file system; Using the third script to perform system configuration on the real root file system to complete the Linux system installation; The step of parsing the configuration file by using the first script set in the virtual root file system, and acquiring the second script and the third script from the PXE server according to the parsing result, comprises: Execute the first script to parse the kernel startup parameters in the configuration file to obtain a first parameter and a second parameter; respectively obtaining from the PXE server the second script specified by the first parameter and the third script specified by the second parameter; The using the third script to perform system configuration on the real root file system includes: The third script is executed, and when it is determined to perform system configuration, a configuration operation is performed on the real root file system; wherein the configuration operation at least includes a user configuration operation and a password configuration operation.
2. The method according to claim 1, characterized in that The step of obtaining a real root file system from the PXE server using the second script and installing the real root file system includes: The second script is executed, and when it is determined to perform system installation, a hard disk configuration operation is performed on the first PXE terminal to obtain a target hard disk partition, the real root file system is downloaded from the PXE server, and the real root file system is installed to the target hard disk partition.
3. The method according to claim 2, characterized in that: The performing a hard disk configuration operation on the first PXE terminal to obtain a target hard disk partition includes: Formatting the hard disk of the first PXE terminal; The formatted hard disk is partitioned to obtain the target hard disk partition.
4. The method according to claim 2, characterized in that: The downloading of the real root file system from the PXE server and installing the real root file system to the target hard disk partition includes: Download the compressed package of the real root file system from the PXE; The compressed package of the real root file system is decompressed, and the real root file system obtained by decompression is installed to the target hard disk partition.
5. The method according to claim 1, characterized in that The method of obtaining a configuration file, a Linux kernel, and a virtual root file system from a PXE server based on a pre-acquired boot program, and installing the virtual root file system according to the Linux kernel, includes: Execute the boot program and send a configuration request to the PXE server; the configuration request is used to instruct the PXE server to send the configuration file; Receive the configuration file, and download the compressed packages of the Linux kernel and the virtual root file system from the PXE server according to the configuration file; The Linux kernel is executed to decompress the compressed package of the virtual root file system to obtain the virtual root file system.
6. The method according to claim 1, characterized in that Before obtaining the configuration file, the Linux kernel and the virtual root file system from the PXE server based on the pre-acquired boot program, the method further includes: After entering the PXE network and starting, sending an address allocation request to the PXE server through the DHCP service, and receiving through the DHCP service a target network address allocated by the PXE server to the first PXE terminal according to the address allocation request; A program transmission request is sent to the PXE server through the TFTP service, and the boot program sent by the PXE server according to the program transmission request is received through the TFTP service.
7. The method according to claim 6, characterized in that Before sending the address allocation request to the PXE server through the DHCP service, the method further includes: After booting up, the pre-set BIOS program is executed, and the BIOS program enters the PXE network boot according to the preset boot items.
8. The method according to claim 1, characterized in that After the Linux system is installed, the method further includes: Download the magnetic resonance software and install the magnetic resonance software.
9. A Linux system installation method, characterized in that: Applied to a PXE server, the method comprises: After the first PXE terminal executes the boot program, a configuration file, a Linux kernel and a virtual root file system are sent to the first PXE terminal, so that the first PXE terminal can install the virtual root file system according to the Linux kernel; the virtual root file system includes a module for supporting various hardware devices; After the first PXE terminal parses the configuration file using the first script set in the virtual root file system to obtain a parsing result, a second script and a third script are sent to the first PXE terminal according to the parsing result; During the execution of the second script by the first PXE terminal, a real root file system is sent to the first PXE terminal, so that the first PXE terminal can install the real root file system; wherein the third script is used to perform a configuration operation on the real root file system when it is determined to perform system configuration; the configuration operation includes at least a user configuration operation and a password configuration operation; The step of parsing the configuration file using the first script set in the virtual root file system to obtain a parsing result includes: The first script is executed, and the kernel startup parameters in the configuration file are parsed to obtain a first parameter and a second parameter; the first parameter is used to obtain the second script specified by the first parameter, and the second parameter is used to obtain the third script specified by the second parameter.
10. The method according to claim 9, characterized in that The sending of the configuration file, the Linux kernel, and the virtual root file system to the first PXE terminal includes: receiving a configuration request sent by the first PXE terminal, and sending the configuration file to the first PXE terminal according to the configuration request; The compressed packages of the Linux kernel and the virtual root file system are sent to the first PXE terminal so that the first PXE terminal executes the Linux kernel, and the compressed package of the virtual root file system is decompressed to obtain the virtual root file system.
11. The method according to claim 9, characterized in that Before sending the configuration file, the Linux kernel and the virtual root file system to the first PXE terminal, the method further includes: receiving an address allocation request sent by the first PXE terminal through a DHCP service, and sending a target network address to the first PXE terminal according to the address allocation request; A program transmission request sent by the first PXE terminal is received through a TFTP service, and the boot program is sent to the first PXE terminal according to the program transmission request.
12. The method according to claim 9, characterized in that In the process of executing the boot program at the first PXE terminal, before sending the configuration file, the Linux kernel and the virtual root file system to the first PXE terminal, the method further includes: Acquire the boot program, the configuration file, the Linux kernel, the virtual root file system, and the real root file system from the second PXE terminal; Among them, the boot program is extracted by the second PXE terminal from a pre-downloaded software package; the configuration file is pre-set in the second PXE terminal; the Linux kernel and the virtual root file system are obtained by pre-installing the Linux system in the second PXE terminal; and the real root file system is obtained by compressing and packaging the hard disk files by the second PXE terminal.
13. A Linux system installation method, characterized in that: The method comprises: The first PXE terminal sends a first acquisition request to the PXE server based on the pre-acquired boot program; The PXE server sends a configuration file, a Linux kernel, and a virtual root file system to the first PXE terminal according to the first acquisition request; the virtual root file system includes a module for supporting each hardware device; The first PXE terminal installs the virtual root file system according to the Linux kernel, parses the configuration file using a first script set in the virtual root file system, and sends a second acquisition request to the PXE server according to the parsing result; The PXE server sends a second script and a third script to the first PXE terminal according to the second acquisition request; The first PXE terminal executes the second script and sends a third acquisition request to the PXE server; The PXE server sends a real root file system to the first PXE terminal according to the third acquisition request; The first PXE terminal receives the real root file system, installs the real root file system, and uses the third script to perform system configuration on the real root file system to complete the Linux system installation; The step of parsing the configuration file by using the first script set in the virtual root file system includes: Execute the first script, parse the kernel startup parameters in the configuration file, and obtain a first parameter and a second parameter; the first parameter is used to obtain the second script specified by the first parameter, and the second parameter is used to obtain the third script specified by the second parameter; The using the third script to perform system configuration on the real root file system includes: The third script is executed, and when it is determined to perform system configuration, a configuration operation is performed on the real root file system; wherein the configuration operation at least includes a user configuration operation and a password configuration operation.
14. A Linux system installation device, characterized in that: Applied to a first PXE terminal, the device comprises: A first installation module is used to obtain a configuration file, a Linux kernel and a virtual root file system from a PXE server based on a pre-acquired boot program, and install the virtual root file system according to the Linux kernel; the virtual root file system includes a module for supporting various hardware devices; A script acquisition module, used to parse the configuration file using the first script set in the virtual root file system, and acquire a second script and a third script from the PXE server according to the parsing result; A second installation module, used for obtaining a real root file system from the PXE server using the second script, and installing the real root file system; A system configuration module, used to perform system configuration on the real root file system using the third script to complete the Linux system installation; The script acquisition module is further used to execute the first script, parse the kernel startup parameters in the configuration file to obtain the first parameter and the second parameter; respectively obtain the second script specified by the first parameter and the third script specified by the second parameter from the PXE server; The system configuration module is used to execute the third script and, when it is determined to perform system configuration, perform configuration operations on the real root file system; wherein the configuration operations at least include user configuration operations and password configuration operations.
15. A Linux system installation device, characterized in that: Applied to a PXE server, the device comprises: A first sending module is used to send a configuration file, a Linux kernel and a virtual root file system to the first PXE terminal after the first PXE terminal executes a boot program, so that the first PXE terminal can install the virtual root file system according to the Linux kernel; the virtual root file system includes a module for supporting various hardware devices; A second sending module is used for sending a second script and a third script to the first PXE terminal according to the parsing result after the first PXE terminal parses the configuration file using the first script set in the virtual root file system to obtain the parsing result; a third sending module, configured to send a real root file system to the first PXE terminal during the execution of the second script by the first PXE terminal, so that the first PXE terminal can install the real root file system; wherein the third script is configured to perform a configuration operation on the real root file system when it is determined to perform system configuration; the configuration operation includes at least a user configuration operation and a password configuration operation; The step of parsing the configuration file using the first script set in the virtual root file system to obtain a parsing result includes: The first script is executed, and the kernel startup parameters in the configuration file are parsed to obtain a first parameter and a second parameter; the first parameter is used to obtain the second script specified by the first parameter, and the second parameter is used to obtain the third script specified by the second parameter.
16. A Linux system installation system, characterized in that: The system includes a first PXE terminal and a PXE server; The first PXE terminal is used to implement the steps of any one of the methods of claims 1-8; The PXE server is used to implement the steps of the method according to any one of claims 9 to 12.
17. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 12 are implemented.
18. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Installing method and system for automatically installing linux systems
CN105117268A
Method for automatic deploying operate system
CN1916846A