Remote installation method of operating system suitable for domestic processor
Technical Field
The invention belongs to the technical field of computer software, and relates to a remote installation method of an operating system suitable for a domestic processor.
Background
Organizations and research institutes such as companies or parties are often faced with: when a batch of computers is newly purchased or existing machines are simultaneously replaced by operating systems, the number of the computers needing to be upgraded is dozens, hundreds, thousands or even tens of thousands of computers. Such a large number of machines takes a lot of time and labor if installed manually one by one.
Meanwhile, with the updating and upgrading of computer products and the development of IT enterprises, the types of computers of a company are more and more, and hard disks are different, so that the types of installing operating systems are different, and some need to install windows, some need to install linux, some need to install desktop versions, some need to install server versions and the like. Therefore, it is necessary to develop a method capable of supporting remote installation of a plurality of operating system types at the same time.
Currently, the way of installing the operating system remotely is mainly based on PXE (Pre-boot Execution Environment). PXE is a protocol designed by Intel that enables computers to boot over a network. The protocol is divided into a client and a server, the PXE client is arranged in a ROM of the network card, when the computer is booted, the BIOS calls the PXE client into a memory to execute, and displays a command menu, and after the user selects the command menu, the PXE client downloads an operating system arranged at a far end to the local through a network to run. The method for remotely installing the operating system is based on most of the existing methods, such as Remote Installation Service (RIS) and the like.
The existing method for remotely installing the operating system cannot install different operating systems according to the type of the hardware platform. The address of the TFTP server for sending the request by the current PXE client is fixed, and different TFTP servers cannot be accessed according to the type of the hardware platform, so that various operating systems of different types cannot be installed.
Disclosure of Invention
In view of this, the present invention provides a remote operating system installation method suitable for a domestic processor, which is used to solve the operating system installation problem of various hardware platforms.
In order to achieve the purpose, the technical scheme of the invention is as follows: the method comprises the following steps:
step one, the pre-boot execution environment PXE client side sends a request to a dynamic host configuration protocol DHCP server.
And step two, the DHCP server sends out providing information which comprises the IP address distributed for the PXE Client.
Step three, sending a communication data packet to a TFTP routing server in a unified extensible firmware interface basic input system UEFI BIOS, wherein the communication data packet comprises hardware platform information; the hardware platform information identifies the type of an operating system required by the hardware platform, and the hardware platform information is dynamically acquired in the UEFI BIOS starting process.
And step four, pre-configuring the starting path of the operating system identified in the hardware platform information in the TFTP routing server, and returning the installation path of the operating system to the PXE client after the TFTP routing server receives the communication data packet in the UEFI BIOS.
And step five, after receiving the installation path, the PXE client sends a downloading request to a Boot Server.
And step six, the Boot Server responds to the downloading request of the PXE client and transmits the file necessary for starting the installation program to the PXE client, and the PXE client starts a Boot kernel of the installation program of the operating system according to a Boot sequence defined in the file necessary for starting the installation program.
And seventhly, after the booting kernel of the operating system installation program is started successfully, downloading the automatic response file from the position where the automatic response file is configured in advance by the PXE client.
And step eight, the PXE client finds the server to which the operating system belongs through the automatic response file, and downloads the software package required in the operating system installation process.
Further, in the third step, the UEFI BIOS sends a communication data packet to the TFTP routing server in the form of a simple user datagram protocol UDP; and in the fourth step, after the TFTP routing server receives the communication data packet in the UEFI BIOS, returning the installation path of the operating system to the PXE client in the form of UDP.
Has the advantages that:
the address of the TFTP server for sending the request by the PXE client is not fixed, and different TFTP servers can be accessed according to the type of the hardware platform, so that various operating systems of different types can be installed.
Drawings
FIG. 1 is a flow chart of a remote install operating system suitable for a domestic processor.
Detailed Description
The invention is described in detail below by way of example with reference to the accompanying drawings.
Step one, the PXE Client sends a request to the DHCP. First, the BIOS of a client of a Network Interface Card (NIC) supporting PXE is set to network boot, and a broadcast request is sent in UDP (simple user datagram protocol) through a PXE BootROM (self-boot chip), so as to ask for information such as an IP address from a DHCP server in a network.
And step two, the DHCP server provides information. The DHCP server receives the request of the Client, verifies whether the request comes to a legal PXE Client, and verifies that a providing response is sent to the Client through the request, wherein the providing response comprises the IP address allocated to the Client.
And step three, sending a communication data packet to the TFTP routing server in the UEFI BIOS, wherein the content in the data packet comprises hardware platform information and the like, and the type of the operating system required by the hardware platform can be identified. The platform information is dynamically acquired during the BIOS startup process.
Step four, an operating system starting path corresponding to the hardware identifier in the step four is configured in advance in the TFTP routing server, and the operating system starting path is returned to the operating system path installed on the PXE client after the server receives the request information in the BIOS.
In the third step, the UEFI BIOS sends a communication data packet to the TFTP routing server in a form of a simple user datagram protocol UDP; and in the fourth step, after the TFTP routing server receives the communication data packet in the UEFI BIOS, returning the installation path of the operating system to the PXE client in the form of UDP.
And step five, the PXE client requests to download the starting file. After receiving the "response" from the server, the client responds with a frame to request the transmission of the file required for starting.
And step six, the Boot Server responds to the client request and transmits the file. BootROM downloads files (pxelinux.O, pxelinux.cfg/default) necessary for starting an installation program from a Boot Server by a TFTP communication protocol. After downloading the default file, booting kernels of different operating system installation programs are started according to the booting sequence defined in the file.
And step seven, requesting to download the automatic response file. After the client successfully boots the Linux installation kernel through the pxelinux.cfg/default file, the installer must first determine what installation medium to install Linux, and if installation is through network (NFS, FTP, HTTP, SMB), initialize the network at this time, and locate the installation source location. The method adopts an unattended installation method, the position of the automatic response file ks.cfg is configured in advance, and the file is downloaded according to the position request.
And step eight, installing an operating system at the client. And after the ks.cfg file is downloaded back, finding the OS Server through the file, and downloading the software package required by the installation process according to the configuration request of the file.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.