CN106873970B - Installation method and device of operating system - Google Patents

Installation method and device of operating system Download PDF

Info

Publication number
CN106873970B
CN106873970B CN201611247321.7A CN201611247321A CN106873970B CN 106873970 B CN106873970 B CN 106873970B CN 201611247321 A CN201611247321 A CN 201611247321A CN 106873970 B CN106873970 B CN 106873970B
Authority
CN
China
Prior art keywords
file
equipment
name
boot
type
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
Application number
CN201611247321.7A
Other languages
Chinese (zh)
Other versions
CN106873970A (en
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 Information Technologies Co Ltd
Original Assignee
New H3C Information Technologies Co Ltd
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 Information Technologies Co Ltd filed Critical New H3C Information Technologies Co Ltd
Priority to CN201611247321.7A priority Critical patent/CN106873970B/en
Publication of CN106873970A publication Critical patent/CN106873970A/en
Application granted granted Critical
Publication of CN106873970B publication Critical patent/CN106873970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F9/4406Loading of operating system
    • 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
    • G06F9/4416Network booting; Remote initial program loading [RIPL]

Abstract

The application provides an installation method and device of an operating system, wherein the method comprises the following steps: sending a request message to network equipment connected with the equipment; receiving a response message returned by the network equipment, wherein the response message carries a boot file name matched with the BIOS mode of the equipment to be installed; sending a boot file downloading request carrying the name of the boot file to an installation server, and receiving the boot file which is returned by the installation server and corresponds to the name of the boot file; and installing an operating system matched with the BIOS mode on the equipment by using the boot file. According to the technical scheme, the installation server is deployed, so that the installation process of the operating systems of all the devices to be installed can be completed, and the resources of the installation server are saved. The parallel batch installation requirements of various operating systems can be met, and the installation process of the operating systems is accelerated.

Description

Installation method and device of operating system
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for installing an operating system.
Background
With the explosive development of the cloud computing internet industry, the number of servers is continuously increased, and due to different application requirements of the servers, the installation requirements of the servers on the operating systems are diversified. Specifically, different servers may operate in different BIOS (Basic Input Output System) modes, such as UEFI (unified Extensible Firmware Interface, i.e. new BIOS mode) or Legacy (i.e. Legacy BIOS mode).
Currently, in order to install operating systems with different BIOS modes, a plurality of PXE (preboot execution environment) servers are deployed, and each PXE server is responsible for one BIOS mode. For example, the PXE server 1 is used to install the UEFI-mode operating system for all the devices to be installed (i.e. servers to be installed with operating systems, which may also be referred to as UUTs), and the PXE server 2 is used to install the Legacy-mode operating system for all the devices to be installed.
However, in the above manner, a plurality of PXE servers need to be deployed, and the more BIOS modes, the greater the number of PXE servers required, and the greater the consumption of PXE server resources.
Disclosure of Invention
The application provides an installation method of an operating system, which is applied to equipment to be installed and comprises the following steps:
sending a request message to network equipment connected with the equipment;
receiving a response message returned by the network equipment, wherein the response message carries a boot file name matched with a Basic Input Output System (BIOS) mode of the equipment to be installed;
sending a boot file downloading request carrying the name of the boot file to an installation server, and receiving the boot file which is returned by the installation server and corresponds to the name of the boot file;
and installing an operating system matched with the BIOS mode on the equipment by using the boot file.
The application provides an installation method of an operating system, which is applied to an installation server and comprises the following steps:
receiving a boot file downloading request from equipment to be installed, wherein the boot file downloading request carries a boot file name, and the boot file name is obtained by the equipment to be installed from network equipment and is matched with a Basic Input Output System (BIOS) mode of the equipment to be installed;
and inquiring a boot file corresponding to the name of the boot file, and returning the boot file to the equipment to be installed so that the equipment to be installed can install the operating system by using the boot file.
The application provides operating system's installation device is applied to and treats the installation equipment, includes:
the sending module is used for sending a request message to the network equipment connected with the equipment to be installed;
a receiving module, configured to receive a response message returned by the network device, where the response message carries a boot file name matched with a BIOS mode of the device to be installed;
the sending module is further configured to send a boot file downloading request carrying the boot file name to an installation server;
the receiving module is further configured to receive a boot file corresponding to the boot file name, where the boot file is returned by the installation server;
and the processing module is used for installing an operating system matched with the BIOS mode on the equipment to be installed by utilizing the boot file.
The application provides an operating system's installation device is applied to installation server, includes:
the device comprises a receiving module and a sending module, wherein the receiving module is used for receiving a boot file downloading request from a device to be installed, the boot file downloading request carries a boot file name, and the boot file name is obtained by the device to be installed from a network device and is matched with a Basic Input Output System (BIOS) mode of the device to be installed;
the query module is used for querying the guide file corresponding to the guide file name;
and the sending module is used for returning the boot file to the equipment to be installed so as to enable the equipment to be installed to install the operating system by using the boot file.
Based on the technical scheme, in the embodiment of the application, the installation process of the operating systems of all the devices to be installed can be completed by deploying one installation server (such as a PXE server), and only one installation server is needed even if the BIOS has more modes, so that the resources of the installation server are saved. Moreover, one installation server supports multiple BIOS modes simultaneously, and the parallel batch installation requirements of multiple operating systems can be met, so that the installation process of the operating systems is accelerated, and the service experience is obviously improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a flow chart of a method of installing an operating system in one embodiment of the present application;
FIG. 2 is a flow chart of a method for installing an operating system in another embodiment of the present application;
FIGS. 3A and 3B are schematic diagrams of an application scenario in an embodiment of the present application;
FIG. 4 is a diagram of a hardware configuration of a device to be installed in one embodiment of the present application;
FIG. 5 is a block diagram of an operating system installation apparatus according to one embodiment of the present application;
FIG. 6 is a hardware block diagram of an installation server in one embodiment of the present application;
fig. 7 is a block diagram of an operating system installation apparatus according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" may be used is interpreted as "at … …," or "at … …," or "in response to a determination.
The embodiment of the present application provides an installation method of an operating system, which is applied to a system including a device to be installed (e.g., a server of the operating system to be installed, which is referred to as a UUT) and an installation server (e.g., a PXE server), where the number of the installation servers is one, the number of the devices to be installed may be multiple, the processing of each device to be installed is the same, and the following description will take the processing of one device to be installed as an example. In the application scenario, referring to fig. 1, a flowchart of an installation method of the operating system is shown, where the method may include:
step 101, a device to be installed sends a request message to a network device connected with the device.
Step 102, the device to be installed receives a response message returned by the network device, wherein the response message carries a boot file name matched with the BIOS mode of the device.
In one example, the request message may be a DHCP (Dynamic Host Configuration Protocol) request message, and the response message may be a DHCP response message.
In one example, after receiving the request message, the network device may obtain a boot file name matching a BIOS pattern of the device to be installed, and send the boot file name to the device to be installed through a response message. For the process of acquiring the boot file name matched with the BIOS mode of the device to be installed by the network device, only one boot file name may be configured on the network device, so that the network device directly determines the locally configured boot file name as the boot file name matched with the BIOS mode of the device to be installed. Or, the Network device may configure a corresponding relationship between a Virtual Local Area Network (VLAN) and a boot file name, so that the Network device may query the boot file name matched with the BIOS mode of the device to be installed based on the VLAN corresponding to the device to be installed.
In the first case, the network device corresponds to a BIOS mode, only the boot file name corresponding to the BIOS mode is configured on the network device, and only the device to be installed using the BIOS mode is connected to the network device, but the device to be installed using another BIOS mode is not connected to the network device. In this case, after receiving the request message from the device to be installed, the network device determines the boot file name configured by itself (only one boot file name is configured on the network device) as the boot file name matched with the BIOS mode of the device to be installed, and returns a response message carrying the boot file name to the device to be installed.
And secondly, the network equipment corresponds to at least two BIOS modes, for each BIOS mode, the network equipment is provided with a corresponding relation between a VLAN (virtual local area network) and a boot file name corresponding to the BIOS mode, the VLAN is the VLAN which a port connected with the equipment to be installed on the network equipment belongs to, the equipment to be installed uses the BIOS mode to be installed, and the boot file name is the boot file name matched with the BIOS mode. In this case, after receiving the request message from the device to be installed, the network device determines the VLAN corresponding to the receiving port of the request message, and then queries the correspondence (i.e., the correspondence between the VLAN and the boot file name) through the VLAN to obtain the boot file name corresponding to the VLAN, and returns a response message carrying the boot file name to the device to be installed.
Step 103, the device to be installed sends a boot file downloading request carrying the name of the boot file to the installation server, and receives the boot file corresponding to the name of the boot file returned by the installation server.
In one example, after receiving a boot file download request from a device to be installed, an installation server parses a boot file name from the boot file download request, queries a boot file corresponding to the boot file name, and returns the boot file to the device to be installed. The installation server may include a plurality of boot files corresponding to the BIOS modes, and may be configured with a correspondence between a boot file name and a boot file.
Step 104, the device to be installed installs an operating system matched with the BIOS mode (i.e. the BIOS mode of the device) on the device by using the boot file.
In one example, the process of "the device to be installed installs the operating system matching the BIOS pattern on the present device by using the boot file" may include, but is not limited to, the following ways:
the equipment to be installed analyzes the strategy information from the boot file, wherein the strategy information comprises the priority relation between the first address type and the second address type, and the priority of the first address type is superior to that of the second address type. The method comprises the steps that equipment to be installed sends a configuration file downloading request carrying first address information corresponding to a first address type to an installation server; if a first type configuration file corresponding to the first address information and returned by the installation server is received, installing an operating system matched with the BIOS mode by using the first type configuration file; if the first type configuration file is not received, sending a configuration file downloading request carrying second address information corresponding to the second address type to the installation server, receiving the second type configuration file corresponding to the second address information and returned by the installation server, and utilizing the second type configuration file to carry out RAID (Redundant Array Of Independent Disks) configuration.
Further, when receiving a configuration file downloading request carrying first address information from the equipment to be installed, the installation server inquires whether a first type configuration file corresponding to the first address information exists locally; if so, returning the first type configuration file corresponding to the first address information to the equipment to be installed; if not, stopping the processing, and returning the second type configuration file corresponding to the second address information to the equipment to be installed when receiving a configuration file downloading request carrying the second address information from the equipment to be installed.
In one example, the first address type may be a MAC (Media Access Control) type, and the second address type may be an IP network segment type. In practical applications, the second address type may be an IP segment type, such as a 24-bit IP segment or a 20-bit IP segment.
In one example, the process of configuring RAID for the device to be installed by using the second type configuration file may include: analyzing the name of the memory system file from the second type configuration file, and sending a memory system file downloading request carrying the name of the memory system file to an installation server; and receiving a memory system file corresponding to the name of the memory system file returned by the installation server, and performing RAID configuration by using the memory system file. Moreover, the device to be installed may send the first address information of the device to the installation server, so that the installation server generates the first type configuration file corresponding to the first address information.
Further, in the process that the device to be installed performs RAID configuration by using the second type configuration file, the installation server may further receive a memory system file download request carrying a memory system file name and sent by the device to be installed, and return the memory system file corresponding to the memory system file name to the device to be installed, so that the device to be installed performs RAID configuration by using the memory system file. Moreover, the installation server may further determine a template file matched with the BIOS mode of the device to be installed and the operating system type of the device to be installed, and generate a first type configuration file corresponding to the first address information by using the template file and the first address information of the device to be installed. Thus, when the installation server receives the configuration file downloading request carrying the first address information sent by the equipment to be installed again, the first type configuration file can be returned to the equipment to be installed, so that the equipment to be installed can install the operating system.
In an example, the second type configuration file is used to enable the device to be installed to perform RAID configuration, and the installation server may locally pre-configure a corresponding relationship between the second address information and the second type configuration file. In addition, the first type configuration file is used for enabling the device to be installed to install the operating system, and the installation server does not configure the first type configuration file corresponding to the first address information in advance locally, but generates the first type configuration file locally in the process of RAID configuration of the device to be installed.
Based on the technical scheme, in the embodiment of the application, the installation process of the operating systems of all the devices to be installed can be completed by deploying one installation server (such as a PXE server), and even if the BIOS has more modes and the operating systems have more types, only one installation server is needed, so that the resources of the installation server are saved. Moreover, one installation server supports multiple BIOS modes simultaneously, and the parallel batch installation requirements of multiple operating systems can be met, so that the installation process of the operating systems is accelerated, and the service experience is obviously improved.
Referring to fig. 2, another flowchart of an installation method of an operating system may include:
in step 201, an installation server receives a boot file download request from a device to be installed. The boot file downloading request carries a boot file name, and the boot file name is obtained by the device to be installed from the network device and is matched with the BIOS mode of the device to be installed.
Step 202, the installation server queries the boot file corresponding to the name of the boot file, and returns the boot file to the device to be installed, so that the device to be installed installs the operating system by using the boot file.
In one example, when receiving a configuration file downloading request carrying first address information from a device to be installed, an installation server queries whether a first type configuration file corresponding to the first address information exists locally; if so, returning the first type configuration file corresponding to the first address information to the equipment to be installed, so that the equipment to be installed can install the operating system by using the first type configuration file; if not, stopping processing, and returning a second type configuration file corresponding to the second address information to the equipment to be installed when receiving a configuration file downloading request carrying the second address information from the equipment to be installed, so that the equipment to be installed performs Redundant Array of Independent Disks (RAID) configuration by using the second type configuration file.
In an example, in the process that the device to be installed performs RAID configuration by using the second type configuration file, the installation server may further receive a memory system file download request carrying a memory system file name (that is, the device to be installed resolves from the second type configuration file) sent by the device to be installed, and return the memory system file corresponding to the memory system file name to the device to be installed, so that the device to be installed performs RAID configuration by using the memory system file. The installation server can also determine a template file matched with the BIOS mode of the equipment to be installed and the type of the operating system of the equipment to be installed, and generate a first type configuration file corresponding to first address information by using the template file and the first address information of the equipment to be installed.
Based on the technical scheme, in the embodiment of the application, the installation process of the operating systems of all the devices to be installed can be completed by deploying one installation server (such as a PXE server), and even if the BIOS has more modes and the operating systems have more types, only one installation server is needed, so that the resources of the installation server are saved. Moreover, one installation server supports multiple BIOS modes simultaneously, and the parallel batch installation requirements of multiple operating systems can be met, so that the installation process of the operating systems is accelerated, and the service experience is obviously improved.
The above-described scheme of the embodiment of the present application is described in detail below with reference to specific application scenarios. In this application scenario, the BIOS mode includes UEFI and Legacy, the operating system type includes ubuntu and rhel, it is assumed that the BIOS mode of the device 1 to be installed is UEFI, and an operating system of the ubuntu type is installed, the BIOS mode of the device 2 to be installed is UEFI, and an operating system of the rhel type is installed, the BIOS mode of the device 3 to be installed is Legacy, and an operating system of the ubuntu type is installed, the BIOS mode of the device 4 to be installed is Legacy, and an operating system of the rhel type is installed.
Fig. 3A and 3B are schematic diagrams of application scenarios according to an embodiment of the present application. In fig. 3A, the network device 1 corresponds to the BIOS mode UEFI, the network device 1 only configures a boot file name (such as bootx64.efi) corresponding to the BIOS mode UEFI, and connects the device 1 to be installed and the device 2 to be installed that use the BIOS mode UEFI with the network device 1. The network device 2 corresponds to the BIOS mode Legacy, the network device 2 only configures a boot file name (e.g., pxelinux.0) corresponding to the BIOS mode Legacy, and connects the device to be installed 3 and the device to be installed 4 using the BIOS mode Legacy with the network device 2. In fig. 3B, the network device corresponds to the BIOS mode UEFI and BIOS mode Legacy, the VLAN1 and VLAN2 are configured, the VLAN1 corresponds to the boot file name of the BIOS mode UEFI (e.g., bootx64.efi), and the VLAN2 corresponds to the boot file name of the BIOS mode Legacy (e.g., pxelinux.0). Also, the device to be installed 1 using the BIOS mode UEFI is connected to the port 1 belonging to the VLAN1, the device to be installed 2 using the BIOS mode UEFI is connected to the port 2 belonging to the VLAN1, the device to be installed 3 using the BIOS mode Legacy is connected to the port 3 belonging to the VLAN2, and the device to be installed 4 using the BIOS mode Legacy is connected to the port 4 belonging to the VLAN 2.
In the application scenario, the installation method of the operating system may include the following steps:
step 1, the device to be installed 1 sends an address request message, such as a DHCP request message, to the network device. Taking the process of installing the operating system by the device to be installed 1 as an example, the processing of other devices to be installed is similar thereto.
And 2, after receiving the address request message, the network equipment allocates an IP address A to the equipment to be installed 1 and determines a boot file name matched with the BIOS mode of the equipment to be installed 1. As shown in fig. 3A, the network device 1 determines a boot file name (boot file name bootx64.efi corresponding to the BIOS mode UEFI) configured by itself as a boot file name matching the BIOS mode of the device 1 to be installed. As shown in fig. 3B, the network device determines that the receiving port (port 1) of the address request message corresponds to VLAN1, and queries the correspondence between the VLAN and the boot file name through VLAN1 to obtain the boot file name bootx64.efi of BIOS mode UEFI corresponding to VLAN 1.
And step 3, the network device returns a response message, such as a DHCP response message, carrying the IP address a and the name of the boot file (such as boot file name bootx64.efi) to the device to be installed 1.
And 4, the device 1 to be installed analyzes the name of the boot file BOOTX64.EFI from the response message. Further, the apparatus to be installed 1 can parse out the IP address a from the response message and use the IP address a.
And step 5, the device to be installed 1 acquires the boot file corresponding to the boot file name bootx64.efi from the installation server, and for convenience of description, the boot file corresponding to the boot file name is taken as an example in the following.
In an example, the installation server may maintain a corresponding relationship between each boot file name and the corresponding boot file, and after the device to be installed 1 sends a request message carrying the boot file name bootx64.efi to the installation server, the installation server may return the boot file corresponding to the boot file name bootx64.efi to the device to be installed 1, so that the device to be installed 1 obtains the boot file.
And 6, analyzing the strategy information from the guide file by the equipment to be installed 1.
The bootstrap file does not carry a configuration file name, but carries policy information, where the policy information is used to indicate a priority relationship between a first address type and a second address type, and for example, the first address type may be an MAC type, and the second address type may be an IP network segment type, such as a 24-bit IP network segment, and the priority of the MAC type is higher than the priority of the 24-bit IP network segment.
And 7, the device 1 to be installed determines the MAC address (such as the MAC address a of the device 1 to be installed) matched with the MAC type and the IP network segment (such as the first 24 bits of the IP address a of the device 1 to be installed, when the IP address a is 100.100.100, the IP network segment is 100.100.100.0/24) matched with the IP network segment type.
And step 8, the device to be installed 1 sends a configuration file downloading request carrying the MAC address A to the installation server. In one example, since the priority of the MAC type is higher than that of the 24-bit IP network segment, the device to be installed 1 first sends a configuration file download request carrying the MAC address a to the installation server.
In step 9, when the installation server receives the configuration file download request, the installation server stops the process because the configuration file corresponding to the MAC address a does not exist locally.
Step 10, if the device to be installed 1 does not receive the configuration file returned by the installation server, sending a configuration file downloading request carrying the IP network segment 100.100.100.0/24 to the installation server.
Step 11, when receiving the configuration file downloading request, the installation server sends the configuration file 1 to the device to be installed 1 because the configuration file 1 corresponding to the IP network segment 100.100.100.0/24 exists locally. In one example, the installation server may pre-configure mapping relationship between the IP segment 100.100.100.0/24 and the configuration file 1 (for enabling RAID configuration of the devices to be installed), and all the devices to be installed belonging to the IP segment 100.100.100.0/24 may use the configuration file 1 for RAID configuration.
And step 12, the device 1 to be installed receives the configuration file 1, analyzes the name of the memory system file from the configuration file 1, and sends a memory system file downloading request carrying the name of the memory system file to the installation server.
Step 13, after receiving the memory system file downloading request, the installation server determines the memory system file corresponding to the memory system file name, and returns the memory system file to the device to be installed 1.
Step 14, after receiving the memory system file, the device to be installed 1 performs RAID configuration using the memory system file, and for the RAID configuration process, details are not described here, and no limitation is made thereto.
Step 15, in the process that the device 1 to be installed performs RAID configuration by using the memory system file, the installation server obtains the BIOS mode, the operating system type, and the MAC address of the device 1 to be installed.
In an example, during the RAID configuration of the device to be installed 1, the installation server may obtain, from the device to be installed 1, an identifier (for example, a serial number of the device to be installed 1) and the MAC address a of the device to be installed 1. For example, the memory system file may include a command for reporting the identifier and the MAC address, and the to-be-installed device 1 may report the identifier and the MAC address a of the to-be-installed device 1 to the installation server based on the command in the process of performing RAID configuration based on the memory system file.
Moreover, the installation server may maintain the corresponding relationship between the identifier of each device to be installed, the BIOS mode, and the operating system type in the database, so that after acquiring the identifier of the device 1 to be installed and the MAC address a, the installation server queries the database through the identifier of the device 1 to be installed, may obtain the BIOS mode (e.g., UEFI) and the operating system type (e.g., ubuntu) corresponding to the identifier, and record the mapping relationship between the MAC address A, BIOS, the UEFI, and the operating system type ubuntu.
Step 16, the installation server determines a template file matching the BIOS mode and the operating system type.
In an example, the template files of different BIOS modes may be different, and the template files of different operating system types may be different, for example, assuming that the BIOS mode includes UEFI and Legacy, and the operating system type includes ubuntu and rhel, 4 template files may be configured on the installation server, where UEFI + ubuntu of the BIOS mode corresponds to template file 1, UEFI + rhel of the operating system type corresponds to template file 2, Legacy + ubuntu of the BIOS mode corresponds to template file 3, and Legacy + rhel of the operating system type corresponds to template file 4, and the contents of these 4 template files are not limited in detail in this embodiment as long as the template files relate to BIOS mode and operating system type, and a configuration file for installing the operating system may be generated based on the template files.
In summary, after obtaining the BIOS mode UEFI and the operating system type ubuntu, the template file 1 matching the BIOS mode UEFI and the operating system type ubuntu may be determined.
And step 17, the installation server generates a configuration file 2 corresponding to the MAC address A by using the template file 1 and the MAC address A, wherein the name of the configuration file 2 comprises the MAC address A, and the configuration file 2 is used for enabling the equipment to be installed to install the operating system. The content of this configuration file 2 is not limited as long as the configuration file 2 enables the device to be installed in the BIOS mode UEFI to install an operating system of the ubuntu type.
And step 18, after the RAID configuration is finished, restarting the device to be installed 1, and after the restarting is finished, returning the device to be installed 1 to execute the step 1. Further, the processing procedure of step 1 to step 8 is the same as the above procedure, and is not repeated herein. In step 9, after receiving the configuration file download request, the installation server may return the configuration file 2 to the device to be installed 1 because the configuration file 2 corresponding to the MAC address a exists locally. After receiving the configuration file 2, the device to be installed 1 may install the operating system using the configuration file 2.
Based on the technical scheme, in the embodiment of the application, the installation process of the operating systems of all the devices to be installed can be completed by deploying one installation server, and only one installation server is needed even if the BIOS has more modes and the operating systems have more types, so that the resources of the installation server are saved. Moreover, one installation server supports multiple BIOS modes (such as supporting UEFI and legacy) at the same time, and can meet the parallel batch installation requirements of multiple operating systems, so that the installation process of the operating systems is accelerated, and the service experience is remarkably improved. And operations such as RAID configuration and the like can be performed, and one-stop completion of RAID configuration and installation of the operating system is realized, namely the equipment to be installed is started for the first time to perform RAID configuration and is started for the second time to install the operating system.
Based on the same application concept as the method, the embodiment of the application further provides an installation device of the operating system, and the installation device is applied to equipment to be installed. The installation device of the operating system can be realized by software, or can be realized by hardware or a combination of hardware and software. Taking a software implementation as an example, as a logical means, the device is formed by reading a corresponding computer program instruction in the nonvolatile memory through a processor of the device to be installed where the device is located. In terms of hardware, as shown in fig. 4, for a hardware structure diagram of a device to be installed where an installation apparatus of an operating system is located according to the present application, in addition to the processor and the nonvolatile memory shown in fig. 4, the device to be installed may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; in terms of hardware structure, the device to be installed may also be a distributed device, and may include a plurality of interface cards, so as to perform message processing extension on a hardware layer.
As shown in fig. 5, the structure diagram of the installation apparatus of the operating system proposed by the present application includes: a sending module 11, configured to send a request message to a network device connected to the device to be installed; a receiving module 12, configured to receive a response message returned by the network device, where the response message carries a boot file name matched with a BIOS mode of the device to be installed; the sending module 11 is further configured to send a boot file downloading request carrying the name of the boot file to an installation server; the receiving module 12 is further configured to receive a boot file corresponding to the name of the boot file, where the boot file is returned by the installation server; and the processing module 13 is configured to install, by using the boot file, an operating system matched with the BIOS mode in the device to be installed.
The processing module 13 is specifically configured to, in a process of using the boot file to install the operating system matched with the BIOS pattern in the device to be installed, parse policy information from the boot file, where the policy information includes a priority relationship between a first address type and a second address type, and a priority of the first address type is higher than a priority of the second address type; sending a configuration file downloading request carrying first address information corresponding to the first address type to an installation server through the sending module 11; if a first type configuration file corresponding to the first address information and returned by the installation server is received through the receiving module 12, installing an operating system matched with the BIOS mode by using the first type configuration file; if the first type configuration file is not received through the receiving module 12, a configuration file downloading request carrying second address information corresponding to the second address type is sent to the installation server through the sending module 11, and if the second type configuration file corresponding to the second address information returned by the installation server is received through the receiving module 12, RAID configuration is performed by using the second type configuration file.
In an example, the processing module 13 is specifically configured to, in a process of performing RAID configuration by using a second type configuration file, parse a memory system file name from the second type configuration file, and send a memory system file downloading request carrying the memory system file name to the installation server through the sending module 11; if a memory system file corresponding to the name of the memory system file returned by the installation server is received through the receiving module 12, RAID configuration is performed by using the memory system file;
the sending module 11 sends the first address information of the device to be installed to the installation server, so that the installation server generates a first type configuration file corresponding to the first address information.
Based on the same application concept as the method, the embodiment of the application further provides an installation device of the operating system, which is applied to an installation server. The installation device of the operating system can be realized by software, or can be realized by hardware or a combination of hardware and software. Taking a software implementation as an example, a device in a logical sense is formed by reading corresponding computer program instructions in a non-volatile memory through a processor of an installation server where the device is located. In terms of hardware, as shown in fig. 6, for a hardware structure diagram of an installation server where an installation apparatus of an operating system is located according to the present application, in addition to the processor and the nonvolatile memory shown in fig. 6, the installation server may further include other hardware, such as a forwarding chip, a network interface, and a memory, which are responsible for processing a packet; in terms of hardware structure, the installation server may also be a distributed device, and may include a plurality of interface cards, so as to perform message processing extension at a hardware level.
As shown in fig. 7, the structure diagram of the installation apparatus of the operating system proposed by the present application includes: a receiving module 21, configured to receive a boot file download request from a device to be installed, where the boot file download request carries a boot file name, and the boot file name is a boot file name that is obtained by the device to be installed from a network device and matches a BIOS mode of the device to be installed; the query module 22 is configured to query the boot file corresponding to the boot file name; the sending module 23 is configured to return the boot file to the device to be installed, so that the device to be installed installs the operating system by using the boot file.
The query module 22 is further configured to query whether a first type of configuration file corresponding to the first address information exists locally when receiving a configuration file downloading request carrying the first address information from the device to be installed; the sending module 23 is further configured to, if the query result is yes, return the first type configuration file corresponding to the first address information to the device to be installed, so that the device to be installed installs the operating system by using the first type configuration file; if the query result is negative, stopping the processing, and returning a second type configuration file corresponding to second address information to the device to be installed when receiving a configuration file downloading request carrying the second address information from the device to be installed through the receiving module 21, so that the device to be installed performs RAID configuration by using the second type configuration file.
In the process that the device to be installed performs RAID configuration by using the second type configuration file, the receiving module 21 is further configured to receive a memory system file downloading request carrying a memory system file name sent by the device to be installed, where the memory system file name is parsed by the device to be installed from the second type configuration file; the sending module 23 is further configured to return the memory system file corresponding to the memory system file name to the device to be installed, so that the device to be installed performs RAID configuration by using the memory system file;
the device further comprises (not represented in the figures): a generation module; the generating module is used for determining a template file matched with the BIOS mode and the operating system type of the equipment to be installed, and generating a first type configuration file corresponding to first address information by using the template file and the first address information.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (which may include, but is not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (12)

1. An installation method of an operating system is applied to equipment to be installed, and is characterized by comprising the following steps:
sending a request message to network equipment connected with the equipment;
receiving a response message returned by the network equipment, wherein the response message carries a boot file name matched with a Basic Input Output System (BIOS) mode of the equipment to be installed; if the network equipment configures the corresponding relation between the VLAN and the name of the boot file, inquiring the name of the boot file matched with the BIOS mode of the equipment to be installed based on the VLAN corresponding to the equipment to be installed;
sending a boot file downloading request carrying the name of the boot file to an installation server, and receiving the boot file which is returned by the installation server and corresponds to the name of the boot file;
and installing an operating system matched with the BIOS mode on the equipment by using the boot file.
2. The method according to claim 1, wherein the process of installing an operating system matching the BIOS pattern in the device using the boot file specifically includes:
analyzing strategy information from the boot file, wherein the strategy information comprises a priority relation between a first address type and a second address type, and the priority of the first address type is superior to that of the second address type;
sending a configuration file downloading request carrying first address information corresponding to the first address type to an installation server;
if a first type configuration file corresponding to the first address information and returned by an installation server is received, installing an operating system matched with the BIOS mode by using the first type configuration file;
if the first type configuration file is not received, sending a configuration file downloading request carrying second address information corresponding to the second address type to the installation server, receiving a second type configuration file corresponding to the second address information and returned by the installation server, and performing Redundant Array of Independent Disks (RAID) configuration by using the second type configuration file.
3. The method of claim 2,
the process of performing RAID configuration using the second type configuration file specifically includes:
analyzing the name of the memory system file from the second type configuration file, and sending a memory system file downloading request carrying the name of the memory system file to the installation server; receiving a memory system file corresponding to the name of the memory system file returned by the installation server, and performing RAID configuration by using the memory system file;
and sending the first address information of the equipment to be installed to the installation server so that the installation server generates a first type configuration file corresponding to the first address information.
4. An installation method of an operating system is applied to an installation server, and is characterized by comprising the following steps:
receiving a boot file downloading request from equipment to be installed, wherein the boot file downloading request carries a boot file name, and the boot file name is obtained by the equipment to be installed from network equipment and is matched with a Basic Input Output System (BIOS) mode of the equipment to be installed; if the network equipment configures the corresponding relation between the VLAN and the name of the boot file, inquiring the name of the boot file matched with the BIOS mode of the equipment to be installed based on the VLAN corresponding to the equipment to be installed;
and inquiring a boot file corresponding to the name of the boot file, and returning the boot file to the equipment to be installed so that the equipment to be installed can install the operating system by using the boot file.
5. The method of claim 4, further comprising:
when a configuration file downloading request carrying first address information from equipment to be installed is received, whether a first type configuration file corresponding to the first address information exists in a local area is inquired;
if so, returning a first type configuration file corresponding to the first address information to the equipment to be installed, so that the equipment to be installed installs an operating system by using the first type configuration file;
if not, stopping processing, and returning a second type configuration file corresponding to second address information to the equipment to be installed when receiving a configuration file downloading request carrying the second address information from the equipment to be installed, so that the equipment to be installed performs Redundant Array of Independent Disks (RAID) configuration by using the second type configuration file.
6. The method according to claim 5, wherein during RAID configuration of the device to be installed by using the second type configuration file, the method further comprises:
receiving a memory system file downloading request carrying a memory system file name sent by the equipment to be installed, wherein the memory system file name is analyzed from the second type configuration file by the equipment to be installed; returning the memory system file corresponding to the memory system file name to the equipment to be installed so that the equipment to be installed can use the memory system file to perform RAID configuration;
and determining a template file matched with the BIOS mode and the operating system type of the equipment to be installed, and generating a first type configuration file corresponding to the first address information by using the template file and the first address information.
7. An installation device of an operating system, which is applied to a device to be installed, is characterized by comprising:
the sending module is used for sending a request message to the network equipment connected with the equipment to be installed;
a receiving module, configured to receive a response message returned by the network device, where the response message carries a boot file name matched with a BIOS mode of the device to be installed; if the network equipment configures the corresponding relation between the VLAN and the name of the boot file, inquiring the name of the boot file matched with the BIOS mode of the equipment to be installed based on the VLAN corresponding to the equipment to be installed;
the sending module is further configured to send a boot file downloading request carrying the boot file name to an installation server;
the receiving module is further configured to receive a boot file corresponding to the boot file name, where the boot file is returned by the installation server;
and the processing module is used for installing an operating system matched with the BIOS mode on the equipment to be installed by utilizing the boot file.
8. The apparatus of claim 7,
the processing module is specifically configured to, in a process of using the boot file to install the operating system matched with the BIOS pattern in the device to be installed, parse policy information from the boot file, where the policy information includes a priority relationship between a first address type and a second address type, and a priority of the first address type is higher than a priority of the second address type; sending a configuration file downloading request carrying first address information corresponding to the first address type to an installation server through the sending module; if a first type configuration file corresponding to the first address information and returned by an installation server is received through the receiving module, installing an operating system matched with the BIOS mode by using the first type configuration file; if the receiving module does not receive the first type configuration file, the sending module sends a configuration file downloading request carrying second address information corresponding to the second address type to the installation server, and if the receiving module receives the second type configuration file corresponding to the second address information returned by the installation server, the second type configuration file is used for RAID configuration.
9. The apparatus of claim 8,
the processing module is specifically configured to, in the process of configuring the RAID using the second type of configuration file, parse the memory system file name from the second type of configuration file, and send a memory system file download request carrying the memory system file name to the installation server through the sending module; if a memory system file corresponding to the name of the memory system file returned by the installation server is received through the receiving module, RAID configuration is carried out by using the memory system file;
and sending the first address information of the equipment to be installed to the installation server through the sending module so that the installation server generates a first type configuration file corresponding to the first address information.
10. An installation apparatus of an operating system, applied to an installation server, comprising:
the device comprises a receiving module and a sending module, wherein the receiving module is used for receiving a boot file downloading request from a device to be installed, the boot file downloading request carries a boot file name, and the boot file name is obtained by the device to be installed from a network device and is matched with a Basic Input Output System (BIOS) mode of the device to be installed; if the network equipment configures the corresponding relation between the VLAN and the name of the boot file, inquiring the name of the boot file matched with the BIOS mode of the equipment to be installed based on the VLAN corresponding to the equipment to be installed;
the query module is used for querying the guide file corresponding to the guide file name;
and the sending module is used for returning the boot file to the equipment to be installed so as to enable the equipment to be installed to install the operating system by using the boot file.
11. The apparatus of claim 10,
the query module is further used for querying whether a first type configuration file corresponding to the first address information exists locally or not when a configuration file downloading request carrying the first address information from the equipment to be installed is received;
the sending module is further configured to, when the query result is yes, return the first type configuration file corresponding to the first address information to the device to be installed, so that the device to be installed installs the operating system by using the first type configuration file; and if the query result is negative, stopping processing, and returning a second type configuration file corresponding to second address information to the equipment to be installed when receiving a configuration file downloading request carrying the second address information from the equipment to be installed through the receiving module, so that the equipment to be installed performs Redundant Array of Independent Disks (RAID) configuration by using the second type configuration file.
12. The apparatus according to claim 11, wherein in a process that the device to be installed performs RAID configuration using the second type configuration file, the receiving module is further configured to receive a memory system file download request that is sent by the device to be installed and carries a memory system file name, where the memory system file name is parsed by the device to be installed from the second type configuration file;
the sending module is further configured to return the memory system file corresponding to the memory system file name to a device to be installed, so that the device to be installed performs RAID configuration by using the memory system file;
the device further comprises: a generation module; the generating module is used for determining a template file matched with the BIOS mode and the operating system type of the equipment to be installed, and generating a first type configuration file corresponding to first address information by using the template file and the first address information.
CN201611247321.7A 2016-12-29 2016-12-29 Installation method and device of operating system Active CN106873970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611247321.7A CN106873970B (en) 2016-12-29 2016-12-29 Installation method and device of operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611247321.7A CN106873970B (en) 2016-12-29 2016-12-29 Installation method and device of operating system

Publications (2)

Publication Number Publication Date
CN106873970A CN106873970A (en) 2017-06-20
CN106873970B true CN106873970B (en) 2021-01-26

Family

ID=59164318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611247321.7A Active CN106873970B (en) 2016-12-29 2016-12-29 Installation method and device of operating system

Country Status (1)

Country Link
CN (1) CN106873970B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101278B (en) * 2017-06-21 2021-12-24 中兴通讯股份有限公司 Method and device for realizing terminal flashing
CN109245925A (en) * 2018-08-28 2019-01-18 郑州云海信息技术有限公司 A kind of method, apparatus and computer readable storage medium configuring vlan
CN109840096B (en) * 2019-01-02 2023-02-07 新华三信息技术有限公司 Installation method and device of operating system
CN114356057A (en) * 2021-12-30 2022-04-15 浙江大华技术股份有限公司 Method, device and equipment for controlling heat dissipation of PCIe card and storage medium
CN114942787A (en) * 2022-02-21 2022-08-26 联想开天科技有限公司 Data processing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200271A (en) * 2013-04-17 2013-07-10 北京百度网讯科技有限公司 Advanced Risc machine (ARM) server and method of automatic installation system thereof
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103744695A (en) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 Method and system for operating system remote installation on basis of PXE
CN105302600A (en) * 2015-10-20 2016-02-03 浪潮电子信息产业股份有限公司 Method, server and system for installing operating system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103200271A (en) * 2013-04-17 2013-07-10 北京百度网讯科技有限公司 Advanced Risc machine (ARM) server and method of automatic installation system thereof
CN103744695A (en) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 Method and system for operating system remote installation on basis of PXE
CN105302600A (en) * 2015-10-20 2016-02-03 浪潮电子信息产业股份有限公司 Method, server and system for installing operating system

Also Published As

Publication number Publication date
CN106873970A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106873970B (en) Installation method and device of operating system
US10320674B2 (en) Independent network interfaces for virtual network environments
US10686755B2 (en) Assigning IP addresses and configuration parameters in hyper-converged infrastructure
CN107896162B (en) Deployment method and device of monitoring system, computer equipment and storage medium
CN111614738B (en) Service access method, device, equipment and storage medium based on Kubernetes cluster
US7467295B2 (en) Determining a boot image based on a requesting client address
CN107431651B (en) Life cycle management method and equipment for network service
CN109992311B (en) Starting method and device of operating system, storage medium and client
CN108572845B (en) Upgrading method of distributed micro-service cluster and related system
US11568092B2 (en) Method of dynamically configuring FPGA and network security device
CN108322325B (en) Virtual machine management method and device
CN109240754B (en) Logic device, method and system for configuring BIOS starting item
CN103281203A (en) Ecos (Embedded Configurable Operating System) system-based DHCP (Dynamic Host Configuration Protocol) address assignment management method
CN107547274B (en) Multi-network-port aggregation method and device
CN106886429B (en) Method for loading driver and server
US9471352B1 (en) Capability based placement
CN111104201A (en) System migration method and device, electronic equipment and storage medium
CN113141405B (en) Service access method, middleware system, electronic device, and storage medium
CN113127150A (en) Rapid deployment method and device of cloud native system, electronic equipment and storage medium
CN108234551B (en) Data processing method and device
CN105373415A (en) Virtualization based application storage method, execution method, apparatus and system
CN109656674B (en) Computer equipment, virtualization chip and data transmission method
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
CN111124437A (en) Bare computer resource configuration information acquisition method, system and equipment based on OpenStack
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product

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
CB02 Change of applicant information

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Xinhua Sanxin Information Technology Co., Ltd.

Address before: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Applicant before: Huashan Information Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant