CN114756290B - Operating system installation method, device and readable storage medium - Google Patents

Operating system installation method, device and readable storage medium Download PDF

Info

Publication number
CN114756290B
CN114756290B CN202210476591.4A CN202210476591A CN114756290B CN 114756290 B CN114756290 B CN 114756290B CN 202210476591 A CN202210476591 A CN 202210476591A CN 114756290 B CN114756290 B CN 114756290B
Authority
CN
China
Prior art keywords
operating system
installation
server
target operating
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
Application number
CN202210476591.4A
Other languages
Chinese (zh)
Other versions
CN114756290A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210476591.4A priority Critical patent/CN114756290B/en
Publication of CN114756290A publication Critical patent/CN114756290A/en
Application granted granted Critical
Publication of CN114756290B publication Critical patent/CN114756290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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 invention provides a method for installing an operating system, which comprises the following steps: acquiring configuration information of a server to be installed, and formulating a configuration strategy according to the configuration information; formulating a virtual mirror structure based on the configuration policy and a target operating system; and installing an operating system for the server to be installed through the virtual mirror image structure body. According to the operating system installation method provided by the invention, different installation images can be set for different server configurations, the server configuration information is automatically collected, the full-automatic operation images are automatically formulated according to the target operating system, and the automatic and batch synchronous installation of the operating systems to a plurality of servers is realized. The operation and maintenance efficiency of the data center is greatly improved. The workload of operation and maintenance personnel in a noisy machine room environment is reduced.

Description

Operating system installation method, device and readable storage medium
Technical Field
The invention belongs to the field of computers, and particularly relates to an operating system installation method, equipment and a readable storage medium.
Background
The invention mainly applies the automatic installation of the operating system under the out-of-band network of the server, and can automatically identify the relevant configuration of the server under the condition of only the operation and maintenance of the out-of-band network, automatically complete the configuration of the server raid, load the relevant raid card/network card drive to complete the automatic installation of the system, and drive the corresponding drive for the installed system. The efficiency of server operation and maintenance of large-scale automation is greatly improved.
The current server operation and maintenance is put on shelf, and batch system installation is carried out in a mode of the distribution of the pxe mirror images of the in-band network. However, if the in-band network is not available or cannot be used, batch installation cannot be performed, and only a single system can be used for system deployment and installation. And some operating systems (such as windows series operating systems) support few raid card drivers, and the corresponding raid card or network card driver needs to be manually selected for loading in the installation process, which is time-consuming and labor-consuming.
Disclosure of Invention
In order to solve the above problems, the present invention provides a method for installing an operating system, including:
acquiring configuration information of a server to be installed, and formulating a configuration strategy according to the configuration information;
formulating a virtual mirror structure based on the configuration policy and a target operating system;
and installing an operating system for the server to be installed through the virtual mirror image structure body.
In some embodiments of the present invention, obtaining configuration information of a server to be installed includes:
and acquiring configuration information of the server to be installed through the memory operating system.
In some embodiments of the present invention, obtaining configuration information of a server to be installed, and formulating a configuration policy according to the configuration information includes:
acquiring a storage structure of a server to be installed, and judging whether the storage structure supports drive-free installation of a target operating system;
and in response to the storage structure not supporting drive-free installation of the target operating system, configuring the storage structure according to the installation requirement of the target operating system, and adding the drive information of the storage structure to the configuration policy.
In some embodiments of the invention, formulating a virtual image structure based on the configuration policy and the target operating system comprises:
and formulating installation bootstrap information of the target operating system based on the configuration strategy and the target operating system, and adding the installation bootstrap information into a virtual mirror structure body.
In some embodiments of the invention, formulating a virtual image structure based on the configuration policy and the target operating system comprises:
and creating a response file template according to the target operating system, generating corresponding response file information based on the configuration strategy and the response file template, and adding the response file information into the virtual mirror structure body.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
and generating a target operating system image file according to the virtual image structure body, sending the target operating system image file to installation equipment, and installing the target operating system image file on the server to be installed through the installation equipment.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
acquiring a corresponding target operating system installation file in the virtual mirror image structure body, and sending the target operating system installation file to an installation device;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
the virtual mirror image structure body is sent to installation equipment, and a corresponding target operating system installation file in the virtual mirror image structure body is obtained through the installation equipment;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
Another aspect of the present invention also proposes a computer device comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any of the above embodiments.
Yet another aspect of the invention also proposes a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method of any of the above embodiments.
According to the operating system installation method provided by the invention, different installation images can be set for different server configurations, the server configuration information is automatically collected, the full-automatic operation images are automatically formulated according to the target operating system, and the automatic and batch synchronous installation of the operating systems to a plurality of servers is realized. The operation and maintenance efficiency of the data center is greatly improved. The workload of operation and maintenance personnel in a noisy machine room environment is reduced.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an embodiment of an operating system installation method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a computer device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, the present invention proposes a method for installing an operating system, which is characterized by comprising:
s1, acquiring configuration information of a server to be installed, and formulating a configuration strategy according to the configuration information;
s2, formulating a virtual mirror structure body based on the configuration strategy and a target operating system;
and S3, installing an operating system for the server to be installed through the virtual mirror image structural body.
In the embodiment of the present invention, in step S1, the server to be installed refers to a server host, i.e. a physical machine, to which an operating system needs to be installed, and the configuration information refers to configuration information related to normal operation of the server, such as a CPU, a memory, a hard disk structure, and the like of the server. The configuration information of the server to be installed can be obtained through various ways, for example, the hardware configuration information such as the specific model, CPU, memory, hard disk or RAID card (Redundant Arrays of Independent Disks, independent disk array) of the server to be installed is obtained from a corresponding management system; the configuration strategy is formulated according to the configuration information, namely, the installation mode or the configuration strategy when the corresponding operating system is installed is determined through the collected model information of the CPU, the memory, the hard disk or the hardware such as the RAID card, the network card and the like. The configuration policy refers to an installation step capable of normally completing the installation of the target operating system on the server to be installed or a scheme capable of installing the corresponding operating system on the server to be installed, and refers to an execution process of an overall installation bootstrap program for installing the target operating system. Different configuration strategies can be provided for different servers to be installed and different target operating systems.
Specifically, the operating system is a management system for managing each hardware on the computer and providing hardware services for the corresponding application program, and installing the operating system to a server or a computer device is essentially installing the management system to the server or the computer device. Therefore, it is necessary to acquire the CPU, hard disk, RAID card, network card, motherboard information, etc. of the server to be installed, and further analyze whether the target operating system can directly support direct running on the server to be installed, that is, manage the hardware of the server to be installed. For example, if the server to be installed is a server of an ARM platform, when the Linux operating system is installed, compiling the Linux system kernel according to the model of the ARMCPU is needed, otherwise, the Linux kernel cannot run; for example, the Windows7 system does not carry the driver of the Intel 7 or more generation of the borui motherboard, which results in the system being unable to be installed during the installation process.
Therefore, in some embodiments of the present invention, it is required to obtain the configuration information of the hard disk of the server to be installed, and formulate a corresponding configuration policy according to the hardware configuration information. And setting a corresponding installation scheme of the target operating system according to the hardware configuration of the server to be installed, wherein the installation scheme comprises an execution process of an installation bootstrap program and a drive of corresponding hardware required by the installation bootstrap program.
In some embodiments of the present invention, the server to be installed may also be a Virtual machine provided by a virtualization platform, such as a Virtual machine created by a tool such as VMware Workstation, virtual Box, virtual PC, etc. In contrast to physical machines, some hardware of the virtual machine server is provided by virtual machine software, so for a virtualized platform, only corresponding virtual machine configuration information needs to be obtained from the corresponding virtual machine software system.
In step S2, the virtual mirror structure is a structure for guiding the installation of a server and a corresponding target operating system for one type of hardware configuration. In practice, the installation of the operating system on the computer may be performed by a system image, and the system image usually adopts an iso file storage format (optical disc image file format), and when the system is used for installing the operating system, the data on the optical disc is read by the optical disc drive and loaded to the computer to implement the installation of the corresponding operating system. The virtual mirror image structure body provided by the invention is not a system mirror image with several GB sizes, namely the virtual mirror image of the invention is not a mirror image file with the format of iso, but is a data structure body based on hardware configuration information of a server to be installed and a target operating system, and the content comprises three types: operating system file information (version information of the target operating system, operating system file address), installation bootstrap information (installation bootstrap during system installation), driver information (driver information based on the server hardware configuration information to be installed and corresponding hardware required during installation determined by the target operating system).
In this embodiment, it is determined whether a corresponding driver needs to be loaded when the target operating system is installed on the server to be installed according to the configuration policy in step S1, if a driver is needed, the corresponding driver information is added to the driver information portion in the virtual image structure, if some installation options need to be set during the installation of the operating system, the configuration parameters of the corresponding setting program are added to the installation bootstrap information portion, and the target operating system information is added to the operating system file information portion of the virtual image structure.
Further, in some embodiments of the present invention, a file address of a driver loaded when a target operating system is installed and a corresponding MD5 value are added to a drive information portion of the virtual mirror structure; adding the file addresses of the corresponding installation bootstrap files and configuration files and the corresponding MD5 values to the corresponding installation bootstrap information parts of the virtual mirror image structure body; the operating system file address of the target operating system and the corresponding MD5 value are added to the operating system file information portion of the virtual mirror structure.
In step S3, the content of the corresponding portion in the virtual image structure is transmitted to the server to be installed and the installation bootstrap program is executed to install the operating system file in the virtual image structure. And sending the corresponding installation bootstrap program file, the configuration file, the driver file and the operating system file in the virtual mirror image structure body to a server to be installed according to the iso file format, and loading the installation bootstrap program file to execute the installation of the target operating system.
In some embodiments of the present invention, obtaining configuration information of a server to be installed includes:
and acquiring configuration information of the server to be installed through the memory operating system.
In this embodiment, the configuration information of the server to be installed is acquired by using a memory operating system. For example, the information is obtained in a manner of LiveCD, specifically, the LiveCD including a query server hardware configuration program is sent to a server to be installed through an out-of-band BMC (Baseboard Management controller. Baseboard management controller), and after the LiveCD mirror image is loaded into a memory, the query server hardware configuration program is operated to obtain information such as a CPU model, a memory, a hard disk or RAID card model, a network card model, a mounted PCIE device and the like of the server to be installed, and a startup mode (UEFI/MBR). And feeding back the acquired hardware configuration information through the BMC. Further, after receiving the hardware configuration information of the server to be installed fed back by the BMC, a configuration strategy can be formulated according to the configuration information.
In some embodiments of the present invention, obtaining configuration information of a server to be installed, and formulating a configuration policy according to the configuration information includes:
acquiring a storage structure of a server to be installed, and judging whether the storage structure supports drive-free installation of a target operating system;
and in response to the storage structure not supporting drive-free installation of the target operating system, configuring the storage structure according to the installation requirement of the target operating system, and adding the drive information of the storage structure to the configuration policy.
In this embodiment, the storage structure of the server to be installed needs to be determined, where the storage structure refers to a connection mode of storage devices (hard disks) on the server to be installed, and may be approximately divided into two modes, one mode is a mode of constructing a RAID with a plurality of hard disks through a RAID card, and the other mode is a mode of directly connecting the hard disks to a server motherboard. The first mode requires the support of the installation bootstrap program to the RIAD card, that is, if the target operating system is not supported, the corresponding disk cannot be selected when entering the step corresponding to the installation bootstrap program, and therefore cannot be installed. It is therefore necessary to acquire the storage structure of the installation server and determine whether the installation bootstrap program can install the operating system without driving the use of the storage device on the server to be installed. If the storage structure on the server is not supported by the installation bootstrap, the corresponding driver information needs to be added to the configuration policy, and further the driver information is added to the virtual mirror structure when the virtual mirror structure is generated according to the configuration policy.
In addition, the storage structure not supported by the installation bootstrap program is mainly that the RAID card used is not supported by the installation bootstrap program, and because the RIAD card has no configuration when the server is not installing the system, it is necessary to designate the RAID mode of the server to be installed and allocate the corresponding disk space for storing data and/or installing the target operating system as needed.
In some embodiments of the invention, formulating a virtual image structure based on the configuration policy and the target operating system comprises:
and formulating installation bootstrap information of the target operating system based on the configuration strategy and the target operating system, and adding the installation bootstrap information into a virtual mirror structure body.
In this embodiment, if the configuration policy formulated according to the hardware configuration situation of the server to be installed contains the driver related information of the corresponding hardware, it is explained that the installation bootstrap program of the target operating system does not support the related hardware of the server to be installed, and it is necessary to add the driver of the related hardware to the installation bootstrap program.
Specifically, taking the example of the Windows operating system, the Windows operating system needs to use a boot. Vim file in a Windows image when installed, where the boot. Vim file is essentially an image file of a memory operating system provided by microsoft, and about 200MB of the file contains the files required when installed in Windows. Therefore, in general, if a certain hardware configuration on a server to be installed is not supported by the microsoft installation bootstrap, it is necessary to add a driver of the hardware to the installation bootstrap, that is, a boot.vim file, and then regenerate the boot.vim file containing the driver.
In some embodiments of the present invention, when the installation bootstrap information of the target operating system is formulated based on the configuration policy and the target operating system, the original boot. Vim is decompressed, then the driving file is stored under the decompressed directory for storing the custom program, and then the decompressed boot folder containing the driving file is repackaged into the boot. Vim file. The file address and related information of the regenerated boot. Vim (the drive information contained in the boot. Vim file, version information of the operating system that can be used for booting the installation, and the MD5 value of the repackaged file, etc.) are further added to the virtual image structure.
In some embodiments of the present invention, the drive is no longer directly added to the boot. Vim, but rather is chunked according to the contents of the boot. Vim file. The boot. Vim files are distinguished when being read in binary, namely, the boot. Vim files are distinguished to be mirror image file areas of Windows installation bootstrap program (memory operating system) and the boot. Vim files are distinguished to be data areas which can be used for storing the driver program by user definition. The data address range of the area for installing the bootstrap program and the area capable of being customized by a user to store the drive is further added into the virtual mirror structure body.
Specifically, if the original size of the boot.vim file is 200MB and the driver required by the server to be installed is 30MB, if the driver is directly written to the boot.vim in an additional manner when the driver is added to the boot.vim, the boot.vim and the corresponding driver information and addresses are saved in the virtual image structure in order from front to back, which means that the installation bootstrap and the driver are saved in the boot.vim image data in a continuous manner. If the driver is started to be stored in the data range of 190MB, and the other data of the boot.vim is the last 10MB of data, the address range of the embedded data of the driver needs to be added to the virtual mirror structure, which can be understood as 0-190MB being the first part of the original data of the boot.vim, then the driver of 30MB, and the last 10MB being the other part of the original data of the boot.vim. The above is merely an example for ease of understanding, and the detailed configuration rules may be referred to the format reference document Windows Image File Format provided by microsoft with respect to boot.
Preferably, in some embodiments of the present invention, the installation bootstrap is not considered in the form of a boot. Vim package, but rather is decompressed into a plurality of files or file directories (according to the format specification of Windows Image File Format), and the addresses of the individual files (all files under one or more directories are treated as a whole) and the corresponding verification information, i.e. MD5 values, are added to the corresponding virtual mirror structure. When a corresponding driver is required to be added, the file address of the driver and the MD5 are directly added to the corresponding position of the virtual mirror structure body according to the decompressed file relationship. That is, the entire installer portion appears in the entire virtual image structure in the decompressed directory structure that encapsulates the corresponding boot. Vim after driving in the above embodiment, that is, the boot. Vim (referring to the entire portion of the installation bootstrap) is not encapsulated into a file according to a different driver, but rather, a structure (a portion of the virtual image structure) related to the installation bootstrap is "encapsulated" in the virtual image structure. When the hardware configuration of the server to be installed is different or the operating system to be installed is different, only the address and MD5 value of the corresponding driver in the virtual mirror structure body or the operating system mirror address and MD5 value are updated. The customization of the installation bootstrap program is carried out in a mode that a plurality of boot.vim files are not required to be packaged or generated according to different hardware conditions, and the time and the storage space are wasted.
In some embodiments of the invention, formulating a virtual image structure based on the configuration policy and the target operating system comprises:
and creating a response file template according to the target operating system, generating corresponding response file information based on the configuration strategy and the response file template, and adding the response file information into the virtual mirror structure body.
In this embodiment, the answer file is a configuration file for guiding the installation of the operating system by the installation bootstrap program, the answer file template is a universal template according to the installation modes of different operating systems, and different types of operating systems have different answer file templates, for example, the Windows operating system and the Linux system have different installation templates due to different installation modes of the bootstrap program, that is, different installation bootstrap programs correspond to different answer file templates.
Further, after the operating system to be installed of the server to be installed is determined, processing items which are required to be additionally added by the installation guide program are configured into response file templates according to the installation sequence, the configured response file templates are used as response files of the target operating system to be installed of the server to be installed, and the content of the response files is read in a character string mode and added into the virtual mirror image structure body. When the installation bootstrap program installs the target operating system, the corresponding executable program is loaded or corresponding operation is executed through the configuration step on the response file.
In some embodiments of the present invention, taking a Windows system as an example, if the RAID card driver needs to be loaded when the operating system is installed on the server to be installed at this time, the information of the installed RAID card driver file needs to be added to autoprotten. In some cases, if the installation bootstrap program requires chipset driver support when installing the target operating system, it is also necessary to write the chipset driver support to Autounatted. When a driver installation of a plurality of hardware devices is involved, the driver installation order needs to be added to Autounatted. Finally, the Autounatted. Xml is read and loaded into the virtual mirror structure.
In some embodiments of the present invention, the creation of the response file is also completed in a non-file form, that is, the installation of the boot program parameter item in the virtual image structure body, where the installation of the boot program parameter item is divided into two parts, and the first part is a driving option when the installation of the boot program to install the target operating system, that is, what information about the driver program needs to be installed after the installation of the boot program (memory operating system) is started, and an operation option when the target operating system can be installed after the installation of the driver program, that is, a configuration parameter item such as an installed operating system version, an installed disk position of the target operating system, whether to format a disk, and the like.
In addition, the second portion includes a driver or some software configuration item to be loaded by the operating system when the target operating system is loaded from the disk after the installation of the installation bootstrap (i.e., after the operating system in the image is copied to the disk and the boot is configured). For example, the option of installing the driver to all hardware devices of the server (it should be noted that, at this time, the driver installation is different from the driver installation of the previous installation bootstrap program, the installation bootstrap program is a simplified memory operating system, some drivers are needed when the target operating system is installed, and these drivers are loaded into the memory, and there is no disk, so that the driver installed after power failure disappears), and after the target operating system is started from the disk, the corresponding driver is automatically installed to perfect the running environment of the target operating system.
In this embodiment, the parameter options of the two parts may be configured in the virtual mirror structure body according to needs, and when the response file needs to be generated, the parameter in the parameter item of the installation guide program in the virtual mirror structure body is added to the large response file template according to the response file template to generate the corresponding response file.
The parameter items of the installation guide program in the virtual mirror image structure body can be directly imported from some configuration files through program modification when needed, so that the batch importing of staff is facilitated.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
and generating a target operating system image file according to the virtual image structure body, sending the target operating system image file to installation equipment, and installing the target operating system image file on the server to be installed through the installation equipment.
In this embodiment, if it is selected to install in the form of a system image file, the target operating system image file in iso format may be generated from information in the virtual image structure. The virtual mirror structure contains the requirements for installing the target operating system: installation bootstrap (memory operation repair), the relevant drivers required by the installation bootstrap, the target operating system image file, and the response file. And obtaining a corresponding file according to the file address in the information in the virtual mirror image structure body, and generating an ios mirror image file which is adapted to the hardware configuration of the server to be installed according to the requirement of the ISO mirror image format.
The iso file is used as a device of a computer system installation structure, for example, if an optical disc is used as a medium, the system image file is burnt into the optical disc, and an optical drive is required to be used as an installation device to install a target operating system. In addition, if the device provided by the virtual drive is installed in a mode of virtualizing the U disk into the virtual drive, the generated iso image file is only required to be copied into the U disk.
Preferably, for the server domain, the BMC may be used to implement a virtual drive to the server to be installed to install the iso image of the target operating system.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
acquiring a corresponding target operating system installation file in the virtual mirror image structure body, and sending the target operating system installation file to an installation device;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
In this embodiment, when the operating system is installed for the server to be installed through the virtual mirror structure, the data in the virtual mirror structure may be transmitted to the device according to the iso format specification based on the virtual mirror structure according to the virtual mirror structure.
It should be noted that if the serial port line of the PC (computer device executing the program of the present invention) is connected to the server to be installed and the virtual optical drive is provided by the PC, the PC obtains the installation bootstrap file, the driving file, the system image file and the response file according to the corresponding address in the virtual image structure, and provides data to the virtual optical drive according to the iso format specification, and installs the target operating system.
In some embodiments of the present invention, if the installation device is a BMC, and the device is a BMC that accesses the server to be installed through a PC through a network, and the BMC provides a virtual drive to install the target operating system in an out-of-band installation manner, after the PC obtains the files in the virtual image structure, the PC sends a data stream to the BMC according to the iso file format specification, and after the BMC receives the data, the BMC sends the data to the virtual drive provided by the BMC to the server to be installed in a receiving order, so as to simulate the normal drive to read the iso image file to install the target operating system. Without generating a corresponding image file in iso format.
In some embodiments of the present invention, installing an operating system for the server to be installed through the virtual mirror structure includes:
the virtual mirror image structure body is sent to installation equipment, and a corresponding target operating system installation file in the virtual mirror image structure body is obtained through the installation equipment;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
Preferably, in this embodiment, when the data center installs the corresponding operating system for the server cluster, the BMC may be preferentially selected as the installation device to install the target operating system. The virtual mirror image structure body can be sent to a corresponding client program on the BMC for realizing, the client program analyzes the file address of an installation guide program (memory operation repair) in the virtual mirror image structure body, the address of a related drive needed by the installation guide program and the image file address of a target operating system, downloads a corresponding file according to the file address, checks the corresponding file according to the corresponding MD5 value in the virtual mirror image structure body after the file is downloaded to the corresponding file, and provides the file to a virtual CD-ROM established on a server in a binary mode according to the iso format specification at the BMC end after the check is passed, and the installation guide program is operated through the virtual CD-ROM.
In addition, for the data center, the files can be checked by means of the security mechanism of the data center, namely, the installation bootstrap program (memory operating system), related drive needed by the installation bootstrap program and the mirror image file of the target operating system are stored in the software library of the data center, the stored address is updated into the virtual mirror image structure body, the BMC directly downloads the files from the software library after receiving the virtual mirror image structure body, and the file mirror image data is provided for the virtual CD-ROM according to the data sequence specified by the iso file format.
Further, when a large number of servers exist in the data center for installing the operating system, the virtual mirror image structural body is sent to the BMC, the BMC acquires mirror image data of a corresponding part from a software library of the data center, and batch installation of the large number of servers is achieved quickly and parallelly through a software network of the data center. And when mirror image data is acquired through the network of the BMC at the same time, batch distribution of the data of the installation mirror image file can be realized based on network caching. The improvement in efficiency is apparent over the way images are generated by a single node and sent to the BMC.
It should be noted that, the virtual mirror image structure provided by the present invention may exist in different forms according to different programming languages, exist in the memory when the corresponding program is executed, and may be stored in the database in the form of binary data when the virtual mirror image structure needs to be stored, or persisted in the form of exporting into an xml format file according to the data structure form of the virtual mirror image structure, and be loaded into the corresponding program when needed.
In addition, the driver in the virtual mirror structure body can be a CPU chip set driver, a PCIE device driver, an external serial device driver and a hard disk RIAD card driver.
According to the operating system installation method provided by the invention, different installation images can be set for different server configurations, the server configuration information is automatically collected, the full-automatic operation images are automatically formulated according to the target operating system, and the automatic and batch synchronous installation of the operating systems to a plurality of servers is realized. The operation and maintenance efficiency of the data center is greatly improved. The workload of operation and maintenance personnel in a noisy machine room environment is reduced.
As shown in fig. 2, another aspect of the present invention further proposes a computer device, including:
at least one processor 21; and
a memory 22, said memory 22 storing computer instructions 23 executable on said processor 21, said instructions 23 when executed by said processor 21 implementing the steps of any of the methods of the above embodiments.
As shown in fig. 3, a further aspect of the present invention further proposes a computer readable storage medium 401, said computer readable storage medium 401 storing a computer program 402, said computer program 402 implementing the steps of the method according to any of the above embodiments when being executed by a processor.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that as used herein, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The foregoing embodiment of the present invention has been disclosed with reference to the number of embodiments for the purpose of description only, and does not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (10)

1. An operating system installation method, comprising:
acquiring configuration information of a server to be installed, and formulating a configuration strategy according to the configuration information;
formulating a virtual mirror structure based on the configuration policy and a target operating system, the virtual mirror structure comprising: operating system file information, installation bootstrap information, drive information, wherein:
the operating system file information includes: version information of the target operating system, operating system file address;
the installation guide program information comprises an installation guide program in the system installation process;
the driving information comprises the hardware configuration information of the server to be installed and the driving program information of the corresponding hardware required in the installation process determined by the target operating system;
and installing an operating system for the server to be installed through the virtual mirror image structure body.
2. The method of claim 1, wherein the obtaining configuration information of the server to be installed comprises:
and acquiring configuration information of the server to be installed through the memory operating system.
3. The method of claim 1, wherein the obtaining configuration information of the server to be installed, and formulating a configuration policy according to the configuration information comprises:
acquiring a storage structure of a server to be installed, and judging whether the storage structure supports drive-free installation of a target operating system;
and in response to the storage structure not supporting drive-free installation of the target operating system, configuring the storage structure according to the installation requirement of the target operating system, and adding the drive information of the storage structure to the configuration policy.
4. The method of claim 1, wherein the formulating a virtual image structure based on the configuration policy and a target operating system comprises:
and formulating installation bootstrap information of the target operating system based on the configuration strategy and the target operating system, and adding the installation bootstrap information into a virtual mirror structure body.
5. The method of claim 1, wherein the formulating a virtual image structure based on the configuration policy and a target operating system comprises:
and creating a response file template according to the target operating system, generating corresponding response file information based on the configuration strategy and the response file template, and adding the response file information into the virtual mirror structure body.
6. The method of claim 1, wherein the installing an operating system for the server to be installed through the virtual mirror structure comprises:
and generating a target operating system image file according to the virtual image structure body, sending the target operating system image file to installation equipment, and installing the target operating system image file on the server to be installed through the installation equipment.
7. The method of claim 1, wherein the installing an operating system for the server to be installed through the virtual mirror structure comprises:
acquiring a corresponding target operating system installation file in the virtual mirror image structure body, and sending the target operating system installation file to an installation device;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
8. The method of claim 1, wherein the installing an operating system for the server to be installed through the virtual mirror structure comprises:
the virtual mirror image structure body is sent to installation equipment, and a corresponding target operating system installation file in the virtual mirror image structure body is obtained through the installation equipment;
providing a virtual drive to the server to be installed through the installation device,
and loading the target operating system installation file to the server to be installed through the virtual CD-ROM so as to install the target operating system.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, which when executed by the processor, perform the steps of the method of any one of claims 1-8.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of any one of claims 1-8.
CN202210476591.4A 2022-04-30 2022-04-30 Operating system installation method, device and readable storage medium Active CN114756290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210476591.4A CN114756290B (en) 2022-04-30 2022-04-30 Operating system installation method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210476591.4A CN114756290B (en) 2022-04-30 2022-04-30 Operating system installation method, device and readable storage medium

Publications (2)

Publication Number Publication Date
CN114756290A CN114756290A (en) 2022-07-15
CN114756290B true CN114756290B (en) 2023-08-25

Family

ID=82333189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210476591.4A Active CN114756290B (en) 2022-04-30 2022-04-30 Operating system installation method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN114756290B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061701B (en) * 2022-08-16 2022-11-25 新华三信息技术有限公司 Out-of-band installation method and device for server
CN116149759B (en) * 2023-04-20 2023-07-14 深圳市吉方工控有限公司 UEFI (unified extensible firmware interface) drive unloading method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110090705A (en) * 2010-02-04 2011-08-10 (주) 샘아이티 High-availability system structured by virtual device mapping
WO2016165472A1 (en) * 2015-07-13 2016-10-20 中兴通讯股份有限公司 Method and device for creating virtual machine
CN107291486A (en) * 2016-04-11 2017-10-24 紫光华山信息技术有限公司 The installation method and device of a kind of operating system
CN110908770A (en) * 2019-11-05 2020-03-24 安超云软件有限公司 Operation and creation method of virtual machine, virtual machine and virtual machine management platform
CN113641413A (en) * 2021-08-25 2021-11-12 Oppo广东移动通信有限公司 Target model loading and updating method and device, readable medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110090705A (en) * 2010-02-04 2011-08-10 (주) 샘아이티 High-availability system structured by virtual device mapping
WO2016165472A1 (en) * 2015-07-13 2016-10-20 中兴通讯股份有限公司 Method and device for creating virtual machine
CN107291486A (en) * 2016-04-11 2017-10-24 紫光华山信息技术有限公司 The installation method and device of a kind of operating system
CN110908770A (en) * 2019-11-05 2020-03-24 安超云软件有限公司 Operation and creation method of virtual machine, virtual machine and virtual machine management platform
CN113641413A (en) * 2021-08-25 2021-11-12 Oppo广东移动通信有限公司 Target model loading and updating method and device, readable medium and electronic equipment

Also Published As

Publication number Publication date
CN114756290A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US8417796B2 (en) System and method for transferring a computing environment between computers of dissimilar configurations
US9940330B2 (en) System and method for converting a physical disk to a virtual disk
US20210216360A1 (en) Virtual machine migration method and apparatus
US9971618B2 (en) System and method to reconfigure a virtual machine image suitable for cloud deployment
CN102207896B (en) Virtual machine crash file generation techniques
US8205194B2 (en) Updating offline virtual machines or VM images
US8533304B2 (en) Remotely deploying and automatically customizing workstation images
CN114756290B (en) Operating system installation method, device and readable storage medium
JP6089064B2 (en) Method, computer system and memory device for updating software components
US7886292B2 (en) Methodology of individualized software deployment for hardware-independent personal computer mass development
CN102799464A (en) Virtual machine creation method, virtual machine creation system, virtual machine resetting method and virtual machine resetting system
US10747523B2 (en) Methods of updating firmware components, computer systems and memory apparatus
US20220244943A1 (en) Software and firmware updates in a combined single pane of glass interface
CN110908753A (en) Intelligent fusion cloud desktop server, client and system
WO2023098052A1 (en) Server operation and maintenance method and apparatus, and device and storage medium
US20100043006A1 (en) Systems and methods for a configurable deployment platform with virtualization of processing resource specific persistent settings
US20210311766A1 (en) Validation and pre-check of combined software/firmware updates
US10210004B2 (en) Method of providing at least one data carrier for a computer system and computer system including service processor independently operable from a main processor of the computer system
CN115509590B (en) Continuous deployment method and computer equipment
CN113645046B (en) Network card driver installation method, main server and medium
CN115700465B (en) Mobile electronic equipment and application method thereof
US20240036896A1 (en) Generating installation images based upon dpu-specific capabilities

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
GR01 Patent grant