CN107562466A - The method and apparatus of computer operating system installation - Google Patents
The method and apparatus of computer operating system installation Download PDFInfo
- Publication number
- CN107562466A CN107562466A CN201710602781.5A CN201710602781A CN107562466A CN 107562466 A CN107562466 A CN 107562466A CN 201710602781 A CN201710602781 A CN 201710602781A CN 107562466 A CN107562466 A CN 107562466A
- Authority
- CN
- China
- Prior art keywords
- computer
- address
- operating system
- boot
- hard disk
- 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.)
- Granted
Links
Landscapes
- Stored Programmes (AREA)
Abstract
本方案提供一种计算机操作系统安装的方法和设备:计算机接收管理服务器发送的网络引导程序并将其存储至计算机硬盘中第一地址指向的存储空间,将第一启动加载器更新为首个启动项的启动地址为第一地址的第二启动加载器;重新启动计算机,计算机从硬盘启动第二启动加载器,运行网络引导程序,从操作系统服务器下载操作系统并安装于硬盘中第二地址指向的存储空间,将第二启动加载器更新为首个启动项的启动地址为第二地址的第三启动加载器。本方案实施过程中计算机启动方式始终为从硬盘启动,不需要手动更改计算机启动方式,可以实现大批量计算机自动安装操作系统。
This solution provides a method and device for installing a computer operating system: the computer receives the network boot program sent by the management server and stores it in the storage space pointed to by the first address in the hard disk of the computer, and updates the first boot loader as the first boot item The boot address is the second boot loader of the first address; restart the computer, the computer starts the second boot loader from the hard disk, runs the network boot program, downloads the operating system from the operating system server and installs it in the hard disk pointed to by the second address In the storage space, the second bootloader is updated to a third bootloader whose startup address of the first startup item is the second address. During the implementation of this solution, the computer boot mode is always boot from the hard disk, and there is no need to manually change the computer boot mode, which can automatically install the operating system on a large number of computers.
Description
技术领域technical field
本发明涉及信息技术领域,尤其涉及一种计算机操作系统安装的方法及设备。The invention relates to the field of information technology, in particular to a method and equipment for installing a computer operating system.
背景技术Background technique
为计算机安装操作系统,特别是在云计算场景下,为大量计算机安装操作系统,通常是人工方式批量通过网络安装,典型安装场景需要首先计算机为从网络引导程序启动,等操作系统安装后,再设置从硬盘启动,完成操作系统安装,需要人工依次在每台计算机上频繁设置启动方式,更无法实现大规模批量自动安装操作系统。Installing an operating system for a computer, especially in a cloud computing scenario, installing an operating system for a large number of computers is usually done manually in batches through the network. In a typical installation scenario, the computer needs to be booted from the network first, and then the operating system is installed. To set boot from the hard disk and complete the installation of the operating system, it is necessary to manually set the boot mode frequently on each computer in turn, and it is impossible to automatically install the operating system in large batches.
发明内容Contents of the invention
一方面,本发明的实施例提供了一种计算机操作系统安装的方法,其中,该计算机包含硬盘;该硬盘存储该计算机的第一启动加载器;该计算机的启动方式为从该硬盘启动;该计算机与操作系统服务器通信;该操作系统服务器存储有操作系统;该方法包括:On the one hand, the embodiments of the present invention provide a method for installing a computer operating system, wherein the computer includes a hard disk; the hard disk stores a first boot loader of the computer; the computer is started by starting from the hard disk; The computer communicates with an operating system server; the operating system server stores an operating system; the method includes:
该计算机接收管理服务器发送的网络引导程序,并将该网络引导程序存储在该硬盘的第一地址指向的存储空间;该网络引导程序包含该操作系统服务器地址;The computer receives the network boot program sent by the management server, and stores the network boot program in the storage space pointed to by the first address of the hard disk; the network boot program includes the address of the operating system server;
该计算机将该第一启动加载器更新为第二启动加载器,该第二启动加载器的首个启动项的启动地址为该第一地址。重新启动该计算机,该计算机从该硬盘启动该第二加载器。具体实施方法上,根据该计算机从该硬盘启动的启动方式,当该计算机重新启动,该计算机的基本输入输出系统(Basic Input/Output System,BIOS)首先从该硬盘读取该第二启动加载器。该计算机根据该第二启动加载器从该第一地址启动该网络引导程序。The computer updates the first boot loader to a second boot loader, and the start address of the first boot item of the second boot loader is the first address. The computer is restarted, and the computer boots the second loader from the hard disk. In the specific implementation method, according to the startup method of the computer from the hard disk, when the computer is restarted, the basic input and output system (Basic Input/Output System, BIOS) of the computer first reads the second boot loader from the hard disk. . The computer starts the network boot program from the first address according to the second boot loader.
该计算机根据该网络引导程序中的该操作系统服务器地址,从该操作系统服务器获取该操作系统,并将该操作系统安装到该硬盘的第二地址指向的存储空间。The computer acquires the operating system from the operating system server according to the address of the operating system server in the network boot program, and installs the operating system into the storage space pointed to by the second address of the hard disk.
该计算机将该第二启动加载器更新为第三启动加载器,其中,该第三启动加载器的首个启动项的启动地址为该第二地址。此时,该计算机根据从该硬盘启动的启动方式,从该硬盘中读取该第三启动加载器,运行该第三启动加载器的首个启动项,即该操作系统。The computer updates the second boot loader to a third boot loader, wherein the boot address of the first boot item of the third boot loader is the second address. At this time, the computer reads the third bootloader from the hard disk according to the booting mode of booting from the hard disk, and runs the first boot item of the third bootloader, that is, the operating system.
本实施例的方法在实施过程中,该计算机的启动方式始终为从该硬盘启动,不需要更改启动方式。因此,管理服务器对多台待安装操作系统的计算机批量下发对应操作系统的网络引导程序,待安装操作系统的计算机通过本实施例中的方法可以实现对应操作系统的安装。During the implementation of the method of this embodiment, the starting mode of the computer is always from the hard disk, and there is no need to change the starting mode. Therefore, the management server distributes network boot programs corresponding to the operating systems to multiple computers to be installed with the operating systems in batches, and the computers to be installed with the operating systems can implement the installation of the corresponding operating systems through the method in this embodiment.
可选的,该计算机的该BIOS读取出存储在该硬盘上的第一启动加载器,运行该第一启动加载器。Optionally, the BIOS of the computer reads out the first boot loader stored on the hard disk, and runs the first boot loader.
可选的,该第一启动加载器可以为多重操作系统启动管理器(GRand UnifiedBootloader,GRUB)或Linux加载程序(Lnux Loader,LILO)等。Optionally, the first boot loader may be a multi-operating system boot manager (GRand Unified Bootloader, GRUB) or a Linux loader (Lnux Loader, LILO).
可选的,该计算机将该第一启动加载器更新为该第二启动加载器,一种实现为该第二启动加载器相对该第一启动加载器为新的启动加载器,并且该第二启动加载器的首个启动项的启动地址为第一地址。另一种实现方式,为将该第一启动加载器的首个启动项的启动地址更新为第一地址得到该第二启动加载器。Optionally, the computer updates the first boot loader to the second boot loader. One implementation is that the second boot loader is a new boot loader relative to the first boot loader, and the second boot loader The boot address of the first boot item of the boot loader is the first address. Another implementation manner is to update the startup address of the first startup item of the first bootloader to the first address to obtain the second bootloader.
可选的,该计算机将该第二启动加载器更新为该第三启动加载器,一种实现为该第三启动加载器相对该第二启动加载器为新的启动加载器,并且该第三启动加载器的首个启动项的启动地址为第二地址。另一种实现方式,为将该第二启动加载器的首个启动项的启动地址更新为第二地址得到该第三启动加载器。Optionally, the computer updates the second boot loader to the third boot loader. One implementation is that the third boot loader is a new boot loader relative to the second boot loader, and the third boot loader The boot address of the first boot item of the boot loader is the second address. Another implementation manner is to update the startup address of the first startup item of the second bootloader to the second address to obtain the third bootloader.
结合第一方面,在第一方面的第一种实施方法中,当该计算机将该操作系统安装到该硬盘的第二地址指向的存储空间且将该第二启动加载器更新为该第三启动加载器后,该计算机重新启动,执行运行该操作系统的步骤。重新启动该计算机可以检测该操作系统的安装是否成功,也是后续运行该操作系统的必要步骤。With reference to the first aspect, in the first implementation method of the first aspect, when the computer installs the operating system into the storage space pointed to by the second address of the hard disk and updates the second boot loader to the third boot loader After the loader is loaded, the computer restarts and performs the steps to run the operating system. Restarting the computer can detect whether the installation of the operating system is successful, and is also a necessary step for subsequent operation of the operating system.
结合第一方面,在第一方面的第二种实施方法中,当该计算机检测到该操作系统安装到该硬盘的第二地址指向的存储空间失败后,该计算机重新启动。该计算机重新启动后,重新从该硬盘中读取该第二启动加载器,并执行第一方面的方法中启动该网络引导程序及其后续步骤,重新安装该操作系统。With reference to the first aspect, in the second implementation method of the first aspect, after the computer detects that the operating system fails to be installed in the storage space pointed to by the second address of the hard disk, the computer is restarted. After the computer is restarted, read the second boot loader from the hard disk again, and execute the method of the first aspect to start the network boot program and subsequent steps to reinstall the operating system.
本发明实施例中计算机重新启动可以为计算机根据预置规则重新启动,也可以为接收管理服务器指令,重新启动。其中,计算机重新启动为计算机要所预置规则重新启动时,预置规则可以配置在BIOS中。In the embodiment of the present invention, restarting the computer may be restarting the computer according to preset rules, or restarting after receiving an instruction from the management server. Wherein, the computer is restarted when the computer needs to be restarted according to the preset rule, and the preset rule can be configured in the BIOS.
第二方面,本发明的实施例提供了一种计算机操作系统安装的系统,该系统包含所述计算机、管理服务器和操作系统服务器;所述计算机包含硬盘;所述硬盘存储第一启动加载器;所述第一计算机的启动方式为从所述硬盘启动;该计算机、该管理服务器及该操作系统服务器用于执行本发明实施例第一方面中的各种方案。In a second aspect, an embodiment of the present invention provides a computer operating system installation system, the system includes the computer, a management server and an operating system server; the computer includes a hard disk; the hard disk stores a first boot loader; The first computer is started by starting from the hard disk; the computer, the management server and the operating system server are used to implement various solutions in the first aspect of the embodiments of the present invention.
第三方面,本发明的实施例提供了一种计算机,该计算机包含硬盘;该硬盘存储该计算机的第一启动加载器;该计算机的启动方式为从该硬盘启动;该计算机与操作系统服务器通信;该操作系统服务器存储有操作系统;其中,一种实现方式,该计算机设备包含各种单元,分别用于执行本发明实施例第一方面中的各种方案。另一种实现方式,计算机包含接口和处理器,分别用于执行第一方面中的各种方案。In a third aspect, an embodiment of the present invention provides a computer, the computer includes a hard disk; the hard disk stores the first boot loader of the computer; the computer is started in the form of starting from the hard disk; the computer communicates with the operating system server The operating system server stores an operating system; wherein, in an implementation manner, the computer device includes various units, which are respectively used to execute various solutions in the first aspect of the embodiments of the present invention. In another implementation manner, the computer includes an interface and a processor, which are respectively used to execute various solutions in the first aspect.
第四方面,本发明的实施例提供了计算机程序产品和非易失性计算机可读存储介质,其中计算机程序产品和非易失性计算机可读存储介质中包含计算机指令,计算机指令的非易失性存储介质和计算机程序产品,计算机执行计算机指令用于实现本发明实施例第一方面中的各种方案。In a fourth aspect, embodiments of the present invention provide a computer program product and a non-volatile computer-readable storage medium, wherein the computer program product and the non-volatile computer-readable storage medium contain computer instructions, and the non-volatile computer instructions contain A permanent storage medium and a computer program product, the computer executes computer instructions to implement various solutions in the first aspect of the embodiments of the present invention.
第五方面,本发明的实施例提供了一种管理服务器,该管理服务器设备可以用于管理计算机安装操作系统,其中,该计算机设备包含硬盘;该硬盘存储该计算机的第一启动加载器;该计算机的启动方式为从该硬盘启动;该计算机与操作系统服务器通信;该操作系统服务器存储有操作系统;该管理服务器包含处理器和接口;其中,所述处理器用于通过所述接口向该计算机发送网络引导程序,并确认该网络引导程序存储于该硬盘的第一地址指向的存储空间,该网络引导程序包含该操作系统服务器的地址;In the fifth aspect, the embodiment of the present invention provides a management server. The management server device can be used to manage the computer to install an operating system, wherein the computer device includes a hard disk; the hard disk stores the first boot loader of the computer; the The starting method of the computer is to start from the hard disk; the computer communicates with the operating system server; the operating system server stores the operating system; the management server includes a processor and an interface; Send a network boot program, and confirm that the network boot program is stored in the storage space pointed to by the first address of the hard disk, and the network boot program includes the address of the operating system server;
所述处理器还用于通过所述接口向该计算机发送第一指令,该第一指令用于指示该计算机更新该第一启动加载器为第二启动加载器,该第二启动加载器的首个启动项的启动地址为第一地址,确认该计算机成功将该第一启动加载器更新为该第二启动加载器,向该计算机发送第二指令,该第二指令用于重新启动该计算机,当该计算机接收该第二指令,根据从该硬盘启动的方式,重新启动,该计算机从该硬盘中读取该第二启动加载器,并根据第一地址启动该网络引导程序,从操作系统服务器中获取该操作系统后安装于该硬盘中第二地址指向的存储空间后,所述处理器还用于通过所述接口向该计算机发送第三指令,所述第三指令用于指示该计算机将该第二启动加载器更新为第三启动加载器;其中,该第三启动加载器的首个启动项的启动地址为该第二地址。The processor is further configured to send a first instruction to the computer through the interface, the first instruction is used to instruct the computer to update the first boot loader to a second boot loader, and the first boot loader of the second boot loader The startup address of a startup item is the first address, confirming that the computer has successfully updated the first boot loader to the second boot loader, sending a second instruction to the computer, and the second instruction is used to restart the computer, When the computer receives the second instruction, it restarts according to the way of starting from the hard disk, the computer reads the second boot loader from the hard disk, and starts the network boot program according to the first address, from the operating system server After obtaining the operating system and installing it in the storage space pointed to by the second address in the hard disk, the processor is further configured to send a third instruction to the computer through the interface, and the third instruction is used to instruct the computer to The second boot loader is updated to be the third boot loader; wherein, the start address of the first boot item of the third boot loader is the second address.
结合第五方面,在第一方面的第一种实施方法中,还包括:当该管理服务器检测到该操作系统安装失败,所述处理器还用于通过所述接口向该计算机发送第四指令,所述第四指令用于指示该计算机重新启动。该计算机重新启动后,重新从该硬盘中读取该第二启动加载器,该管理服务器执行第五方面的方法中启动该网络引导程序及其后续步骤,重新安装该操作系统。With reference to the fifth aspect, in the first implementation method of the first aspect, further comprising: when the management server detects that the operating system installation fails, the processor is further configured to send a fourth instruction to the computer through the interface , the fourth instruction is used to instruct the computer to restart. After the computer is restarted, the second boot loader is reread from the hard disk, and the management server executes the method of the fifth aspect to start the network boot program and subsequent steps to reinstall the operating system.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例中所需要使用的附图作以简单地介绍。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings that need to be used in the embodiments.
图1为计算机管理系统示意图;Fig. 1 is a schematic diagram of computer management system;
图2为管理服务器结构示意图;Figure 2 is a schematic diagram of the structure of the management server;
图3为网络引导程序与操作系统服务器关系示意图;Fig. 3 is a schematic diagram of the relationship between the network boot program and the operating system server;
图4为计算机安装操作系统的流程图;Fig. 4 is the flowchart of computer installation operating system;
图5为本发明实施例中一种计算机的结构图;FIG. 5 is a structural diagram of a computer in an embodiment of the present invention;
图6为本发明实施例中一种计算机的结构图。FIG. 6 is a structural diagram of a computer in an embodiment of the present invention.
具体实施方式detailed description
如图1所示的计算机管理系统中,包含计算机100、管理服务器101和操作系统服务器320,计算机100与管理服务器101和操作系统服务器320通信。管理服务器101上存储有网络引导程序310。操作系统服务器320存储有操作系统103,操作系统103可以为Windows或Linux或其他操作系统,本实施例对此不做限制。计算机100包含硬盘110,硬盘110上存储启动加载器111。当计算机100启动方式为从硬盘110启动时,计算机100的基本输入输出系统(Basic Input/Output System,BIOS)120读取出存储在硬盘110上的启动加载器111,运行启动加载器111。此处,启动加载器111可以为多重操作系统启动管理器(GRand UnifiedBootloader,GRUB)或Linux加载程序(Linux Loader,LILO)或其他,本实施例对此不做限制。管理服务器101的结构如图2所示,包含处理器201和接口202。其中,处理器201可以包含中央处理单元(Central Processing Unit,CPU)和存储器,其中CPU可以为一个或多个。处理器201还可以为现场可编程逻辑门阵列(Field Programmable Gate Array,FPGA),或FPGA与CPU的组合等。接口202可以为网络接口卡(Network Interface Card,NIC)等,本发明实施例对此不作限定。管理服务器101还可以包含存储设备用于存储网络引导程序310。The computer management system shown in FIG. 1 includes a computer 100 , a management server 101 and an operating system server 320 , and the computer 100 communicates with the management server 101 and the operating system server 320 . A network boot program 310 is stored on the management server 101 . The operating system server 320 stores the operating system 103, and the operating system 103 may be Windows or Linux or other operating systems, which is not limited in this embodiment. The computer 100 includes a hard disk 110 on which a boot loader 111 is stored. When the computer 100 is started from the hard disk 110 , the Basic Input/Output System (BIOS) 120 of the computer 100 reads the boot loader 111 stored on the hard disk 110 and runs the boot loader 111 . Here, the boot loader 111 may be a multi-operating system boot manager (GRand Unified Bootloader, GRUB) or a Linux loader (Linux Loader, LILO) or others, which is not limited in this embodiment. The structure of the management server 101 is shown in FIG. 2 , including a processor 201 and an interface 202 . Wherein, the processor 201 may include a central processing unit (Central Processing Unit, CPU) and a memory, where there may be one or more CPUs. The processor 201 may also be a Field Programmable Gate Array (Field Programmable Gate Array, FPGA), or a combination of FPGA and CPU. The interface 202 may be a network interface card (Network Interface Card, NIC), etc., which is not limited in this embodiment of the present invention. The management server 101 may also include a storage device for storing the network boot program 310 .
如图3所示,网络引导程序310上存储有操作系统服务器地址311,操作系统服务器地址311指向操作系统服务器320。计算机100根据网络引导程序310中存储的操作系统服务器地址311,与操作系统服务器320通信,获取操作系统103。As shown in FIG. 3 , an operating system server address 311 is stored on the network boot program 310 , and the operating system server address 311 points to the operating system server 320 . The computer 100 communicates with the operating system server 320 according to the operating system server address 311 stored in the network boot program 310 to acquire the operating system 103 .
本实施例提供一种安装操作系统的方法如图4所示。具体流程如下:This embodiment provides a method for installing an operating system, as shown in FIG. 4 . The specific process is as follows:
401,计算机100接收管理服务器101发送的网络引导程序310,并将网络引导程序310存储在硬盘110中第一地址指向的存储空间。其中网络引导程序310被编译为本实施例中启动加载器可识别的程序。401. The computer 100 receives the network boot program 310 sent by the management server 101, and stores the network boot program 310 in the storage space pointed to by the first address in the hard disk 110. The network boot program 310 is compiled into a program that can be recognized by the boot loader in this embodiment.
其中一种实现,管理服务器101的处理器201通过接口202向计算机100发送网络引导程序310,并确认该网络引导程序310存储于该硬盘110的第一地址指向的存储空间,该网络引导程序包含该操作系统服务器320的地址。In one implementation, the processor 201 of the management server 101 sends the network boot program 310 to the computer 100 through the interface 202, and confirms that the network boot program 310 is stored in the storage space pointed to by the first address of the hard disk 110, and the network boot program includes The address of the operating system server 320 .
402,计算机100将启动加载器111更新为启动加载器112,启动加载器112的首个启动项的启动地址为第一地址。首个启动项即为网络引导程序310。本发明实施例中将启动加载器111更新为启动加载器112,一种实现为启动加载器112相对启动加载器111为新的启动加载器,并且启动加载器112的首个启动项的启动地址为第一地址。另一种实现方式,为将启动加载器111的首个启动项的启动地址更新为第一地址得到启动加载器112。402. The computer 100 updates the boot loader 111 to the boot loader 112, and the boot address of the first boot item of the boot loader 112 is the first address. The first startup item is the network boot program 310 . In the embodiment of the present invention, the boot loader 111 is updated to the boot loader 112. One implementation is that the boot loader 112 is a new boot loader relative to the boot loader 111, and the boot address of the first boot item of the boot loader 112 as the first address. Another implementation manner is to update the boot address of the first boot item of the boot loader 111 to the first address to obtain the boot loader 112 .
其中一种实现,管理服务器101的处理器201通过接口202向计算机100发送第一指令,该第一指令用于指示计算机100更新启动加载器111更新为启动加载器112,确认计算机100成功将启动加载器111更新为启动加载器112,向计算机100发送第二指令,该第二指令用于重新启动计算机100。In one implementation, the processor 201 of the management server 101 sends a first instruction to the computer 100 through the interface 202, the first instruction is used to instruct the computer 100 to update the boot loader 111 to the boot loader 112, and confirm that the computer 100 successfully boots The loader 111 is updated to the boot loader 112 , and sends a second instruction to the computer 100 , where the second instruction is used to restart the computer 100 .
403,计算机100重新启动,从硬盘110启动启动加载器112。计算机100重新启动时,根据其启动方式,即从硬盘110启动,BIOS120在硬盘110中读取并启动加载器112。403 , the computer 100 is restarted, and the boot loader 112 is started from the hard disk 110 . When the computer 100 is restarted, according to its starting mode, that is, starting from the hard disk 110 , the BIOS 120 reads the hard disk 110 and starts the loader 112 .
404,计算机100根据启动加载器112从第一地址指向的存储空间启动网络引导程序310。启动加载器112启动后,BIOS120根据启动加载器112的首个启动项的启动地址执行首个启动项,即根据第一地址,启动第一地址指向的存储空间中存储的网络引导程序310。404. The computer 100 starts the network boot program 310 from the storage space pointed to by the first address according to the boot loader 112. After the boot loader 112 is started, the BIOS 120 executes the first boot item according to the boot address of the first boot item of the boot loader 112, that is, starts the network boot program 310 stored in the storage space pointed to by the first address according to the first address.
405,计算机100根据网络引导程序310中操作系统服务器320的地址311从操作系统服务器320获取操作系统103,将操作系统103安装到硬盘110的第二地址指向的存储空间。操作系统103安装的过程中,计算机100将启动加载器112更新为启动加载器113,其中启动加载器113的首个启动项的启动地址为第二地址。此时,硬盘110中存储的启动加载器113的首个启动项为安装好的操作系统103,当计算机100从硬盘启动时,BIOS120读取并运行启动加载器113,启动加载器113运行操作系统103。本发明实施例中将启动加载器112更新为启动加载器113,一种实现为启动加载器113相对启动加载器112为新的启动加载器,并且启动加载器113的首个启动项的启动地址为第二地址。另一种实现方式,为将启动加载器112的首个启动项的启动地址更新为第二地址得到启动加载器113。405 , the computer 100 obtains the operating system 103 from the operating system server 320 according to the address 311 of the operating system server 320 in the network boot program 310 , and installs the operating system 103 into the storage space pointed to by the second address of the hard disk 110 . During the installation of the operating system 103 , the computer 100 updates the boot loader 112 to the boot loader 113 , wherein the boot address of the first boot item of the boot loader 113 is the second address. At this time, the first boot item of the boot loader 113 stored in the hard disk 110 is the installed operating system 103. When the computer 100 starts from the hard disk, the BIOS 120 reads and runs the boot loader 113, and the boot loader 113 runs the operating system. 103. In the embodiment of the present invention, the boot loader 112 is updated to the boot loader 113. One implementation is that the boot loader 113 is a new boot loader relative to the boot loader 112, and the boot address of the first boot item of the boot loader 113 for the second address. Another implementation is to update the boot address of the first boot item of the boot loader 112 to the second address to obtain the boot loader 113 .
其中一种实现,管理服务器101的处理器201通过接口202向计算机100发送第三指令,该第三指令用于指示计算机100将启动加载器112更新为启动加载器113。In one implementation, the processor 201 of the management server 101 sends a third instruction to the computer 100 through the interface 202 , where the third instruction is used to instruct the computer 100 to update the boot loader 112 to the boot loader 113 .
计算机100检测操作系统系统103是否安装到硬盘100的第二地址指向的存储空间。若操作系统103安装失败,则计算机100重新启动,根据从硬盘110启动的模式,执行403-405流程,重新安装操作系统103。The computer 100 detects whether the operating system system 103 is installed in the storage space pointed to by the second address of the hard disk 100 . If the installation of the operating system 103 fails, the computer 100 is restarted, and according to the mode of booting from the hard disk 110, the process of 403-405 is executed to reinstall the operating system 103.
计算机100检测操作系统103成功安装至硬盘110的第二地址指向的存储空间,且启动加载器112更新为启动加载器113完成后,计算机100重新启动,根据从硬盘110启动的模式,启动并运行操作系统103。After the computer 100 detects that the operating system 103 is successfully installed to the storage space pointed to by the second address of the hard disk 110, and the bootloader 112 is updated to the bootloader 113, the computer 100 restarts, and starts and runs according to the mode of booting from the hard disk 110. operating system 103 .
本实施例的方法在实施过程中,该计算机的启动方式始终为从该硬盘启动,不需要更改启动方式。因此,管理服务器可以向多台待安装操作系统的计算机批量下发对应操作系统的网络引导程序,待安装操作系统的计算机通过本实施例中的方法可以实对应操作系统的安装。During the implementation of the method of this embodiment, the starting mode of the computer is always from the hard disk, and there is no need to change the starting mode. Therefore, the management server can distribute the network boot program corresponding to the operating system to multiple computers to be installed with the operating system in batches, and the computers to be installed with the operating system can implement the installation of the corresponding operating system through the method in this embodiment.
本发明实施例中计算机重新启动可以为计算机根据预置规则重新启动,也可以为接收管理服务器指令,重新启动。其中,计算机重新启动为计算机要所预置规则重新启动时,预置规则可以配置在BIOS120中。In the embodiment of the present invention, restarting the computer may be restarting the computer according to preset rules, or restarting after receiving an instruction from the management server. Wherein, the restart of the computer is when the computer requires the preset rule to restart, and the preset rule can be configured in the BIOS 120 .
与本发明实施例中的方法相对应,计算机100具体结构如图5所示,包括接收单元510、存储单元520、更新单元530、启动单元540、获取单元550和安装单元560。其中,接收单元510用于接收管理服务器101发送的网络引导程序310;存储单元520,用于将网络引导程序310存储在硬盘110中第一地址指向的存储空间;更新单元530,用于将启动加载器111更新为启动加载器112,启动加载112器的首个启动项的启动地址为第一地址;启动单元540,用于计算机110重新启动,包括从硬盘110启动加载器112,根据启动加载器112从第一地址指向的存储空间启动网络引导程序210;获取单元550,用于根据网络引导程序310中的操作系统服务器320的地址311从操作系统服务器320获取操作系统103;安装单元560,用于将操作系统103安装到硬盘110第二地址指向的存储空间;更新单元530,还用于安装单元560安装操作系统103时,将启动加载器112更新为启动加载器113,启动加载112器的首个启动项的启动地址为第二地址。Corresponding to the method in the embodiment of the present invention, the specific structure of the computer 100 is shown in FIG. Wherein, the receiving unit 510 is used to receive the network boot program 310 sent by the management server 101; the storage unit 520 is used to store the network boot program 310 in the storage space pointed to by the first address in the hard disk 110; The loader 111 is updated to the boot loader 112, and the boot address of the first boot item of the boot loader 112 is the first address; the boot unit 540 is used for restarting the computer 110, including starting the loader 112 from the hard disk 110, according to the boot loader. The device 112 starts the network boot program 210 from the storage space pointed to by the first address; the obtaining unit 550 is used to obtain the operating system 103 from the operating system server 320 according to the address 311 of the operating system server 320 in the network boot program 310; the installation unit 560, For installing the operating system 103 to the storage space pointed to by the second address of the hard disk 110; the update unit 530 is also used for updating the boot loader 112 to the boot loader 113 when the installation unit 560 installs the operating system 103, and the boot loader 112 The startup address of the first startup item of is the second address.
启动单元540,还用于操作系统103安装以及将启动加载器112更新为启动加载器113完成后,重新启动计算机100,根据启动加载器113从第二地址指向的存储空间启动操作系统230。The boot unit 540 is also used for installing the operating system 103 and updating the boot loader 112 to the boot loader 113 , restarting the computer 100 , and booting the operating system 230 from the storage space pointed to by the second address according to the boot loader 113 .
启动单元540,还用于操作系统103安装失败后,重新启动计算机100,根据启动加载器112从第二地址指向的存储空间启动网络引导程序310,重新安装操作系统103。The startup unit 540 is also used to restart the computer 100 after the installation of the operating system 103 fails, and start the network boot program 310 from the storage space pointed to by the second address according to the bootloader 112, so as to reinstall the operating system 103.
图5中所示的计算机100的具体实现可参考前面实施例中描述,其中各单元可以分别由对应的硬件芯片实现,如接收单元510对应接口卡芯片、存储单元520对应存储芯片、更新单元530对应更新芯片、启动单元540对应启动芯片、获取单元550对应获取芯片、安装单元560对应安装芯片。在另一种实现中,一个或多个单元可以集成在一个硬件芯片上。相应的,本发明实施例提供一种包含计算机指令的非易失性存储介质和计算机程序产品,计算机的处理器执行计算机指令用于实现本发明实施例所描述的方案。The specific implementation of the computer 100 shown in FIG. 5 can refer to the description in the previous embodiments, wherein each unit can be realized by a corresponding hardware chip, such as the receiving unit 510 corresponding to the interface card chip, the storage unit 520 corresponding to the storage chip, and the updating unit 530 Corresponding to the update chip, the startup unit 540 corresponds to the startup chip, the acquisition unit 550 corresponds to the acquisition chip, and the installation unit 560 corresponds to the installation chip. In another implementation, one or more units may be integrated on one hardware chip. Correspondingly, embodiments of the present invention provide a non-volatile storage medium containing computer instructions and a computer program product, and a processor of a computer executes the computer instructions to implement the solutions described in the embodiments of the present invention.
本发明实施例中计算机100的结构,另一种实现如图6所示,包含处理器601和接口602,其中,处理器601可以包含中央处理单元(Central Processing Unit,CPU)和存储器,其中CPU可以为一个或多个。处理器601还可以为现场可编程逻辑门阵列(FieldProgrammable Gate Array,FPGA),或FPGA与CPU的组合等,或者CPU与BIOS的组合。接口602可以为网络接口卡(Network Interface Card,NIC)等,本发明实施例对此不作限定。接口602用于接收管理服务器101发送的网络引导程序310,根据网络引导程序310中操作系统服务器320的地址311从操作系统服务器320获取操作系统103,处理器601用于执行图4所示的其他流程。本发明实施例对此不再赘述。Another implementation of the structure of the computer 100 in the embodiment of the present invention is shown in FIG. 6 , which includes a processor 601 and an interface 602, wherein the processor 601 may include a central processing unit (Central Processing Unit, CPU) and a memory, wherein the CPU Can be one or more. The processor 601 may also be a Field Programmable Gate Array (Field Programmable Gate Array, FPGA), or a combination of FPGA and CPU, or a combination of CPU and BIOS. The interface 602 may be a network interface card (Network Interface Card, NIC), etc., which is not limited in this embodiment of the present invention. The interface 602 is used to receive the network boot program 310 sent by the management server 101, obtain the operating system 103 from the operating system server 320 according to the address 311 of the operating system server 320 in the network boot program 310, and the processor 601 is used to execute other programs shown in FIG. 4 process. This embodiment of the present invention will not describe it in detail.
本发明实施例中的计算机的硬件架构可以为英特尔有限公司精简指令集处理器x86(Intel x86,x86)、Arm有限公司精简指令集处理器(advanced RISC Machines,ARM)、MIPS有限公司精简指令集处理器(million instructions per second,MIPS)、优化精简指令集处理器(performance optimization with enhanced RISC,PowerPC),本实施例对此不做限制。对于不同硬件架构的计算机,安装操作系统时,只需要为其下发与其硬件架构相对应的网络引导程序。待安装的操作系统包括但不限于Windows、Linux,本实施例对此不做限制。本发明实施例中的硬盘可以为物理硬盘,如机械硬盘或固态硬盘,也可以为逻辑单元(Logical Unit,LU)或卷。其中,LU又称为逻辑单元号。在虚拟化场景下,本发明实施例中的计算机也可以为虚拟机(Virtual Machine,VM),根据本发明实施例提供的方案,可以为虚拟机批量安装操作系统,而不需要人工频繁修改启动设置,从而实现为虚拟机批量安装操作系统。The hardware architecture of the computer in the embodiment of the present invention can be Intel Co., Ltd. RISC Processor x86 (Intel x86, x86), Arm Co., Ltd. RISC Machines (advanced RISC Machines, ARM), MIPS Co., Ltd. RISC A processor (million instructions per second, MIPS) and an optimized reduced instruction set processor (performance optimization with enhanced RISC, PowerPC), which are not limited in this embodiment. For computers with different hardware architectures, when installing the operating system, only the network boot program corresponding to the hardware architecture needs to be delivered to them. The operating systems to be installed include but are not limited to Windows and Linux, which are not limited in this embodiment. The hard disk in this embodiment of the present invention may be a physical hard disk, such as a mechanical hard disk or a solid state hard disk, or may be a logical unit (Logical Unit, LU) or a volume. Wherein, LU is also called a logical unit number. In a virtualization scenario, the computer in the embodiment of the present invention can also be a virtual machine (Virtual Machine, VM). According to the solution provided by the embodiment of the present invention, the operating system can be installed in batches for the virtual machine without frequent manual modification and startup. Settings, so as to implement batch installation of operating systems for virtual machines.
在本发明所提供的几个实施例中,应该理解到,所公开的装置、方法,可以通过其它的方式实现。例如,以上所描述的装置实施例所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the division of the units described in the above-described device embodiments is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or Some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
Claims (15)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710602781.5A CN107562466B (en) | 2017-07-21 | 2017-07-21 | Method and device for installing computer operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710602781.5A CN107562466B (en) | 2017-07-21 | 2017-07-21 | Method and device for installing computer operating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107562466A true CN107562466A (en) | 2018-01-09 |
CN107562466B CN107562466B (en) | 2021-01-08 |
Family
ID=60974269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710602781.5A Active CN107562466B (en) | 2017-07-21 | 2017-07-21 | Method and device for installing computer operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107562466B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1508697A (en) * | 2002-12-16 | 2004-06-30 | 联想(北京)有限公司 | Method and apparatus for realizing protection of computer operation system in hard disk |
CN1744040A (en) * | 2005-09-27 | 2006-03-08 | 胡元志 | Method for completely running operating system in multi storage media and its operating system |
CN105824678A (en) * | 2016-05-17 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Method and device for installing operating system |
-
2017
- 2017-07-21 CN CN201710602781.5A patent/CN107562466B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1508697A (en) * | 2002-12-16 | 2004-06-30 | 联想(北京)有限公司 | Method and apparatus for realizing protection of computer operation system in hard disk |
CN1744040A (en) * | 2005-09-27 | 2006-03-08 | 胡元志 | Method for completely running operating system in multi storage media and its operating system |
CN105824678A (en) * | 2016-05-17 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Method and device for installing operating system |
Also Published As
Publication number | Publication date |
---|---|
CN107562466B (en) | 2021-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11030047B2 (en) | Information handling system and method to restore system firmware to a selected restore point | |
US11550593B2 (en) | Information handling system quick boot | |
US11886903B2 (en) | Continuous uptime of guest virtual machines during upgrade of a virtualization host device | |
US9311119B2 (en) | Reconfiguring virtual machines | |
US9965304B2 (en) | Delayed hardware upgrades in virtualization systems | |
US9501289B2 (en) | Method of a UEFI firmware and computer system thereof | |
CN103412769B (en) | External card parameter configuration, equipment and system | |
US20200218527A1 (en) | Component firmware update from baseboard management controller | |
US8171276B2 (en) | Minimal startup mode for performing multiple-reboot configuration | |
US10303458B2 (en) | Multi-platform installer | |
US20060020845A1 (en) | Unattended BIOS recovery | |
US11194589B2 (en) | Information handling system adaptive component reset | |
US10725770B2 (en) | Hot-swapping operating systems using inter-partition application migration | |
US20140359617A1 (en) | Patching a Virtual Image | |
US11237837B2 (en) | System and method for managing devices during reboot | |
US20200241889A1 (en) | Methods and apparatus for hypervisor boot up | |
CN113342365A (en) | Operating system deployment method, device, equipment and computer-readable storage medium | |
US10491736B2 (en) | Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS | |
US11347494B2 (en) | Installing patches during upgrades | |
US11726852B2 (en) | Hardware-assisted paravirtualized hardware watchdog | |
US20240020103A1 (en) | Parallelizing data processing unit provisioning | |
CN107562466B (en) | Method and device for installing computer operating system | |
CN118369648A (en) | Data processing unit integration | |
US9405559B2 (en) | Efficient method of decoupling the downloading of a memory map and execution of a utility program contained in the memory map | |
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 |