Operating system installation method and device

By matching the device's MAC address with the image file in the PXE server and directly sending the target image file to the device, the problem of low operating system installation efficiency in the existing technology is solved, and an efficient operating system installation process is achieved.

CN114115917BActive Publication Date: 2025-09-19新华三技术有限公司成都分公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111437426.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-09-19
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

In the prior art, the operating system installation efficiency is low, and users are required to query the MAC address of each device one by one and manually configure the image file, which makes the system installation process cumbersome.

Method used

By obtaining the MAC address of the target device, querying the configuration file of the PXE server, matching the target image file, and sending it directly to the target device for installation, manual configuration steps are reduced.

Benefits of technology

It improves the efficiency of operating system installation, reduces user repetitive operations, and simplifies the operating system installation process for different devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115917B_ABST
    Figure CN114115917B_ABST
Patent Text Reader

Abstract

The present application relates to an operating system installation method and device, specifically to the field of network communication technology. The method includes: obtaining a target MAC address of a target device; querying a configuration file in a PXE server based on the target MAC address to obtain a target image file that matches the target MAC address; in the configuration file, the MAC address and image file associated with the same management address have a matching relationship; sending the target image file to the target device so that the target device with the target management address can install the operating system. In the above scheme, the management server can directly determine the operating system to be installed based on the MAC address. When installing different operating systems on different devices, the user's repeated operations are minimized as much as possible, thereby improving the efficiency of operating system installation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network communications, and in particular to an operating system installation method and device. Background Art

[0002] Preboot eXecution Environment (PXE), also known as pre-execution environment, provides a mechanism for starting a computer using a network interface.

[0003] During the PXE boot process, the terminal requests an IP address from the server. It then uses TFTP (trivial file transfer protocol) or MTFTP (multicast trivial file transfer protocol) to download a boot package to its local memory for execution. This package completes the basic terminal software setup, booting the terminal's operating system pre-installed on the server. Developers can manually configure the PXE BootLoader and DHCP server configurations using server management tools. They can then select the mapping between image files and MAC addresses within the server management tools. This allows the server to select the image file based on the MAC address in the information sent by the PXE client and send it to the terminal for installation.

[0004] In the above solution, the user needs to query the MAC addresses of devices with different management addresses one by one in advance, and then manually configure the image file to be installed on the device corresponding to each MAC address, resulting in low system installation efficiency. Summary of the Invention

[0005] The present application provides an operating system installation method and device, which improves the installation efficiency of the operating system. The technical solution is as follows.

[0006] In one aspect, a method for installing an operating system is provided, the method comprising:

[0007] Get the target MAC address of the target device;

[0008] Querying a configuration file in the PXE server according to the target MAC address to obtain a target image file that matches the target MAC address; in the configuration file, the MAC address and the image file associated with the same management address have a matching relationship;

[0009] The target image file is sent to the target device so that the target device having the target management address can install the operating system.

[0010] In another aspect, a device for installing an operating system is provided, the device comprising:

[0011] A first address acquisition module is used to obtain a target MAC address of a target device;

[0012] An image file acquisition module is used to query a configuration file in the PXE server according to the target MAC address to obtain a target image file that matches the target MAC address, wherein in the configuration file, the MAC address and the image file associated with the same management address have a matching relationship;

[0013] The image file sending module is used to send the target image file to the target device so that the target device with the target management address can install the operating system.

[0014] In a possible implementation, the apparatus further includes:

[0015] The configuration file update module is used to update the configuration file of the PXE server according to the target configuration information corresponding to the configuration write operation when receiving the configuration write operation; the target configuration is used to indicate that there is a matching relationship between the target MAC address and the target image file.

[0016] In a possible implementation, the apparatus further includes:

[0017] A first device determination module is configured to determine the target device according to the target management address; the target device includes a target BMC device;

[0018] A second address acquisition module is configured to acquire a target MAC address sent by a target BMC device; the MAC address is read by the target BMC device from the network card of the target device;

[0019] An image file determination module is used to obtain a target image file associated with a target management address;

[0020] The configuration information generating module is used to generate the target configuration information according to the target image file and the target MAC address.

[0021] In a possible implementation, the apparatus further includes:

[0022] A status information receiving module is used to receive the installation status information sent by the target device;

[0023] An address query module is used to query an address correspondence table according to the target MAC address of the target device to obtain the target management address of the target device;

[0024] The installation status display module is used to display the installation status of the target device in the status area corresponding to the target management address on the system installation interface.

[0025] In a possible implementation, the apparatus further includes:

[0026] A second device determination module, configured to determine the target device according to the target management address;

[0027] A third address acquisition module is used to obtain a target MAC address sent by the BMC device on the target device;

[0028] The correspondence table generating module is used to generate the address correspondence table according to the target management address and the target MAC address.

[0029] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the above-mentioned operating system installation method.

[0030] On the other hand, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned operating system installation method.

[0031] In another aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the above-described operating system installation method.

[0032] The technical solution provided by this application may have the following beneficial effects:

[0033] When an operating system needs to be installed, the management server can directly obtain the MAC address of the target device and query it in the configuration file of the PXE server to determine the target image file corresponding to the operating system to be installed on the target device corresponding to the target management address, thereby installing the operating system on the target device. In the above solution, the configuration file matches the MAC address of each device with the image file to be installed based on the management address of each device. The user does not need to query the MAC address of each device and then configure them one by one. The management server can directly determine the operating system to be installed based on the MAC address. When installing different operating systems on different devices, the user's repeated operations are minimized as much as possible, improving the efficiency of operating system installation. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0035] Figure 1 The figure is a schematic structural diagram of an operating system installation system according to an exemplary embodiment.

[0036] Figure 2 The figure is a flowchart of a method for installing an operating system according to an exemplary embodiment.

[0037] Figure 3 The figure is a flowchart of a method for installing an operating system according to an exemplary embodiment.

[0038] Figure 4 The figure is a flowchart showing a method for installing an operating system according to an exemplary embodiment.

[0039] Figure 5 A schematic diagram of a parameter configuration interface involved in an embodiment of the present application is shown.

[0040] Figure 6 The figure is a structural block diagram showing a device for installing an operating system according to an exemplary embodiment.

[0041] Figure 7 It is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will clearly and completely describe the technical solution of this application in conjunction with the accompanying drawings. 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 any creative efforts are within the scope of protection of this application.

[0043] It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B.

[0044] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and being indicated, configuration and being configured, etc.

[0045] In an embodiment of the present application, "predefinition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). This application does not limit its specific implementation method.

[0046] Before describing the various embodiments shown in this application, several concepts involved in this application are first introduced.

[0047] 1) PXE (Preboot eXecution Environment)

[0048] The Preboot Execution Environment (PXE), also known as the Pre-Execution Environment (PXE), provides a mechanism for booting a computer using a network interface. This mechanism allows the computer to boot without relying on local data storage devices (such as hard drives) or a locally installed operating system. PXE was originally developed as part of Intel's wired management architecture. It uses network protocols such as the Internet Protocol (IP), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP), and Trivial File Transfer Protocol (TFTP), as well as concepts such as Globally Unique Identifiers (GUIDs), Universal Network Driver Interfaces (UNDI), and Universally Unique Identifiers (UUIDs) by extending predefined APIs to the firmware of the client (the computer running the PXE self-test). The term "PXE client" refers to the role of a machine in the PXE boot process. A PXE client can be a server, desktop computer, laptop, or other machine with PXE boot code installed.

[0049] 2) BMC (Baseboard Management Controller)

[0050] The BMC can perform firmware upgrades, check device status, and other operations even when the machine is powered off. Platform management encompasses a series of monitoring and control functions that operate on system hardware. For example, it monitors system temperature, voltage, fans, power supplies, and other functions, and makes appropriate adjustments to ensure a healthy system. Of course, if the system becomes abnormal, a reset can be performed to restart the system. Platform management also records various hardware information and logs to alert users and troubleshoot subsequent issues. These functions can be integrated into a single controller, known as a baseboard management controller. It's important to note that the BMC is an independent system and is independent of other system hardware (such as the CPU, memory, etc.), the BIOS (Basic Input Output System), or the OS (Operating System).

[0051] Figure 1 FIG. 1 is a schematic diagram showing the structure of an operating system installation system according to an exemplary embodiment. The operating system installation system includes a management server 110 and a target device 120 .

[0052] Optionally, the management server 110 stores image files of various operating systems to enable installation of different operating systems on the target device.

[0053] Optionally, a PXE server is loaded on the management server 110 , and a PXE client is loaded on the network card of the target device 120 .

[0054] Optionally, the target device 120 includes a BMC device, and the management server 110 can control the BMC device to control the BIOS settings of the target device 120. When the BIOS of the target device 120 is controlled by the BMC device to boot from PXE, the target device 120 enters the process of booting the operating system from the network after restarting.

[0055] Optionally, the above-mentioned management server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms and other technical operations and computing services.

[0056] Optionally, the operating system installation system may further include a management device for managing the system (e.g., managing the connection status between each module and the server), wherein the management device and the server are connected via a communication network. Optionally, the communication network is a wired network or a wireless network.

[0057] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is typically the Internet, but may also be any other network, including but not limited to any combination of a local area network, a metropolitan area network, a wide area network, a mobile, a limited or wireless network, a private network, or a virtual private network. In some embodiments, the data exchanged over the network is represented using technologies and / or formats including hypertext markup language, extensible markup language, etc. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, internet protocol security, etc. may be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may also be used to replace or supplement the above-mentioned data communication technologies.

[0058] Figure 2 is a flowchart of a method for installing an operating system according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 Install the management server in the system as shown in the operating system. Figure 2 As shown, the operating system installation method may include the following steps:

[0059] Step 201: Obtain the target MAC address of the target device.

[0060] The MAC address (Media Access Control Address) is also called the local area network address (LAN Address) or the physical address.

[0061] In the embodiment of the present application, the MAC address is the physical address corresponding to the network card of the target device, which is burned into the network card by the network device manufacturer during production. Generally speaking, the MAC addresses corresponding to the network cards of different devices are different, so different MAC addresses correspond to different devices.

[0062] Step 202: query the configuration file in the PXE server according to the target MAC address to obtain the target image file that matches the target MAC address.

[0063] When the server receives the target MAC address, it can query the configuration file in the PXE server according to the target MAC address, and confirm the name of the target image file that matches the target MAC address from the configuration file, thereby determining the target image file of the operating system that the target device needs to install.

[0064] For example, the configuration file in the PXE server can be as follows:

[0065]

[0066] In the code contained in the above configuration file, the "disable" field is used to indicate whether the configuration is enabled. If the field content of "disable" in the above configuration file is "false", it means that the configuration is not disabled and is in the enabled state; the "mac" field is used to represent the MAC address corresponding to the configuration; the "disk" field is used to represent the disk address where the image file in the configuration needs to be installed; the "size" field is used to represent the size of the image file in the configuration; the "image" field is used to represent the version name of the image file in the configuration; the "disk_sel-type" field is used to represent how to determine the installation address of the image file. When the content in this field is by_name, the terminal will obtain the configuration information and install the image file to the disk location indicated by " / dev / sda"; optionally, the field content in "disk_sel-type" can also be by_size, that is, searching for a disk that meets the same size.

[0067] In an embodiment of the present application, in the configuration file, the MAC address and the mirror file associated with the same management address have a matching relationship.

[0068] In a possible implementation, the configuration file is generated based on a correspondence between a MAC address and a management address, and a correspondence between a management address and a mirror file.

[0069] Optionally, the management address is an address pre-configured by the management server to each computer device and is used to manage each computer device.

[0070] For example, when a server management device BMC is present in a computer device, the management address is the IP address of the BMC. The computer device can manage each BMC device through the management address.

[0071] Since the configuration file is generated based on the correspondence between the MAC address and the management address (i.e., the MAC address is associated with the management address), and the correspondence between the management address and the image file (i.e., the management address is associated with the image file), the configuration file actually also records the correspondence between the MAC address and the image file (i.e., the matching relationship between the MAC address and the image file). Therefore, during the system installation process through PXE, when the management server obtains the information transmitted by the PXE client on the target device, it can directly confirm the image file that needs to be installed on the target device based on the MAC address in the information. There is no need to confirm the MAC address of the device corresponding to each management address in advance through the developer, and then manually construct the correspondence between the MAC address and the image file.

[0072] Step 203: Send the target image file to the target device so that the target device with the target management address can install the operating system.

[0073] When the target device starts the PXE process, it first requests the PXE server in the management server to allocate an IP address through the PXE client. At this time, the management server needs to configure the DHCP service to allocate an IP address to the PXE client.

[0074] Once the PXE client is assigned an IP address, gateway, and DNS, the management server initiates TFTP, allowing the PXE client to download the boot package to the target device's local memory for execution. The PXE client then sends a file request (such as a kernel or root file request) to TFTP. Upon receiving the message, TFTP returns the target image file corresponding to the target device's target MAC address, allowing the PXE client to boot the corresponding operating system on the target device with the target management address.

[0075] In summary, when an operating system needs to be installed, the server can directly obtain the MAC address of the target device and query it in the configuration file of the PXE server to determine the target image file corresponding to the operating system to be installed on the target device corresponding to the target management address, thereby achieving the installation of the operating system on the target device. In the above scheme, the configuration file matches the MAC address of each device with the image file to be installed through the management address of each device. The user does not need to query the MAC address of each device one by one and then configure them one by one. The server can directly determine the operating system to be installed based on the MAC address. When installing different operating systems on different devices, the user's repeated operations are minimized as much as possible, thereby improving the efficiency of operating system installation.

[0076] Figure 3is a flowchart of a method for installing an operating system according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 Install the management server in the system as shown in the operating system. Figure 3 As shown, the operating system installation method may include the following steps:

[0077] Step 301: When a configuration write operation to a PXE server is received, a configuration file of the PXE server is updated according to target configuration information corresponding to the configuration write operation.

[0078] In one possible implementation, the management server is loaded with an operating system installation interface, on which a configuration update control exists. When a user clicks or touches the configuration update control, the PXE server on the management server receives the configuration write operation.

[0079] For example, the PXE server displays configuration update controls for each device corresponding to its management address. In a computer cluster, developers typically use each device's management address to determine its role within the cluster, such as whether it is a master node or a backup node. Before installing an operating system on a device, a developer can click the corresponding configuration update control. The management server then writes the configuration information based on the device, updates the PXE server's configuration file, and prepares for the device update.

[0080] In another possible implementation, the operating system image file of the management server also has an automatic installation script KS (kickstart), which can automatically configure the system when the system is running according to the configuration information pre-stored in the script, such as automatically configuring the root password and system language.

[0081] Optionally, the target configuration information includes the target MAC address and the target image file. The target configuration information can be specifically as follows: Figure 2 As shown in the embodiment shown, no further details are given here.

[0082] In one possible implementation, the target device is determined based on a target management address; the target device includes a target BMC device; a target MAC address sent by the target BMC device is obtained; the MAC address is read by the target BMC device from a network card of the target device; a target image file associated with the target management address is obtained; and the target configuration information is generated based on the target image file and the target MAC address.

[0083] In an embodiment of the present application, each device to be installed that requires the installation of an operating system, together with the management server, constitutes an intelligent management center platform IMC. In the IMC, each device to be installed includes a BMC device. The management server can manage the BMC devices on each device to be installed according to the management address pre-set in the device to be installed, thereby realizing control of the BMC devices on each device to be installed.

[0084] Therefore, before the management server needs to operate one of the devices to be installed, for example, before it needs to operate the device to be installed corresponding to the target management address, when the management server obtains the target management address, it determines which device it is. It can obtain the PCIE information on the network card of the target device based on the BMC device on the device to be installed with the target management address, thereby obtaining the target MAC address in the PCIE information.

[0085] At this time, the management server obtains the target MAC address according to the target management address, thereby matching the target management address with the target MAC address and establishing a corresponding relationship between the target management address and the target MAC address.

[0086] In one possible implementation, a pre-set correspondence between target management addresses and image files exists in the management server. This correspondence can be pre-set by developers and stored in the management server. Since developers pre-set the management addresses of each device to be installed when designing the intelligent management center platform (IMC), they can further determine the operating system to be installed on the device to be installed corresponding to each management address.

[0087] When the operating system is installed on the device to be installed through PXE, the server can only obtain the MAC address and business IP address of the device to be installed. It is impossible to directly determine which device to install the operating system based on the MAC address and business IP address. Therefore, it is necessary to manually match the MAC address with the image file, which is extremely cumbersome.

