Disclosure of Invention
The application provides a method for automatically installing a Windows operating system, which aims to solve the technical problem that the solid state disk in the prior art is low in testing work efficiency.
In order to solve the technical problem, the embodiment of the application discloses the following technical scheme:
the embodiment of the application discloses a method for automatically installing a Windows operating system, which is applied to SSD test, wherein an SSD is connected with a mainboard, the mainboard is connected with a server through a network, a plurality of Windows operating system installation files with different versions and a device driver software compression package are configured in the server, and the method comprises the following steps:
step S01: entering a partition format of the SSD, activating the partitions, and setting a first partition as a main partition, wherein the main partition is a system starting partition;
step S02: the main board obtains the Windows operating system installation files in an HTTP mode, kernel files in the Windows operating system installation files are applied to the main partition, and system boot files are added to the main partition;
step S03: the main board obtains the device driver software compression package in an HTTP mode, decompresses the device driver software compression package to the designated path of the main partition, and adds an unattended file;
step S04: restarting the mainboard, and starting a Windows operating system of the SSD according to the system boot file;
step S05: adding a corresponding device driver to the unattended file according to the type of the mainboard;
step S06: according to the type of the mainboard, the unattended file adds test software according to test requirements;
step S07: and according to the unattended file, the mainboard is configured with an addition system user.
Preferably, in the method for automatically installing a Windows operating system, after the step S07, the method further includes:
step S08: testing the SSD under the system user to obtain a test result;
step S09: and deleting the system boot file, restarting the mainboard, returning to the step S02, and sequentially obtaining a plurality of test results, wherein the plurality of test results respectively correspond to a plurality of Windows operating systems with different versions.
Preferably, in the method for automatically installing a Windows operating system, before the step S01, the method further includes:
starting up the mainboard, and starting up a built-in network card network to guide in the BIOS setting of the mainboard;
the main board loads the PE mirror image through the network card network bootstrap program, and enters the PE mirror image to run the startup appointed program.
Preferably, in the method for automatically installing a Windows operating system, the booting of the motherboard includes: the mainboard receives a server Wake On Lan command through a network, and the Wake On Lan command controls the mainboard to be started.
Preferably, in the method for automatically installing a Windows operating system, in the BIOS setting of the motherboard, a network boot with a built-in network card is enabled, including: the BIOS setting item of the mainboard is LAN Option ROM Enable or Boot On Lan Enable.
Preferably, in the method for automatically installing a Windows operating system, in step S02, after the motherboard acquires the installation file of the Windows operating system in the same version in an HTTP manner, the method further includes:
mounting the obtained Windows operating system installation file to a virtual partition;
and the mainboard uses a DISM command to apply the Windows operating system kernel file mounted in the virtual partition to the main partition.
Preferably, in the method for automatically installing a Windows operating system, in step S03, after the main board obtains the device driver software compressed package in an HTTP manner, the method further includes: and mounting the obtained device driving software compression package to a virtual partition.
Preferably, in the method for automatically installing the Windows operating system, the device driver software compression package includes: and different device driving software corresponding to the main boards of different models.
Preferably, in the method for automatically installing a Windows operating system, after the step S05, the method further includes: cleaning and deleting redundant files decompressed by the device driver software compressed packet, wherein the redundant files comprise: the driver compresses the package to decompress the file, and the driver installs the intermediate process file.
Preferably, in the method for automatically installing a Windows operating system, in step S06, the motherboard adds corresponding test software according to a test requirement, where the test software includes: self-developed test software or open source test software, the self-developed test software comprising: and automatically performing performance test, dormancy test and power failure test software.
Compared with the prior art, the beneficial effect of this application is:
the application provides a method for automatically installing Windows operating system, the method is applied to SSD test, the SSD is connected with a mainboard, the mainboard is connected with a server through a network, a plurality of Windows operating system installation files with different versions and a device driving software compression package are configured in the server, in the method: and entering a partition format of the SSD, activating the partitions, setting the first partition as a main partition, wherein the main partition is a system starting partition, the main board acquires the Windows operating system installation files in an HTTP mode, and applies the kernel files in the Windows operating system installation files to the main partition to add system boot files for the main partition. And similarly, acquiring the device driver software compressed packet in an HTTP mode, decompressing the device driver software compressed packet to the designated path of the main partition, and adding an unattended file. The method comprises the steps that a Windows operating system is automatically installed on a mainboard through a system boot file, corresponding equipment drivers are added to the unattended files according to the types of the mainboard, corresponding test software is added according to test requirements, and finally, system users are added to the mainboard configuration according to the unattended files, so that the corresponding test requirements of the SSD can be completed in the system users. . The method provided by the application realizes automatic Windows operation installation and equipment driving software installation, shortens the test period, improves the test efficiency and saves the labor cost in the SSD test process.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the SSD is subjected to system compatibility test, power-on and power-off test, sleep test, read-write test, performance test, and the like, it is necessary to cover various Windows operating systems and a large number of test host environments. Generally, a test host environment is manually set up, the installation process of various Windows operating systems and device driver software is complicated in content, huge in test amount and tedious in process, and when workers test, omitted operating systems or types of driver software are avoided, so that the test of the solid state disk cannot cover all Microsoft Windows operating systems and driver software. In addition, frequent system installation requires downloading and installing corresponding driver software for different test hosts, which requires a great amount of manpower, especially, the test period is long and the test efficiency is low under the condition of limited manpower input. Therefore, it is necessary to design a method capable of automatically installing the Windows operating system and the driver software.
The method for automatically installing the Windows operating system is applied to SSD test, the SSD is connected with a mainboard, the mainboard is connected with a server through a network, and a plurality of Windows operating system installation files with different versions and an equipment driving software compression package are configured in the server. It should be noted that the method is suitable for testing one SSD or multiple SSDs, and when multiple SSDs are tested simultaneously, multiple SSDs can be correspondingly connected to multiple motherboards of different models, and the multiple motherboards of different models can be connected to the server through the network. Referring to fig. 1, a flowchart of a method for automatically installing a Windows operating system according to an embodiment of the present invention is shown. With reference to fig. 1, the method comprises the following steps:
step S01: entering a partition format of the SSD, activating the partitions, and setting a first partition as a main partition, wherein the main partition is a system starting partition;
in the method for automatically installing a Windows operating system according to the embodiment of the present invention, before step S01, the method further includes: starting the mainboard, and starting the network boot of the built-in network card in the BIOS setting of the mainboard. The main board loads the PE mirror image through the network card network bootstrap program, and enters the PE mirror image to run the startup appointed program.
In the application, the mainboard receives a Wake On Lan command of the server through a network, wherein the Wake On Lan command is a power management function and allows the equipment to Wake up an operating system from a standby mode or a sleep mode if network activity exists. The main boards connected with the SSD are connected to the server through network cables, and the server sends Wake On Lan commands to the main boards through the network to control the start-up of the main boards of different models.
After the mainboard is started, in the BIOS setting of the mainboard, the network Boot of the built-in network card is started through the setting of the LAN Option ROM Enable or Boot On LAN Enable, and then the function that the mainboard supports PEX is started. The PEX is open source software, and is used for loading a special PE environment through network guidance and automatically running a startup appointed program in the PE after entering the PE environment. Under the guidance of a starting-up designated program, entering a partition format of the SSD, activating the partitions, and setting a first partition in the SSD as a main partition, wherein the main partition is a system starting partition.
Step S02: the main board obtains the Windows operating system installation files in an HTTP mode, kernel files in the Windows operating system installation files are applied to the main partition, and system boot files are added to the main partition;
HTTP, hypertext transfer protocol, is a protocol designed to facilitate communication between a client and a server. HTTP works with a "request-reply protocol" between the client and the server. In the application, the mainboard acquires the Windows operating system installation files in the server in an HTTP mode, and further, the purpose of automatically installing the Windows operating system is achieved.
In order to further optimize the scheme, after the mainboard acquires the Windows operating system installation file, the acquired Windows operating system installation file is mounted to the virtual partition. It takes a long time to completely download the main partition and install the main partition. If virtual mounting is carried out, namely the obtained Windows operating system mounting file is mounted to the virtual partition, the Windows operating system image can be downloaded in real time and the mounting process is carried out simultaneously, the speed is higher, and the mounting time is saved.
The functions and the program packages in the PE environment of the Windows operating system can be installed, uninstalled, configured and updated through the DISM command, and the kernel files of the Windows operating system, namely Install. Each mainboard adds a system boot file to the main partition by using BCDBOOT and BOOTSECT commands, and the system boot file can boot the start of a Windows operating system in the SSD.
Step S03: the main board obtains the device driver software compression package in an HTTP mode, decompresses the device driver software compression package to the designated path of the main partition, and adds an unattended file;
similarly, the mainboard acquires the device driver software compression package in an HTTP mode, and then automatic installation of the device driver software is achieved. After the mainboard acquires the device driver software compression package, the acquired device driver software compression package is mounted to the virtual partition, device driver software conforming to various types of PC mainboards is configured in the device driver software compression package, and the mainboards of various types can acquire corresponding device driver software from the device driver software.
Step S04: restarting the mainboard, and starting a Windows operating system of the SSD according to the system boot file;
and restarting the plurality of main boards, and starting the Windows operating system in the SSD under the guidance of the system boot file.
Step S05: adding a corresponding device driver to the unattended file according to the type of the mainboard;
further, after step S05, the method for automatically installing the Windows operating system in the present application further includes: cleaning redundant files decompressed by the device driver software compressed packets, wherein the redundant files comprise: the driver compresses the package to decompress the file, and the driver installs the intermediate process file. After the corresponding device drivers are installed on the mainboards of different models, automatically cleaning and deleting redundant files decompressed by device driver software compressed packets, and releasing the storage space of the SSD.
Step S06: according to the type of the mainboard, the unattended file adds corresponding test software according to test requirements;
step S07: and according to the unattended file, the mainboard is configured with an addition system user.
After step S07, the present application further includes: step S08: testing the SSD under the system user to obtain a test result; step S09: and deleting the system boot file, restarting the mainboard, returning to the step S02, and sequentially obtaining a plurality of test results, wherein the plurality of test results respectively correspond to a plurality of Windows operating systems with different versions.
In the preparation stage of the Windows operating system, according to the type of the main board, automatically adding corresponding device drivers under the guidance of corresponding programs of unattended files, and then adding corresponding test software according to test requirements, wherein the test software can be added with self-development test software or open source test software according to the actual conditions of operators, and the self-development test software comprises: and finally, adding a system user to the mainboard configuration according to the guidance of the unattended file, testing the SSD under the system user, acquiring a test result, and completing one round of test.
For example, when a plurality of SSDs are simultaneously subjected to installation testing, the plurality of SSDs are respectively and correspondingly connected with a plurality of motherboards of different models. The first round of testing is performed under the windows7 operating system, that is, a plurality of different models of motherboards initially acquire the windows7 operating system configured in the server, and after the above steps are completed, the SSD installs the windows7 operating system and performs a series of tests. After the test is finished, each mainboard sends a flag bit of which the test is finished to the server side. After the server receives the flag bit after the test is completed, the system boot file can be deleted, the windows7 operating system is changed into a windows8 operating system, then a plurality of different types of mainboards are restarted, and each mainboard acquires and installs a windows8 operating system configured in the server to complete the next round of test.
To sum up, in the automatically installed Windows operating system provided in the embodiment of the present invention, multiple motherboards of different models all obtain the Windows operating system installation files of the same version configured in the server in an HTTP manner, and similarly, obtain the device driver software compression package configured in the server in an HTTP manner. The method comprises the steps that a Windows operating system is automatically installed on a mainboard through a system boot file, corresponding equipment drivers are automatically added to different types of mainboards according to unattended files, corresponding test software is added to a plurality of different types of mainboards according to test requirements, and finally, a first test is completed on the SSD to be tested under the condition of the same Windows operating system and different driver software, and a test result is obtained. And then deleting the system boot file in the SSD, restarting each mainboard, reinstalling the system because each mainboard loses the system boot file after restarting, and further continuously acquiring other versions of Windows operating systems for installation by each mainboard, thereby completing the tests of other Windows operating systems and different driver software. And continuously circulating the process until the testing of a plurality of different versions of Windows operating systems and different driver software is completed. In addition, the method provided by the application realizes automatic Windows operation installation and equipment driving software installation, shortens the test period, improves the test efficiency and saves the labor cost in the SSD test process.
Since the above embodiments are all described by referring to and combining with other embodiments, the same portions are provided between different embodiments, and the same and similar portions between the various embodiments in this specification may be referred to each other. And will not be described in detail herein.
It is noted that, in this specification, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a circuit structure, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such circuit structure, article, or apparatus. Without further limitation, the presence of an element identified by the phrase "comprising an … …" does not exclude the presence of other like elements in a circuit structure, article or device comprising the element.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
The above-described embodiments of the present application do not limit the scope of the present application.