CN106708579B - Method and device for installing operating system - Google Patents

Method and device for installing operating system Download PDF

Info

Publication number
CN106708579B
CN106708579B CN201611222169.7A CN201611222169A CN106708579B CN 106708579 B CN106708579 B CN 106708579B CN 201611222169 A CN201611222169 A CN 201611222169A CN 106708579 B CN106708579 B CN 106708579B
Authority
CN
China
Prior art keywords
assembling
raid
module
card
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611222169.7A
Other languages
Chinese (zh)
Other versions
CN106708579A (en
Inventor
刘京亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dawning Information Industry Co Ltd
Original Assignee
Dawning Information Industry 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 Dawning Information Industry Co Ltd filed Critical Dawning Information Industry Co Ltd
Priority to CN201611222169.7A priority Critical patent/CN106708579B/en
Publication of CN106708579A publication Critical patent/CN106708579A/en
Application granted granted Critical
Publication of CN106708579B publication Critical patent/CN106708579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • 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

Abstract

The invention provides a method and a device for installing an operating system, wherein the method comprises the following steps: sending a downloading request to the server, and receiving a system installation program, a first script and a second script returned by the server; assembling the RAID according to the first script, and automatically installing an operating system according to a system installation program; and configuring the operating system according to the second script. In the whole installation process of the operating system, the automatic installation and setting are realized, so that the manpower resource and the time resource are saved, in addition, the problems caused by manual operation are avoided due to the reduction of manual intervention, and the production efficiency and the first production pass yield of a factory are greatly improved.

Description

Method and device for installing operating system
Technical Field
The invention relates to the field of computers, in particular to a method and a device for installing an operating system.
Background
At present, when an operating system is installed, the operating system needs to be manually installed by using an optical drive, meanwhile, if a RAID (Redundant Arrays of Independent Disks) card or SAS (Serial Attached SCSI) array card is installed, a management interface needs to be manually accessed, then a RAID array is assembled according to corresponding requirements, if RAID is not manually assembled, the operating system cannot be installed, and in addition, after the system is installed, a service network, a management network, a host name and the like need to be manually set, which takes time and labor, so the installation method of the operating system cannot meet all requirements, for example, when the magnitude of servers reaches hundreds of thousands, a large amount of human resources and time resources need to be consumed, and therefore, the installation method cannot meet the requirement of work efficiency, because the number of servers for most users is not large, the cost of developing a set of automated RAID assembly software is also high.
An effective solution to the problems in the related art has not been proposed yet.
Disclosure of Invention
Aiming at the problems in the related art, the invention provides a method and a device for installing an operating system, which can realize automatic installation and setting in the whole installation process of the operating system, thereby saving human resources and time resources.
The technical scheme of the invention is realized as follows:
according to one aspect of the present invention, a method of installing an operating system is provided.
The method for installing the operating system comprises the following steps: sending a downloading request to the server, and receiving a system installation program, a first script and a second script returned by the server; assembling the RAID according to the first script, and automatically installing an operating system according to a system installation program; and configuring the operating system according to the second script.
According to one embodiment of the invention, assembling the disk array RAID according to the first script includes: judging whether an SAS card or an RAID card is installed; assembling a first disk array RAID under the condition that an SAS card is installed; and assembling the second disk array RAID under the condition that the RAID card is installed.
According to an embodiment of the present invention, assembling the first disk array RAID with the SAS card mounted includes: judging the number of hard disks related to the SAS card; assembling the hard disks into RAID1 under the condition that the number of the hard disks is not less than a threshold value; and when the number of the hard disks is less than the threshold value, assembling the disk array RAID is not carried out.
According to an embodiment of the present invention, the assembling of the second disk array RAID with the RAID card installed includes: acquiring first configuration information of a first configuration file; and assembling the disk array for the hard disk connected with the RAID card according to the first configuration information.
According to an embodiment of the present invention, configuring the operating system according to the second script includes: acquiring second configuration information of a second configuration file, wherein the second configuration information comprises a data network IP address and a management network IP address; setting the data network IP address according to the data network IP address; and setting the management network IP address according to the management network IP address.
According to another aspect of the present invention, there is provided an apparatus for installing an operating system.
The device for installing the operating system comprises: the download receiving module is used for sending a download request to the server and receiving a system installation program, a first script and a second script returned by the server; the installation module is used for assembling the RAID according to the first script and automatically installing the operating system according to a system installation program; and the configuration module is used for configuring the operating system according to the second script.
According to one embodiment of the invention, a mounting module comprises: the first judgment module is used for judging whether an SAS card or an RAID card is installed or not; the first assembling module is used for assembling the RAID of the first disk array under the condition that the SAS card is installed; and the second assembling module is used for assembling the second disk array RAID under the condition that the RAID card is installed.
According to one embodiment of the invention, the first assembly module comprises: the second judgment module is used for judging the number of the hard disks related to the SAS card; the first assembling submodule is used for assembling the hard disks into the RAID1 under the condition that the number of the hard disks is not less than a threshold value; and the second assembling submodule is used for not assembling the RAID under the condition that the number of the hard disks is less than the threshold value.
According to an embodiment of the present invention, the second assembly module includes: the first acquisition module is used for acquiring first configuration information of a first configuration file; and the third assembling submodule is used for assembling the disk array on the hard disk connected with the RAID card according to the first configuration information.
According to one embodiment of the invention, the configuration module comprises: the second obtaining module is used for obtaining second configuration information of a second configuration file, wherein the second configuration information comprises a data network IP address and a management network IP address; the first setting module is used for setting the data network IP address according to the data network IP address; and the second setting module is used for setting the management network IP address according to the management network IP address.
The invention has the following beneficial effects:
according to the invention, the downloading request is sent to the server, the system installation program, the first script and the second script returned by the server are received, then the RAID is assembled according to the first script, the operating system is automatically installed according to the system installation program, and finally the operating system is configured according to the second script, so that the automatic installation and setting are realized in the whole operating system installation process, thereby saving human resources and time resources.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a flow diagram of a method of installing an operating system according to an embodiment of the invention;
FIG. 2 is a detailed flow diagram of a method of installing an operating system according to an embodiment of the invention;
FIG. 3 is a flow diagram of assembling a disk array RAID according to an embodiment of the present invention;
FIG. 4 is a flow diagram of configuring an operating system according to an embodiment of the present invention;
fig. 5 is a block diagram of an apparatus to install an operating system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present invention.
According to an embodiment of the present invention, a method of installing an operating system is provided.
As shown in fig. 1, a method of installing an operating system according to an embodiment of the present invention includes:
step S101, sending a downloading request to a server, and receiving a system installation program, a first script and a second script returned by the server;
step S103, assembling the RAID according to the first script, and automatically installing an operating system according to a system installation program;
and step S105, configuring the operating system according to the second script.
According to the scheme of the invention, the downloading request is sent to the server, the system installation program, the first script and the second script returned by the server are received, then the RAID is assembled according to the first script, the operating system is automatically installed according to the system installation program, and finally the operating system is configured according to the second script, so that the automatic installation and setting are realized in the whole operating system installation process, the human resources and the time resources are saved, in addition, the problem caused by manual operation is avoided due to the reduction of manual intervention, and the production efficiency and the production through rate of a factory are greatly improved.
According to one embodiment of the invention, assembling the disk array RAID according to the first script includes: judging whether an SAS card or an RAID card is installed; assembling a first disk array RAID under the condition that an SAS card is installed; and assembling the second disk array RAID under the condition that the RAID card is installed.
According to an embodiment of the present invention, assembling the first disk array RAID with the SAS card mounted includes: judging the number of hard disks related to the SAS card; assembling the hard disks into RAID1 under the condition that the number of the hard disks is not less than a threshold value; and when the number of the hard disks is less than the threshold value, assembling the disk array RAID is not carried out.
According to an embodiment of the present invention, the assembling of the second disk array RAID with the RAID card installed includes: acquiring first configuration information of a first configuration file; and assembling the disk array for the hard disk connected with the RAID card according to the first configuration information.
According to an embodiment of the present invention, configuring the operating system according to the second script includes: acquiring second configuration information of a second configuration file, wherein the second configuration information comprises a data network IP address and a management network IP address; setting the data network IP address according to the data network IP address; and setting the management network IP address according to the management network IP address.
In order to better describe the present invention, the following detailed description is given by way of specific examples.
As shown in fig. 2, the present invention uses a server as a carrier, where the server is a PXE (Preboot execution Environment) server, downloads two scripts (raid.sh and autoset ip.sh) from the server by using an FTP (File Transfer Protocol) Protocol and a startup script configuration File (namely, KS File) through an Initrd (Linux initial RAM disk) temporary root File system at a client, performs RAID assembly through the script.
The installation of the operating system is generally divided into two parts: RAID assembly and setting of system data network IP address and management network IP address, as shown in fig. 3, the system automatically determines whether the client has an SAS card and an RAID card, and if the client is installed as an SAS card, the processing flow is as follows:
the client side can automatically judge the number of the SAS card associated hard disks, if the number of the hard disks is more than or equal to 2, the client side can assemble the first two hard disks of the physical address and assemble the hard disks into RAID1 (independent disk array), wherein RAID1 realizes data redundancy through disk data mirroring, and data which are mutually backed up are generated on paired independent disks; if the number of hard disks is <2, the client does not need to do RAID.
Further, as shown in fig. 3, in the case of being installed as the RAD card, the processing flow is as follows:
the method comprises the steps of supporting an N + N mode, namely supporting the combination of a plurality of RAD cards and a plurality of hard disks, and judging the number of the RAD cards and the hard disks; and assembling the corresponding disk array RAID according to the requirements of the configuration file by using all hard disks connected with the RAID card pair, wherein the disk array RAID can be set to different levels.
Further, as shown in fig. 3, the operating system is directly installed without the SAS card and the RAID card.
In addition, as shown in fig. 4, after the operating system is installed, the client automatically downloads the autoset ip.sh and the configuration file (configuration file) from the server after the system is installed, and automatically runs the autoset ip.sh after the downloading is completed, and after the autoset ip.sh is run, the following steps are performed:
the system can automatically judge that the network port connected with the network cable is an Ethernet port;
the system will read the configuration file to judge the IP address of each server, wherein the file needs to be written manually, the writing order is written according to the format of SN (server serial number), data network IP address, management network IP address, HOSTNAME, such as 01234567891.1.1.11.2.1.1 Node1 (Node 1), wherein the server serial number is 0123456789, the solid IP of the data network is 1.1.1.1, the solid IP of the management network is 1.2.1.1, the HOSTNAME is Node 1;
according to the configuration file, the system modifies the IP of the port of the corresponding data network;
according to the configuration file, the system configures the corresponding management IP for the port of the management network.
Furthermore, the protocol of the present invention can be compared to the protocol of the prior art, as shown in table 1.
Figure BDA0001192844680000061
TABLE 1
If 100 servers are configured at the same time, as shown in table 1, the configuration of 100 servers by the conventional method is as follows:
when the disk array RAID is manually built, the method comprises the following steps: 5 minutes 100 ═ 500 minutes;
when the operating system is manually installed: 40 min 100-4000 min;
when the data IP is manually configured and the network IP is managed: 6 min 100-600 min;
to sum up, when the server 100 is configured by the conventional method: (500+4000+600)/60 ═ 85 hours.
As shown in table 1, the configuration of 100 servers according to the present invention is as follows:
and meanwhile, when RAID (redundant array of independent disk) of 100 servers is performed: 10 seconds;
when the system is installed for 100 servers at the same time: 1800 seconds;
when the configuration of data IP and management network IP is carried out on 100 servers at the same time: 10 seconds;
to sum up, when the method of the present invention is used to configure 100 servers: (10+1800+10)/3600 ═ 0.51 hours.
Therefore, the comparison of 100 servers shows that the traditional method needs 85 hours, but the method only needs 0.51 hour, and in the whole installation process, the automatic setting is completely realized, the time and the labor are saved, meanwhile, the problems of manual setting errors and the like are avoided due to the reduction of manual intervention, and the production efficiency and the production first pass rate of a factory are greatly improved.
According to an embodiment of the invention, an apparatus for installing an operating system is also provided.
As shown in fig. 5, an apparatus for installing an operating system according to an embodiment of the present invention includes:
the download receiving module 51 is configured to send a download request to the server, and receive a system installation program, a first script, and a second script returned by the server; the installation module 52 is used for assembling the RAID according to the first script and automatically installing the operating system according to the system installation program; and a configuration module 53, configured to configure the operating system according to the second script.
According to one embodiment of the present invention, the installation module 52 includes: a first judgment module (not shown) for judging whether an SAS card or a RAID card is mounted; a first assembling module (not shown) for assembling the first disk array RAID with the SAS card installed; and a second assembling module (not shown) for assembling the second disk array RAID with the RAID card installed.
According to one embodiment of the invention, the first assembly module comprises: a second judging module (not shown) for judging the number of hard disks associated with the SAS card; a first assembling submodule (not shown) for assembling the hard disks into RAID1 in a case where the number of hard disks is not less than a threshold value; and a second assembling submodule (not shown) for not assembling the disk array RAID in the case where the number of hard disks is less than the threshold value.
According to an embodiment of the present invention, the second assembly module includes: a first obtaining module (not shown) for obtaining first configuration information of the first configuration file; and a third assembling submodule (not shown) for assembling the disk array to the hard disk connected with the RAID card according to the first configuration information.
According to one embodiment of the invention, the configuration module 53 comprises: a second obtaining module (not shown) configured to obtain second configuration information of a second configuration file, where the second configuration information includes a data network IP address and a management network IP address; a first setting module (not shown) for setting the data network IP address according to the data network IP address; and a second setting module (not shown) for setting the management network IP address according to the management network IP address.
In summary, according to the above technical solution of the present invention, a download request is sent to a server, a system installation program, a first script, and a second script returned by the server are received, then, according to the first script, RAID is assembled, according to the system installation program, an operating system is automatically installed, and finally, according to the second script, configuration of the operating system is performed, so that in the whole operating system installation process, automatic installation and setting are achieved, thereby saving human resources and time resources, and in addition, because manual intervention is reduced, problems caused by manual operation are avoided, and production efficiency and production throughput of a factory are greatly improved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method of installing an operating system, comprising:
sending a downloading request to a server, and receiving a system installation program, a first script and a second script returned by the server;
judging whether an SAS card or an RAID card is installed;
if the SAS card or the RAID card is installed, assembling the RAID according to the first script, wherein the assembling comprises the following steps:
under the condition that the SAS card is installed, assembling a first disk array RAID, wherein the assembling comprises judging the number of hard disks related to the SAS card, assembling the hard disks into RAID1 under the condition that the number of the hard disks is not less than a threshold value, and not assembling the disk array RAID under the condition that the number of the hard disks is less than the threshold value;
assembling a second disk array RAID under the condition that the RAID card is installed;
automatically installing the operating system according to the system installation program;
if no SAS card or RAID card is installed, automatically installing the operating system directly according to the system installation program; and
and configuring the operating system according to the second script.
2. The method of claim 1, wherein assembling a second disk array RAID with the RAID card installed comprises:
acquiring first configuration information of a first configuration file;
and assembling the disk array on a hard disk connected with the RAID card according to the first configuration information.
3. The method of claim 1, wherein configuring the operating system according to the second script comprises:
acquiring second configuration information of a second configuration file, wherein the second configuration information comprises a data network IP address and a management network IP address;
setting the data network IP address according to the data network IP address;
and setting the management network IP address according to the management network IP address.
4. An apparatus for installing an operating system, comprising:
the system comprises a download receiving module, a download processing module and a download processing module, wherein the download receiving module is used for sending a download request to a server and receiving a system installation program, a first script and a second script which are returned by the server;
the first judgment module is used for judging whether an SAS card or an RAID card is installed or not;
if the SAS card or the RAID card is installed, the installation module is used for assembling the RAID according to the first script and automatically installing the operating system according to the system installation program; if no SAS card or RAID card is installed, the operating system is automatically installed directly according to the system installation program;
the installation module includes:
the first assembling module is used for assembling the RAID under the condition that the SAS card is installed; the first assembly module comprises a second judgment module used for judging the number of the hard disks related to the SAS card; the first assembling module further comprises a first assembling submodule for assembling the hard disks into the RAID1 when the number of the hard disks is not less than a threshold value; the first assembly module further comprises a second assembly sub-module, which is used for not assembling the disk array RAID under the condition that the number of the hard disks is smaller than the threshold value;
the second assembling module is used for assembling a second disk array RAID under the condition that the RAID card is installed;
and the configuration module is used for configuring the operating system according to the second script.
5. The apparatus of claim 4, wherein the second assembly module comprises:
the first acquisition module is used for acquiring first configuration information of a first configuration file;
and the third assembling submodule is used for assembling the disk array on the hard disk connected with the RAID card according to the first configuration information.
6. The apparatus of claim 4, wherein the configuration module comprises:
the second obtaining module is used for obtaining second configuration information of a second configuration file, wherein the second configuration information comprises a data network IP address and a management network IP address;
the first setting module is used for setting the data network IP address according to the data network IP address;
and the second setting module is used for setting the management network IP address according to the management network IP address.
CN201611222169.7A 2016-12-27 2016-12-27 Method and device for installing operating system Active CN106708579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611222169.7A CN106708579B (en) 2016-12-27 2016-12-27 Method and device for installing operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611222169.7A CN106708579B (en) 2016-12-27 2016-12-27 Method and device for installing operating system

Publications (2)

Publication Number Publication Date
CN106708579A CN106708579A (en) 2017-05-24
CN106708579B true CN106708579B (en) 2021-02-26

Family

ID=58903507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611222169.7A Active CN106708579B (en) 2016-12-27 2016-12-27 Method and device for installing operating system

Country Status (1)

Country Link
CN (1) CN106708579B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108459822B (en) * 2017-07-28 2020-05-12 新华三信息技术有限公司 Installation method and device of operating system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103746833A (en) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 PXE-based RAID automatic configuration method and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2547630A1 (en) * 2003-11-26 2005-06-16 Hewlett-Packard Development Company, L.P. System and method for management and installation of operating system images for computers
CN103927126B (en) * 2013-07-18 2016-10-12 詹明德 The collocation method of a kind of Disk Array and assembling and disk insertion process method
CN104360883B (en) * 2014-11-12 2018-03-09 浪潮(北京)电子信息产业有限公司 A kind of configuration Raid method and system
CN105656970A (en) * 2014-11-24 2016-06-08 中国移动通信集团公司 RAID (Redundant Array of Independent Disk) card configuring method and system and relevant device
CN105242875A (en) * 2015-09-17 2016-01-13 浪潮集团有限公司 Server raid batch configuration method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103746833A (en) * 2013-12-25 2014-04-23 新浪网技术(中国)有限公司 PXE-based RAID automatic configuration method and system

Also Published As

Publication number Publication date
CN106708579A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US7895428B2 (en) Applying firmware updates to servers in a data center
CN103746833B (en) PXE-based RAID automatic configuration method and system
US8332496B2 (en) Provisioning of operating environments on a server in a networked environment
US10936295B2 (en) Software update system
US10394573B2 (en) Host bus adapter with built-in storage for local boot-up
US20100217944A1 (en) Systems and methods for managing configurations of storage devices in a software provisioning environment
US20110093850A1 (en) Dynamic and automatic colocation and combining of service providers and service clients in a grid of resources
US20070118654A1 (en) Method and apparatus for provisioning heterogeneous operating systems onto heterogeneous hardware systems
CN1407441A (en) System and method for automatic management computer service and programmable device
US10430082B2 (en) Server management method and server for backup of a baseband management controller
CN101788917A (en) Deployment method of utility software and the system thereof
US20040255110A1 (en) Method and system for rapid repurposing of machines in a clustered, scale-out environment
US11132191B2 (en) Software and firmware updates of computing systems
CN111930396B (en) Upgrading method of communication module in 4G router based on notify mechanism
CN105430096A (en) Automatic installation method and device for parallel file system
US20100082812A1 (en) Rapid resource provisioning with automated throttling
US8090833B2 (en) Systems and methods for abstracting storage views in a network of computing systems
CN106708579B (en) Method and device for installing operating system
CN1592231A (en) Maintaining unit structure of high extending internet superserver and its method
US20150220350A1 (en) Information processing device and method for managing information processing device
CN109783026A (en) A kind of method and device of automatic configuration server RAID
CN113626183A (en) Cluster construction method and device based on super-fusion infrastructure
CN101577701A (en) Method for initializing disk drive in batches
CN110688130A (en) Physical machine deployment method, physical machine deployment device, readable storage medium and electronic equipment
CN107861761B (en) Starting method and system of physical host

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant