CN116126403A - Operating system deployment method and device, electronic equipment and storage medium - Google Patents

Operating system deployment method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116126403A
CN116126403A CN202211678311.4A CN202211678311A CN116126403A CN 116126403 A CN116126403 A CN 116126403A CN 202211678311 A CN202211678311 A CN 202211678311A CN 116126403 A CN116126403 A CN 116126403A
Authority
CN
China
Prior art keywords
operating system
system file
deployment
mirror image
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211678311.4A
Other languages
Chinese (zh)
Inventor
王大鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211678311.4A priority Critical patent/CN116126403A/en
Publication of CN116126403A publication Critical patent/CN116126403A/en
Pending legal-status Critical Current

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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a deployment method and device of an operating system, electronic equipment and a storage medium, relates to the field of artificial intelligence, and in particular relates to cloud computing and server installation technology, and can be applied to an intelligent cloud scene. The specific implementation scheme is as follows: according to the first mirror image system file, initializing an operating system corresponding to the first mirror image system file by using a first deployment agent to acquire a second mirror image operating system file; according to the second mirror image operating system file, calling a preset switching command by utilizing the first deployment agent so as to switch to an operating system corresponding to the second mirror image operating system file; acquiring a target operating system file by using a second deployment agent so as to deploy a target operating system corresponding to the target operating system file; and calling a preset switching command by using the second deployment agent so as to switch to a target operating system corresponding to the target operating system file.

Description

