CN113867814A - Method and device for realizing multi-type restarting of server based on UEFI (unified extensible firmware interface) - Google Patents

Method and device for realizing multi-type restarting of server based on UEFI (unified extensible firmware interface) Download PDF

Info

Publication number
CN113867814A
CN113867814A CN202111089276.8A CN202111089276A CN113867814A CN 113867814 A CN113867814 A CN 113867814A CN 202111089276 A CN202111089276 A CN 202111089276A CN 113867814 A CN113867814 A CN 113867814A
Authority
CN
China
Prior art keywords
server
restarting
restart
starting
uefi
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
Application number
CN202111089276.8A
Other languages
Chinese (zh)
Other versions
CN113867814B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111089276.8A priority Critical patent/CN113867814B/en
Publication of CN113867814A publication Critical patent/CN113867814A/en
Application granted granted Critical
Publication of CN113867814B publication Critical patent/CN113867814B/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/4416Network booting; Remote initial program loading [RIPL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for realizing multi-type restarting of a server based on a UEFI interface, wherein the method comprises the following steps: s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system; s2, after the server is started and enters a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server; and S3, judging whether the server is started according to the restarting mode selected by the user. The invention carries out corresponding restart on the server in a mode of resetting the corresponding register through the UEFI Shell interface between the user and the UEFI system. The invention provides convenience for the production test link of the server, provides another mode for solving the problem of restarting the server, and saves manpower and material resources for partial function verification.

Description

Method and device for realizing multi-type restarting of server based on UEFI (unified extensible firmware interface)
Technical Field
The invention belongs to the technical field of server restart, and particularly relates to a method and a device for realizing multi-type server restart based on a UEFI interface.
Background
As servers continue to evolve, the definition of server reboots begins to change. Restart, the english name reset, is a popular term for computer operations, meaning to restart a computer. The restarting is to save the setting and modification of the system and start the related service immediately. The most common application to restart is when a crash occurs upon installation of new software or hardware, or because the application software has not responded for some reason. Although the number of reboots in a year is as small as possible for a server, a large amount of stress testing is still required for the server in the development stage of the server, such as resetting the CPU registers and installing software, which is still required for rebooting. The Intel platform defines a plurality of restart types, each restart type has different functions, and for the current servers, the server is more intelligent, and the requirements of clients on the performance of the servers are higher and higher.
In general, the server restart operation is performed in two ways: one is under the operating system, which is based on instructions of the operating system, such as the "reboot" instruction under Redhat; a 'shutdown' instruction in the Windows cmd; another is to send IPMI command to the server via BMC to restart. In a server production test link, the situations that the two restart modes cannot be realized exist in some cases: for example, a bootable hard disk cannot be identified, the system cannot be entered due to system damage, the hard disk is a UEFI-based system, the BIOS boot mode is "Legacy", the BMC has a problem or a network failure causes a failure to successfully send a reboot instruction to the server, and the like. legacy, refers to the conventional BIOS transfer mode start-up sequence: power on → BIOS initialization → BIOS self test → boot operating system → enter system.
Therefore, it is very necessary to provide a method and an apparatus for implementing multi-type restart of a server based on a UEFI interface to address the above-mentioned drawbacks in the prior art.
Disclosure of Invention
Aiming at the defect that the conventional common server restarting mode in the prior art cannot be realized actually, the invention provides a method and a device for realizing multi-type restarting of a server based on a UEFI (unified extensible firmware interface), so as to solve the technical problem.
In a first aspect, the present invention provides a method for implementing multi-type restart of a server based on a UEFI interface, including the following steps:
s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system;
s2, after the server is started and enters a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server;
and S3, judging whether the server is started according to the restarting mode selected by the user.
Further, the step S1 specifically includes the following steps:
s11, plugging the mobile storage equipment with the starting item with a server;
s12, entering a BIOS setting item in the starting process of the server, setting UEFI shell system starting as enabling, and storing the BIOS setting item;
and S13, restarting the server, entering a starting menu, selecting to establish and enter a UEFI shell system. And modifying the BIOS setting so as to enter the UEFI shell system after restarting.
Further, the step S2 specifically includes the following steps:
s21, starting a server to enter a UEFI shell system, and automatically operating a starting item in the mobile storage device;
and S22, prompting a user to select a restarting mode by the starting item, calling an mm instruction to modify the value of the restarting control register according to the restarting mode selected by the user, and restarting the server. And the starting program under the UEFI shell system is used for restarting the servers in multiple types, provides the users with choices, and restarts the servers in the selected restarting mode by modifying the address of the restarting control register.
Further, the step S22 specifically includes the following steps:
s221, the starting item acquires a restarting mode selected by a user, wherein the restarting mode comprises soft restarting, hot restarting and cold restarting;
when the starting item is soft restart, the step S222 is entered;
when the startup item is a hot restart, the step S223 is entered;
when the startup item is cold restart, go to step S224;
s222, calling an mm instruction by a starting item, modifying the value of a restarting control register, restarting a CPU, performing soft start on the server, and entering step S23;
s223, calling an mm instruction by the startup item, modifying the value of the restart control register, informing the server of restarting all chips and network cards, performing hot restart on the server, and entering step S23;
and S224, calling the mm instruction by the starting item, modifying the value of the restarting control register, performing power circulation on the server again, and performing cold restarting on the server. The system has three restarting modes of restarting the server by modifying the address mode of the restarting register, the restarting degree of each part of the server is not needed, and a user can select the most suitable restarting mode based on different application scenes without using external equipment and a network.
Further, the step S3 specifically includes the following steps:
s31, acquiring a restarting mode selected by a user;
when the restart mode is soft restart, the process proceeds to step S32;
when the restart mode is a hot restart, the process proceeds to step S33;
when the restart mode is the cold restart, the process proceeds to step S34;
s32, judging whether the CPU is restarted or not;
if yes, judging that the server soft restart is successful, and ending;
if not, judging that the server soft restart fails, and ending;
s33, judging whether all chips and network cards of the server are restarted or not;
if so, judging that the server is successfully restarted again, and ending;
if not, judging that the server fails in hot restart, and ending;
s34, judging whether the server carries out power supply circulation again or not;
if yes, judging that the server is successfully cold restarted, and ending;
if not, judging that the cold restart of the server fails, and ending. Due to different restarting modes, the restarting degrees are different, so that whether the corresponding restarting mode selected by the user is restarted successfully or not is verified through the characteristics of each restarting mode, and the corresponding restarting mode is ensured to be effective.
In a second aspect, the present invention provides an apparatus for implementing multi-type restart of a server based on a UEFI interface, including:
the UEFI shell system starting module is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system;
the server restarting module is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server;
and the restarting judgment module is used for judging whether the server is started according to the restarting mode selected by the user.
Further, the UEFI shell system starting module includes:
the starting item setting unit is used for plugging the mobile storage equipment with the starting item with the server;
the BIOS modification unit is used for entering a BIOS setting item in the starting process of the server, setting the UEFI shell system as an enable and storing the BIOS setting item;
and the UEFI shell system entering unit is used for restarting the server, entering a starting menu, selecting establishment and entering the UEFI shell system.
Further, the server restart module comprises:
the starting item running unit is used for starting the server to enter the UEFI shell system and automatically running the starting items in the mobile storage equipment;
and the server restarting mode selecting and restarting unit is used for prompting a user to select a restarting mode through the starting item, calling the mm instruction to modify the value of the restarting control register according to the restarting mode selected by the user, and restarting the server.
Further, the server restart mode selecting and restarting unit includes:
the restarting mode acquiring subunit is used for acquiring the restarting mode selected by the user through the starting item, wherein the restarting mode comprises soft restarting, hot restarting and cold restarting;
the soft starting unit is used for calling the mm instruction through the starting item to modify the value of the restarting control register and restarting the CPU to perform soft starting on the server when the starting item is soft restarting;
the hot start unit is used for calling the mm instruction to modify the value of the restart control register through the startup item when the startup item is hot restart, informing the server of restarting all chips and network cards, and carrying out hot restart on the server;
and the cold starting subunit is used for calling the mm instruction to modify the value of the restarting control register through the starting item when the starting item is cold restarting, performing power supply circulation again on the server, and performing cold restarting on the server.
Further, the restart judgment module comprises:
the user selection restarting mode obtaining unit is used for obtaining the restarting mode selected by the user;
the soft restart judging unit is used for judging whether the CPU is restarted or not when the restart mode is soft restart;
the soft restart success judging unit is used for judging that the server is in soft restart success when the CPU is restarted;
the soft restart failure judging unit is used for judging the soft restart failure of the server when the CPU is not restarted;
the hot restart judging unit is used for judging whether all chips and network cards of the server are restarted or not when the restart mode is hot restart;
the hot restart success judging unit is used for judging that the server is successfully hot restarted when all chips and network cards of the server are restarted;
the hot restart failure determination unit is used for determining the hot restart failure of the server when all chips and network cards of the server have non-restart items;
the cold restart judging unit is used for judging whether the server carries out power supply circulation again or not when the restart mode is cold restart;
the cold restart success judging unit is used for judging that the server is successfully restarted in a cold mode when the server performs power circulation again;
and the cold restart failure determination unit is used for determining that the server fails to perform cold restart when the server does not perform power circulation again.
The beneficial effect of the invention is that,
according to the method and the device for realizing the multi-type restarting of the server based on the UEFI interface, the user can restart the server correspondingly by resetting the corresponding register according to the self requirement when the user cannot use external equipment or a network through the UEFI Shell interface between the user and the UEFI system. The invention provides convenience for the production test link of the server, provides another mode for solving the problem of restarting the server, and saves manpower and material resources for partial function verification.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a first flowchart of a method for implementing multi-type restart of a server based on a UEFI interface according to the present invention.
Fig. 2 is a schematic flow chart of a method for implementing multi-type restart of a server based on a UEFI interface according to the present invention.
Fig. 3 is a schematic diagram of an apparatus for implementing multi-type restart of a server based on a UEFI interface according to the present invention.
In the figure, a 1-UEFI shell system starts a module; 1.1-start item setting unit; 1.2-BIOS modification unit; 1.3-UEFI shell system entering unit; 2-a server restart module; 2.1-start item operation unit; 2.2-a server restart mode selection and restart unit; 3-restarting the judging module; 3.1-restarting the judging module; 3.2-soft restart judgment unit; 3.3-soft restart success determination unit; 3.4-soft restart failure determination unit; 3.5-a hot restart judgment unit; 3.6-a hot restart success determination unit; 3.7-hot restart failure determination unit; 3.8-cold restart judgment unit; 3.9-cold restart success judging unit; 3.10 — Cold restart failure determination Unit.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all 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 invention.
UEFI is a Unified Extensible Firmware Interface (UNIFIED Extensible Firmware Interface) which is a short name for a Unifie Extensible Firmware Interface, is a personal computer system specification and is used for defining a software Interface between an operating system and system Firmware as a replacement scheme for BIOS.
The mm instruction is a built-in instruction under UEFI Shell, and can modify the values of corresponding registers in a memory, memory mapping IO, PCI and PCIE address space mode.
Example 1:
as shown in fig. 1, the present invention provides a method for implementing multi-type restart of a server based on UEFI interface, which includes the following steps:
s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system;
s2, after the server is started and enters a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server;
and S3, judging whether the server is started according to the restarting mode selected by the user.
Example 2:
as shown in fig. 2, the present invention provides a method for implementing multi-type restart of a server based on UEFI interface, which includes the following steps:
s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system; the method comprises the following specific steps:
s11, plugging the mobile storage equipment with the starting item with a server;
s12, entering a BIOS setting item in the starting process of the server, setting UEFI shell system starting as enabling, and storing the BIOS setting item;
s13, restarting the server, entering a starting menu, selecting to establish and enter a UEFI shell system;
s2, starting the server to enter a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server; the method comprises the following specific steps:
s21, starting a server to enter a UEFI shell system, and automatically operating a starting item in the mobile storage device;
s22, prompting a user to select a restarting mode by a starting item, calling an mm instruction to modify the value of a restarting control register according to the restarting mode selected by the user, and restarting a server;
s3, judging whether the server is started according to a restarting mode selected by a user; the method comprises the following specific steps:
s31, acquiring a restarting mode selected by a user;
when the restart mode is soft restart, the process proceeds to step S32;
when the restart mode is a hot restart, the process proceeds to step S33;
when the restart mode is the cold restart, the process proceeds to step S34;
s32, judging whether the CPU is restarted or not;
if yes, judging that the server soft restart is successful, and ending;
if not, judging that the server soft restart fails, and ending;
s33, judging whether all chips and network cards of the server are restarted or not;
if so, judging that the server is successfully restarted again, and ending;
if not, judging that the server fails in hot restart, and ending;
s34, judging whether the server carries out power supply circulation again or not;
if yes, judging that the server is successfully cold restarted, and ending;
if not, judging that the cold restart of the server fails, and ending.
Example 3:
as shown in fig. 2, the present invention provides a method for implementing multi-type restart of a server based on UEFI interface, which includes the following steps:
s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system; the method comprises the following specific steps:
s11, plugging the mobile storage equipment with the starting item with a server;
s12, entering a BIOS setting item in the starting process of the server, setting UEFI shell system starting as enabling, and storing the BIOS setting item;
s13, restarting the server, entering a starting menu, selecting to establish and enter a UEFI shell system;
s2, after the server is started and enters a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server; the method comprises the following specific steps:
s21, starting a server to enter a UEFI shell system, and automatically operating a starting item in the mobile storage device;
s22, prompting a user to select a restarting mode by a starting item, calling an mm instruction to modify the value of a restarting control register according to the restarting mode selected by the user, and restarting a server; the method comprises the following specific steps:
s221, the starting item acquires a restarting mode selected by a user, wherein the restarting mode comprises soft restarting, hot restarting and cold restarting;
when the starting item is soft restart, the step S222 is entered;
when the startup item is a hot restart, the step S223 is entered;
when the startup item is cold restart, go to step S224;
s222, calling an mm instruction by a starting item, modifying the value of a restarting control register, restarting a CPU, performing soft start on the server, and entering step S23;
s223, calling an mm instruction by the startup item, modifying the value of the restart control register, informing the server of restarting all chips and network cards, performing hot restart on the server, and entering step S23;
s224, calling the mm instruction by the starting item, modifying the value of the restarting control register, performing power supply circulation on the server again, and performing cold restarting on the server;
s3, judging whether the server is started according to a restarting mode selected by a user; the method comprises the following specific steps:
s31, acquiring a restarting mode selected by a user;
when the restart mode is soft restart, the process proceeds to step S32;
when the restart mode is a hot restart, the process proceeds to step S33;
when the restart mode is the cold restart, the process proceeds to step S34;
s32, judging whether the CPU is restarted or not;
if yes, judging that the server soft restart is successful, and ending;
if not, judging that the server soft restart fails, and ending;
s33, judging whether all chips and network cards of the server are restarted or not;
if so, judging that the server is successfully restarted again, and ending;
if not, judging that the server fails in hot restart, and ending;
s34, judging whether the server carries out power supply circulation again or not;
if yes, judging that the server is successfully cold restarted, and ending;
if not, judging that the cold restart of the server fails, and ending.
In the above embodiment 3, a startup procedure is set in the usb disk, and the mm built-in command can be called by the startup procedure;
the method comprises the steps of inserting a USB flash disk with a startup procedure, entering a BIOS item through a hot key in the server startup process, and setting Add EFI Shell To Boot Option under Boot in the BIOS item To be Enabled, so that starting of the UEFI Shell system is realized, and the UEFI Shell system can be entered in the next startup. And saving and restarting, entering a Boot menu item through a hot key in the starting process, selecting 'UEFI: build-in EFI Shell', entering a UEFI Shell system, generating a text interface of the UEFI Shell at the output end, detecting a startup procedure in the USB flash disk, and running.
Nsh starting program running can prompt the user to select at the output end, so that the user automatically enters the U disk directory, and calls UEFI Shell built-in instruction 'mm', and runs the instruction: mm cf9 xx-IO.
Wherein xx is a parameter requiring a user, and the meaning of each parameter is as follows:
when the user selects the soft restart, the CF9 address is modified to 02 to perform the soft restart, the CPU is restarted by the restart mode, the program is executed again from the reset vector, and peripheral registers and south bridge chipset registers of a plurality of CPUs are not restarted.
When the user selects hot restart, the CF9 address is modified to be 06, and the hot restart is carried out, which is also called hard restart. The restart mode is the most common restart mode, and informs all chips including peripheral network cards to restart together through an alert PLTRST # signal, and most registers of the system are reset to default values after the restart mode.
When the user selects the cold restart, the CF9 address is modified to 0E, and the cold restart, also called a full restart, is performed. In this manner, the server system may experience a complete power cycle, which may appear to be shut down and then turned on, and the fan may also be shut down and then operated. The server system in the rebooting manner goes through the processes of S3, S4, and S5 in sequence, which takes a long time, and resets the registers that need to be cleared only by shutdown on the basis of the previous period. The actions adopted by the restarting mode are indispensable when certain functions are set, for example, after the firmware of the network card is upgraded, the network card can only be started through cold restarting, and the hot restarting cannot be started.
Example 4:
as shown in fig. 3, the present invention provides a device for implementing multi-type restart of a server based on UEFI interface, including:
the UEFI shell system starting module 1 is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system;
the server restarting module 2 is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server;
and the restarting judgment module 3 is used for judging whether the server is started according to the restarting mode selected by the user.
Example 5:
as shown in fig. 3, the present invention provides a device for implementing multi-type restart of a server based on UEFI interface, including:
the UEFI shell system starting module 1 is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system; the UEFI shell system starting module 1 comprises:
the starting item setting unit 1.1 is used for plugging the mobile storage equipment with the starting item with a server;
the BIOS modification unit 1.2 is used for entering BIOS setting items in the starting process of the server, setting UEFI shell system starting as enabling and storing the BIOS setting items;
the UEFI shell system entering unit 1.3 is used for restarting the server, entering a starting menu, selecting to establish and entering the UEFI shell system;
the server restarting module 2 is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server; the server restart module 2 includes:
the starting item running unit 2.1 is used for starting the server to enter the UEFI shell system and automatically running the starting items in the mobile storage device;
the server restarting mode selecting and restarting unit 2.2 is used for prompting a user to select a restarting mode through a starting item, calling an mm instruction to modify the value of a restarting control register according to the restarting mode selected by the user, and restarting the server;
the restarting judgment module 3 is used for judging whether the server is started according to the restarting mode selected by the user; the restart judgment module 3 includes:
a user selection restarting mode obtaining unit 3.1, which is used for obtaining the restarting mode selected by the user;
a soft restart judging unit 3.2, configured to judge whether the CPU is restarted when the restart mode is a soft restart;
a soft restart success judging unit 3.3, which is used for judging the success of the soft restart of the server when the CPU is restarted;
a soft restart failure determination unit 3.4, configured to determine that the server is in a soft restart failure when the CPU is not restarted;
the hot restart judging unit 3.5 is used for judging whether all chips and network cards of the server are restarted or not when the restart mode is hot restart;
the hot restart success judging unit 3.6 is used for judging that the server is successfully hot restarted when all the chips and the network cards of the server are restarted;
the hot restart failure determination unit 3.7 is used for determining the hot restart failure of the server when all chips and network cards of the server have non-restart items;
the cold restart judging unit 3.8 is used for judging whether the server carries out power supply circulation again when the restart mode is cold restart;
the cold restart success judging unit 3.9 is used for judging that the server is successfully cold restarted when the server performs power circulation again;
and the cold restart failure determination unit 3.10 is used for determining that the server fails to perform cold restart when the server does not perform power circulation again.
Example 6:
as shown in fig. 3, the present invention provides a device for implementing multi-type restart of a server based on UEFI interface, including:
the UEFI shell system starting module 1 is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system; the UEFI shell system starting module 1 comprises:
the starting item setting unit 1.1 is used for plugging the mobile storage equipment with the starting item with a server;
the BIOS modification unit 1.2 is used for entering a BIOS setting item in the starting process of the server, modifying the UEFI shell system starting item into enable and storing the BIOS setting item;
the UEFI shell system entering unit 1.3 is used for restarting the server, entering a starting menu, selecting to establish and entering the UEFI shell system;
the server restarting module 2 is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server; the server restart module 2 includes:
the starting item running unit 2.1 is used for starting the server to enter the UEFI shell system and automatically running the starting items in the mobile storage device;
the server restarting mode selecting and restarting unit 2.2 is used for prompting a user to select a restarting mode through a starting item, calling an mm instruction according to the restarting mode selected by the user to modify the value of a restarting control register, and restarting the server;
the restarting judgment module 3 is used for judging whether the server is started according to the restarting mode selected by the user; the restart judgment module 3 includes:
a user selection restarting mode obtaining unit 3.1, which is used for obtaining the restarting mode selected by the user;
a soft restart judging unit 3.2, configured to judge whether the CPU is restarted when the restart mode is a soft restart;
a soft restart success judging unit 3.3, which is used for judging the success of the soft restart of the server when the CPU is restarted;
a soft restart failure determination unit 3.4, configured to determine that the server is in a soft restart failure when the CPU is not restarted;
the hot restart judging unit 3.5 is used for judging whether all chips and network cards of the server are restarted or not when the restart mode is hot restart;
the hot restart success judging unit 3.6 is used for judging that the server is successfully hot restarted when all the chips and the network cards of the server are restarted;
the hot restart failure determination unit 3.7 is used for determining the hot restart failure of the server when all chips and network cards of the server have non-restart items;
the cold restart judging unit 3.8 is used for judging whether the server carries out power supply circulation again when the restart mode is cold restart;
the cold restart success judging unit 3.9 is used for judging that the server is successfully cold restarted when the server performs power circulation again;
and the cold restart failure determination unit 3.10 is used for determining that the server fails to perform cold restart when the server does not perform power circulation again.
Example 7:
as shown in fig. 3, the present invention provides a device for implementing multi-type restart of a server based on UEFI interface, including:
the UEFI shell system starting module 1 is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system; the UEFI shell system starting module 1 comprises:
the starting item setting unit 1.1 is used for plugging the mobile storage equipment with the starting item with a server;
the BIOS modification unit 1.2 is used for entering a BIOS setting item in the starting process of the server, modifying the UEFI shell system starting item into enable and storing the BIOS setting item;
the UEFI shell system entering unit 1.3 is used for restarting the server, entering a starting menu, selecting to establish and entering the UEFI shell system;
the server restarting module 2 is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server; the server restart module 2 includes:
the starting item running unit 2.1 is used for starting the server to enter the UEFI shell system and automatically running the starting items in the mobile storage device;
the server restarting mode selecting and restarting unit 2.2 is used for prompting a user to select a restarting mode through a starting item, calling an mm instruction according to the restarting mode selected by the user to modify the value of a restarting control register, and restarting the server; the server restart mode selection and restart unit 2.2 comprises:
the restarting mode acquiring subunit is used for acquiring the restarting mode selected by the user through the starting item, wherein the restarting mode comprises soft start, hot start and cold start;
the soft starting unit is used for calling the mm instruction through the starting item to modify the value of the restarting control register and restarting the CPU to perform soft starting on the server when the starting item is soft restarting;
the hot start unit is used for calling the mm instruction to modify the value of the restart control register through the startup item when the startup item is hot restart, informing the server of restarting all chips and network cards, and carrying out hot restart on the server;
the cold starting subunit is used for calling the mm instruction to modify the value of the restarting control register through the starting item when the starting item is cold restarting, performing power supply circulation again on the server, and performing cold restarting on the server;
the restarting judgment module 3 is used for judging whether the server is started according to the restarting mode selected by the user; the restart judgment module 3 includes:
a user selection restarting mode obtaining unit 3.1, which is used for obtaining the restarting mode selected by the user;
a soft restart judging unit 3.2, configured to judge whether the CPU is restarted when the restart mode is a soft restart;
a soft restart success judging unit 3.3, which is used for judging the success of the soft restart of the server when the CPU is restarted;
a soft restart failure determination unit 3.4, configured to determine that the server is in a soft restart failure when the CPU is not restarted;
the hot restart judging unit 3.5 is used for judging whether all chips and network cards of the server are restarted or not when the restart mode is hot restart;
the hot restart success judging unit 3.6 is used for judging that the server is successfully hot restarted when all the chips and the network cards of the server are restarted;
the hot restart failure determination unit 3.7 is used for determining the hot restart failure of the server when all chips and network cards of the server have non-restart items;
the cold restart judging unit 3.8 is used for judging whether the server carries out power supply circulation again when the restart mode is cold restart;
the cold restart success judging unit 3.9 is used for judging that the server is successfully cold restarted when the server performs power circulation again;
and the cold restart failure determination unit 3.10 is used for determining that the server fails to perform cold restart when the server does not perform power circulation again.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for realizing multi-type restarting of a server based on a UEFI interface is characterized by comprising the following steps:
s1, configuring a mobile storage device with a starting item for a server, and setting the server to start a UEFI shell system;
s2, after the server is started and enters a UEFI shell system, modifying the value of a restart control register through a built-in instruction according to a restart mode selected by a user, and restarting the server;
and S3, judging whether the server is started according to the restarting mode selected by the user.
2. The method for multi-type restarting of a server based on UEFI interface of claim 1, wherein the step S1 is embodied as follows:
s11, plugging the mobile storage equipment with the starting item with a server;
s12, entering a BIOS setting item in the starting process of the server, setting UEFI shell system starting as enabling, and storing the BIOS setting item;
and S13, restarting the server, entering a starting menu, selecting to establish and enter a UEFI shell system.
3. The method for multi-type restarting of a server based on UEFI interface of claim 1, wherein the step S2 is embodied as follows:
s21, starting a server to enter a UEFIshell system, and automatically operating a starting item in the mobile storage equipment;
and S22, prompting a user to select a restarting mode by the starting item, calling an mm instruction to modify the value of the restarting control register according to the restarting mode selected by the user, and restarting the server.
4. The method for multi-type restarting of a server based on UEFI interface of claim 3, wherein the step S22 is specifically as follows:
s221, the starting item acquires a restarting mode selected by a user, wherein the restarting mode comprises soft restarting, hot restarting and cold restarting;
when the starting item is soft restart, the step S222 is entered;
when the startup item is a hot restart, the step S223 is entered;
when the startup item is cold restart, go to step S224;
s222, calling an mm instruction by a starting item, modifying the value of a restarting control register, restarting a CPU, performing soft start on the server, and entering step S23;
s223, calling an mm instruction by the startup item, modifying the value of the restart control register, informing the server of restarting all chips and network cards, performing hot restart on the server, and entering step S23;
and S224, calling the mm instruction by the starting item, modifying the value of the restarting control register, performing power circulation on the server again, and performing cold restarting on the server.
5. The method for multi-type restarting of a server based on UEFI interface of claim 4, wherein the step S3 is specifically as follows:
s31, acquiring a restarting mode selected by a user;
when the restart mode is soft restart, the process proceeds to step S32;
when the restart mode is a hot restart, the process proceeds to step S33;
when the restart mode is the cold restart, the process proceeds to step S34;
s32, judging whether the CPU is restarted or not;
if yes, judging that the server soft restart is successful, and ending;
if not, judging that the server soft restart fails, and ending;
s33, judging whether all chips and network cards of the server are restarted or not;
if so, judging that the server is successfully restarted again, and ending;
if not, judging that the server fails in hot restart, and ending;
s34, judging whether the server carries out power supply circulation again or not;
if yes, judging that the server is successfully cold restarted, and ending;
if not, judging that the cold restart of the server fails, and ending.
6. An apparatus for implementing multi-type restart of a server based on a UEFI interface, comprising:
the UEFI shell system starting module (1) is used for configuring the mobile storage equipment with the starting item for the server and setting the server to start the UEFI shell system;
the server restarting module (2) is used for modifying the value of a restarting control register through a built-in instruction according to a restarting mode selected by a user after the server is started and enters the UEFI shell system, and restarting the server;
and the restarting judgment module (3) is used for judging whether the server is started according to the restarting mode selected by the user.
7. The apparatus for implementing multi-type restart of server based on UEFI interface of claim 6, wherein UEFI shell system startup module (1) comprises:
the starting item setting unit (1.1) is used for plugging the mobile storage equipment with the starting item with the server;
the BIOS modification unit (1.2) is used for entering a BIOS setting item in the starting process of the server, setting the UEFI shell system starting as enabling and storing the BIOS setting item;
and the UEFI shell system entering unit (1.3) is used for restarting the server, entering a starting menu, selecting establishment and entering the UEFI shell system.
8. The apparatus for enabling multi-type restart of a server based on UEFI interface of claim 6, wherein the server restart module (2) comprises:
the starting item running unit (2.1) is used for starting the server to enter the UEFI shell system and automatically running the starting item in the mobile storage equipment;
and the server restarting mode selecting and restarting unit (2.2) is used for prompting a user to select a restarting mode through the starting item, calling the mm instruction to modify the value of the restarting control register according to the restarting mode selected by the user, and restarting the server.
9. The apparatus for enabling multi-type restart of a server based on UEFI interface of claim 8, wherein the server restart mode selecting and restarting unit (2.2) comprises:
the restarting mode acquiring subunit is used for acquiring the restarting mode selected by the user through the starting item, wherein the restarting mode comprises soft restarting, hot restarting and cold restarting;
the soft starting unit is used for calling the mm instruction through the starting item, modifying the value of the restarting control register, restarting the CPU and carrying out soft starting on the server when the starting item is soft restarting;
the hot start unit is used for calling the mm instruction through the startup item when the startup item is hot restart, modifying the value of the restart control register, informing the server of restarting all chips and network cards, and carrying out hot restart on the server;
and the cold starting subunit is used for calling the mm instruction through the starting item when the starting item is cold restarting, modifying the value of the restarting control register, performing power supply circulation again on the server, and performing cold restarting on the server.
10. The apparatus for implementing multi-type restart of a server based on UEFI interface according to claim 9, wherein the restart judgment module (3) comprises:
a user selection restarting mode obtaining unit (3.1) for obtaining the restarting mode selected by the user;
a soft restart judging unit (3.2) for judging whether the CPU is restarted when the restart mode is soft restart;
a soft restart success judging unit (3.3) for judging that the server soft restart succeeds when the CPU is restarted;
a soft restart failure determination unit (3.4) for determining that the server soft restart fails when the CPU is not restarted;
the hot restart judging unit (3.5) is used for judging whether all chips and network cards of the server are restarted or not when the restart mode is hot restart;
the hot restart success judging unit (3.6) is used for judging that the server is successfully hot restarted when all chips and network cards of the server are restarted;
the hot restart failure judgment unit (3.7) is used for judging the hot restart failure of the server when all chips and network cards of the server have non-restart items;
a cold restart judging unit (3.8) for judging whether the server performs power circulation again when the restart mode is cold restart;
the cold restart success judging unit (3.9) is used for judging that the server is successfully cold restarted when the server performs power circulation again;
and the cold restart failure determination unit (3.10) is used for determining the cold restart failure of the server when the server does not perform power cycle again.
CN202111089276.8A 2021-09-16 2021-09-16 Method and device for realizing multi-type restarting of server based on UEFI interface Active CN113867814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111089276.8A CN113867814B (en) 2021-09-16 2021-09-16 Method and device for realizing multi-type restarting of server based on UEFI interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111089276.8A CN113867814B (en) 2021-09-16 2021-09-16 Method and device for realizing multi-type restarting of server based on UEFI interface

Publications (2)

Publication Number Publication Date
CN113867814A true CN113867814A (en) 2021-12-31
CN113867814B CN113867814B (en) 2023-07-21

Family

ID=78996294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111089276.8A Active CN113867814B (en) 2021-09-16 2021-09-16 Method and device for realizing multi-type restarting of server based on UEFI interface

Country Status (1)

Country Link
CN (1) CN113867814B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924802A (en) * 2022-05-27 2022-08-19 苏州浪潮智能科技有限公司 System starting method, device equipment and medium based on BMC and BIOS
CN115495161A (en) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 BIOS option modification validation method and device and storage medium
WO2023221273A1 (en) * 2022-05-16 2023-11-23 宝德计算机系统股份有限公司 Server pressure testing method and device, and computer storage medium
CN117632569A (en) * 2024-01-12 2024-03-01 宝德计算机系统股份有限公司 Method and device for remedying PCI equipment information loss at BMC webpage end

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180032349A1 (en) * 2016-07-28 2018-02-01 Microsoft Technology Licensing, Llc. Optimized UEFI Reboot Process
US20190004818A1 (en) * 2017-06-29 2019-01-03 American Megatrends Inc. Method of UEFI Shell for Supporting Power Saving Mode and Computer System thereof
CN109189618A (en) * 2018-08-10 2019-01-11 郑州云海信息技术有限公司 A kind of Server Restart test method, device and equipment
CN111736906A (en) * 2020-06-12 2020-10-02 苏州浪潮智能科技有限公司 BIOS-based boot entry synchronous storage method, system, terminal and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180032349A1 (en) * 2016-07-28 2018-02-01 Microsoft Technology Licensing, Llc. Optimized UEFI Reboot Process
US20190004818A1 (en) * 2017-06-29 2019-01-03 American Megatrends Inc. Method of UEFI Shell for Supporting Power Saving Mode and Computer System thereof
CN109189618A (en) * 2018-08-10 2019-01-11 郑州云海信息技术有限公司 A kind of Server Restart test method, device and equipment
CN111736906A (en) * 2020-06-12 2020-10-02 苏州浪潮智能科技有限公司 BIOS-based boot entry synchronous storage method, system, terminal and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023221273A1 (en) * 2022-05-16 2023-11-23 宝德计算机系统股份有限公司 Server pressure testing method and device, and computer storage medium
CN114924802A (en) * 2022-05-27 2022-08-19 苏州浪潮智能科技有限公司 System starting method, device equipment and medium based on BMC and BIOS
CN114924802B (en) * 2022-05-27 2024-02-09 苏州浪潮智能科技有限公司 System starting method, device equipment and medium based on BMC and BIOS
CN115495161A (en) * 2022-11-17 2022-12-20 苏州浪潮智能科技有限公司 BIOS option modification validation method and device and storage medium
CN115495161B (en) * 2022-11-17 2023-04-07 苏州浪潮智能科技有限公司 BIOS option modification validation method and device and storage medium
WO2024103583A1 (en) * 2022-11-17 2024-05-23 苏州元脑智能科技有限公司 Method and apparatus for changed bios options to take effect, nonvolatile readable storage medium, and electronic apparatus
CN117632569A (en) * 2024-01-12 2024-03-01 宝德计算机系统股份有限公司 Method and device for remedying PCI equipment information loss at BMC webpage end
CN117632569B (en) * 2024-01-12 2024-04-12 宝德计算机系统股份有限公司 Method and device for remedying PCI equipment information loss at BMC webpage end

Also Published As

Publication number Publication date
CN113867814B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN113867814B (en) Method and device for realizing multi-type restarting of server based on UEFI interface
US10866623B2 (en) Information handling system and method to detect and recover from no power/no post failures
TWI291652B (en) Debugging device using a LPC interface capable of recovering functions of BIOS, and debugging method therefor
CN105094927A (en) Equipment firmware updating method and device
WO2019169877A1 (en) Double bios control method and related devices
CN109976816B (en) Computer system configuration method and server
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
US20220214945A1 (en) System Booting Method and Apparatus, Node Device, and Computer-Readable Storage Medium
CN110119623A (en) A kind of credible main board implementation method for realizing that firmware is actively measured using TPCM
CN111338698A (en) Method and system for accurately booting server by BIOS (basic input output System)
CN111475172A (en) Bare machine deployment method and device
CN112433769A (en) BMC starting method and device, computer equipment and storage medium
JP2009524126A (en) Mobile computing device and data packet receiving method thereof
CN102567178B (en) A kind of electronic equipment and dump energy Notification Method thereof and starting method
CN111708662A (en) Debugging method and device
CN101201746A (en) Method for setting ROM-BIOS
CN117130672A (en) Server start flow control method, system, terminal and storage medium
CN115495161B (en) BIOS option modification validation method and device and storage medium
CN112148100B (en) Embedded equipment control method, device and system
TWI554876B (en) Method for processing node replacement and server system using the same
CN114090329A (en) Server restarting method under full-unloading architecture and related equipment
CN111399921A (en) Switching method, device and equipment for server boot logo
CN110673974A (en) System debugging method and device
CN110119624A (en) A kind of security measure method
CN104142870A (en) Virtual BIOS (basic input /output system) booting system and virtual BIOS booting method

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