An apparatus, method, storage medium and processor for batch updating mac steering
By using a batch update device and method for Mac bootloaders, and automatically recording and updating information on test machines, the problem of time-consuming and error-prone manual configuration of Mac bootloaders is solved, achieving efficient and accurate Mac bootloader updates.
Patent Information
- Application Number
- CN202211049578.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-08-30
AI Technical Summary
During the server lab testing phase, manually configuring the macOS boot process for multiple machines was time-consuming and error-prone, resulting in low testing efficiency.
Design a device and method for batch updating MAC bootloaders. Through an information recording module, an automatic information update module, and a MAC bootloader batch update module based on machine type, automatically record and update information such as the MAC address and IP address of the test machine, and use tools to automatically configure the MAC bootloader template to achieve batch updates.
It has enabled automated maintenance of the Mac bootloader on the test machine, improving testing efficiency, avoiding manual configuration errors, and ensuring the accuracy and efficiency of the Mac bootloader.
Smart Images

Figure CN115408408B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of system booting, and particularly relates to a device, method, storage medium and processor for batch updating mac booting. BACKGROUND
[0002] Servers often use diskless systems in the laboratory test phase, and different systems are required due to different tests, so it is necessary to configure the mac booting of each machine before performing the test.
[0003] In the case of a large number of test machines, the test personnel need to manually arrange and record the mac values of each machine, and then configure the mac booting of each machine one by one before the test, which is time-consuming, low in test efficiency, and prone to errors. This is the deficiency of the prior art.
[0004] Therefore, the present application provides a device, method, storage medium and processor for batch updating mac booting to solve the above technical defects in the prior art, which is very necessary. SUMMARY
[0005] The present application aims to provide a device, method, storage medium and processor for batch updating mac booting to solve the above technical problems in view of the defects of the prior art.
[0006] To achieve the above object, the present application provides the following technical solution:
[0007] In a first aspect, the present application provides a device for batch updating mac booting, comprising:
[0008] An information recording module is configured to record test data of test machines and set a test type according to the machine type of the test machines;
[0009] An information automatic updating module is configured to compare whether the machine serial number PN is the same as the current test machine serial number PN, and if so, read the mac address, IP address, current system and package model of the test machine, and then record them in the corresponding row of the database table; if the PN value in the database table is still not the same after polling, exit;
[0010] A mac booting batch updating module according to machine type is configured to establish a mac booting template and update the mac booting in the server / tftpboot and / tftpboot / pxelinux.cfg directories through a second tool.
[0011] As preferred, in the information recording module, first, a database table is established according to the laboratory testing machine, and the serial number PN, package model, mac address, IP address, current system, and testing machine type of the laboratory testing machine are recorded;
[0012] Secondly, the serial number PN of the testing machine is input into the database table;
[0013] Thirdly, the testing machine type of the testing machine is set according to the model and package of the testing machine, and different types are marked with different numbers, such as 1, 2, 3…
[0014] As preferred, in the information automatic updating module,
[0015] First, a first tool for data updating is stored in a fixed position of the PXE central server, and a self-starting program is configured, with the path being / etc / rc.local or ~ / .bash_profile, and the first tool is automatically called at startup;
[0016] Secondly, the serial number PN of the testing machine is obtained by calling the first tool, the database table of the central server is read, and the serial number PN of each machine is compared with the serial number PN of the current testing machine. If they are the same, the mac address, IP address, current system, and package model of the testing machine are read and recorded in the corresponding row of the database table. If the PN values in the database table are all different, the process is exited;
[0017] Thirdly, the PN values of the machines to be managed are recorded in the database table, and the first tool is automatically run after each startup of the testing machine, so that the current information of the testing machine is updated to the database table, facilitating query and use. In addition, machines that are not concerned are not recorded in the database table.
[0018] As preferred, in the mac booting module, first, mac booting templates are established according to the system os and kernel required by the testing, and the templates include UEFI and Legency modes, such as mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.
[0019] Secondly, a second tool is used to input parameters, including the testing machine type and the name of the mac booting template file. According to the testing machine type, the data in the database table is read to obtain the mac value of the testing machine of the required type, and then the mac booting in the / tftpboot and / tftpboot / pxelinux.cfg directories of the server is updated.
[0020] Again, before each test task execution, the second tool performs accurate and fast updating of the mac boot of the test machine according to the test task.
[0021] In a second aspect, the present application also provides a method for batch updating mac boot, comprising the following steps:
[0022] Step S1: information recording step, which records test data of the test machine and sets test type according to the machine type of the test machine;
[0023] Step S2: information automatic updating step, which compares whether the machine serial number PN is the same as the current test machine serial number PN, if yes, reads the mac address, IP address, current system and package type of the test machine, and then records them into the corresponding row of the database table; if there is no same PN value in the database table after polling, exit;
[0024] Step S3: mac boot batch updating step according to machine type, which establishes mac boot template and updates mac boot in the directories of server / tftpboot and / tftpboot / pxelinux.cfg through the second tool.
[0025] As a preferred, in the step S1, first, establish database table according to the situation of the laboratory test machine, record the serial number PN, package type, mac address, IP address, current system and test machine type of the laboratory test machine;
[0026] Secondly, input the serial number PN of the test machine into the database table;
[0027] Thirdly, set the test machine type according to the machine type and package of the test machine, and mark different numbers for different types, such as 1, 2, 3…
[0028] As a preferred, in the step S2,
[0029] First, store the first tool for data updating in the fixed position of the PXE central server, configure the startup program, and configure the path as / etc / rc.local or ~ / .bash_profile, and automatically call the first tool at startup;
[0030] Secondly, acquire the serial number PN of the test machine through the first tool, read the database table of the central server, compare the serial number PN of the machine with the current serial number PN of the test machine one by one, if the same, read the mac address, IP address, current system and package type of the test machine, and then record them into the corresponding row of the database table; if there is no same PN value in the database table after polling, exit;
[0031] Again, the machine PN value that is expected to be included in management is recorded into the database table, then the first tool is automatically run after each start of the test machine, and the current information of the test machine is updated to the database table, facilitating the query use; in addition, the database table is not recorded for other machines that are not concerned.
[0032] As preferred, in the step S3, first, the mac boot templates are established according to the system os and kernel required by the test, and the templates contain UEFI and Legency two modes; for example, mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.
[0033] Secondly, the second tool is inputted with parameters, the parameters including the test machine type and the mac boot template file name; according to the inputted test machine type, the data in the database table is read, the mac value of the required test machine type is obtained, and then the mac boot in the server / tftpboot and / tftpboot / pxelinux.cfg directories is updated.
[0034] Thirdly, before each test task is executed, the second tool is executed to accurately and quickly update the mac boot of the test machine of the corresponding machine type according to the test task.
[0035] Thirdly, the application also provides a computer storage medium, wherein instructions are stored, when the instructions are run on a computer, the computer executes the method in the second aspect.
[0036] Fourthly, the application also provides a processor, wherein a processing program is run, when the processing program is run in the processor, the processor executes the method in the second aspect.
[0037] The application has the beneficial effects that through the two tools provided herein, the mac address and other information of the machine can be automatically maintained when the test machine is started each time, when the mac boot needs to be updated, the mac boot of the specific machine type can be accurately and quickly updated according to the machine type marked in advance, the test machine mac information can be classified and saved, the mac boot can be accurately maintained by type, and the efficiency and accuracy are high, and the errors caused by manual maintenance are avoided
[0038] In addition, the application has reliable design principle, simple structure, and very wide application prospect.
[0039] Compared with the prior art, the application has outstanding and substantial characteristics and obvious progress, and the beneficial effects of the implementation are also obvious. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of the provided drawings.
[0041] Figure 1 is a principle block diagram of the device for batch updating mac boot provided by the present application.
[0042] Figure 2 is a flow chart of the method for batch updating mac boot provided by the present application.
[0043] Among them, 1-information recording module, 2-information automatic updating module, 3-mac boot batch updating module according to machine type. DETAILED DESCRIPTION
[0044] The present application will be described in detail below in combination with the drawings and through specific embodiments. The following embodiments are an explanation of the present application, and the present application is not limited to the following embodiments.
[0045] Embodiment 1:
[0046] As shown in the figure, the device for batch updating mac boot provided by the present embodiment comprises: Figure 1
[0047] The information recording module 1 is used for recording the test data of the test machine and setting the test type according to the machine type of the test machine. In the information recording module 1, a database table is first established according to the laboratory test machine condition, and the serial number PN, package model, mac address, IP address, current system, and test machine type of the laboratory test machine are recorded.
[0048] Secondly, the serial number PN of the test machine is input into the database table.
[0049] Thirdly, the test machine type of the test machine is set according to the machine type and package of the test machine, and different types are marked with different numbers, such as 1, 2, 3…
[0050] The information automatic updating module 2 is used for comparing whether the machine serial number PN is same as the current test machine serial number PN, if yes, reading the mac address, IP address, current system, package model of the test machine, and then recording to the corresponding row of the database table, if polling reading the PN value in the database table still has no same, then exiting, in the information automatic updating module 2,
[0051] Firstly, the first tool of data updating is stored in the fixed position of the PXE central server, the boot self-starting program is configured, the configuration path is / etc / rc.local or ~ / .bash_profile, and the first tool is automatically called at booting;
[0052] Secondly, the test machine serial number PN is acquired by calling the first tool, the database table of the central server is read, and the machine serial number PN is compared with the current test machine serial number PN one by one, if same, the mac address, IP address, current system, package model of the test machine are read, and then recorded to the corresponding row of the database table, if polling reading the PN value in the database table still has no same, then exiting;
[0053] Thirdly, the machine PN value which is expected to be managed is recorded to the database table, then the first tool is automatically run after the test machine is booted each time, the current information of the test machine is updated to the database table, and the query use is facilitated, in addition, the machines which are not concerned are not recorded to the database table.
[0054] The mac booting batch updating module 3 according to machine type is used for establishing the mac booting template, and updating the mac booting under the / tftpboot and / tftpboot / pxelinux.cfg directories of the server through the second tool, in the mac booting batch updating module 3 according to machine type, firstly, the mac booting template is established according to the system os and kernel which are needed by the test, the template contains two modes of UEFI and Legency, such as mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.;
[0055] Secondly, the input parameter is inputted through the second tool, the parameter includes the test machine type and the mac booting template file name, according to the test machine type of the input parameter, the data in the database table is read, the mac value of the required test machine type machine is acquired, and then the mac booting under the / tftpboot and / tftpboot / pxelinux.cfg directories of the server is updated;
[0056] Again, before each test task execution, the second tool performs accurate and fast and accurate update of the mac boot of the test machine of the corresponding machine type according to the test task.
[0057] Embodiment 2:
[0058] As Figure 2 shown, the method for batch updating mac boot provided by the embodiment includes the following steps:
[0059] Step S1: information recording step, which records test data of the test machine and sets test type according to the machine type of the test machine; in the step S1, first, a database table is established according to the laboratory test machine, and the serial number PN, package model, mac address, IP address, current system, and test machine type of the laboratory test machine are recorded;
[0060] Secondly, the serial number PN of the test machine is input into the database table;
[0061] Thirdly, the test machine type is set according to the machine type and package of the test machine, and different types are marked with different numbers, such as 1, 2, 3…
[0062] Step S2: information automatic updating step, which compares whether the machine serial number PN is the same as the current test machine serial number PN, if yes, reads the mac address, IP address, current system, and package model of the test machine, and then records them in the corresponding row of the database table; if there is no same after polling reading the PN value in the database table, exit; in the step S2,
[0063] Firstly, a first tool for data updating is stored in a fixed position of the PXE central server, and a startup program is configured, the configuration path is / etc / rc.local or ~ / .bash_profile, and the first tool is automatically called at startup;
[0064] Secondly, the test machine serial number PN is obtained by calling the first tool, the database table of the central server is read, and the machine serial number PN is compared with the current test machine serial number PN, if they are the same, the mac address, IP address, current system, and package model of the test machine are read, and then recorded in the corresponding row of the database table; if there is no same after polling reading the PN value in the database table, exit;
[0065] Thirdly, the machine PN value to be managed is recorded in the database table, then the test machine will automatically run the first tool after each startup, and the current information of the test machine is updated to the database table, which is convenient for query and use; in addition, the machines not concerned are not recorded in the database table.
[0066] Step S3: the step of mac boot guiding the machine type batch update, which establishes the mac boot template and updates the mac boot in the / tftpboot and / tftpboot / pxelinux.cfg directories of the server through the second tool;
[0067] In the step S3, first, the mac boot template is established according to the system os and kernel required by the test, and the template contains two modes of UEFI and Legency; for example, mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.
[0068] Secondly, the second tool inputs parameters, which include the test machine type and the mac boot template file name; according to the test machine type, the data in the database table is read to obtain the mac value of the test machine of the required test machine type, and then the mac boot in the / tftpboot and / tftpboot / pxelinux.cfg directories of the server is updated.
[0069] Thirdly, before each test task is executed, the second tool is executed to accurately and quickly update the mac boot of the test machine of the corresponding machine type according to the test task.
[0070] Embodiment 3
[0071] The embodiment provides a computer storage medium, wherein the computer storage medium stores instructions, when the instructions are run on a computer, the computer executes the method in the above embodiment 2; that is, a method for batch updating mac boot, comprising the following steps:
[0072] Step S1: the step of information recording, which records the test data of the test machine and sets the test type according to the machine type of the test machine; in the step S1, first, a database table is established according to the laboratory test machine, and the serial number PN, package model, mac address, IP address, current system and test machine type of the laboratory test machine are recorded.
[0073] Secondly, the serial number PN of the test machine is input into the database table.
[0074] Thirdly, the test machine type of the test machine is set according to the machine type and package of the test machine, and different types are marked with different numbers, such as 1, 2, 3, etc.
[0075] Step S2: the step of automatic information updating, which compares whether the machine serial number PN is the same as the current test machine serial number PN. If yes, the mac address, IP address, current system, and package model of the test machine are read and recorded in the corresponding row of the database table. If no, the polling reading of the PN value in the database table is completed, and the process is exited.
[0076] First, a first tool for data updating is stored in a fixed position of the PXE central server, and a self-starting program is configured for booting, with a configuration path of / etc / rc.local or ~ / .bash_profile. The first tool is automatically called at booting.
[0077] Second, the test machine serial number PN is obtained by calling the first tool, and the database table of the central server is read. The machine serial number PN is compared with the current test machine serial number PN one by one. If they are the same, the mac address, IP address, current system, and package model of the test machine are read and recorded in the corresponding row of the database table. If they are not the same, the polling reading of the PN value in the database table is completed, and the process is exited.
[0078] Third, the machine PN value that is intended to be managed is recorded in the database table. The first tool is automatically run after each booting of the test machine, and the current information of the test machine is updated to the database table, which is convenient for query and use. In addition, the machines that are not concerned are not recorded in the database table.
[0079] Step S3: the step of mac booting batch updating according to machine type, which establishes a mac booting template and updates the mac booting in the server / tftpboot and / tftpboot / pxelinux.cfg directory through a second tool.
[0080] In the step S3, the mac booting template is established according to the system os and kernel that are needed for testing. The template includes two modes of UEFI and Legency. For example, the template is named as mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.
[0081] Second, the test machine type and the mac booting template file name are input through the second tool. According to the test machine type, the data in the database table is read, the mac value of the required test machine type is obtained, and the mac booting in the server / tftpboot and / tftpboot / pxelinux.cfg directory is updated.
[0082] Again, before each test task execution, the second tool performs accurate and fast and accurate update of the mac boot of the test machine of the corresponding machine type according to the test task.
[0083] Embodiment 4:
[0084] The embodiment also provides a processor, wherein a processing program is run in the processor, and when the processing program is run in the processor, the processor performs the method described in Embodiment 2. That is, a method for batch updating mac boot, comprising the following steps:
[0085] Step S1: information recording step, which records test data of the test machine and sets test type according to the machine type of the test machine; in the step S1, first, a database table is established according to the laboratory test machine, and the serial number PN, package model, mac address, IP address, current system, and test machine type of the laboratory test machine are recorded;
[0086] Secondly, the serial number PN of the test machine is input into the database table;
[0087] Thirdly, the test machine type of the test machine is set according to the machine type and package, and different types are marked with different numbers, such as 1, 2, 3…
[0088] Step S2: information automatic updating step, which compares whether the machine serial number PN is the same as the current test machine serial number PN, if yes, reads the mac address, IP address, current system, and package model of the test machine, and then records them in the corresponding row of the database table; if there is no same after polling reading the PN value in the database table, exit; in the step S2,
[0089] Firstly, a first tool for data updating is stored in a fixed position of the PXE central server, and a startup self-starting program is configured, with the configuration path being / etc / rc.local or ~ / .bash_profile, and the first tool is automatically called at startup;
[0090] Secondly, the first tool is called to obtain the serial number PN of the test machine, the database table of the central server is read, and the serial number PN of the machine is compared with the serial number PN of the current test machine, if they are the same, the mac address, IP address, current system, and package model of the test machine are read, and then recorded in the corresponding row of the database table; if there is no same after polling reading the PN value in the database table, exit;
[0091] Again, the machine PN value that is expected to be included in the management is recorded into the database table, then the first tool is automatically run after each start of the test machine, and the current information of the test machine is updated to the database table, facilitating the query and use; in addition, the database table is not recorded for other machines that are not concerned.
[0092] Step S3: the step of mac booting batch updating according to machine type, which establishes the mac boot template and updates the mac boot in the server / tftpboot and / tftpboot / pxelinux.cfg directory through the second tool;
[0093] In step S3, the mac boot template is established according to the system os and kernel used by the test, and the template contains UEFI and Legency modes; for example, mac_template_redhat79.txt, mac_template_redhat83.txt, mac_template_debian.txt, etc.
[0094] Secondly, the second tool is inputted with parameters, including test machine type and mac boot template file name; according to the inputted test machine type, the data in the database table is read to obtain the mac value of the required test machine type, and then the mac boot in the server / tftpboot and / tftpboot / pxelinux.cfg directory is updated.
[0095] Thirdly, before each test task is executed, the second tool is executed to accurately and quickly update the mac boot of the test machine of the corresponding machine type according to the test task.
[0096] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the method disclosed by the embodiments, since it corresponds to the system disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.
[0097] The skilled person can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present text can be realized in electronic hardware, computer software or combination of both. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in general in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0098] In several embodiments provided in the present application, it should be understood that the disclosed system, system and method can be implemented in other manners. For example, the system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between different units, or the among different units, can be indirect couplings or communication connections through some interfaces, and can be in electrical, mechanical or other forms.
[0099] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units. That is, they can be located in one place, or also can be distributed on a plurality of network units. In actual implementation, some or all of the units can be selected according to the actual needs to achieve the purposes of the embodiments of the present application.
[0100] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each module can be physically present independently, or two or more modules can be integrated in one unit.
[0101] Similarly, each processing unit in each embodiment of the present application can be integrated in one functional module, or each processing unit can be physically present independently, or two or more processing units can be integrated in one functional module.
[0102] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be located in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), register, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it needs to be explained that in this text, relational terms such as first and second and the like can merely be used to distinguish one entity or action from another, without necessarily requiring or implying any actual such relationship or order between or among the entities or actions. Also, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0104] The above disclosure is merely preferred embodiments of the present application, but the present application is not limited thereto, any non-creative changes and several improvements and refinements that any person skilled in the art can think of without departing from the principles of the present application should fall within the protection scope of the present application.
Claims
1. An apparatus for batch updating mac boot, characterized in that, The information recording module is used for recording test data of the test machine and setting test types according to machine types of the test machine. The information automatic updating module is used for comparing whether the machine serial number PN is same as the current test machine serial number PN, if yes, reading the mac address, IP address, current system and package type of the test machine, and then recording into the corresponding row of the database table. If the polling reading of the PN value in the database table is still not same, then exit. The mac boot is guided according to the machine type batch updating module, the mac boot template is established, and the mac boot under the server / tftpboot and / tftpboot / pxelinux.cfg directory is updated through the second tool. In the information automatic updating module, Firstly, the first tool for data updating is stored in the fixed position of the PXE central server, the startup self-starting program is configured, the path is / etc / rc.local or ~ / .bash_profile, and the first tool is automatically called at startup; Secondly, the test machine serial number PN is obtained by calling the first tool, the central server database table is read, and the machine serial number PN is compared with the current test machine serial number PN, if yes, the mac address, IP address, current system and package type of the test machine are read, and then recorded into the corresponding row of the database table. If the polling reading of the PN value in the database table is still not same, then exit. Thirdly, the machine PN value which is expected to be managed is recorded into the database table, then the test machine will automatically run the first tool after each startup, and the current information of the test machine is updated into the database table, so as to facilitate the query and use; in addition, the machines which are not concerned are not recorded in the database table. In the mac boot according to the machine type batch updating module, firstly, the mac boot template is established according to the system os and kernel which are needed for the test, and the template contains UEFI and Legency two modes; Secondly, the second tool is used to input parameters, the parameters include the test machine type and the mac boot template file name; according to the input parameter test machine type, the data in the database table is read, the mac value of the required test machine type machine is obtained, and then the mac boot under the server / tftpboot and / tftpboot / pxelinux.cfg directory is updated. Thirdly, before each test task is executed, the second tool is executed to accurately and quickly update the mac boot of the test machine of the corresponding machine type according to the test task. In the information recording module, firstly, the database table is established according to the laboratory test machine situation, and the serial number PN, package type, mac address, IP address, current system and test machine type of the laboratory test machine are recorded.
2. The device for batch updating MAC boot according to claim 1, characterized in that: Secondly, the serial number PN of the test machine is input into the database table. Thirdly, the test machine type of the test machine is set according to the machine type and package, and different types are marked with different numbers. The method comprises the following steps:
3. A method of batch updating mac boot, characterized in that, Step S1: information recording step, which records test data of test machine and sets test type according to model of test machine; Step S2: information automatic updating step, which compares whether machine serial number PN is same as current test machine serial number PN, if same, reads mac address, IP address, current system, package model of test machine, and then records to corresponding row of database table; If there is no same PN value in database table after polling, exit; Step S3: mac boot guiding batch updating step according to machine type, which establishes mac boot template and updates mac boot in server / tftpboot and / tftpboot / pxelinux.cfg directory through second tool; In step S2, First, store first tool for data updating in fixed position of PXE central server, configure boot self-starting program, and configure path as / etc / rc.local or ~ / .bash_profile, and first tool is automatically called at boot; Second, acquire test machine serial number PN through first tool, read database table of central server, compare machine serial number PN with current test machine serial number PN one by one, if same, read mac address, IP address, current system, package model of test machine, and then record to corresponding row of database table; If there is no same PN value in database table after polling, exit; Third, record machine PN value which is desired to be managed into database table, then test machine will automatically run first tool after each boot, and update current information of test machine into database table, which is convenient for query and use; and other machines which are not concerned are not recorded into database table; In step S3, first, establish mac boot template according to system os and kernel which are needed for test, and the template contains UEFI and Legency two modes; Second, input parameters through second tool, which include test machine type and mac boot template file name; read data in database table according to input parameter test machine type, acquire mac value of required test machine type machine, and then update mac boot in server / tftpboot and / tftpboot / pxelinux.cfg directory; Third, execute second tool to accurately and quickly update mac boot of test machine of corresponding machine type before each test task execution.
4. The method of claim 3, wherein, In step S1, first, establish database table according to test machine situation of laboratory, and record serial number PN, package model, mac address, IP address, current system, test machine type of test machine of laboratory; Second, input serial number PN of test machine into database table; Third, set test machine type of test machine according to model and package of test machine, and mark different numbers for different types.
5. A computer storage medium, characterized in that, The computer storage medium stores instructions which, when executed on the computer, cause the computer to perform the method of any one of claims 3 or 4.
6. A processor, comprising: The processor runs a processing program, and the processing program, when running in the processor, causes the processor to perform the method of any one of claims 3 or 4.
Citation Information
Patent Citations
Method, apparatus, device and medium for installing Linux operating system
CN108958750A
Method and system for booting of a target device in a network environment based on automatic client discovery and scan
US20030005276A1