Operating system deployment method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to cloud computing and server installation technology, which can be applied to an intelligent cloud scene.
Background
With the continuous development of internet technology, the number of servers is increasing, and the number of servers is gradually increasing from the initial few servers to huge data centers.
Currently, in the scenario of large-scale server installation of an internet data center, the network installation process of the server involves two hard restarts, and three operating system images are downloaded.
Disclosure of Invention
The disclosure provides a deployment method and device of an operating system, electronic equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a deployment method of an operating system, the method should
For a device to be deployed, comprising: 0, according to the first mirror image system file, utilizing a first deployment agent to make said first mirror image system file
Initializing an operating system corresponding to the piece to acquire a second mirror image operating system file;
according to the second mirror image operating system file, calling a preset switching command by utilizing the first deployment agent so as to switch to an operating system corresponding to the second mirror image operating system file;
acquiring a target operating system file by using a second deployment agent to deploy a target operating system corresponding to the target operating system 5 system file;
And calling a preset switching command by using the second deployment agent so as to switch to a target operating system corresponding to the target operating system file.
According to another aspect of the present disclosure, there is provided a deployment apparatus of an operating system, provided to a system to be deployed
A deployment device, comprising:
the first acquisition unit is used for initializing an operating system corresponding to the first mirror image system file by utilizing a first deployment agent according to the first mirror image system file so as to acquire a second mirror image operating system file;
the first switching unit is used for calling a preset switching command by utilizing the first deployment agent according to the second mirror image operating system file so as to switch to an operating system corresponding to the second mirror image operating system file;
the second acquisition unit is used for acquiring a target operating system file by using a second deployment agent so as to deploy a target operating system corresponding to the target operating system file;
and the second switching unit is used for calling a preset switching command by utilizing the second deployment agent so as to switch to the target operating system corresponding to the target operating system file.
According to still another aspect of the present disclosure, there is provided an electronic apparatus including:
At least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the aspects and methods of any one of the possible implementations described above.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of the aspects and any possible implementation described above.
According to a further aspect of the present disclosure there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of the aspects and any one of the possible implementations described above.
As can be seen from the above technical solutions, in the embodiments of the present disclosure, a first deployment agent is used to initialize the operating system according to a first image system file, so as to obtain a second image operating system file, and a preset switching command is called by the first deployment agent according to the second image operating system file, so as to switch to an operating system corresponding to the second image operating system file, and further, a second deployment agent is used to obtain a target operating system file, so that the target operating system corresponding to the target operating system file can be deployed, and the second deployment agent is used to call the preset switching command so as to switch to the target operating system corresponding to the target operating system file.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a block diagram of an electronic device used to implement a deployment method of an operating system of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It will be apparent that the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
It should be noted that, the terminal device in the embodiments of the present disclosure may include, but is not limited to, smart devices such as a mobile phone, a personal digital assistant (Personal Digital Assistant, PDA), a wireless handheld device, and a Tablet Computer (Tablet Computer); the display device may include, but is not limited to, a personal computer, a television, or the like having a display function.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
At present, in the related technical scheme, the network installation process of the server is that the server can be started through a network pre-start execution environment (Preboot eXecution Environment, PXE), a download guide (bootfile) file pxelinux.0 is executed, and the pxelinux.0 can download a kernel file vmlinuz and a file system initrafs through a network. After the kernel file downloaded by the server through the network is successfully started, 5 the server downloads the first system mirror image to the memory, performs system initialization, and enters the first server
After the mirror image system, the information collection of the server is started to be executed, the logic of reporting and registering is automatically carried out, and the server is reported to the control center until the work of the mirror image of the first system is completed. After the server has finished reporting, the administrator can discover the server from the control center, and the administrator selects the desired installation
Is installed from the control center click. The server will perform the first hard restart, 0 is still started from the PXE network, and downloads vmlinuz and initrimfs of the second phase to the memory through the network, and the server downloads the second system image to the memory, where the second system image is used to perform the install operation. After entering the second system, the server begins performing various installation operations, including downloading the third system image to the hard disk, and setting the correct start-up sequence of the operating system start-up program (grub). Thus, the second system image is completed. Again, after the completion of the install operation of the second stage 5, the server may perform a second hard restart. The start-up is from the hard disk
Dynamically, bootloader finds vmlinuz and init fs from the hard disk/boot directory according to grub configuration,
And starting to boot, and entering an operating system to be installed after the booting is successful.
In summary, in the related technical solution, the network installation of the server needs to be restarted twice, and three servers are downloaded
Operating system images. The three operating system images are respectively used for information acquisition and network automatic 0 registration of the server, executing the installation flow and configuration of the server and installing the target operating system. The switching of the three operating systems is achieved by a two-time server hard restart. The hard restart includes a Bootloader system that is booted by hardware initialization and boot loader (Bootloader) performed by a basic input output system (Basic Input Output System, BIOS). However, these two hard restart steps take a long time,
particularly, when some servers with higher configuration are encountered, the time is more time-consuming, and the time consumption is up to 5% of the whole installation process. In the context of large-scale installation, the efficiency of the installation is particularly important,
the two steps seriously slow the rhythm of the installation machine, and the optimization is needed.
Therefore, it is desirable to provide a deployment method of an operating system, which can reduce the number of hard restarts in the server installation process, so as to improve the efficiency of the server installation.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure, as shown in fig. 1.
101. And initializing an operating system corresponding to the first mirror image system file by using a first deployment agent according to the first mirror image system file so as to acquire a second mirror image operating system file.
102. And calling a preset switching command by using the first deployment agent according to the second mirror image operating system file so as to switch to an operating system corresponding to the second mirror image operating system file.
103. And acquiring a target operating system file by using a second deployment agent so as to deploy a target operating system corresponding to the target operating system file.
104. And calling a preset switching command by using the second deployment agent so as to switch to a target operating system corresponding to the target operating system file.
It should be noted that the device to be deployed may include a physical server or the like. Such as servers in an internet data center (Internet Data Center, IDC), 5G and hardware devices for edge scenarios.
In addition, during the network installation process, the device to be deployed may interact with the control center to complete steps 101-104.
It should be noted that the first deployment agent and the second deployment agent may be processes initiated based on different phases of the same process file. The first deployment agent and the second deployment agent may both be used to deploy an operating system and invoke preset handoff instructions.
In this way, the first deployment agent is utilized to initialize the operating system corresponding to the first mirror image system file to obtain the second mirror image operating system file, and the first deployment agent is utilized to call a preset switching command to switch to the operating system corresponding to the second mirror image operating system file according to the second mirror image operating system file, so that the second deployment agent is utilized to obtain the target operating system file to deploy the target operating system corresponding to the target operating system file, so that the second deployment agent is utilized to call the preset switching command to switch to the target operating system corresponding to the target operating system file.
Optionally, in one possible implementation manner of this embodiment, in 101, specifically, device data of the device to be deployed may be collected by using a first deployment agent according to the first image system file, so as to report the device data, and further, a second image operating system file may be obtained in response to receiving a deployment request.
In a specific implementation process of the implementation manner, first, after collecting device data of a device to be deployed by using a first deployment agent according to a first mirror system file, the device data may be reported to a control center so as to register the device to be deployed in the control center. Secondly, after receiving the device data of the device to be deployed, the control center can determine a deployment request according to the pre-configured deployment information and issue the deployment request to the device to be deployed. And thirdly, the equipment to be deployed can receive the deployment request by using the first deployment agent, acquire the second mirror image operating system file according to the deployment request, and download the second mirror image operating system file to the first system disk of the equipment to be deployed.
In this specific implementation, the pre-configured deployment information may include information such as a deployment manner configured by an administrator and an operating system to be deployed.
In this way, in the implementation manner, the first deployment agent is utilized to initialize the operating system, so that the device can be registered and reported, a deployment request is obtained, and the second mirror image operating system file is further obtained according to the deployment request.
Optionally, in one possible implementation manner of this embodiment, in 102, the first deployment agent may be used to deploy an operating system corresponding to the second image operating system file in the first system disk of the device to be deployed according to the second image operating system file, and further a preset switching command may be called by using the first deployment agent, so that switching to the operating system corresponding to the second image operating system file and refreshing the memory of the device to be deployed may be performed according to the preset switching command.
In this implementation, the preset handover command may include, but is not limited to, a kexec command. The kexec command may be directed from the currently running core to a new core, i.e. it may allow the new core to be started from the currently running core.
Here, specifically, the kexec command may be: kexec-l/reploy/boot/vmlinuz-baid-initrd=/reploy/boot/initrimfs-baid.
In a specific implementation process of the implementation manner, first, according to a second mirrored operating system file, an operating system corresponding to the second mirrored operating system file may be deployed in a first system disk of a device to be deployed by using a first deployment agent. And secondly, a kexec command can be called by using the first deployment agent to directly switch into a new operating system, namely to switch into an operating system corresponding to the second mirror image operating system file, and meanwhile, refreshing the memory of the equipment to be deployed, resetting the hardware state and other operations are performed.
It can be appreciated that in the process of operating system deployment, the device to be deployed may send its deployment status information to the control center.
In this way, in the implementation manner, by using the first deployment agent and the preset switching command, the quick switching between different operating system images can be realized once, and the hard restart is avoided, so that the deployment efficiency of the operating system is improved.
It should be noted that, the specific implementation process provided in the present implementation manner may be combined with the specific implementation process provided in the foregoing implementation manner for obtaining the second image operating system file to implement the deployment method of the operating system in this embodiment. The detailed description may refer to the relevant content in the foregoing implementation, and will not be repeated here.
Optionally, in one possible implementation manner of this embodiment, in 103, specifically, a second deployment agent may be used to obtain deployment status information of the device to be deployed and the target operating system file, and then, according to the deployment status information, a target operating system corresponding to the target operating system file may be deployed in a second system disk of the device to be deployed.
In this implementation, the deployment status information may include current deployment status information of the device to be deployed. The target operating system file may be a pre-configured file of the operating system that needs to be deployed.
In one specific implementation of this implementation, after execution 102, the device to be deployed may restart one deployment agent, i.e., the second deployment agent. And acquiring deployment state information of the equipment to be deployed and the target operating system file from the control center by using the second deployment agent, and further deploying a target operating system corresponding to the target operating system file in a second system disk of the equipment to be deployed according to the deployment state information.
In another specific implementation process of the implementation manner, the target operating system file can be downloaded to the second system disk according to the deployment state information, and further the deployment program can be controlled to perform network configuration processing and grub configuration processing, so that the target operating system corresponding to the target operating system file can be deployed in the second system disk of the device to be deployed.
Here, after 103, the second deployment agent may call the preset switching command again, and directly switch to the target operating system corresponding to the deployed target operating system file, so as to complete the deployment process of the operating system of the device to be deployed.
It is understood that the first system disk and the second system disk may be separate hard disks.
In this way, in the implementation manner, the deployment state information of the device to be deployed and the target operating system file can be acquired by using the second deployment agent, so that the target operating system can be deployed in the second system disk of the device to be deployed according to the deployment state information, the deployment of the target operating system can be effectively completed, and the reliability of the deployment of the operating system is further ensured.
It should be noted that, in the multiple specific implementation processes of the deployment target operating system provided in the present implementation manner, the deployment method of the operating system of the present embodiment may be implemented in combination with the specific implementation processes provided in the foregoing respective implementation manners. The detailed description may refer to the relevant content in the foregoing implementation, and will not be repeated here.
Optionally, in one possible implementation manner of this embodiment, before 101, further, a first image operating system file may be obtained according to the PXE operating system file, and the first image operating system file is loaded to a memory of the device to be deployed.
In this implementation, the PXE operating system files may include kernel files vmlinuz and file system initrimfs. The PXE operating system file may be obtained by the device to be deployed through network PXE boot.
It will be appreciated that here, vmlinuz and initrimfs may be loaded into the memory of the device to be deployed during the process of starting the operating system deployment of the device to be deployed through the network PXE. vmlinuz may be a kernel file used during startup. The file system initrimfs may be an initializing file system.
In a specific implementation process of the implementation manner, firstly, equipment to be deployed is started through a network PXE, a bootfile file pxelinux.0 is downloaded and executed, and the pxelinux.0 can download a kernel file vmlinuz and a file system initrimfs, namely a PXE operating system file through the network. Secondly, after the device to be deployed is successfully started by using the PXE operating system file, the first mirror image operating system file can be downloaded to the memory.
In this way, in the implementation manner, the first mirror image operating system file can be obtained according to the PXE operating system file, and the first mirror image operating system file is loaded into the memory of the equipment to be deployed, so that a plurality of equipment can be automatically assembled remotely and simultaneously, and the scale and automation of operating system deployment are ensured.
It should be noted that, the specific implementation process provided in the present implementation manner may be combined with the specific implementation process provided in the foregoing implementation manners to implement the deployment method of the operating system of the present embodiment. The detailed description may refer to the relevant content in the foregoing implementation, and will not be repeated here.
In this embodiment, the first deployment agent is used to initialize the operating system corresponding to the first image system file to obtain the second image operating system file, and the first deployment agent is used to call a preset switching command to switch to the operating system corresponding to the second image operating system file according to the second image operating system file, so that the second deployment agent is used to obtain the target operating system file to deploy the target operating system corresponding to the target operating system file, so that the second deployment agent is used to call the preset switching command to switch to the target operating system corresponding to the target operating system file.
In addition, by adopting the technical scheme provided by the embodiment, the first deployment agent is utilized to initialize the operating system, so that the equipment can be registered and reported, a deployment request is obtained, and the second mirror image operating system file is further obtained according to the deployment request.
In addition, by adopting the technical scheme provided by the embodiment, the first deployment agent and the preset switching command can be utilized to realize the quick switching between different operating system images at one time, so that the hard restart is avoided, and the deployment efficiency of the operating system is improved.
In addition, by adopting the technical scheme provided by the embodiment, the deployment state information of the equipment to be deployed and the target operating system file can be acquired by utilizing the second deployment agent, so that the target operating system can be deployed in the second system disk of the equipment to be deployed according to the deployment state information, the deployment of the target operating system can be effectively completed, and the reliability of the deployment of the operating system is further ensured.
In addition, by adopting the technical scheme provided by the embodiment, the first mirror image operating system file can be obtained according to the PXE operating system file, and the first mirror image operating system file is loaded into the memory of the equipment to be deployed, so that a plurality of equipment can be automatically assembled remotely and simultaneously, and the scale and automation of operating system deployment are ensured.
Fig. 2 is a schematic diagram, as shown in fig. 2, according to a second embodiment of the present disclosure.
In this embodiment, the application scenario may include a server and a control center. The control center can be used for issuing the server installation, namely the flow of the deployment of the operating system, recording the installation state and is a dispatcher of the server installation. The server may be used to execute the deployment method of the operating system of the present embodiment. The deployment method of the server executing the operating system may include three phases, such as a first phase (steps 201-202), a second phase (steps 203-205), and a third phase (step 206).
For a better understanding of the deployment method of the operating system of this embodiment, a detailed description will be given with reference to fig. 2.
201. And obtaining the kernel file and the file system through PXE to obtain a first mirror image system.
202. Based on the first mirror image system, the first deployment agent is utilized to collect equipment data and report the equipment data.
In this embodiment, the server is powered off to be deployed, and when deployment is started, the server may be started through the network PXE.
Specifically, the bootfile file pxelinux.0 may be downloaded and executed through a network, and the pxelinux.0 may download the kernel file vmlinuz and the file system initrimfs through the network. After the server uses the kernel file downloaded by the network to start successfully, the server downloads the first mirror image system, namely the first system mirror image to the memory, and performs initialization. After the server system enters the first mirror system, a deployment agent, namely a first deployment agent, may be started to execute the automatic reporting and registration logic of the server, and report the server to the control center.
Meanwhile, the deployAgent1 can also be used for waiting for a deployment request issued by the control center.
203. And acquiring a second mirror image system according to the received deployment request.
204. The Kexec command is invoked with the first deployment agent to switch to the second mirrored system.
205. And acquiring deployment state information and a target operating system by using the second deployment agent so as to deploy the target operating system.
In this embodiment, after the control center recognizes the server, the administrator can select the installation mode and the operating system to be deployed, and then click on the server installation. The control center responds to the installed operation of the administrator and the information preconfigured by the administrator, determines a corresponding deployment request, and issues the deployment request to the server.
Specifically, after receiving the deployment request, the DeployAgent1 in the server starts to download the second mirror image system of the second stage to the system disk of the corresponding hard disk. After the downloading is completed, the deployAgent1 mounts the system disk of the hard disk to a specific directory, and can call Kexec, execute Kexec-l/deploy/boot/vmlinuz-baid-initrd=/deploy/boot/initrimfs-baidu.img-reuse-cmdline, and directly switch into a new system, namely a second mirror system.
Meanwhile, the operations such as refreshing of the memory, hardware state reset and the like can be performed. Thus, the hard restart step can be omitted.
Further, at this time, the second mirror system is switched into, and since the memory is already refreshed, a DeployAgent2, i.e. the second deployment agent, is started again in the mirror. The DeployAgent2 may continue to report to the control center to obtain current deployment status information. Meanwhile, the control center can send the deployment state information and the target operating system to the server, and the server utilizes the DeployAgent2 to schedule the installation of the target operating system according to the deployment state information.
Specifically, the installation and deployment process of the target operating system according to the deployment state information may be that the target operating system image is downloaded to a corresponding system disk, and the deployment program is controlled to perform network configuration, grub configuration, so as to complete deployment of the target operating system.
Here, the system disk for loading the target operating system and the aforementioned system disk for loading the second mirror system are different.
206. And calling a Kexec command by using a second deployment agent to switch to the target operating system.
In this embodiment, after the deployment operation performed by the DeployAgent2 is completed, the DeployAgent2 may mount a system disk to a specific directory, and call Kexec to enter into the target operating system.
So far, the server does not need to be restarted, the installed deployment of the operating system is completed, and a new operating system is entered.
It will be appreciated that the first stage deployment process may be performed in the memory system of the server. The deployment process of the second and third phases may be performed in a hard disk system of the server. The deployAgents, i.e., the first deployment agent deployAgent1 and the second deployment agent deployAgent, may be processes.
In this embodiment, a process depoyagent may be added to the images of the first two stages of the deployment of the operating system to identify the stages of the deployment of each operating system, and interact with the control center to trigger the corresponding deployment and call Kexec to perform the switching between the systems, so as to complete the deployment of the operating system of the server.
In addition, by adopting the technical scheme provided by the embodiment, bootloader is not required to be installed on the hard disk when the second-stage mirror image system is imported, so that a plurality of bootable hard disks are avoided, and the efficiency of server installation is further improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all of the preferred embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
Fig. 3 is a schematic diagram according to a third embodiment of the present disclosure, as shown in fig. 3. The deployment apparatus 300 of the operating system of the present embodiment may include a first acquisition unit 301, a first switching unit 302, a second acquisition unit 303, and a second switching unit 304. The deployment apparatus 300 of the operating system may be disposed in a device to be deployed, where the first obtaining unit 301 is configured to perform, according to a first image system file, an initialization process on an operating system corresponding to the first image system file by using a first deployment agent, so as to obtain a second image operating system file; a first switching unit 302, configured to invoke, according to the second mirrored operating system file, a preset switching command by using the first deployment agent, so as to switch to an operating system corresponding to the second mirrored operating system file; a second obtaining unit 303, configured to obtain, using a second deployment agent, a target operating system file, so as to deploy a target operating system corresponding to the target operating system file; and the second switching unit 304 is configured to invoke a preset switching command by using the second deployment agent to switch to the target operating system corresponding to the target operating system file.
Optionally, in one possible implementation manner of this embodiment, the first obtaining unit 301 may be specifically configured to collect, according to the first image system file, device data of the device to be deployed by using a first deployment agent, report the device data, and obtain, in response to receiving a deployment request, a second image operating system file.
Optionally, in one possible implementation manner of this embodiment, the first switching unit 302 may specifically be configured to deploy, according to the second image operating system file, an operating system corresponding to the second image operating system file in a first system disk of the device to be deployed by using the first deployment agent, call a preset switching command by using the first deployment agent, switch to the operating system corresponding to the second image operating system file according to the preset switching command, and refresh a memory of the device to be deployed.
Optionally, in one possible implementation manner of this embodiment, the second obtaining unit 303 may specifically be configured to obtain, by using a second deployment agent, deployment state information of the device to be deployed and the target operating system file, and deploy, according to the deployment state information, a target operating system corresponding to the target operating system file in a second system disk of the device to be deployed.
Optionally, in one possible implementation manner of this embodiment, the first obtaining unit 301 may be further configured to obtain a first image operating system file according to a PXE operating system file, and load the first image operating system file to a memory of the device to be deployed.
In this embodiment, the first acquiring unit may perform initialization processing on the operating system corresponding to the first image system file by using the first deployment agent according to the first image system file, so as to acquire a second image operating system file, and then the first switching unit may use the first deployment agent to invoke a preset switching command to switch to the operating system corresponding to the second image operating system file according to the second image operating system file, and the second acquiring unit may use the second deployment agent to acquire the target operating system file to deploy the target operating system corresponding to the target operating system file, so that the second switching unit may use the second deployment agent to invoke the preset switching command to switch to the target operating system corresponding to the target operating system file.
In addition, by adopting the technical scheme provided by the embodiment, the first deployment agent is utilized to initialize the operating system, so that the equipment can be registered and reported, a deployment request is obtained, and the second mirror image operating system file is further obtained according to the deployment request.
In addition, by adopting the technical scheme provided by the embodiment, the first deployment agent and the preset switching command can be utilized to realize the quick switching between different operating system images at one time, so that the hard restart is avoided, and the deployment efficiency of the operating system is improved.
In addition, by adopting the technical scheme provided by the embodiment, the deployment state information of the equipment to be deployed and the target operating system file can be acquired by utilizing the second deployment agent, so that the target operating system can be deployed in the second system disk of the equipment to be deployed according to the deployment state information, the deployment of the target operating system can be effectively completed, and the reliability of the deployment of the operating system is further ensured.
In addition, by adopting the technical scheme provided by the embodiment, the first mirror image operating system file can be obtained according to the PXE operating system file, and the first mirror image operating system file is loaded into the memory of the equipment to be deployed, so that a plurality of equipment can be automatically assembled remotely and simultaneously, and the scale and automation of operating system deployment are ensured.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 4 illustrates a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 4, the electronic device 400 includes a computing unit 401 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Various components in electronic device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the electronic device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as the deployment method of an operating system. For example, in some embodiments, the deployment method of an operating system may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the operating system deployment method described above may be performed. Alternatively, in other embodiments, computing unit 401 may be configured to perform the deployment method of the operating system in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other
And typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. Server device
The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
It should be appreciated that the various forms of flow shown above may be used to reorder, add, or otherwise
And deleting. For example, the steps recited in the present disclosure may be performed in parallel, 0 may be performed sequentially, or may be performed in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions, 5 improvements, etc., which are within the spirit and principles of the present disclosure, are intended to be included within the scope of the present disclosure.

Claims (13)

1. A deployment method of an operating system, the method being applied to a device to be deployed, comprising:
according to the first mirror image system file, initializing an operating system corresponding to the first mirror image system file by using a first deployment agent to acquire a second mirror image operating system file;
according to the second mirror image operating system file, calling a preset switching command by utilizing the first deployment agent so as to switch to an operating system corresponding to the second mirror image operating system file;
Acquiring a target operating system file by using a second deployment agent so as to deploy a target operating system corresponding to the target operating system file;
and calling a preset switching command by using the second deployment agent so as to switch to a target operating system corresponding to the target operating system file.
2. The method of claim 1, wherein initializing, according to the first image system file, an operating system corresponding to the first image system file with a first deployment agent to obtain a second image operating system file, includes:
collecting equipment data of the equipment to be deployed by using a first deployment agent according to the first mirror image system file so as to report the equipment data;
and acquiring a second mirror image operating system file in response to receiving the deployment request.
3. The method according to claim 1 or 2, wherein the calling, according to the second mirrored operating system file, a preset switching command by using the first deployment agent to switch to an operating system corresponding to the second mirrored operating system file includes:
according to the second mirror image operating system file, using the first deployment agent to deploy an operating system corresponding to the second mirror image operating system file in a first system disk of the equipment to be deployed;
Invoking a preset switching command by using the first deployment agent;
and switching to an operating system corresponding to the second mirror image operating system file according to a preset switching command, and refreshing the memory of the equipment to be deployed.
4. The method of any of claims 1-3, wherein the obtaining, with the second deployment agent, the target operating system file to deploy the target operating system corresponding to the target operating system file includes:
acquiring deployment state information of the equipment to be deployed and the target operating system file by using a second deployment agent;
and according to the deployment state information, deploying a target operating system corresponding to the target operating system file in a second system disk of the equipment to be deployed.
5. The method of any of claims 1-4, wherein the initializing the operating system with the first deployment agent from the first mirrored system file, prior to the initializing, comprises:
obtaining a first mirror image operating system file according to the PXE operating system file;
and loading the first mirror image operating system file to the memory of the equipment to be deployed.
6. A deployment apparatus of an operating system, disposed in a device to be deployed, comprising:
The first acquisition unit is used for initializing an operating system corresponding to the first mirror image system file by utilizing a first deployment agent according to the first mirror image system file so as to acquire a second mirror image operating system file;
the first switching unit is used for calling a preset switching command by utilizing the first deployment agent according to the second mirror image operating system file so as to switch to an operating system corresponding to the second mirror image operating system file;
the second acquisition unit is used for acquiring a target operating system file by using a second deployment agent so as to deploy a target operating system corresponding to the target operating system file;
and the second switching unit is used for calling a preset switching command by utilizing the second deployment agent so as to switch to the target operating system corresponding to the target operating system file.
7. The apparatus of claim 6, wherein the first acquisition unit is specifically configured to:
collecting equipment data of the equipment to be deployed by using a first deployment agent according to the first mirror image system file so as to report the equipment data;
and acquiring a second mirror image operating system file in response to receiving the deployment request.
8. The device according to claim 6 or 7, wherein the first switching unit is in particular configured to:
according to the second mirror image operating system file, using the first deployment agent to deploy an operating system corresponding to the second mirror image operating system file in a first system disk of the equipment to be deployed;
invoking a preset switching command by using the first deployment agent;
and switching to an operating system corresponding to the second mirror image operating system file according to a preset switching command, and refreshing the memory of the equipment to be deployed.
9. The apparatus according to any one of claims 6-8, wherein the second acquisition unit is specifically configured to:
acquiring deployment state information of the equipment to be deployed and the target operating system file by using a second deployment agent;
and according to the deployment state information, deploying a target operating system corresponding to the target operating system file in a second system disk of the equipment to be deployed.
10. The apparatus according to any of claims 6-9, wherein the first acquisition unit is further configured to:
obtaining a first mirror image operating system file according to the PXE operating system file;
And loading the first mirror image operating system file to the memory of the equipment to be deployed.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-5.
13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-5.
CN202211678311.4A 2022-12-26 2022-12-26 Operating system deployment method and device, electronic equipment and storage medium Pending CN116126403A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211678311.4A CN116126403A (en) 2022-12-26 2022-12-26 Operating system deployment method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211678311.4A CN116126403A (en) 2022-12-26 2022-12-26 Operating system deployment method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116126403A true CN116126403A (en) 2023-05-16

Family

ID=86293848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211678311.4A Pending CN116126403A (en) 2022-12-26 2022-12-26 Operating system deployment method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116126403A (en)

Similar Documents

Publication Publication Date Title
CN113312037B (en) Data processing method, device, equipment and storage medium applied to micro-service
CN112925651B (en) Application resource deployment method, device, electronic equipment and medium
CN115794257B (en) System starting method, device, electronic equipment and storage medium
CN112925652B (en) Application resource deployment method, device, electronic equipment and medium
CN112667266A (en) Firmware upgrading method, device, equipment and storage medium
EP4209894A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
CN112925587A (en) Method and apparatus for initializing applications
CN115357310A (en) System starting method and device, electronic equipment and storage medium
WO2022199335A1 (en) Method, apparatus and device for controlling firmware upgrade of server component, and storage medium
US11030047B2 (en) Information handling system and method to restore system firmware to a selected restore point
CN115269025A (en) Kernel quick starting method and device, electronic equipment and storage medium
CN110515671A (en) Initial method, apparatus for initializing, terminal device and readable storage medium storing program for executing
CN110399167B (en) Firmware starting method and device, equipment and storage medium
CN114228745B (en) Driving system module control method, device, equipment, medium, product and vehicle
CN116610370A (en) Starting method, starting device, starting equipment and storage medium
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN116126403A (en) Operating system deployment method and device, electronic equipment and storage medium
CN115794132A (en) Operating system deployment method, device, equipment and storage medium
CN112241141B (en) Hardware configuration method, system, device and medium of PLC control system
CN110109707B (en) Terminal starting method and device and terminal
CN115220797B (en) Operating system starting and deploying method, device, equipment, medium and program product
CN112905270A (en) Workflow implementation method, device, platform, electronic equipment and storage medium
CN116700807A (en) Optimized starting method, device, equipment and medium for embedded system
CN115220797A (en) Operating system starting and deploying method, device, equipment, medium and program product
CN114879981B (en) Cloud operating system installation method and device, electronic equipment and storage medium

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