[0088] In the embodiment of the present application, the obtained MAC address is directly sent to the management server through the BMC device managed by the target management address, so that the management server can match the target MAC address with the target management address, thereby establishing a matching relationship between its target MAC address and the target image file. No manual input is required, which greatly improves the installation efficiency when installing different operating systems.

[0089] Step 302: Obtain the target MAC address of the target device.

[0090] Before installing on the target device, the target device needs to be set to start from PXE. At this time, the management server can send instructions to the target BMC device on the target device through the target management address to control the BMC device to adjust the BIOS settings of the target device to start from PXE.

[0091] At this time, the DHCP function also needs to be enabled on the management server to assign a service IP address to the target device, thereby enabling data transmission between the target device and the management server.

[0092] When the target device is assigned a service IP address and the PXE client is turned on, the target device sends a command to the management server to request the installation of the operating system; at this time, the management server can obtain the target MAC address of the target device from the command.

[0093] Step 303: query the configuration file in the PXE server according to the target MAC address to obtain the target image file that matches the target MAC address.

[0094] When the management server obtains the target MAC address, it queries the configuration file pre-generated in the PXE server according to the target MAC address, and queries the target image file corresponding to the target MAC address as the image file of the operating system of the target device.

[0095] Step 304: Send the target image file to the target device so that the target device with the target management address can install the operating system.

[0096] The management server sends the target image file to the target device, so that the target device installs the operating system according to the target image file.

[0097] Through the above steps, when the user does not query the MAC address of each device one by one, the management server obtains the MAC address of each device to be installed through each BMC device and corresponds it to the management address. Therefore, the developer only needs to determine the type of operating system to be installed for each management address according to the pre-set management address (that is, determine the image file), and can install different operating systems on different devices, thereby improving the efficiency of operating system installation.

[0098] In one possible implementation, installation status information sent by a target device is received; based on the target MAC address of the target device, an address correspondence table is queried to obtain the target management address of the target device; and on the system installation interface, the status area corresponding to the target management address displays the installation status of the target device.

[0099] After the target device obtains the image file and installs it, the target device can also send its own installation status information to the management server. At this time, the installation status information is sent to the management server, so the target MAC address of the target device is also included in the installation status information. At this time, the management server queries the address correspondence table based on the target MAC address, determines the target management address corresponding to the target MAC address, and displays the installation status of the target device on the system installation interface.

[0100] In a possible implementation, the target device is determined according to the target management address; the target MAC address sent by the BMC device on the target device is obtained; and the address correspondence table is generated according to the target management address and the target MAC address.

[0101] The management server manages the BMC device on the target device through the target management address, and obtains the target MAC address of the target device through the BMC device on the target device to generate the corresponding information between the target MAC address and the target management address, and updates the corresponding information to the address correspondence table. The address correspondence table records the matching relationship between each management address and the MAC address of each device.

[0102] In summary, when an operating system needs to be installed, the server can directly obtain the MAC address of the target device and query it in the configuration file of the PXE server to determine the target image file corresponding to the operating system to be installed on the target device corresponding to the target management address, thereby achieving the installation of the operating system on the target device. In the above scheme, the configuration file matches the MAC address of each device with the image file to be installed through the management address of each device. The user does not need to query the MAC address of each device one by one and then configure them one by one. The server can directly determine the operating system to be installed based on the MAC address. When installing different operating systems on different devices, the user's repeated operations are minimized as much as possible, thereby improving the efficiency of operating system installation.

[0103] Please refer to Figure 4 , which is a flowchart of a method for installing an operating system according to an exemplary embodiment. Figure 4 As shown, the operating system installation method includes the following steps:

[0104] 1. Enable PXE.

[0105] In an embodiment of the present application, the server management software can be started in the server, and then the PXE and DHCP functions can be enabled in the server management software.

[0106] Please refer to Figure 5 , which shows a schematic diagram of a parameter configuration interface involved in the embodiment of the present application. Figure 5 As shown, on the parameter configuration interface of the server management software, users can select the PXE BootLoader configuration and DHCP server configuration, as well as the image selection to be installed by entering specified operations (such as touch operations or click operations). When the developer performs PXE installation on the device to be installed, the device will set the next startup item to PXE, and after restarting, it will start from PXE and start installing the OS. In the PXE management page, you can turn PXE on and off, and you can record the IP address, MAC address, BIOS mode, operating system, and installation status of the device undergoing PXE installation.

[0107] 2. Get PCIE information.

[0108] Add the device to be managed to the HDM (H3C Device Manager) device and obtain the PCIE information of the device through HDM.

[0109] The HDM device is a BMC device, a management unit on the server that is independent of the motherboard CPU. It uses sensors to monitor the status of a computer, network server, or other hardware drive device and communicates with the system administrator through independent connection lines.

[0110] 3. Upload the image file to be installed.

[0111] 4. Select the device where you want to install the system and choose PXE installation.

[0112] 5. Determine the MAC address of the device to be installed.

[0113] The server management software first obtains the network card information in the PCIE information of the device according to the device selected by the user, and then filters out the MAC address of the network card port from the network card information.

[0114] 6. Set up the configuration file.

[0115] Then set the binding relationship between the device's MAC address and the system to be installed in the PXE configuration file.

[0116] 7. Set the device to be installed to PXE boot.

[0117] Use HDM to set the device's next startup option to PXE, then restart the device. After the device restarts, it enters the PXE process to start installing the OS. The PXE server detects the MAC address of the PXE client, and then checks the binding relationship between the MAC address and the image in the configuration file based on the MAC address. It then sets the PXE client to start from the corresponding system image to install the OS.

[0118] 8. Get the installation results.

[0119] The server management software can filter out the PXE installation status and installation results of the corresponding device from the installation progress of the back-end device returned by PXE based on the correspondence between the IP address and the MAC address of the network card provided by HDM.

[0120] Figure 6 This is a block diagram of a device for installing an operating system according to an exemplary embodiment. The device includes:

[0121] A first address acquisition module 601 is used to acquire a target MAC address of a target device;

[0122] An image file acquisition module 602 is configured to query a configuration file in the PXE server according to the target MAC address to obtain a target image file corresponding to the target MAC address, wherein in the configuration file, MAC addresses and image files associated with the same management address have a matching relationship;

[0123] The image file sending module 603 is configured to send the target image file to a target device so that the target device having the target management address can install an operating system.

[0124] In a possible implementation, the apparatus further includes:

[0125] The configuration file update module is used to update the configuration file of the PXE server according to the target configuration information corresponding to the configuration write operation when receiving the configuration write operation; the target configuration is used to indicate that there is a matching relationship between the target MAC address and the target image file.

[0126] In a possible implementation, the apparatus further includes:

[0127] A first device determination module is configured to determine the target device according to the target management address; the target device includes a target BMC device;

[0128] A second address acquisition module is configured to acquire a target MAC address sent by a target BMC device; the MAC address is read by the target BMC device from the network card of the target device;

[0129] An image file determination module is used to obtain a target image file associated with a target management address;

[0130] The configuration information generating module is used to generate the target configuration information according to the target image file and the target MAC address.

[0131] In a possible implementation, the apparatus further includes:

[0132] A status information receiving module is used to receive the installation status information sent by the target device;

[0133] An address query module is used to query an address correspondence table according to the target MAC address of the target device to obtain the target management address of the target device;

[0134] The installation status display module is used to display the installation status of the target device in the status area corresponding to the target management address on the system installation interface.

[0135] In a possible implementation, the apparatus further includes:

[0136] A second device determination module, configured to determine the target device according to the target management address;

[0137] A third address acquisition module is used to obtain a target MAC address sent by the BMC device on the target device;

[0138] The correspondence table generating module is used to generate the address correspondence table according to the target management address and the target MAC address.

[0139] In summary, when an operating system needs to be installed, the server can directly obtain the MAC address of the target device and query it in the configuration file of the PXE server to determine the target image file corresponding to the operating system to be installed on the target device corresponding to the target management address, thereby achieving the installation of the operating system on the target device. In the above scheme, the configuration file matches the MAC address of each device with the image file to be installed through the management address of each device. The user does not need to query the MAC address of each device one by one and then configure them one by one. The server can directly determine the operating system to be installed based on the MAC address. When installing different operating systems on different devices, the user's repeated operations are minimized as much as possible, thereby improving the efficiency of operating system installation.

[0140] See also Figure 7 , which is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the above-mentioned operating system installation method is implemented.

[0141] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0142] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods described in the embodiments of the present invention. The processor executes the non-transitory software programs, instructions, and modules stored in the memory to perform various processor functions and data processing, thereby implementing the methods described in the aforementioned method embodiments.

[0143] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0144] In an exemplary embodiment, a computer-readable storage medium is further provided, storing at least one computer program, which is loaded and executed by a processor to implement all or part of the steps of the above method. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, or an optical data storage device.

[0145] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0146] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for installing an operating system, characterized in that: The method is executed by a management server, and includes: Get the target MAC address of the target device; A configuration file in the PXE server is queried based on the target MAC address to obtain a target image file that matches the target MAC address; in the configuration file, a MAC address and an image file associated with the same management address have a matching relationship; the configuration file is generated based on a correspondence between the MAC address and the management address, and a correspondence between the management address and the image file; the management address is pre-configured by the management server to each computer device; The target image file is sent to the target device so that the target device having the target management address can install the operating system.

2. The method according to claim 1, characterized in that Before querying the configuration file in the PXE server according to the target MAC address, the method further includes: When a configuration write operation is received, the configuration file of the PXE server is updated according to target configuration information corresponding to the configuration write operation; the target configuration is used to indicate that there is a matching relationship between the target MAC address and the target image file.

3. The method according to claim 2, characterized in that The method further comprises: Determine the target device according to the target management address; the target device includes a target BMC device; Obtaining a target MAC address sent by a target BMC device; the MAC address is read by the target BMC device from the network card of the target device; Obtaining the target image file associated with the target management address; The target configuration information is generated according to the target image file and the target MAC address.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Receive installation status information sent by the target device; According to the target MAC address of the target device, query the address correspondence table to obtain the target management address of the target device; On the system installation interface, the status area corresponding to the target management address displays the installation status of the target device.

5. The method according to claim 4, characterized in that Before receiving the first installation status sent by the first device, the method further includes: Determining the target device according to the target management address; Obtain the target MAC address sent by the BMC device on the target device; The address correspondence table is generated according to the target management address and the target MAC address.

6. An operating system installation device, characterized in that: The device is applied to a management server, and includes: A first address acquisition module is used to obtain a target MAC address of a target device; An image file acquisition module is configured to query a configuration file in a PXE server according to the target MAC address to obtain a target image file that matches the target MAC address; in the configuration file, MAC addresses and image files associated with the same management address have a matching relationship; the configuration file is generated based on the correspondence between the MAC address and the management address, and the correspondence between the management address and the image file; the management address is pre-configured by the management server to each computer device; The image file sending module is used to send the target image file to the target device so that the target device with the target management address can install the operating system.

7. The device according to claim 6, characterized in that The device further comprises: The configuration file update module is used to update the configuration file of the PXE server according to the target configuration information corresponding to the configuration write operation when receiving the configuration write operation; the target configuration is used to represent the correspondence between the target MAC address and the target image file.

8. The device according to claim 7, characterized in that The device further comprises: A first device determination module is configured to determine the target device according to the target management address; the target device includes a target BMC device; A second address acquisition module is configured to acquire a target MAC address sent by a target BMC device; the MAC address is read by the target BMC device from a network card of the target device; An image file determination module is used to obtain a target image file associated with a target management address; The configuration information generating module is used to generate the target configuration information according to the target image file and the target MAC address.

9. The device according to any one of claims 6 to 8, characterized in that The device further comprises: A status information receiving module is used to receive the installation status information sent by the target device; An address query module is used to query an address correspondence table according to the target MAC address of the target device to obtain the target management address of the target device; The installation status display module is used to display the installation status of the target device in the status area corresponding to the target management address on the system installation interface.

10. The device according to claim 9, characterized in that The device further comprises: A second device determination module, configured to determine the target device according to the target management address; A third address acquisition module is used to obtain a target MAC address sent by the BMC device on the target device; The correspondence table generating module is used to generate the address correspondence table according to the target management address and the target MAC address.

Citation Information

Patent Citations

  • Server system installation method, device, apparatus, and readable storage medium

    CN109254783A

  • Server starting method of cloud platform and terminal

    CN111008043A

  • Method, device and system for automatically deploying and configuring servers in batches

    CN111427624A