CN114115917B - Operating system installation method and device - Google Patents
Operating system installation method and deviceInfo
- Publication number
- CN114115917B CN114115917B CN202111437426.XA CN202111437426A CN114115917B CN 114115917 B CN114115917 B CN 114115917B CN 202111437426 A CN202111437426 A CN 202111437426A CN 114115917 B CN114115917 B CN 114115917B
- Authority
- CN
- China
- Prior art keywords
- target
- address
- mac address
- management
- image file
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
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 steps of obtaining 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, wherein the MAC address and the image file associated with the same management address have a matching relationship in the configuration file, and sending the target image file to the target equipment so as to enable the target equipment with the target management address to install 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 repeated operation of a user is reduced as much as possible when different operating systems are installed on different devices, and the installation efficiency of the operating system is improved.
Description
Technical Field
The present invention relates to the field of network communications technologies, and in particular, to a method and an apparatus for installing an operating system.
Background
The pre-boot execution environment (Preboot eXecution Environment, PXE), also referred to as a pre-execution environment, provides a mechanism for booting a computer using a network interface (Network Interface).
In the process of PXE starting, the terminal requires the server to distribute an IP address, and then downloads a starting software package to a local memory for execution by using a TFTP (TRIVIAL FILE TRANSFER protocol) or MTFTP (multi cast TRIVIAL FILE TRANSFER protocol) protocol, and the starting software package completes the setting of basic software of the terminal, thereby guiding a terminal operating system pre-installed in the server. The developer can manually set BootLoader configuration of the PXE and configuration of the DHCP server through the 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 the terminal for installation according to the MAC address in the information sent by the PXE client.
In the scheme, users need 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 of the devices corresponding to each MAC address, so that the system installation efficiency is low.
Disclosure of Invention
The application provides a method and a device for installing an operating system, which improve the installation efficiency of the operating system.
In one aspect, there is provided an operating system installation method, the method comprising:
Acquiring a target MAC address of target equipment;
Inquiring 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, wherein in the configuration file, the MAC address and the image file which are associated with the same management address have a matching relationship;
And sending the target image file to the target device so that the target device with the target management address installs an operating system.
In yet another aspect, there is provided an operating system installation apparatus, the apparatus 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 the PXE server according to the target MAC address to acquire a target image file matched with the target MAC address, wherein in the configuration file, the MAC address and the image file which are associated with the same management address have a matching relationship;
And the image file sending module is used for sending the target image file to target equipment so as to enable the target equipment with the target management address to install an operating system.
In one possible implementation, the apparatus further includes:
And the configuration file updating module is used for updating the configuration file of the PXE server according to the target configuration information corresponding to the configuration writing operation when the configuration writing operation is received, wherein the target configuration is used for representing that the target MAC address and the target image file have a matching relationship.
In one possible implementation, the apparatus further includes:
The first device determining module is used for determining the target device according to the target management address, wherein the target device comprises target BMC (baseboard management controller) devices;
the second address acquisition module is used for acquiring a target MAC address sent by target BMC equipment, wherein the target MAC address is read from a network card of the target equipment by the target BMC equipment;
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 inquiry module is used for 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 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 corresponding table generating module is used for generating the address corresponding table according to the target management address and the target MAC address.
In yet 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 set of codes, or a set of instructions, where the at least one instruction, at least one program, a set of codes, or a set of instructions are loaded and executed by the processor to implement the operating system installation method described above.
In yet another aspect, a computer readable storage medium having stored therein at least one instruction loaded and executed by a processor to implement the operating system installation method described above is provided.
In yet another aspect, a computer program product or computer program is provided, the computer program product or 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 performs the operating system installation method described above.
The technical scheme provided by the application can comprise the following beneficial effects:
When the operating system needs to be installed, the management server can directly acquire the MAC address of the target device and inquire in the configuration file of the PXE server, so that the target image file corresponding to the operating system, which is required to be installed, of the target device corresponding to the target management address is determined, and the operating system is installed on the target device. In the scheme, the configuration file matches the MAC address of each device with the mirror image file to be installed through the management address of each device, the user does not need to inquire the MAC addresses of the devices one by one and then configure one by one, and the management server can directly determine the operating system to be installed according to the MAC addresses, so that when different operating systems are installed on different devices, repeated operation of the user is reduced as much as possible, and the installation efficiency of the operating system is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram illustrating the architecture of an operating system installation system, according to an example embodiment.
FIG. 2 is a method flow diagram illustrating a method of operating system installation, according to an example embodiment.
FIG. 3 is a method flow diagram illustrating a method of operating system installation, according to an example embodiment.
FIG. 4 is a flow chart diagram illustrating a method of operating system installation according to an example embodiment.
Fig. 5 shows a schematic diagram of a parameter configuration interface 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 according to an exemplary embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made apparent and fully in view of the accompanying drawings, in which some, but not all embodiments of the application are shown. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the "indication" mentioned in the embodiments of the present application may be a direct indication, an indirect indication, or an indication having an association relationship. For example, the indication B may indicate that a directly indicates B, for example, B may be obtained by a, or may indicate that a indirectly indicates B, for example, a indicates C, B may be obtained by C, or may indicate that a and B have an association relationship.
In the description of the embodiments of the present application, the term "corresponding" may indicate that there is a direct correspondence or an indirect correspondence between the two, or may indicate that there is an association between the two, or may indicate a relationship between the two and the indicated, configured, etc.
In the embodiment of the present application, the "predefining" may be implemented by pre-storing corresponding codes, tables or other manners that may be used to indicate relevant information in devices (including, for example, terminal devices and network devices), and the present application is not limited to the specific implementation manner thereof.
Before explaining the various embodiments of the present application, a description is given first of several concepts to which the present application relates.
1) PXE (Preboot eXecution Environment, pre-boot execution Environment)
The 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 independently of the local data storage device (e.g., hard disk) or the locally installed operating system. PXE was originally implemented as part of Intel's wired management architecture by using several network protocols like Internet Protocol (IP), user Datagram Protocol (UDP), dynamic Host Configuration Protocol (DHCP), small file transfer protocol (TFTP), etc. and concepts of Globally Unique Identifier (GUID), universal network drive interface (undei), universal unique identification code (UUID) and by extending preset APIs to client (computer by PXE self-test) firmware. The term PXE client (client) refers to the role of a machine in the PXE startup process. A PXE client (client) may be a server, desktop, notebook, or other machine that hosts PXE boot code.
2) BMC (Baseboard Management Controller )
The BMC may perform firmware upgrades, view the machine device, etc. on the machine while the machine is not powered on. Platform management represents a series of monitoring and control functions, the object of operation being the system hardware. Such as by monitoring the temperature, voltage, fans, power supplies, etc. of the system and making corresponding adjustments to ensure that the system is in a healthy state. Of course, if the system is not normal, the system can be restarted by resetting. Meanwhile, 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. These functions above may be integrated into a controller, which is referred to as a baseboard management controller. It should be noted that, the BMC is a separate System, and does not depend on other hardware (such as CPU, memory, etc.) on the System, or on BIOS (Basic Input Output System ), OS (Operating System), etc.
FIG. 1 is a schematic diagram illustrating the architecture of an operating system installation system, according to an example embodiment. The operating system installation system includes a management server 110 and a target device 120.
Optionally, the management server 110 stores an image file of each operating system, 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 be started from PXE by the BMC device, the target device 120 enters a process of starting the operating system from the network after being restarted.
Optionally, the management server may be an independent physical server, a server cluster formed by a plurality of physical servers or a distributed system, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, and technical computing services such as big data and an 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 (such as managing a connection state between each module and the server, etc.), 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.
Alternatively, 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, techniques and/or formats including hypertext markup language, extensible markup language, and the like are used to represent data exchanged over a network. All or some of the links may also be encrypted using conventional encryption techniques such as secure socket layer, transport layer security, virtual private network, internet protocol security, etc. 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, according to an example 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 acquired.
Wherein the MAC Address (MEDIA ACCESS Control Address, medium access Control Address), also called local area network Address (LAN ADDRESS), physical Address.
In the embodiment of the application, the MAC address is the physical address corresponding to the network card of the target device, and is burnt in 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, so the different MAC addresses respectively correspond to the different devices.
Step 202, inquiring the 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 the server receives the target MAC address, the configuration file in the PXE server can be queried according to the target MAC address, so that the name of the target image file matched with the target MAC address is confirmed from the configuration file, and the target image file of the operating system required to be installed by the target device is determined.
For example, the configuration file in the PXE server may be as follows:
In the code included in the configuration file, the "disable" field is used to indicate whether the configuration is enabled, and the "disable" field content in the configuration file is "false", which represents that the configuration is not disabled and is in an enabled state, the "MAC" field is used to indicate the MAC address corresponding to the configuration, the "disk" field is used to indicate the disk address where the image file in the configuration needs to be installed, the "size" field is used to indicate the size of the image file in the configuration, the "image" field is used to indicate the version name of the image file in the configuration, the "disk_sel-type" field is used to indicate how to determine the installation address where the image file is installed, when the content in the field is by_name, the terminal will acquire the configuration information and then install the image file to the disk location indicated by "/dev/sda", and optionally, the content of the field in the "disk_sel-type" may also be by size, i.e. the content of the field in the "disk_sel-type" may be by size is satisfied, i.e. the size may be satisfied.
In the embodiment of the application, in the configuration file, the MAC address and the mirror image file which are 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 that the management server configures in advance to each computer device for managing each computer device.
For example, when a server management device BMC exists in a computer device, the management address is an IP address of the BMC, and the computer device may perform a nanotube on each BMC device through the management address.
Because the configuration file is generated based on the corresponding relation between the MAC address and the management address (namely, the MAC address is associated with the management address) and the corresponding relation between the management address and the mirror image file (namely, the management address is associated with the mirror image file), the configuration file actually records the corresponding relation between the MAC address and the mirror image file (namely, the matching relation between the MAC address and the mirror image file), and therefore when the management server acquires the information transmitted by the PXE client on the target device in the process of system installation through the PXE, the mirror image file required to be installed by the target device can be directly confirmed according to the MAC address in the information, and the corresponding relation between the MAC address and the mirror image file does not need to be confirmed by a developer in advance.
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 the PXE flow, the PXE client requests the PXE server in the management server to allocate the IP address, and the management server needs to be configured with the DHCP service to allocate the IP address to the PXE client.
After the PXE client is distributed 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 device after receiving the message, so that a corresponding operating system is started on the target device 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 configuration file of the PXE server, so as to determine the target image file corresponding to the operating system to be installed by the target device corresponding to the target management address, thereby implementing the installation of the operating system on the target device. In the scheme, the configuration file matches the MAC address of each device with the mirror image file to be installed through the management address of each device, the user does not need to inquire the MAC addresses of the devices one by one and then configure one by one, the server can directly determine the operating system to be installed according to the MAC addresses, and when different operating systems are installed on different devices, repeated operation of the user is reduced as much as possible, and the installation efficiency of the operating system is improved.
FIG. 3 is a method flow diagram illustrating a method of operating system installation, according to an example 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 the configuration file of the PXE server according to the target configuration information corresponding to the configuration write operation.
In one possible implementation, 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 displayed. In a computer cluster, a developer typically confirms the role played by each device in the computer cluster, such as a primary node or a backup node, according to the management address of each device. Before a developer needs to install an operating system on one of the devices, the developer can click on a configuration update control corresponding to the device, and at the moment, the management server can acquire configuration information corresponding to the device according to the configuration writing operation so as to update a configuration file of the PXE server, so that preparation work for updating the device is done.
In another possible implementation manner, the operating system image file of the management server also has an automatic installation script KS (kckstart), and the automatic installation script can automatically perform configuration of the system, such as automatic configuration Root password, system language, and the like, according to configuration information stored in the script in advance 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, which is not described herein.
In one possible implementation manner, the target device is determined according to a target management address, the target device comprises target BMC equipment, a target MAC address sent by the target BMC equipment is obtained, the target BMC equipment reads from a network card of the target device in the MAC address, a target image file associated with the target management address is obtained, and the target configuration information is generated according to the target image file and the target MAC address.
In the embodiment of the application, each device to be installed, which needs to install an operating system, and the management server together form an intelligent management center platform IMC, wherein each device to be installed contains BMC devices, and the management server can receive the BMC devices on each device to be installed according to the preset management address in the device to be installed, so that the control of the BMC devices on each device to be installed is realized.
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 obtains the target management address, which device is determined, PCIE information on a network card of the target device can be obtained 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 obtains the target MAC address according to the target management address, so as to achieve the purpose of associating the target management address with the target MAC address, and establish the association between the target management address and the target MAC address.
In one possible implementation manner, a preset corresponding relationship between the target management address and the mirror image file exists in the management server. The corresponding relation between the target management address and the mirror image file can be preset by a developer and stored in the management server, and because the developer presets the management address of each device to be installed when designing the IMC of the intelligent management center platform, the developer can further determine the operating system to be installed of the device to be installed corresponding to each management address.
When the device to be installed installs the operating system through PXE, the server can only acquire the MAC address and the service IP address of the device to be installed, and can not directly determine which device is installed with the operating system according to the MAC address and the service IP address, so that the MAC address and the mirror image file are required to be manually corresponding, and the operation is very complicated.
In the embodiment of the application, the acquired MAC address is directly sent to the management server through the BMC equipment of the target management address nanotube, so that the management server corresponds the target MAC address to the target management address, thereby constructing the matching relationship between the target MAC address and the target mirror image file, avoiding manual input and greatly improving the installation efficiency when different operating systems are installed.
Step 302, a target MAC address of a target device is obtained.
Before installing the target device, the target device needs to be set to be started from PXE, and at the moment, the management server can 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 be started from PXE.
At this time, the management server also needs to start a DHCP function to allocate a service IP address to the target device, so as to implement data transmission between the target device and the management server.
When the target device allocates the service IP address and starts the PXE client, the target device sends an instruction to the management server to request the installation of the operating system, and the management server can acquire the target MAC address of the target device in the instruction.
And step 303, inquiring the 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 obtains the target MAC address, inquiring a configuration file which is generated in advance in the PXE server according to the target MAC address, and inquiring a target image file corresponding to the target MAC address to be used as an image file of an operating system of 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 device, so that the target device installs an operating system according to the target image file.
Through the steps, under the condition that users do not inquire the MAC addresses of the devices one by one, as the management server obtains the MAC addresses of the devices to be installed through each BMC device and corresponds to the management addresses, a developer only needs to determine the types of the operating systems required to be installed for each management address according to the preset management addresses (namely, determine mirror image files), so that the installation of different operating systems on different devices can be realized, and the installation efficiency of the operating systems is improved.
In one possible implementation manner, the method comprises the steps of receiving installation state information sent by target equipment, inquiring an address corresponding table according to a 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.
After the target device acquires the image file and installs the image file, the target device can also send its own installation state information to the management server, and the installation state information is sent to the management server at this time, so that the installation state information also has the target MAC address of the target device, and at this time, the management server queries the address correspondence table according to the target MAC address, determines the target management address corresponding to the target MAC address, and displays the installation state of the target device on the system installation interface.
In one possible implementation, the target device is determined according to a target management address, a target MAC address sent by a 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.
The management server manages the BMC equipment on the target equipment through the target management address, acquires the target MAC address of the target equipment through the BMC equipment on the target equipment, generates 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 relation between each management address and the MAC address of each equipment.
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 configuration file of the PXE server, so as to determine the target image file corresponding to the operating system to be installed by the target device corresponding to the target management address, thereby implementing the installation of the operating system on the target device. In the scheme, the configuration file matches the MAC address of each device with the mirror image file to be installed through the management address of each device, the user does not need to inquire the MAC addresses of the devices one by one and then configure one by one, the server can directly determine the operating system to be installed according to the MAC addresses, and when different operating systems are installed on different devices, repeated operation of the user is reduced as much as possible, and the installation efficiency of the operating system is improved.
Referring now to FIG. 4, a flowchart of a method for operating system installation is shown in accordance with an illustrative embodiment. As shown in fig. 4, the operating system installation method includes the steps of:
1. PXE is turned on.
In the embodiment of the application, the server management software can be started in the server, and then the PXE and DHCP functions are started in the server management software.
Referring to fig. 5, a schematic diagram of a parameter configuration interface according to an embodiment of the application is shown. As shown in fig. 5, on the parameter configuration interface in the server management software, the user can select the BootLoader configuration of PXE and the configuration of the DHCP server, and the mirror selection to be installed by inputting a specified operation (such as a touch operation or a click operation). The developer installs the PXE on the device to be installed, the device sets the next start item as PXE, starts from the PXE after restarting, and starts to install the OS. PXE can be turned on and off in the PXE management page, and the IP address, MAC address, BIOS mode, operating system, and installation status of the device that is performing the PXE installation can be recorded
2. And obtaining PCIE information.
The HDM (H3C DEVICE MANAGER, H3C device management) device of the device to be managed is added, and PCIE information on the device is acquired through the HDM.
The HDM device is a BMC device, a management unit independent of a CPU on a server, and uses a sensor to monitor the state of a computer, a network server or other hardware driving devices, and communicates with a system administrator through an independent connection line.
3. Uploading an image file to be installed.
4. The device to which the system is to be installed is selected, and the installation of the PXE is selected.
5. The MAC address of the device to be installed is determined.
And the server management software firstly acquires network card information in PCIE information of the equipment according to the equipment selected by the user, and filters the MAC address of the network card port from the network card information.
6. And setting a configuration file.
And then setting the binding relation between the MAC address of the equipment and the system to be installed into the configuration file of the PXE.
7. The device to be installed is set to PXE start.
Setting the next starting item of the equipment as PXE through HDM, restarting the equipment, entering a PXE flow after restarting the equipment to start installing an OS, detecting the MAC address of a PXE Client by a PXE server, checking the binding relation between the MAC address and the mirror image in the configuration file according to the MAC address, and setting the PXE Client to start installing the OS from the corresponding system mirror image.
8. And obtaining an installation result.
The server management software can filter the installation state and the installation result of the PXE of the corresponding device from the installation progress of the device at the back end returned by the PXE according to the corresponding relation between the IP address and the MAC address of the network card provided by the HDM.
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 a configuration file in the PXE server according to the target MAC address, obtain a target image file corresponding to the target MAC address, where in the configuration file, a MAC address associated with the same management address has a matching relationship with the image file;
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:
And the configuration file updating module is used for updating the configuration file of the PXE server according to the target configuration information corresponding to the configuration writing operation when the configuration writing operation is received, wherein the target configuration is used for representing that the target MAC address and the target image file have a matching relationship.
In one possible implementation, the apparatus further includes:
The first device determining module is used for determining the target device according to the target management address, wherein the target device comprises target BMC (baseboard management controller) devices;
the second address acquisition module is used for acquiring a target MAC address sent by target BMC equipment, wherein the target MAC address is read from a network card of the target equipment by the target BMC equipment;
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 inquiry module is used for 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 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 corresponding table generating module is used for generating the address corresponding 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 configuration file of the PXE server, so as to determine the target image file corresponding to the operating system to be installed by the target device corresponding to the target management address, thereby implementing the installation of the operating system on the target device. In the scheme, the configuration file matches the MAC address of each device with the mirror image file to be installed through the management address of each device, the user does not need to inquire the MAC addresses of the devices one by one and then configure one by one, the server can directly determine the operating system to be installed according to the MAC addresses, and when different operating systems are installed on different devices, repeated operation of the user is reduced as much as possible, and the installation efficiency of the operating system is improved.
Referring to fig. 7, a schematic diagram of a computer device according to an exemplary embodiment of the present application is provided, where the computer device includes a memory and a processor, and the memory is configured to store 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 (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 (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above.
The memory, as 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 in embodiments of the present invention. The processor executes various functional applications of the processor and data processing, i.e., implements the methods of the method embodiments described above, by running non-transitory software programs, instructions, and modules stored in memory.
The memory may include a storage program area that may store an operating system, application programs required for at least one function, and a storage data area that may store data created by the processor, etc. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some implementations, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through 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 that 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 Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application 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 application 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 is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method of operating system installation, the method performed by a management server, 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 mirror image file matched with the target MAC address, wherein the configuration file has a matching relationship with the MAC address and the mirror image file associated with the same management address, and the configuration file is generated based on the corresponding relationship between the MAC address and the management address and the corresponding relationship between the management address and the mirror image file;
And sending the target image file to the target device so that the target device with the target management address installs an operating system.
2. The method as recited in claim 1, wherein prior to querying the configuration file in the PXE server according to the destination MAC address, the method further comprises:
When a configuration writing operation is received, updating the configuration file of the PXE server according to target configuration information corresponding to the configuration writing operation, wherein the target configuration is used for representing that a matching relationship exists between the target MAC address and the target image file.
3. The method according to claim 2, wherein the method further comprises:
Determining the target equipment according to the target management address, wherein the target equipment comprises target BMC equipment;
acquiring a target MAC address sent by target BMC equipment, wherein the MAC address is read from a network card of the target equipment by the target BMC equipment;
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. A method according to any one of claims 1 to 3, wherein the method further comprises:
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 prior to receiving the first installation status sent by the first device, further comprising:
Determining the target equipment 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.
6. An operating system installation apparatus for application to a management server, the apparatus comprising:
the first address acquisition module is used for acquiring a target MAC address of target equipment;
The system comprises a target MAC address, an image file acquisition module, a management server and a management server, wherein the target MAC address is used for acquiring a target image file matched with the target MAC address, the image file acquisition module is used for inquiring the configuration file in the PXE server according to the target MAC address, and the MAC address and the image file which are associated with the same management address in the configuration file have a matching relationship;
And the image file sending module is used for sending the target image file to target equipment so as to enable the target equipment with the target management address to install an operating system.
7. The apparatus of claim 6, wherein the apparatus further comprises:
and the configuration file updating module is used for updating the configuration file of the PXE server according to the target configuration information corresponding to the configuration writing operation when the configuration writing operation is received, wherein the target configuration is used for representing the corresponding relation between the target MAC address and the target mirror image file.
8. The apparatus of claim 7, wherein the apparatus further comprises:
The first device determining module is used for determining the target device according to the target management address, wherein the target device comprises target BMC (baseboard management controller) devices;
The system comprises a target BMC device, a second address acquisition module, a first address acquisition module and a second address acquisition module, wherein the target BMC device is used for acquiring a target MAC address sent by the target BMC 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 according to any one 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 inquiry module is used for 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 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, wherein the apparatus further comprises:
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 corresponding table generating module is used for generating the address corresponding table according to the target management address and the target MAC address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111437426.XA CN114115917B (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 CN114115917B (en) | 2021-11-29 | 2021-11-29 | Operating system installation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114115917A CN114115917A (en) | 2022-03-01 |
CN114115917B true CN114115917B (en) | 2025-09-19 |
Family
ID=80367702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111437426.XA Active CN114115917B (en) | 2021-11-29 | 2021-11-29 | Operating system installation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114115917B (en) |
Families Citing this family (6)
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 |
CN115098174B (en) * | 2022-06-29 | 2024-11-12 | 广东东勤科技有限公司 | Operating system installation method and device based on PXE technology |
CN115576613B (en) * | 2022-09-24 | 2025-08-15 | 超聚变数字技术有限公司 | Method for installing operating system based on PXE, computing equipment and communication system |
CN115712439A (en) * | 2022-09-28 | 2023-02-24 | 超聚变数字技术有限公司 | Operating system installation management method and system and electronic equipment |
CN116126361A (en) * | 2022-12-30 | 2023-05-16 | 中国长城科技集团股份有限公司 | An operating system filling method, system and electronic equipment |
CN120255915B (en) * | 2025-05-30 | 2025-08-08 | 苏州元脑智能科技有限公司 | Method, device, equipment and medium for starting server system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254783A (en) * | 2018-09-18 | 2019-01-22 | 郑州云海信息技术有限公司 | A kind of server system installation method, device, equipment and readable storage medium storing program for executing |
CN111008043A (en) * | 2019-10-18 | 2020-04-14 | 烽火通信科技股份有限公司 | Server starting method of cloud platform and terminal |
CN111427624A (en) * | 2020-03-20 | 2020-07-17 | 苏州浪潮智能科技有限公司 | Method, device and system for batch automatic deployment and configuration of servers |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101408033B1 (en) * | 2011-08-24 | 2014-06-17 | 주식회사 케이티 | Apparatus and Method for building a configuration of multilple host devices within network |
CN104065758A (en) * | 2013-03-18 | 2014-09-24 | 杭州华三通信技术有限公司 | Active device automatic deployment method, device and system |
CN106919420A (en) * | 2017-02-13 | 2017-07-04 | 彤诺电子鄂州有限公司 | A kind of PC auto-fillings method and system |
CN107360042A (en) * | 2017-08-22 | 2017-11-17 | 郑州云海信息技术有限公司 | A kind of server management method and device |
CN110879712B (en) * | 2019-11-07 | 2022-06-17 | 北京浪潮数据技术有限公司 | Cloud data center physical host installation method and related device |
-
2021
- 2021-11-29 CN CN202111437426.XA patent/CN114115917B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254783A (en) * | 2018-09-18 | 2019-01-22 | 郑州云海信息技术有限公司 | A kind of server system installation method, device, equipment and readable storage medium storing program for executing |
CN111008043A (en) * | 2019-10-18 | 2020-04-14 | 烽火通信科技股份有限公司 | Server starting method of cloud platform and terminal |
CN111427624A (en) * | 2020-03-20 | 2020-07-17 | 苏州浪潮智能科技有限公司 | Method, device and system for batch automatic deployment and configuration of servers |
Also Published As
Publication number | Publication date |
---|---|
CN114115917A (en) | 2022-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114115917B (en) | Operating system installation method and device | |
US11922177B2 (en) | Securely and reliably transferring startup script | |
US7802084B2 (en) | System and method for management and installation of operating system images for computers | |
US10884759B2 (en) | Remote deployment of operating systems | |
CN105765526B (en) | Boot from a remote disk image over the network | |
US7080134B2 (en) | Systems and methods for software distribution and management | |
US7363514B1 (en) | Storage area network(SAN) booting method | |
CN101917452B (en) | Platform discovery in a pre-boot environment using web services | |
US7886139B2 (en) | Method to enable firmware to boot a system from an ISCSI device | |
US8332490B2 (en) | Method, apparatus and program product for provisioning a computer system | |
KR101587994B1 (en) | Cloud computing service system with virtual hard disk | |
US20050132360A1 (en) | Network boot sequence in the absence of a DHCP server | |
CN114327536A (en) | Server operation and maintenance method, device, equipment and storage medium | |
CN116775540A (en) | PCIE equipment information acquisition method, apparatus, equipment and storage medium | |
CN115712542A (en) | Dynamic loading method, device and equipment for monitoring process and storage medium | |
CN110633086A (en) | Blade server | |
WO2012054023A1 (en) | Computer system with computers that perform network boots | |
CN107861761B (en) | A method and system for starting a physical host | |
KR102414260B1 (en) | Method and apparatus for automatically installing operating system in an environment of network | |
CN104753708A (en) | Client-side startup configuration system and method | |
CN103793239A (en) | Cloud cluster system and its startup deployment method | |
Both | DHCP | |
CN117667231A (en) | A method and device for network booting operating system based on debugging environment | |
HK40083923A (en) | Pxe-based operating system installation method, apparatus, device and storage medium | |
CN118740616A (en) | Method, device, electronic device and storage medium for deploying server cluster |
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 | ||
GR01 | Patent grant |