Summary of the invention
One of technical matters to be solved by this invention is need to provide a kind of to need not just can be rapidly the Godson platform (SuSE) Linux OS network installation method of a plurality of main frame installing operating systems by third party's reflect tool.
In order to solve the problems of the technologies described above, the invention provides (SuSE) Linux OS network installation method in a kind of Godson platform.The method comprises:
Configuration step, configuration file is set, and described configuration file be used for to activate each and wants network interface card, the remote loading of the computing machine of installing operating system to be positioned at kernel file under the first set path of the designated computer that is provided with nfs server and installation environment file and based on the kernel file startup kernel of remote loading;
The first copy step, described configuration file is copied to respectively can be by the described computing machine that each want installing operating system by PMON directly on the medium of access, and the PMON of computing machine that then will installing operating system is configured to start from above-mentioned medium;
The second copy step, with kernel file and installation environment file copy to the first set path of the described designated computer that is provided with nfs server;
Installation steps, want the computing machine of installing operating system to power on for described each, described each wants the computing machine of installing operating system to guide and move described configuration file by PMON, come installing operating system with the file based on remote loading under the first set path of the described designated computer that is provided with nfs server, the file of described remote loading comprises kernel file and installation environment file.
Further, comprise the instruction that proceeds as follows in the described configuration file:
Arrange described configuration file place main frame the IP address, activate the network interface card of described designated computer and make it the networking;
Described configuration file place main frame remote loading is described wants kernel file and the installation environment file under the first set path in the computing machine of installing operating system;
Described configuration file place main frame starts kernel based on the kernel file of remote loading.
Further, the file based on remote loading under the first set path of the described designated computer that is provided with nfs server comes the step of installing operating system to comprise described in the described installation steps:
After described configuration file place main frame started kernel based on described configuration file, kernel was finished whole installation process by the installation procedure of carrying out in the installation environment file.
In addition, in described the second copy step, can be with described kernel file, installation environment file copy to described the first set path of wanting the computing machine of installing operating system, wherein the installation environment file comprises installation interface program, installation script file and installation procedure.
In the described installation steps, described file based on remote loading under the first set path of the described designated computer that is provided with nfs server comes the step of installing operating system further to comprise: after described configuration file place main frame starts kernel based on described configuration file, kernel is carried out the installation interface program in the installation environment file, described installation interface program display installation progress is also called installation procedure again, to finish whole installation process.
Further, described installation procedure can comprise and proceeds as follows one or more in the instruction: the instruction of format partitioning instruction, the instruction that is used for the formatted subregion of carry, the instruction that is used for the copy system compressed package, this compressed package of decompress(ion), be used for pre-configured fstab file instruction, be used for the os starting setting instruction, be used for unloading the instruction of formatted subregion.
In addition, this method also comprises: giving before described each described computing machine of wanting installing operating system powers on, in the described computing machine of wanting installing operating system the PMON configuration file is set, and PMON is being set to from storing the medium activated of described configuration file; And, in described the second copy step, come remote loading file under the first specified path of the described designated computer that is provided with nfs server by accessing path that the described designated computer network that is provided with nfs server shares.
In addition, in described the second copy step, can be with the kernel file after the compression and installation environment file copy to described the first set path that is provided with the designated computer of nfs server; In the described installation steps, after powering on for each described computing machine of wanting installing operating system, each described computing machine of installing operating system of wanting guides and moves described configuration file by PMON, the file that decompresses first and load under the first specified path of the described designated computer that is provided with nfs server is finished installation based on the file of remote loading under the first specified path of the described designated computer that is provided with nfs server after decompressing again.
Compared with prior art, one or more embodiment of the present invention can have following advantage: can be in situation about need not by third party's reflect tool, can be rapidly a plurality of main frame installing operating systems.
Other advantages of the present invention, target, to set forth in the following description to a certain extent with feature, and to a certain extent, based on being apparent to those skilled in the art to investigating hereinafter, perhaps can obtain from the practice of the present invention instruction.Target of the present invention and other advantages can be passed through following instructions, claims, and the specifically noted structure realizes and obtains in the accompanying drawing.
Embodiment
Describe embodiments of the present invention in detail below with reference to drawings and Examples, how the application technology means solve technical matters to the present invention whereby, and the implementation procedure of reaching technique effect can fully understand and implements according to this.Need to prove that only otherwise consist of conflict, each embodiment among the present invention and each feature among each embodiment can mutually combine, formed technical scheme is all within protection scope of the present invention.
In addition, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out step shown or that describe with the order that is different from herein.
Step S110 arranges configuration file.Described configuration file is used for, activate the network of each computing machine of wanting installing operating system (hereinafter to be referred as host B), loading is positioned at kernel file and the installation environment file under the first set path of the designated computer (hereinafter to be referred as host A, also being called for short designated computer) that is provided with nfs server.Wherein, the installation environment file can comprise installation interface program, installation script file and installation procedure etc., and wants the computer based of installing operating system to start kernel in the kernel file of remote loading by each.
Do not lose usually, the filename of kernel file can be vmlinuz, installation interface program and installation script file and installation procedure etc. is compressed to (but file of called after initrdn.img) in the file, as the installation environment file.Wherein, the installation interface program is optional, if do not need installation interface, then the installation interface program does not need to be compressed in the file of file initrdn.img by name.
It below is a configuration file example.This configuration file relates generally to following several: (being that IP gives an example with 192.168.2.123 here)
ifaddr?em0192.168.2.123
load?tftp://192.168.2.23/xx/vmlinuz
initrd?tftp://192.168.2.23/xx/initrdn.img
g?console=tty?rdinit=/sbin/init?ip=dhcp
nfs_dir=192.168.2.23:/patch/to/nk6-mips-64.tar.gz?lang=en_US
keymap=us
Related description to this configuration file is as follows:
" ifaddr " order is used for IP is set, and the IP address of host B is set to 192.168.2.123.The load order is used for loading the far-end kernel vmlinuz that is positioned under the tftp: // 192.168.2.23/xx/ by the ftp agreement, and wherein 192.168.2.23 is the IP address of host A; The initrd order is used for loading the far-end installation environment file initrdn.img that is positioned under the tftp: // 192.168.2.23/xx/; Last column order is used for importing into parameter, in this parameter that can import into following several (content of " * * * " hereinafter for arranging as required) is arranged:
Console=***---specify the PMON control desk
The path of the init program that rdinit=/path/to/init-given core is called after starting
Ip=dhcp nfs_dir=ip:/path/to/nfs_dir---be provided with the first specified path of the designated computer of nfs server
Lang=***---language is set, has bilingual optional herein: en_US.UTF-8, zh_CN.UTF-8
Keymap=***-arrange keyboard, operated by rotary motion KEYBUS us.
Wherein parameter c onsole=tty is optional.Because the difference of PMON (Prom Monitor is as the Basic Input or Output System (BIOS) of Godson platform) version may be not necessarily, necessary this parameter of adding in than the PMON of lowest version, otherwise can cause PMON to start unsuccessfully; In the PMON of higher-version, can ignore this parameter.Other parameter is necessary.
PMON installs and starts kernel after mentioned order is finished loading.
Step S120 is copied to each computing machine of wanting installing operating system (abbreviation host B) with described configuration file.More specifically, can with configuration file respectively (by copying) be placed on the direct medium of accessing of the computing machine B that can be wanted installing operating system (on the hard disk such as the computing machine B that wants installing operating system), the PMON of computing machine that then will installing operating system is configured to from above-mentioned medium activated.
Step S130 will be for the kernel file of installing operating system and installation environment file copy the first set path (being the first set path that arranges at above-mentioned configuration file) to host A.
Step S140 powers on for each host B, and each host B is by PMON guiding and running configuration file, comes installing operating system based on kernel file, the installation environment file of remote loading under the first specified path of host A.Wherein, PMON is an Open Source Code Software that has BIOS and boot loader partial function concurrently.
Particularly, each host B is carried out following substep S1401 to S1403 by each instruction in the running configuration file:
Step S1401 arranges the IP address of host B, and the network interface card of active host B also makes it networking;
Step S1402, the kernel file in the host B remote loading host A under the first set path, installation environment file.
For example, can before step S140, in host A, arrange and start nfs server, to allow kernel file, the installation environment file under the first set path in the host B access to netwoks host A.
NFS be on network with the network file system(NFS) (Network FileSystem) of other people share directory and file.By using NFS, user and program can be accessed the file on the REMOTE MACHINE that nfs server is installed as accessing local file.In other words, after nfs server is set, can (for example be mounted to local machine to the file of the distance host (for example host A) that is provided with the NFS service by procotol, certain host B), so, host B just can have been accessed the file on the distance host A as access the machine file.
Can be as follows be equipped with in the host A of (SuSE) Linux OS one server is set, this host A is can be the computer equipments such as X86, Godson:
1, create the first specified path at machine A, as/root/nfs-loongson;
2, the compressed package of copy Godson system
* .tar.gz is to this catalogue;
3, on the editor machine A/and the etc/exports file, delegation below adding:
/root/nfs-loongson*(rw,sync,no_root_squash)
4, fill order in terminal: servicenfs start;
5, nfs success to be opened, the NFS service end is ready.
Certainly, the above just can allow a kind of mode of the file under the first set path in the host B access host A, but is not limited to this mode, and the mode of other various permission one host access strange land main frame Files all can.
Step S1403, host B starts kernel vmlinuz based on the kernel file of remote loading.
After described configuration file place main frame starts kernel based on described configuration file, come the step of installing operating system among the execution in step S140 based on the file of remote loading under the first set path of the described designated computer that is provided with nfs server.In a kind of mode, this step can specifically comprise: kernel vmlinuz calls the installation interface program, installation interface program prompts installation progress, and the installation interface program is also called the installation procedure in the installation environment file, to finish whole installation process.
More specifically, installation procedure comprises the instruction that proceeds as follows:
A) format partitioning instruction.For example, by " mkfs.ext3/dev/sd* " instruction (content in " * " can be set as required, and is lower same), with creating a subregion in formatting hard disk and the hard disk after format, the zoned format that creates is turned to the ext3 form.
B) be used for the instruction of the formatted subregion of carry.For example, be mounted to specified path by " mount/dev/sd*/mnt/local ", as the destination path of installing operating system.
C) be compressed with the instruction of the system compresses bag of kernel file and installation environment file, the instruction of this compressed package of decompress(ion) for copying in it, for example, will also install from system compresses bag (being compressed with kernel file and installation environment file in the it) decompress(ion) that machine A obtains by " tar-xvf*.tar.gz-C/mnt/local ".
D) be used for pre-configured fstab file instruction, be used for the instruction that os starting arranges, such as revising the file such as boot.cfgboot.cong.
E) be used for unloading the instruction etc. of formatted subregion, for example carry out this operation by " umount/mnt/local ".
Need to prove, in step S130, can be with kernel file, installation environment file copy after the compression the first set path to host A, and in step S140, after powering on for each host B, each host B is by PMON guiding and running configuration file, and the kernel file, the installation environment file that decompress first and load under the first specified path of host A are finished installation based on the kernel file, the installation environment file that load under the first specified path of host A after decompressing again.
In the above steps, the installation interface program is used for presenting current installation progress to the user, is optional.
In another kind of mode, in the situation that the installation interface program is not set, file based on remote loading under the first set path of the described designated computer that is provided with nfs server comes the step of installing operating system specifically to comprise: after starting kernel vmlinuz, kernel vmlinuz no longer calls the installation interface program in the installation environment file, finish whole installation process but directly call the installation procedure of carrying out in the installation environment file, to finish whole installation process.Although this mode has reduced effect of visualization because showing without the interface, also can be a plurality of host B installing operating systems rapidly.
According to installation method of the present invention, the file of using in the installation process is left on certain specified machine, during installation only need to in advance ready configuration file put into each computing machine to be installed, and so that each computing machine to be installed and designated computer network connection.Next just only need to press opening computer key to be installed, just can automatically finish the whole process of installation.
Need to prove that the alleged computing machine of the present invention comprises the various smart machines that utilize the standby computing power of preparation implement, such as desktop computer, notebook computer and smart mobile phone etc.
Incidentally, the host A for the Godson platform is that example describes.Initrd.img file and the kernel file that can utilize Ana-conda to generate to be applicable to the Godson platform.
Those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Although the disclosed embodiment of the present invention as above, the embodiment that described content just adopts for the ease of understanding the present invention is not to limit the present invention.Technician in any the technical field of the invention; under the prerequisite that does not break away from the disclosed spirit and scope of the present invention; can do any modification and variation in the details that reaches of implementing in form; but scope of patent protection of the present invention still must be as the criterion with the scope that appending claims was defined.