CN111966417A - Method and system for controlling starting of slave PXE through designated key - Google Patents
Method and system for controlling starting of slave PXE through designated key Download PDFInfo
- Publication number
- CN111966417A CN111966417A CN202010876035.7A CN202010876035A CN111966417A CN 111966417 A CN111966417 A CN 111966417A CN 202010876035 A CN202010876035 A CN 202010876035A CN 111966417 A CN111966417 A CN 111966417A
- Authority
- CN
- China
- Prior art keywords
- pxe
- starting
- item
- variable
- setting
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention provides a method and a system for controlling starting from PXE through a designated key, belonging to the technical field of computer systems. The method for controlling starting of the slave PXE through the designated key comprises the following steps: s1: setting a flag bit, and associating the response of the specified key with the setting of the flag bit; s2: adding a PXE drive; s3: and setting a function for managing a starting item, and finishing starting from the PXE through a response to the specified key. The invention also provides a system for realizing the method for controlling the starting of the slave PXE through the designated key. The invention has the beneficial effects that: whether to start from PXE is controlled by using a designated key, and the operation is convenient.
Description
Technical Field
The invention relates to a BIOS operation technology, in particular to a method and a system for controlling starting from PXE through a designated key.
Background
Currently, in production or when a user wants to use a PXE function, the user needs to enter a BIOS setup interface to set the priority of the PXE to the first priority in the Boot Option, so as to start the machine from the PXE.
In the process of actual product production, a large number of machines in a factory need to use a PXE function refreshing system, each machine starts the PXE by modifying the priority of Boot Option of BIOS Setup, and the operation is too tedious and affects the efficiency. If a PXE (preboot execution environment) is started by a designated key in the Boot process, the step of starting the PXE can be simplified, and the method for controlling the starting from the PXE by the designated key is provided because the method is selective to whether the PXE is used in the Boot.
Disclosure of Invention
In order to solve the technical problems of too complicated operation and low efficiency in the prior art, the invention provides a method for controlling the starting of the slave PXE through a designated key and a system for realizing the method for controlling the starting of the slave PXE through the designated key.
The invention discloses a method for controlling starting from PXE through a designated key, which is characterized by comprising the following steps:
s1: setting a flag bit, and associating the response of the specified key with the setting of the flag bit;
s2: adding a PXE drive;
s3: setting a function of the management starting item, completing the starting from the PXE through the response to the specified key,
the processing method for starting the slave PXE comprises the following steps:
and judging whether the flag bit is a set value or not, if so, obtaining the description and the path of each starting item, finding out the PXE, taking the PXE as a first starting item, and loading the PXE driver to finish the starting action from the PXE.
In a further improvement of the present invention, in step S3, the method for processing the function of the management startup item further includes the following steps:
s31: setting the description of the startup item, and searching the startup item through the description;
s32: starting system variable service, searching a system variable BootOrder, acquiring a variable value and the number of bytes of the variable value, and calculating the number of all starting items in the current system according to the number of bytes of the variable;
s33: defining a pointer variable BootOrder2, allocating a memory with the same size as the system variable BootOrder to BootOrder2, and writing the values in BootOrder into BootOrder2 one by one;
s34: finding out Windows boot Mananger in BootOrder2 and taking the Windows boot Mananger as a default first starting item;
s35: and judging whether the PXE is used as a first starting item or not by using the zone bit, judging whether the zone bit is a set value or not, if not, using Windows boot Mananger as the first starting item, if so, obtaining the description and the path of each starting item, finding out the PXE in BootOrder2, then using the PXE as the first starting item, and loading a PXE drive to finish the action of starting from the PXE.
The invention is further improved, in step S1, a response function for designating the designated key is added to the BIOS code, whether the designation is pressed is detected at any time during the machine Boot process, when the designated key is detected to be pressed, the response function is executed, a flag bit is written in the register, and then a response process is performed according to the value of the flag bit.
The invention also provides a system for realizing the method for controlling the starting from the PXE through the designated key, which comprises the following steps:
setting a module: the device is used for setting a flag bit and associating the response of the specified key with the setting of the flag bit;
adding a module: for adding PXE drives;
loading a module: the PXE driver is used for loading;
a starting module: the function for setting the management start item completes the starting from the PXE by the response to the specified key.
In a further refinement of the present invention, the start module comprises:
the description setting submodule: setting description of the startup item, and searching the startup item through the description;
system variable service promoter module: the system variable service starting method comprises the steps of starting system variable service, searching a system variable BootOrder, obtaining a variable value and the number of bytes of the variable value, and calculating the number of all starting items in the current system according to the number of bytes of the variable;
pointer variable definition submodule: defining a pointer variable BootOrder2, allocating a memory with the same size as the system variable BootOrder to BootOrder2, and writing the values in BootOrder into BootOrder2 one by one;
the default starting item setting submodule: finding out Windows boot Mananger in BootOrder2 and taking the Windows boot Mananger as a default first starting item;
the first start item setting submodule: and judging whether the PXE is used as a first starting item or not by using the zone bit, judging whether the zone bit is a set value or not, if not, using Windows boot Mananger as the first starting item, if so, obtaining the description and the path of each starting item, finding out the PXE in BootOrder2, then using the PXE as the first starting item, and loading a PXE drive to finish the action of starting from the PXE.
Compared with the prior art, the invention has the beneficial effects that: the special key response is added, whether the special key is started from the PXE is controlled by using the special key, a plurality of operation steps in the prior art are replaced, and the special key starting method is convenient to operate and high in efficiency. If the invention is not started from PXE, the invention can also ensure that the computer can correctly load Windows Boot Manager.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flowchart illustrating an embodiment of a method of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
As shown in fig. 1 and 2, the present invention comprises the steps of:
firstly, setting a flag bit.
Adding a response function of a designated key, such as F12, up and down keys and the like, in a BIOS code, detecting whether the set designated key is pressed at any time in the Boot process of a machine, executing the response function of the designated key when detecting that the designated key is pressed, writing a 0x60 register in a CMOS (chip for storing basic startup information of a computer) into a flag bit (such as AA), reading the value of the 0x60 register later, and responding according to the value.
Secondly, a driver of Realtek PXE IPV4 is added in a Source Code (resource library), and the driver needs to be loaded when the driver is started from the PXE subsequently.
And thirdly, designing a function for managing the starting item, and finishing the starting action from the PXE according to the flag bit in the first step.
Specifically, the step includes the following substeps:
step 1: in the function, a string pointer variable PXEBootOptionDescSring and HDDBootOptionDescSring are defined, and respectively assigned values are UEFI, PXE IP4 Realtek PCIe GBE Family Controller and Windows book Manager, the string is a description of the startup item, and the startup item can be found through the description later.
Step 2: and starting a system variable service, calling a GetEfiVariable () function to find a system variable 'BootOrder' to acquire a variable value (BootOrder: the face contains all starting items in the current system) and the byte number (BootOrderSize) of the variable value. According to the number of bytes of the variable, the number (BootOrderCount) of all the startup items in the current system can be calculated.
And step 3: define pointer variable BootOrder2, call pBS- > AllocatePool to BootOrder2 allocate the same size memory as BootOrder. And establishing a for loop by using the BootOrderCount calculated in the step 2, and writing the values in BootOrder into the BootOrder2 one by one, so as to facilitate the starting sequence of the starting items in BootOrder in the subsequent operation.
And 4, step 4: finding out Windows Booot Manager in BootOrder2 and using the Windows Booot Manager as a first boot item, establishing a for loop by using the BootOrderCount calculated in step 2, obtaining variable values (NvramOption2) of each boot item one by one, obtaining description (Option description) and path DevicePath of the boot item according to the variable values, then using the values as judgment conditions to find out the Windows Booot Manager position in the current BootOrder2, and assigning the boot item of BootOrder2 to BootOrder [0] if BootOrder2[ i ], wherein i is not less than 0 and not more than BootOrder Count, and the boot item is the BootOrder Manager, thus finishing the action of finding out Windows Booger and using the boot Manager as the first boot item, which ensures that the computer can load OS when other operations are not known to be executed in the boot process.
And 5: the flag bit is used to determine whether to use PXE as the first starting item. Firstly, judging whether the flag bit of the CMOS 0x60 is AA, if not, loading the OS by taking Windows boot Mananger as a first starting item according to the step 4. If the flag bit is AA, similar to step 5, a for loop is established, the description (OptionDescription) and the path DevicePath of each boot entry are obtained, the PXE in BootOrder is found and then used as the first boot entry, and the PXE driver is loaded to complete the action of starting from the PXE.
The invention increases the response of the designated key, utilizes the designated key to control whether to start from the PXE, replaces a plurality of operation steps in the prior art, is convenient and fast to operate and greatly improves the working efficiency. If the computer is not started from the PXE, the invention can ensure that the computer can correctly load the Windows Boot Manager, and has strong practicability.
The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Claims (5)
1. A method for controlling starting from PXE by means of a designated key, comprising the steps of:
s1: setting a flag bit, and associating the response of the specified key with the setting of the flag bit;
s2: adding a PXE drive;
s3: setting a function of the management starting item, completing the starting from the PXE through the response to the specified key,
the processing method for starting the slave PXE comprises the following steps:
and judging whether the flag bit is a set value or not, if so, obtaining the description and the path of each starting item, finding out the PXE, taking the PXE as a first starting item, and loading the PXE driver to finish the starting action from the PXE.
2. The method of claim 1 for controlling boot from PXE by means of a designated key, wherein: in step S3, the method for processing the function of the management startup item further includes the following steps:
s31: setting the description of the startup item, and searching the startup item through the description;
s32: starting system variable service, searching a system variable BootOrder, acquiring a variable value and the number of bytes of the variable value, and calculating the number of all starting items in the current system according to the number of bytes of the variable;
s33: defining a pointer variable BootOrder2, allocating a memory with the same size as the system variable BootOrder to BootOrder2, and writing the values in BootOrder into BootOrder2 one by one;
s34: finding out Windows boot Mananger in BootOrder2 and taking the Windows boot Mananger as a default first starting item;
s35: and judging whether the PXE is used as a first starting item or not by using the zone bit, judging whether the zone bit is a set value or not, if not, using Windows boot Mananger as the first starting item, if so, obtaining the description and the path of each starting item, finding out the PXE in BootOrder2, then using the PXE as the first starting item, and loading a PXE drive to finish the action of starting from the PXE.
3. A method for controlling boot from PXE by means of a designated key according to any one of claims 1 to 3, wherein: in step S1, a response function for specifying a designated key is added to the BIOS code, whether the designation is pressed is detected at any time during Boot of the machine, and when it is detected that the designated key is pressed, the response function is executed, a flag bit is written in a register, and then a response process is performed according to a value of the flag bit.
4. A system for implementing the method for controlling starting from PXE by using a designated key according to any one of claims 1 to 3, comprising:
setting a module: the device is used for setting a flag bit and associating the response of the specified key with the setting of the flag bit;
adding a module: for adding PXE drives;
loading a module: the PXE driver is used for loading;
a starting module: the function for setting the management start item completes the starting from the PXE by the response to the specified key.
5. The system of claim 4, wherein: the starting module comprises:
the description setting submodule: setting description of the startup item, and searching the startup item through the description;
system variable service promoter module: the system variable service starting method comprises the steps of starting system variable service, searching a system variable BootOrder, obtaining a variable value and the number of bytes of the variable value, and calculating the number of all starting items in the current system according to the number of bytes of the variable;
pointer variable definition submodule: defining a pointer variable BootOrder2, allocating a memory with the same size as the system variable BootOrder to BootOrder2, and writing the values in BootOrder into BootOrder2 one by one;
the default starting item setting submodule: finding out Windows boot Mananger in BootOrder2 and taking the Windows boot Mananger as a default first starting item;
the first start item setting submodule: and judging whether the PXE is used as a first starting item or not by using the zone bit, judging whether the zone bit is a set value or not, if not, using Windows boot Mananger as the first starting item, if so, obtaining the description and the path of each starting item, finding out the PXE in BootOrder2, then using the PXE as the first starting item, and loading a PXE drive to finish the action of starting from the PXE.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010876035.7A CN111966417B (en) | 2020-08-25 | 2020-08-25 | Method and system for controlling start-up from PXE through designated key |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010876035.7A CN111966417B (en) | 2020-08-25 | 2020-08-25 | Method and system for controlling start-up from PXE through designated key |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111966417A true CN111966417A (en) | 2020-11-20 |
CN111966417B CN111966417B (en) | 2023-08-18 |
Family
ID=73390595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010876035.7A Active CN111966417B (en) | 2020-08-25 | 2020-08-25 | Method and system for controlling start-up from PXE through designated key |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966417B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113946273A (en) * | 2021-12-20 | 2022-01-18 | 深圳市吉方工控有限公司 | OptionROM starting method, system, equipment and storage medium |
Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467427A (en) * | 2010-11-15 | 2012-05-23 | 英业达股份有限公司 | Method for entering basic output and input system setting |
CN103365667A (en) * | 2012-03-26 | 2013-10-23 | 国际商业机器公司 | Method and device for installing operating system in host system |
CN103546492A (en) * | 2013-11-14 | 2014-01-29 | 国家电网公司 | Unattended operation installation system and method |
CN104052761A (en) * | 2013-03-11 | 2014-09-17 | 联想(北京)有限公司 | Method for device start controlling and electronic device |
CN104158859A (en) * | 2014-07-30 | 2014-11-19 | 华为技术有限公司 | PXE-based information acquisition method, PXE (pre-boot execution environment) client, PXE server and system |
CN104935468A (en) * | 2015-06-24 | 2015-09-23 | 宋敏 | PXE technology-based interactive system and method for realizing operation of operating system thereof |
CN106325868A (en) * | 2016-08-24 | 2017-01-11 | 南京百敖软件有限公司 | Method for binding starting equipment with shortcut keys in UEFI (unified extensible firmware interface) |
CN106897064A (en) * | 2017-02-24 | 2017-06-27 | 郑州云海信息技术有限公司 | A kind of method and device of configuration BIOS |
CN107526595A (en) * | 2017-08-28 | 2017-12-29 | 中南大学 | A kind of method for supporting multiple operating system remote loading |
CN107766055A (en) * | 2017-09-29 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of client linux system installation method based on GUI module |
CN108334351A (en) * | 2017-08-31 | 2018-07-27 | 郑州云海信息技术有限公司 | A kind of method and device of modification boot sequence |
CN108733542A (en) * | 2017-04-18 | 2018-11-02 | 鸿富锦精密电子(天津)有限公司 | Terminal Server Client exports picture monitoring system and method |
CN108769267A (en) * | 2018-07-12 | 2018-11-06 | 成都傲梅科技有限公司 | A method of ISO and WIM image files are guided by the network startup mode based on PXE protocol |
CN110162435A (en) * | 2019-04-24 | 2019-08-23 | 苏州浪潮智能科技有限公司 | A kind of server PXE starting test method, system, terminal and storage medium |
-
2020
- 2020-08-25 CN CN202010876035.7A patent/CN111966417B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102467427A (en) * | 2010-11-15 | 2012-05-23 | 英业达股份有限公司 | Method for entering basic output and input system setting |
CN103365667A (en) * | 2012-03-26 | 2013-10-23 | 国际商业机器公司 | Method and device for installing operating system in host system |
CN104052761A (en) * | 2013-03-11 | 2014-09-17 | 联想(北京)有限公司 | Method for device start controlling and electronic device |
CN103546492A (en) * | 2013-11-14 | 2014-01-29 | 国家电网公司 | Unattended operation installation system and method |
CN104158859A (en) * | 2014-07-30 | 2014-11-19 | 华为技术有限公司 | PXE-based information acquisition method, PXE (pre-boot execution environment) client, PXE server and system |
CN104935468A (en) * | 2015-06-24 | 2015-09-23 | 宋敏 | PXE technology-based interactive system and method for realizing operation of operating system thereof |
CN106325868A (en) * | 2016-08-24 | 2017-01-11 | 南京百敖软件有限公司 | Method for binding starting equipment with shortcut keys in UEFI (unified extensible firmware interface) |
CN106897064A (en) * | 2017-02-24 | 2017-06-27 | 郑州云海信息技术有限公司 | A kind of method and device of configuration BIOS |
CN108733542A (en) * | 2017-04-18 | 2018-11-02 | 鸿富锦精密电子(天津)有限公司 | Terminal Server Client exports picture monitoring system and method |
CN107526595A (en) * | 2017-08-28 | 2017-12-29 | 中南大学 | A kind of method for supporting multiple operating system remote loading |
CN108334351A (en) * | 2017-08-31 | 2018-07-27 | 郑州云海信息技术有限公司 | A kind of method and device of modification boot sequence |
CN107766055A (en) * | 2017-09-29 | 2018-03-06 | 郑州云海信息技术有限公司 | A kind of client linux system installation method based on GUI module |
CN108769267A (en) * | 2018-07-12 | 2018-11-06 | 成都傲梅科技有限公司 | A method of ISO and WIM image files are guided by the network startup mode based on PXE protocol |
CN110162435A (en) * | 2019-04-24 | 2019-08-23 | 苏州浪潮智能科技有限公司 | A kind of server PXE starting test method, system, terminal and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113946273A (en) * | 2021-12-20 | 2022-01-18 | 深圳市吉方工控有限公司 | OptionROM starting method, system, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111966417B (en) | 2023-08-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240095043A1 (en) | Execution of sub-application processes within application program | |
TWI581188B (en) | The way to load the driver and the embedded device | |
US5805796A (en) | System architecture for implementing modular diagnostics | |
CN105094683A (en) | Data display method and device | |
CN103150183A (en) | Wallpaper background switching processing method of multi-desktop system and mobile intelligent equipment | |
CN111801731B (en) | Voice control method, voice control device, and computer-executable nonvolatile storage medium | |
CN102262555B (en) | Method and device for loading different versions of JAVA three-party library | |
CN110795172B (en) | Foreground process control method and device, electronic equipment and storage medium | |
CN116107922A (en) | Application management method and electronic device | |
CN111966417A (en) | Method and system for controlling starting of slave PXE through designated key | |
CN106603125B (en) | Method and device for data interaction with Bluetooth equipment | |
CN115509953A (en) | Memory recovery method and device | |
CN109407991B (en) | Non-volatile flash memory execution command suspending and recovering method, non-volatile flash memory and electronic equipment | |
US8402479B2 (en) | Device control call allocation for embedded system design | |
CN106293963B (en) | Method and system for communication between application layer and drive layer in windows system | |
CN101685396A (en) | System and method for controlling function icon | |
US11287949B2 (en) | Method and device for displaying icon | |
CN109710292B (en) | Mobile terminal machine brushing control processing method, mobile terminal and storage medium | |
CN111309389A (en) | Multi-user management method and system based on BIOS | |
WO2022121333A1 (en) | Method and device for starting application | |
CN115357355A (en) | Method, device and equipment for software cross-system migration and readable storage medium | |
CN110989876B (en) | Application program adaptation method, mobile terminal and storage medium | |
CN113032290A (en) | Flash memory configuration method and device, electronic equipment and storage medium | |
CN105302610A (en) | Automatic installation method of Linux system | |
AU2019393724B2 (en) | Providing most recent application views from user devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |