CN114115917A - Operating system installation method and device - Google Patents

Operating system installation method and device Download PDF

Info

Publication number
CN114115917A
CN114115917A CN202111437426.XA CN202111437426A CN114115917A CN 114115917 A CN114115917 A CN 114115917A CN 202111437426 A CN202111437426 A CN 202111437426A CN 114115917 A CN114115917 A CN 114115917A
Authority
CN
China
Prior art keywords
target
address
mac address
equipment
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111437426.XA
Other languages
Chinese (zh)
Inventor
李红霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Chengdu Branch
Original Assignee
New H3C Technologies Co Ltd Chengdu Branch
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd Chengdu Branch filed Critical New H3C Technologies Co Ltd Chengdu Branch
Priority to CN202111437426.XA priority Critical patent/CN114115917A/en
Publication of CN114115917A publication Critical patent/CN114115917A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to an operating system installation method and device, in particular to the technical field of network communication. The method comprises the following steps: acquiring a target MAC address of target equipment; inquiring a configuration file in a PXE server according to the target MAC address to obtain a target image file matched with the target MAC address; in the configuration file, the MAC address associated with the same management address has a matching relationship with the image file; and sending the target image file to the target equipment so that the target equipment with the target management address installs an operating system. In the scheme, the management server can directly determine the operating system to be installed according to the MAC address, so that when different operating systems are installed on different devices, repeated operation of a user is reduced as much as possible, and the installation efficiency of the operating system is improved.

Description

Operating system installation method and device
Technical Field
The invention relates to the technical field of network communication, in particular to an operating system installation method and device.
Background
A Preboot eXecution Environment (PXE), also referred to as a Preboot eXecution Environment, provides a mechanism for booting a computer using a Network Interface (Network Interface).
In the PXE starting process, the terminal requires the server to distribute an IP address, then a TFTP (virtual file transfer protocol) or MTFTP (multicast file transfer protocol) protocol is used for downloading a starting software package to a local memory for execution, and the starting software package is used for finishing the setting of the basic software of the terminal, so that the terminal operating system which is pre-installed in the server is guided. A developer can manually set BootLoader configuration of the PXE and configuration of the DHCP server through a server management tool, and then selects the corresponding relation between the image file and the MAC address in the server management tool, so that the server can select the image file to be sent to a terminal for installation according to the MAC address in the information sent by the PXE client.
In the above scheme, the user needs to query the MAC addresses of the devices with different management addresses one by one in advance, and then manually configure the image files to be installed on the devices corresponding to the MAC addresses, so that the system installation efficiency is low.
Disclosure of Invention
The application provides an operating system installation method and device, which improve the installation efficiency of an operating system.
In one aspect, an operating system installation method is provided, and the method includes:
acquiring a target MAC address of target equipment;
inquiring a configuration file in a PXE server according to the target MAC address to obtain a target image file matched with the target MAC address; in the configuration file, the MAC address associated with the same management address has a matching relationship with the image file;
and sending the target image file to the target equipment so that the target equipment with the target management address installs an operating system.
In yet another aspect, an operating system installation apparatus is provided, the apparatus including:
the first address acquisition module is used for acquiring a target MAC address of target equipment;
the image file acquisition module is used for inquiring a configuration file in a PXE server according to the target MAC address to acquire a target image file matched with the target MAC address, and the MAC address associated with the same management address in the configuration file has a matching relation with the image file;
and the image file sending module is used for sending the target image file to target equipment so as to install the operating system on the target equipment with the target management address.
In one possible implementation, the apparatus further includes:
the PXE server comprises a configuration file updating module, a configuration file updating module and a configuration file updating module, wherein the configuration file updating module is used for updating a configuration file of the PXE server according to target configuration information corresponding to configuration writing operation when the configuration writing operation is received; the target configuration is used for representing that the target MAC address and the target image file have a matching relation.
In one possible implementation, the apparatus further includes:
the first equipment determining module is used for determining the target equipment according to the target management address; the target equipment comprises target BMC equipment;
the second address acquisition module is used for acquiring a target MAC address sent by the target BMC equipment; the MAC address is read by the target BMC device from a network card of the target device;
the image file determining module is used for acquiring a target image file associated with the target management address;
and the configuration information generation module is used for generating the target configuration information according to the target image file and the target MAC address.
In one possible implementation, the apparatus further includes:
the state information receiving module is used for receiving the installation state information sent by the target equipment;
the address query module is used for querying an address corresponding table according to the target MAC address of the target equipment to obtain a target management address of the target equipment;
and the installation state display module is used for displaying the installation state of the target equipment in a state area corresponding to the target management address on a system installation interface.
In one possible implementation, the apparatus further includes:
the second equipment determining module is used for determining the target equipment according to the target management address;
a third address obtaining module, configured to obtain a target MAC address sent by a BMC device on the target device;
and the mapping table generating module is used for generating the address mapping table according to the target management address and the target MAC address.
In still another aspect, a computer device is provided, where the computer device includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, at least one program, a code set, or a set of instructions is loaded and executed by the processor to implement the operating system installation method.
In yet another aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the operating system installation method described above.
In yet another aspect, a computer program product is provided, as well as a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the operating system installation method.
The technical scheme provided by the application can comprise the following beneficial effects:
when the operating system needs to be installed, the management server may directly obtain the MAC address of the target device, and query the MAC address in the configuration file of the PXE server, so as to determine a target image file corresponding to the operating system that the target device corresponding to the target management address needs to install, thereby implementing installation of the operating system on the target device. According to the scheme, the MAC addresses of the devices are matched with the image files required to be installed through the management addresses of the devices by the configuration files, a user does not need to query the MAC addresses of the devices one by one and then configure the MAC addresses one by one, the management server can directly determine the operating systems required to be installed according to the MAC addresses, when different operating systems are installed on different devices, repeated operation of the user is reduced as far as possible, and installation efficiency of the operating systems is improved.
Drawings
In order to more clearly illustrate the detailed description of the present application or the technical solutions in the prior art, the drawings needed to be used in the detailed description of the present application or the prior art description will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a block diagram illustrating an operating system installation system in accordance with an exemplary embodiment.
FIG. 2 is a method flow diagram illustrating a method of operating system installation in accordance with one illustrative embodiment.
FIG. 3 is a method flow diagram illustrating a method of operating system installation in accordance with one illustrative embodiment.
FIG. 4 is a flowchart illustrating a method of operating system installation in accordance with an exemplary embodiment.
Fig. 5 shows a parameter configuration interface diagram according to an embodiment of the present application.
Fig. 6 is a block diagram illustrating a configuration of an operating system installation apparatus according to an exemplary embodiment.
FIG. 7 is a schematic diagram of a computer device provided in accordance with an exemplary embodiment of the present application.
Detailed Description
The technical solutions of the present application will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be understood that "indication" mentioned in the embodiments of the present application may be a direct indication, an indirect indication, or an indication of an association relationship. For example, a indicates B, which may mean that a directly indicates B, e.g., B may be obtained by a; it may also mean that a indicates B indirectly, for example, a indicates C, and B may be obtained by C; it can also mean that there is an association between a and B.
In the description of the embodiments of the present application, the term "correspond" may indicate that there is a direct correspondence or an indirect correspondence between the two, may also indicate that there is an association between the two, and may also indicate and be indicated, configure and configured, and so on.
In the embodiment of the present application, "predefining" may be implemented by saving a corresponding code, table, or other manners that may be used to indicate related information in advance in a device (for example, including a terminal device and a network device), and the present application is not limited to a specific implementation manner thereof.
Before describing the various embodiments shown herein, several concepts related to the present application will be described.
1) PXE (Preboot eXecution Environment)
A pre-boot execution environment, also referred to as a pre-execution environment, provides a mechanism for booting a computer using a Network Interface (Network Interface). This mechanism allows the computer to boot without relying on a local data storage device (e.g., hard disk) or a locally installed operating system. PXE originally served as part of Intel's cable management system by using several network protocols like Internet Protocol (IP), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP), Trivial File Transfer Protocol (TFTP) and the like, and Globally Unique Identifier (GUID), Universal Network Driver Interface (UNDI), Universally Unique Identifier (UUID) and by extending a preset API to the client (computer self-test through PXE) firmware. The term PXE client (client) refers to the role of a machine in the PXE boot process. A PXE client (client) may be a server, desktop computer, laptop computer, or other machine that has PXE boot code.
2) BMC (Baseboard Management Controller)
The BMC can perform operations such as firmware upgrading, machine equipment checking and the like on the machine in a state that the machine is not started. Platform management represents a series of monitoring and control functions, and the object of operation is system hardware. Such as by monitoring the temperature, voltage, fan, power supply, etc. of the system and making adjustments to ensure that the system is in a healthy state. Of course, if the system is not normal, the system can be restarted in a reset mode. Meanwhile, the platform management is also responsible for recording information and log records of various hardware and is used for prompting a user and positioning subsequent problems. The above functions may be implemented by being integrated into a controller, which is referred to as a baseboard management controller. It should be noted that the BMC is an independent System, and is independent of other hardware (such as CPU, memory, etc.) on the System, BIOS (Basic Input Output System), OS (Operating System), and the like.
FIG. 1 is a block diagram illustrating an operating system installation system in accordance with an exemplary embodiment. The operating system installation system includes a management server 110 and a target device 120.
Optionally, the management server 110 stores image files of the operating systems, so as to implement installation of different operating systems on the target device.
Optionally, the management server 110 is loaded with a PXE server, and the network card of the target device 120 is loaded with a PXE client.
Optionally, the target device 120 includes a BMC device, and the management server 110 may control the BMC device, so as to control the BIOS setting of the target device 120. When the BIOS of the target device 120 is controlled to start from the PXE by the BMC device, the target device 120 enters a process of starting an operating system from a network after restarting.
Optionally, the management server may be an independent physical server, a server cluster formed by a plurality of physical servers, or a distributed system, and may also be a cloud server that provides technical operation and computation services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and a big data and artificial intelligence platform.
Optionally, the operating system installation system may further include a management device, where the management device is configured to manage the system (e.g., manage connection states between the modules and the server, and the management device is connected to the server through a communication network. Optionally, the communication network is a wired network or a wireless network.
Optionally, the wireless network or wired network described above uses standard communication techniques and/or protocols. The network is typically the internet, but may be any other network including, but not limited to, a local area network, a metropolitan area network, a wide area network, a mobile, a limited or wireless network, a private network, or any combination of virtual private networks. In some embodiments, data exchanged over the network is represented using techniques and/or formats including hypertext markup language, extensible markup language, and the like. All or some of the links may also be encrypted using conventional encryption techniques such as secure sockets layer, transport layer security, virtual private network, internet protocol security, and the like. In other embodiments, custom and/or dedicated data communication techniques may also be used in place of, or in addition to, the data communication techniques described above.
FIG. 2 is a method flow diagram illustrating a method of operating system installation in accordance with one illustrative embodiment. The method is performed by a computer device, which may be a management server in an operating system installation system as shown in fig. 1. As shown in fig. 2, the operating system installation method may include the steps of:
step 201, a target MAC address of a target device is obtained.
The MAC Address (Media Access Control Address) is also called a local area network Address (LAN Address) and a physical Address.
In this embodiment, the MAC address is a physical address corresponding to the network card of the target device, and is burned into the network card when the network device manufacturer produces the MAC address. Generally, the MAC addresses corresponding to the network cards of different devices are different, and therefore different MAC addresses correspond to different devices.
Step 202, querying a configuration file in the PXE server according to the target MAC address to obtain a target image file matched with the target MAC address.
After receiving the target MAC address, the server may query the configuration file in the PXE server according to the target MAC address, so as to confirm the name of the target image file matched with 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.
For example, the configuration file in the PXE server may be as follows:
Figure BDA0003382228160000071
in the code contained in the configuration file, a "disable" field is used to indicate whether the configuration is enabled, and the content of the field in the "disable" in the configuration file is "false", which means that the configuration is not disabled and is in an enabled state; the 'MAC' field is used for representing the MAC address corresponding to the configuration; the 'disk' field is used for representing the disk address required to be installed by the image file in the configuration; the "size" field is used to characterize the size of the image file in this configuration; the "image" field is used to characterize the version name of the image file in the configuration; the field of 'disk _ sel-type' is used for representing how to determine the installation address for installing the image file, and when the content in the field is by _ name, the terminal can obtain the configuration information and then install the image file to the disk position indicated by '/dev/sda'; optionally, the field content in the "disk _ sel-type" may also be by _ size, that is, it is enough to search for a disk that meets the size consistent with the size.
In the embodiment of the application, in the configuration file, the MAC address and the image file associated with the same management address have a matching relationship.
In one possible implementation, 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.
Optionally, the management address is an address, which is configured by the management server to each computer device in advance and is used for managing each computer device.
For example, when a server management device BMC exists in the computer device, the management address is an IP address of the BMC, and the computer device can manage each BMC device through the management address.
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 records the correspondence between the MAC address and the image file (i.e., the matching relationship between the MAC address and the image file), so that when the management server acquires information transmitted by the PXE client on the target device during system installation through the PXE, the image file to be installed on the target device can be directly confirmed according to the MAC address in the information, and it is not necessary to confirm the MAC address of the device corresponding to each management address in advance through developers, and then manually construct the correspondence between the MAC address and the image file.
Step 203, the target image file is sent to the target device, so that the target device with the target management address installs the operating system.
When the target device starts a PXE process, the PXE client requests the PXE server in the management server to allocate an IP address, and at this time, the management server needs to configure a DHCP service to allocate an IP address to the PXE client.
After the PXE client is allocated to the IP, the gateway and the DNS, the management server starts the TFTP, and the PXE client downloads the starting software package to the local memory of the target device for execution. And then the PXE client sends a file request (such as a kernel request or a root file request) to the TFTP, and the TFTP returns a target image file corresponding to a target MAC address of the target equipment after receiving the message, so that the corresponding operating system is started on the target equipment with the target management address through the PXE client.
In summary, when the operating system needs to be installed, the server may directly obtain the MAC address of the target device, and query the MAC address in the configuration file of the PXE server, so as to determine a target image file corresponding to the operating system that the target device corresponding to the target management address needs to install, thereby implementing installation of the operating system on the target device. According to the scheme, the MAC addresses of the devices are matched with the image files required to be installed through the management addresses of the devices by the configuration files, a user does not need to query the MAC addresses of the devices one by one and then configure the MAC addresses one by one, the server can directly determine the operating systems required to be installed according to the MAC addresses, when different operating systems are installed on different devices, repeated operation of the user is reduced as far as possible, and installation efficiency of the operating systems is improved.
FIG. 3 is a method flow diagram illustrating a method of operating system installation in accordance with one illustrative embodiment. The method is performed by a computer device, which may be a management server in an operating system installation system as shown in fig. 1. As shown in fig. 3, the operating system installation method may include the steps of:
step 301, when receiving a configuration write operation to the PXE server, updating a configuration file of the PXE server according to target configuration information corresponding to the configuration write operation.
In a possible implementation manner, an operating system installation interface is loaded in the management server, a configuration update control exists on the operating system installation interface, and when a user clicks or touches the configuration update control, a PXE server on the management server receives a configuration write operation.
For example, on the PXE server, a configuration update control of the device corresponding to each management address is shown. In a computer cluster, a developer usually confirms the role played by each device in the computer cluster, such as a main node or a standby node, according to the management address of each device. Before a developer needs to install an operating system for one of the devices, the developer may click on a configuration update control corresponding to the device, and at this time, the management server may obtain configuration information corresponding to the device according to the configuration write-in operation, so as to update the configuration file of the PXE server, thereby preparing for updating the device.
In another possible implementation manner, the operating system image file of the management server further has an automatic installation script ks (cockstart), and the automatic installation script may automatically perform configuration of the system, such as automatically configuring a Root password and a system language, according to configuration information pre-stored in the script when the system runs.
Optionally, the target configuration information includes the target MAC address and a target image file. The target configuration information may be specifically shown in the embodiment shown in fig. 2, and is not described herein again.
In one possible implementation, the target device is determined according to a target management address; the target equipment comprises target BMC equipment; acquiring a target MAC address sent by target BMC equipment; the MAC address is read by the target BMC device from the network card of the target device; acquiring a target image file associated with a target management address; and generating the target configuration information according to the target image file and the target MAC address.
In the embodiment of the application, each device to be installed, on which an operating system needs to be installed, and the management server together form an intelligent management center platform IMC, in the IMC, each device to be installed includes a BMC device, and the management server can manage the BMC devices on the devices to be installed according to a preset management address in the devices to be installed, so as to control the BMC devices on the devices to be installed.
Therefore, before the management server needs to operate one of the devices to be installed, for example, before the device to be installed corresponding to the target management address needs to be operated, when the management server acquires the target management address, it is determined which device is, the PCIE information on the network card of the target device can be acquired according to the BMC device on the device to be installed of the target management address, so as to obtain the target MAC address in the PCIE information.
At this time, the management server acquires the target MAC address according to the target management address, so that the target management address and the target MAC address are associated, and a corresponding relationship between the target management address and the target MAC address is established.
In a possible implementation manner, a preset corresponding relationship between a target management address and an image file exists in the management server. The corresponding relation between the target management address and the image file can be preset and stored in the management server by a developer, and the developer presets the management address of each device to be installed when designing the intelligent management center platform IMC, so that the developer can further determine the operating system to be installed on the device to be installed corresponding to each management address.
When the device to be installed is installed with the operating system through the PXE, the server can only obtain the MAC address and the service IP address of the device to be installed, and cannot determine which device to install the operating system according to the MAC address and the service IP address directly, so that the MAC address and the image file need to be manually corresponding, and the operation is very complicated.
In the embodiment of the 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 corresponds the target MAC address to the target management address, thereby establishing a matching relationship between the target MAC address and the target image file, and without manual input, greatly improving the installation efficiency when installing different operating systems.
Step 302, obtain the destination MAC address of the destination device.
Before installing the target device, the target device needs to be set to be started from the PXE, and at this time, the management server may send an instruction to the target BMC device on the target device through the target management address, and control the BMC device to adjust the BIOS setting of the target device so as to adjust the target device to be started from the PXE.
At this time, the management server also needs to start a DHCP function to allocate a service IP address to the target device, thereby implementing data transmission between the target device and the management server.
When the target equipment is allocated to a service IP address and a PXE client is started, the target equipment sends an instruction to a management server to request the installation of an operating system; at this time, the management server may acquire the target MAC address of the target device in the instruction.
Step 303, querying a configuration file in the PXE server according to the target MAC address to obtain a target image file matched with the target MAC address.
When the management server acquires the target MAC address, the management server queries a configuration file generated in the PXE server side in advance according to the target MAC address, and queries a target image file corresponding to the target MAC address to be used as an image file of an operating system of the target equipment.
Step 304, the target image file is sent to the target device, so that the target device with the target management address installs the operating system.
And the management server sends the target image file to the target equipment, so that the target equipment installs the operating system according to the target image file.
Through the steps, under the condition that a user does not inquire the MAC addresses of the devices one by one, the management server acquires the MAC addresses of the devices to be installed through the BMC devices and corresponds to the management addresses, so that developers can install different operating systems for different devices only by determining the types of the operating systems (namely determining the mirror image files) required to be installed by the management addresses according to the preset management addresses, and the installation efficiency of the operating systems is improved.
In one possible implementation manner, installation state information sent by a target device is received; inquiring an address corresponding table according to the target MAC address of the target equipment to obtain a target management address of the target equipment; and displaying the installation state of the target equipment in a state area corresponding to the target management address on a system installation interface.
When the target device acquires the image file and installs the image file, the target device can also send installation state information of the target device to the management server, the installation state information is sent to the management server, therefore, a target MAC address of the target device also exists in the installation state information, at the moment, the management server inquires an address corresponding table according to the target MAC address, determines a target management address corresponding to the target MAC address, and displays the installation state of the target device on a system installation interface.
In one possible implementation, the target device is determined according to a target management address; acquiring a target MAC address sent by BMC equipment on the target equipment; and generating the address corresponding table according to the target management address and the target MAC address.
The management server manages the BMC device on the target device through the target management address, acquires the target MAC address of the target device through the BMC device on the target device to generate corresponding information of the target MAC address and the target management address, and updates the corresponding information into an address corresponding table, wherein the address corresponding table records the matching relationship between each management address and the MAC address of each device.
In summary, when the operating system needs to be installed, the server may directly obtain the MAC address of the target device, and query the MAC address in the configuration file of the PXE server, so as to determine a target image file corresponding to the operating system that the target device corresponding to the target management address needs to install, thereby implementing installation of the operating system on the target device. According to the scheme, the MAC addresses of the devices are matched with the image files required to be installed through the management addresses of the devices by the configuration files, a user does not need to query the MAC addresses of the devices one by one and then configure the MAC addresses one by one, the server can directly determine the operating systems required to be installed according to the MAC addresses, when different operating systems are installed on different devices, repeated operation of the user is reduced as far as possible, and installation efficiency of the operating systems is improved.
Reference is now made to FIG. 4, which is a block diagram illustrating a method for operating system installation in accordance with an exemplary embodiment. As shown in fig. 4, the operating system installation method includes the following steps:
1. and starting the PXE.
In the embodiment of the application, the server management software can be started in the server, and then the PXE and DHCP functions can be started in the server management software.
Please refer to fig. 5, which illustrates a parameter configuration interface diagram according to an embodiment of the present application. As shown in fig. 5, on a parameter configuration interface in the server management software, a user may select BootLoader configuration of PXE and configuration of a DHCP server by inputting a specified operation (such as a touch operation or a click operation), and select an image to be installed. And the developer carries out PXE installation on the equipment to be installed, the equipment sets the next starting item as PXE, and after the equipment is restarted, the PXE is started to start the installation of the OS. PXE can be opened and closed in a PXE management page, and the IP address, MAC address, BIOS mode, operating system, and installation status of the device undergoing PXE installation can be recorded
2. And acquiring PCIE information.
An HDM (H3C Device Manager, H3C Device management) Device of a Device to be managed is added, and PCIE information on the Device is acquired by the HDM.
The HDM device is a BMC device, a management unit independent of a mainboard CPU on a server, monitors the state of a computer, a network server or other hardware driving devices by using a sensor, and communicates with a system administrator through an independent connecting line.
3. And uploading the image file to be installed.
4. And selecting equipment for installing the system, and selecting installation of the PXE.
5. The MAC address of the device to be installed is determined.
According to the equipment selected by the user, the server management software firstly acquires the network card information in the PCIE information of the equipment and filters the MAC address of the network card port from the network card information.
6. A configuration file is set.
The binding relationship between the MAC address of the device and the system to be installed is then set into the PXE configuration file.
7. The device to be installed is set to PXE boot.
Setting the next starting item of the device as PXE through HDM, then restarting the device, entering a PXE flow after the device is restarted, and starting to install the OS, wherein the PXE server detects the MAC address of the PXE Client, then checking the binding relationship between the MAC address and the mirror image in the configuration file according to the MAC address, and setting the PXE Client to start to install the OS from the corresponding system mirror image.
8. And acquiring an installation result.
The server management software can filter the PXE installation state and the installation result of the corresponding device from the installation progress of the rear-end device returned by the PXE according to the corresponding relation between the IP address provided by the HDM and the MAC address of the network card.
Fig. 6 is a block diagram illustrating a configuration of an operating system installation apparatus according to an exemplary embodiment. The device comprises:
a first address obtaining module 601, configured to obtain a target MAC address of a target device;
the image file obtaining module 602 is configured to query, according to the target MAC address, a configuration file in the PXE server to obtain a target image file corresponding to the target MAC address, where, in the configuration file, an MAC address and an image file associated with the same management address have a matching relationship;
an image file sending module 603, configured to send the target image file to a target device, so that the target device with a target management address installs an operating system.
In one possible implementation, the apparatus further includes:
the PXE server comprises a configuration file updating module, a configuration file updating module and a configuration file updating module, wherein the configuration file updating module is used for updating a configuration file of the PXE server according to target configuration information corresponding to configuration writing operation when the configuration writing operation is received; the target configuration is used for representing that the target MAC address and the target image file have a matching relation.
In one possible implementation, the apparatus further includes:
the first equipment determining module is used for determining the target equipment according to the target management address; the target equipment comprises target BMC equipment;
the second address acquisition module is used for acquiring a target MAC address sent by the target BMC equipment; the MAC address is read by the target BMC device from a network card of the target device;
the image file determining module is used for acquiring a target image file associated with the target management address;
and the configuration information generation module is used for generating the target configuration information according to the target image file and the target MAC address.
In one possible implementation, the apparatus further includes:
the state information receiving module is used for receiving the installation state information sent by the target equipment;
the address query module is used for querying an address corresponding table according to the target MAC address of the target equipment to obtain a target management address of the target equipment;
and the installation state display module is used for displaying the installation state of the target equipment in a state area corresponding to the target management address on a system installation interface.
In one possible implementation, the apparatus further includes:
the second equipment determining module is used for determining the target equipment according to the target management address;
a third address obtaining module, configured to obtain a target MAC address sent by a BMC device on the target device;
and the mapping table generating module is used for generating the address mapping table according to the target management address and the target MAC address.
In summary, when the operating system needs to be installed, the server may directly obtain the MAC address of the target device, and query the MAC address in the configuration file of the PXE server, so as to determine a target image file corresponding to the operating system that the target device corresponding to the target management address needs to install, thereby implementing installation of the operating system on the target device. According to the scheme, the MAC addresses of the devices are matched with the image files required to be installed through the management addresses of the devices by the configuration files, a user does not need to query the MAC addresses of the devices one by one and then configure the MAC addresses one by one, the server can directly determine the operating systems required to be installed according to the MAC addresses, when different operating systems are installed on different devices, repeated operation of the user is reduced as far as possible, and installation efficiency of the operating systems is improved.
Please refer to fig. 7, which is a schematic diagram of a computer device according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used for storing a computer program, and the computer program is executed by the processor to implement the operating system installation method described above.
The processor may be a Central Processing Unit (CPU). The Processor may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or a combination thereof.
The memory, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the methods of the embodiments of the present invention. The processor executes various functional applications and data processing of the processor by executing non-transitory software programs, instructions and modules stored in the memory, that is, the method in the above method embodiment is realized.
The memory may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor, and the like. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and such remote memory may be coupled to the processor via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
In an exemplary embodiment, a computer readable storage medium is also provided for 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 Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements 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 application is limited only by the appended claims.

Claims (10)

1. An operating system installation method, the method comprising:
acquiring a target MAC address of target equipment;
inquiring a configuration file in a PXE server according to the target MAC address to obtain a target image file matched with the target MAC address; in the configuration file, the MAC address associated with the same management address has a matching relationship with the image file;
and sending the target image file to the target equipment so that the target equipment with the target management address installs an operating system.
2. The method as claimed in claim 1, wherein before querying the configuration file in the PXE server according to the target MAC address, the method further comprises:
when configuration write-in operation is received, updating the configuration file of the PXE server according to target configuration information corresponding to the configuration write-in operation; the target configuration is used for representing that the target MAC address and the target image file have a matching relation.
3. The method of claim 2, further comprising:
determining the target equipment according to the target management address; the target equipment comprises target BMC equipment;
acquiring a target MAC address sent by target BMC equipment; the MAC address is read by the target BMC device from a network card of the target device;
acquiring a target image file associated with the target management address;
and generating the target configuration information according to the target image file and the target MAC address.
4. The method of any of claims 1 to 3, further comprising:
receiving installation state information sent by target equipment;
inquiring an address corresponding table according to the target MAC address of the target equipment to obtain a target management address of the target equipment;
and displaying the installation state of the target equipment in a state area corresponding to the target management address on a system installation interface.
5. The method of claim 4, wherein before receiving the first installation status sent by the first device, further comprising:
determining the target equipment according to the target management address;
acquiring a target MAC address sent by BMC equipment on the target equipment;
and generating the address corresponding table according to the target management address and the target MAC address.
6. An operating system installation apparatus, the method comprising:
the first address acquisition module is used for acquiring a target MAC address of target equipment;
the image file acquisition module is used for inquiring a configuration file in a PXE server according to the target MAC address to acquire a target image file matched with the target MAC address; in the configuration file, the MAC address associated with the same management address has a matching relationship with the image file;
and the image file sending module is used for sending the target image file to target equipment so as to install the operating system on the target equipment with the target management address.
7. The apparatus of claim 6, further comprising:
the PXE server comprises a configuration file updating module, a configuration file updating module and a configuration file updating module, wherein the configuration file updating module is used for updating a configuration file of the PXE server according to target configuration information corresponding to configuration writing operation when the configuration writing operation is received; the target configuration is used for representing the corresponding relation between the target MAC address and the target image file.
8. The apparatus of claim 7, further comprising:
the first equipment determining module is used for determining the target equipment according to the target management address; the target equipment comprises target BMC equipment;
the second address acquisition module is used for acquiring a target MAC address sent by the target BMC equipment; the MAC address is read by the target BMC device from a network card of the target device;
the image file determining module is used for acquiring a target image file associated with the target management address;
and the configuration information generation module is used for generating the target configuration information according to the target image file and the target MAC address.
9. The apparatus of any of claims 6 to 8, further comprising:
the state information receiving module is used for receiving the installation state information sent by the target equipment;
the address query module is used for querying an address corresponding table according to the target MAC address of the target equipment to obtain a target management address of the target equipment;
and the installation state display module is used for displaying the installation state of the target equipment in a state area corresponding to the target management address on a system installation interface.
10. The apparatus of claim 9, further comprising:
the second equipment determining module is used for determining the target equipment according to the target management address;
a third address obtaining module, configured to obtain a target MAC address sent by a BMC device on the target device;
and the mapping table generating module is used for generating the address mapping table according to the target management address and the target MAC address.
CN202111437426.XA 2021-11-29 2021-11-29 Operating system installation method and device Pending CN114115917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111437426.XA CN114115917A (en) 2021-11-29 2021-11-29 Operating system installation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111437426.XA CN114115917A (en) 2021-11-29 2021-11-29 Operating system installation method and device

Publications (1)

Publication Number Publication Date
CN114115917A true CN114115917A (en) 2022-03-01

Family

ID=80367702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111437426.XA Pending CN114115917A (en) 2021-11-29 2021-11-29 Operating system installation method and device

Country Status (1)

Country Link
CN (1) CN114115917A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866517A (en) * 2022-05-16 2022-08-05 广州高专资讯科技有限公司 Installation file execution method and device and storage medium
CN115098174A (en) * 2022-06-29 2022-09-23 广东东勤科技有限公司 PXE technology-based operating system installation method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866517A (en) * 2022-05-16 2022-08-05 广州高专资讯科技有限公司 Installation file execution method and device and storage medium
CN115098174A (en) * 2022-06-29 2022-09-23 广东东勤科技有限公司 PXE technology-based operating system installation method and device

Similar Documents

Publication Publication Date Title
US11922177B2 (en) Securely and reliably transferring startup script
US7802084B2 (en) System and method for management and installation of operating system images for computers
US10203946B2 (en) Retiring target machines by a provisioning server
US8402123B2 (en) Systems and methods for inventorying un-provisioned systems in a software provisioning environment
US8892700B2 (en) Collecting and altering firmware configurations of target machines in a software provisioning environment
US9465625B2 (en) Provisioning of operating environments on a server in a networked environment
US8898305B2 (en) Providing power management services in a software provisioning environment
US7376944B2 (en) Hardware ROM upgrade through an internet or intranet service
US8245022B2 (en) Method and system to support ISCSI boot through management controllers
CN106911729B (en) Remote installation method of operating system suitable for domestic processor
US20100138526A1 (en) Methods and systems for providing hardware updates in a software provisioning environment
CN110908753B (en) Intelligent fusion cloud desktop server, client and system
US8332490B2 (en) Method, apparatus and program product for provisioning a computer system
US20100306337A1 (en) Systems and methods for cloning target machines in a software provisioning environment
US20060155838A1 (en) Program installation system and method using the same
CN113741914B (en) Operating system installation mechanism
CN114115917A (en) Operating system installation method and device
CN104113430A (en) Cloud computing data center automatic deployment software framework design
CN107391193A (en) A kind of client, the system and method for configuration server
US20050132360A1 (en) Network boot sequence in the absence of a DHCP server
CN111475172B (en) Bare metal deployment method and device
US20190205109A1 (en) Computer system, baseboard management controller, and os installation method
WO2023098052A1 (en) Server operation and maintenance method and apparatus, and device and storage medium
CN111078305A (en) Information acquisition method and device, server and information management system
US20060059330A1 (en) Remotely providing basic input/output system to a client system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination