CN114153509A - System starting method and electronic equipment - Google Patents

System starting method and electronic equipment Download PDF

Info

Publication number
CN114153509A
CN114153509A CN202111461694.5A CN202111461694A CN114153509A CN 114153509 A CN114153509 A CN 114153509A CN 202111461694 A CN202111461694 A CN 202111461694A CN 114153509 A CN114153509 A CN 114153509A
Authority
CN
China
Prior art keywords
boot loader
processor
running data
running
preset value
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.)
Pending
Application number
CN202111461694.5A
Other languages
Chinese (zh)
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202111461694.5A priority Critical patent/CN114153509A/en
Publication of CN114153509A publication Critical patent/CN114153509A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The application discloses a system starting method and electronic equipment, wherein in the system starting process, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.

Description

System starting method and electronic equipment
Technical Field
The present disclosure relates to the field of system booting, and in particular, to a system booting method and an electronic device.
Background
In the system starting process, a first boot loader bootloader in a BIOS is usually operated after the system is powered on, and the first boot loader is used to initialize hardware devices and establish a mapping map of a memory space. And after the BIOS finishes hardware detection and resource allocation, starting the operating system OS to finish the starting process of the system.
However, during bootloader loading operation, an exception may occur, and debugging information related to the exception cannot be received by a debugger, which results in that the system cannot be started normally.
Disclosure of Invention
In view of the above, the present application provides a system booting method and an electronic device, and the specific scheme thereof is as follows:
a system startup method, comprising:
controlling a first boot loader to run in the system starting process;
when the first boot loader outputs running data, the first processor determines whether a preset parameter is a first preset value, wherein the preset parameter is used for indicating whether the first boot loader is in a state to be debugged;
if the preset parameter is a first preset value, storing running data of a first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data.
Further, the method also comprises the following steps:
the control system is restarted, and the first processor or the second processor reads and outputs stored running data of the first boot loader during running so as to debug the first boot loader based on the output running data;
the first processor is different from the second processor, and the second processor is used for controlling the operation of the system after being started.
Further, the method also comprises the following steps:
if the preset parameter is a second preset value, controlling a first boot loader to operate;
and if the first boot loader runs abnormally, adjusting the preset parameters from a second preset value to a first preset value.
Further, the method also comprises the following steps:
obtaining an adjusting instruction output by the first processor or the second processor;
and adjusting the preset parameter to be a first preset value or a second preset value based on the adjusting instruction.
Further, the method also comprises the following steps:
and if the preset parameter is adjusted to the first preset value from the second preset value, controlling the system to restart so as to store running data of the first boot loader during running of the first boot loader in the process of controlling the first boot loader to run when the first processor determines that the preset parameter is the first preset value during the starting process of the system.
Further, the storing the running data of the first boot loader during the running process includes:
the first processor sends the running data to a platform management system for storage;
and/or the presence of a gas in the gas,
the first processor stores the operating data to a non-volatile memory.
Further, when the control system is restarted, the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, including:
during the system restarting process, the first processor reads the stored running data through a reading module;
and outputting the running data to a serial port terminal, and storing the running data in a first boot loader running log.
Further, when the control system is restarted, the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, including:
in the process of restarting the system, the first processor adjusts the preset parameter to a second preset value and controls a second boot loader to run;
and when the system starts to finish running, the second processor reads and outputs the stored running data.
An electronic device, comprising:
the first processor is used for controlling the operation of the first boot loader in the system starting process; when the first boot loader outputs running data, determining whether a preset parameter is a first preset value, wherein the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of a first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data;
and the memory is used for storing the program of the processor for executing the processing procedure.
A readable storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least a system-initiated method as in any one of the above.
According to the technical scheme, in the system starting process, the first boot loader is controlled to run, when the first boot loader outputs running data, the first processor determines whether the preset parameter is the first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a system startup method disclosed in an embodiment of the present application;
fig. 2 is a schematic structural relationship diagram of a first boot loader, a first processor and a second processor according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a system booting method according to an embodiment of the present application;
FIG. 4 is a flowchart of a system boot method disclosed in an embodiment of the present application;
FIG. 5 is a schematic flow chart illustrating system startup disclosed in an embodiment of the present application;
FIG. 6 is a flowchart of a system boot method disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The application discloses a system starting method, a flow chart of which is shown in fig. 1, comprising the following steps:
step S11, in the system starting process, controlling the first boot loader to run;
step S12, when the first boot loader outputs the running data, the first processor determines whether a preset parameter is a first preset value, where the preset parameter is used to indicate whether the first boot loader is in a state to be debugged;
step S13, if the preset parameter is the first preset value, in the process of controlling the first boot loader to run, storing running data of the first boot loader during running, so as to debug the first boot loader based on the running data.
The bootloader is a program which runs before the kernel of the operating system runs, and can initialize hardware equipment and establish a mapping map of a memory space through the bootloader, so that the software and hardware environment of the system reaches an adaptive state.
In the system starting process, when a first boot loader bootloader in a Basic Input Output System (BIOS) loads and runs, no matter a problem occurs in a first stage shim or a problem occurs in a second stage grub, debugging information related to the abnormality cannot be completely output to a serial port, so that the debugging information cannot be received by a debugger, and the system cannot be normally started.
Based on this, in the scheme, in the process of running the first boot loader, if it is determined that the first boot loader is in the state to be debugged, the running data in the running process of the first boot loader is stored, so that the first boot loader can be debugged based on the stored running data.
Specifically, in the system starting process, when the first processor BIOS is started, the first boot loader runs, and in the running process of the first boot loader, the first processor determines whether a certain preset parameter is a first preset value, and if the certain preset parameter is the first preset value, it indicates that the first boot loader is in a state to be debugged and needs to store running data of the first boot loader; if the current first boot loader program is not the first preset value, the current first boot loader program does not need to be debugged, the first boot loader program normally runs, and the subsequent system starting process is continuously started.
The preset parameter is a variable DEBUG added in the unified extensible firmware interface UEFI, and default values may be set for the variable, for example: false, when the variable is a default value, the variable is a non-first preset value, and the running data of the first boot loader does not need to be stored; when the variable is the first preset value, the first preset value is as follows: true, at this time, the running data of the first boot loader needs to be stored.
It should be noted that the storage of the running data of the first boot loader is not necessarily performed only when the first boot loader runs abnormally, but is necessarily performed only when the preset parameter is the first preset value, and the storage of the running data of the first boot loader is performed as long as the preset parameter is the first preset value.
As shown in fig. 2, includes: a first boot loader 21, a first processor 22 and a second processor 23.
The first boot loader Bootloader is partially stored in the first processor BIOS, and the rest is stored in the second processor CPU. The method comprises the following steps that a first stage shim and a second stage grub can be executed in the running process of a first boot loader, a debugging switch is arranged in each of the first stage shim and the second stage grub, the first boot loader can be debugged only when the two debugging switches are both in an open state, and the embodiment disclosed by the scheme is realized when the two debugging switches are both in the open state; in addition, a preset parameter Debug needs to be set in the first boot loader, and whether the running data of the first boot loader needs to be stored is determined according to the value of the preset parameter.
Further, a Write module Write handler may be further added to the first boot loader Bootloader, and the Write module Write handler is configured to check whether a value of the preset parameter is the first preset value. The write module may be located in a portion of the first boot loader that is located in the BIOS of the first processor, i.e., the write module is located in a portion of the first boot loader that is stored in the first processor.
The embodiment discloses a system starting method, wherein in the system starting process, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
The embodiment discloses a system starting method, a flow chart of which is shown in fig. 3, and the method comprises the following steps:
step S31, in the system starting process, controlling the first boot loader to run;
step S32, when the first boot loader outputs the running data, the first processor determines whether a preset parameter is a first preset value, where the preset parameter is used to indicate whether the first boot loader is in a state to be debugged;
step S33, if the preset parameter is the first preset value, in the process of controlling the first boot loader to run, storing running data of the first boot loader during running, so as to debug the first boot loader based on the running data;
and step S34, the control system restarts, and the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, so as to debug the first boot loader based on the output running data.
The first processor is different from the second processor, and the second processor is used for controlling the operation of the system after the system is started.
If the preset parameter is determined to be the first preset value, the first boot loader is in a to-be-debugged state, and the running data of the first boot loader during running is stored based on the first boot loader being in the to-be-debugged state, and the running data is stored, so that the first boot loader can be debugged based on reading of the stored running data.
After the running data of the first boot loader is stored, the system is controlled to restart, so that the stored running data can be read in the restarting process, and the first boot loader is not executed again.
The method includes that a first boot loader is directly operated in a starting process of a system when running data is stored, the first boot loader is determined to be in a to-be-debugged state in the operating process, then, after the running data is read, the first boot loader cannot be controlled to operate again according to the previous flow in a restarting process, and if the first boot loader is controlled to operate again, the first boot loader still can be in the to-be-debugged state, and the system cannot be normally started. Therefore, after the running data of the first boot loader is stored, in the process of restarting the first boot loader, the running data is directly read so as to be adjusted based on the running data, only after the first boot loader is debugged based on the running data, the preset parameter can be adjusted back to the non-first preset value, at this time, the system is restarted, the detected preset parameter is the non-first preset value when the first boot loader is controlled to run, the normal starting process of the first boot loader can be completed, and the normal starting of the system is realized.
When the control system is restarted, the first processor may read the stored operation data, or the second processor may read the stored operation data, and the first processor may be: the second processor may be a central processing unit CPU, that is, the second processor may read and output the running data of the first boot loader stored in the last boot process in the system boot process, or may read and output the running data after the system boot is completed.
The first processor or the second processor outputs the stored operation data, which may be: the first processor or the second processor reads the running data of the first boot loader in the last system starting process stored in the memory and outputs the running data through the display screen of the electronic device, so that an operator can determine which part of the first boot loader is to be debugged based on the running data output by the display screen, or what state the first boot loader needs to be debugged to, and the like.
The operating data of the first boot loader during operation is stored, and may be sent to the platform management system through the first processor for storage, or may be stored in the non-volatile memory for storage.
The first processor sends the running data of the first boot loader to the BMC end through an interface connected with the BMC, the BMC end completes storage, and the BMC end can directly display the relevant running data.
The non-volatile memory is in the electronic device, and the interface for the first processor to write the operation data into the non-volatile memory may multiplex a Serialization Action in a specific specification defined by the ACPI specification, where the specific specification may be: the ERST table mechanism, which can define what devices the back-end word group is. The specific data writing can call the method corresponding to EXECUTE _ OPERATION, and the method completes the unloading of the OPERATION data.
The specific unloading method may be different according to a position of the Error Log Address Range defined in the ACPI, and the first processor may store the running data in the non-volatile random access memory NVRAM or the random access memory RAM.
If the operation data is stored in the NVRAM, the operation data of the first boot loader is directly stored in the nonvolatile memory; if the operation data is stored in the RAM, since the RAM is only an intermediate cache, the first processor may transfer and store the operation data from the RAM to other nonvolatile memories, such as: the hard disk or the hard disk is stored through a network, namely, the hard disk or the hard disk is stored to the cloud.
The embodiment discloses a system starting method, wherein in the system starting process, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
The embodiment discloses a system starting method, a flow chart of which is shown in fig. 4, and the method comprises the following steps:
step S41, in the system starting process, controlling the first boot loader to run;
step S42, when the first boot loader outputs the running data, the first processor determines whether a preset parameter is a first preset value, where the preset parameter is used to indicate whether the first boot loader is in a state to be debugged;
step S43, if the preset parameter is the first preset value, in the process of controlling the first boot loader to run, storing running data of the first boot loader during running, so as to debug the first boot loader based on the running data;
step S44, controlling the system to restart, wherein in the system restarting process, the first processor adjusts the preset parameter to a second preset value and controls a second boot loader to run;
and step S45, when the system is started to finish running, the second processor reads and outputs the stored running data.
After the running data of the first boot loader is stored, if the stored running data is to be read, the system needs to be controlled to restart, in the restarting process of the system, the first processor runs firstly, and when the first processor runs, the first processor adjusts the preset parameter to the second preset value, namely the first preset value, so that the normal running of the boot loader is facilitated, and the problem that the boot loader cannot run normally due to the fact that the preset parameter is the first preset value is solved.
After the preset parameter is adjusted to the second preset value, the first boot loader is still in a state to be debugged, and therefore, in order to ensure normal startup of the system, the first processor controls running of the second boot loader, which is a boot loader capable of running normally without debugging except the first boot loader.
The first processor controls the second boot loader to run so as to ensure the smooth start of the system, when the system is in a running state after the system is started, the second processor, namely the CPU controls the running of the system, so that under the condition of ensuring the normal running of the system, the second processor can directly read the running data of the first boot loader stored in the process of starting the system last time from the memory or the BMC and display the running data after reading the running data, thereby realizing that the running data of the first boot loader in a state to be debugged can be read and displayed in the process of ensuring the normal running of the system, so as to debug the first boot loader and ensure that the first boot loader is in a state which does not need to be debugged and can run normally.
When the second processor reads the stored running data of the first boot loader, the stored running data can be displayed in a file form through the pstore architecture. Specifically, in the process of starting the operating system, according to an operation defined in an ERST table mechanism of the ACPI, it is determined whether there is running data of the first boot loader stored in the last system starting process, and if so, a GET _ RECORD _ IDENTIFIER operation sending instruction is sent to the first processor, so that the first processor reads the running data of the first boot loader from the rear-end nonvolatile memory specified by the Error Log Address Range.
Further, when the control system is restarted, the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, and the step may further be:
in the process of restarting the system, the first processor reads the stored running data through the reading module, outputs the running data to the serial port terminal, and stores the running data in the first boot loader running log.
When the system is restarted, the system is not directly enabled to read the running data of the first boot loader in the last system starting process in the running state, but the running data is read in the starting state.
Specifically, when the system is started, the first processor firstly reads stored running data through the Read handler of the reading module, and when the reading module determines that the running data is not stored in the last system starting process, the first processor can determine that the current first boot loader does not need to be debugged, and starts the first boot loader according to a normal flow of system starting to enable the first boot loader to run normally and enable the operating system to run;
when the reading module determines that the running data is stored in the nonvolatile memory or the BMC in the last system starting process, the first boot loader is not controlled to be started any more, and the running data is called.
That is, in the system starting process, the schematic diagram of the normal starting flow is shown in fig. 5, and includes: the method comprises the steps that a first processor BIOS runs, a reading module Read handler in the first processor runs, the reading module determines whether running data of a first boot loader stored in the last system starting process is stored in a nonvolatile memory or not, if the running data of the first boot loader stored in the last system starting process is not stored in the nonvolatile memory, the reading module sends an instruction to a writing module Write handler in the first boot loader, at the moment, the first boot loader Bootloader runs, and the writing module judges whether a preset parameter Debug is a first preset value or not;
if the preset parameter is not the first preset value, namely the second preset value, the first boot loader normally runs, and then the second processor CPU runs, namely the operating system OS normally runs; if the preset parameter is a first preset value, storing running data of the first boot loader during running so as to read and output the running data of the first boot loader stored during last system starting when the system is restarted;
if the read module Readhandler in the first processor runs and determines that the nonvolatile memory stores the running data of the first boot loader stored in the last system starting process, the stored running data is read and output to the serial port terminal, so that an operator can debug the first boot loader based on the running data output to the serial port terminal and store the running data into the first boot loader running log.
That is to say, in the system starting method disclosed in this embodiment, when the control system is restarted and the stored data in the running of the first boot loader is read and output, the data can be read in the above two ways, that is, the second boot loader capable of running normally can be used for running, and after the system is started, the stored running data is read and output by the second processor; or, in the system restarting process, the first processor first determines whether the running data is stored through the reading module, and if the running data is stored, the running data is output to the serial port terminal, so that the debugging of the first boot loader is performed based on the running data. In the scheme, the stored running data can be read by any one of the above modes, one mode can be randomly selected for the system in the restarting process, the reading can also be performed based on a preset optimal mode, and the reading is performed by another mode when the optimal mode cannot be realized or does not have the execution condition.
The embodiment discloses a system starting method, wherein in the system starting process, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
The embodiment discloses a system starting method, a flow chart of which is shown in fig. 6, and the method comprises the following steps:
step S61, in the system starting process, controlling the first boot loader to run;
step S62, when the first boot loader outputs the running data, the first processor determines whether a preset parameter is a first preset value, where the preset parameter is used to indicate whether the first boot loader is in a state to be debugged;
step S63, if the preset parameter is a second preset value, controlling the first boot loader to run; if the first boot loader runs abnormally, adjusting the preset parameters from the second preset value to the first preset value;
step S64, if the preset parameter is the first preset value, in the process of controlling the first boot loader to run, storing running data of the first boot loader during running, so as to debug the first boot loader based on the running data.
When the preset parameter is a second preset value, namely not the first preset value, at this time, based on the value of the preset parameter, the first boot loader can be determined to be in a normal state, debugging is not needed, and the first boot loader can normally run, so that the first processor controls the first boot loader to run, and the system can be in a normal running state after being started;
if the preset parameter is the first preset value, based on the value of the preset parameter, it may be determined that the first boot loader is in a state to be debugged and cannot normally run, and at this time, running data during running of the first boot loader may be stored, so that the first boot loader may be debugged based on the running data.
If the first processor determines that the preset parameter is the second preset value, the first boot loader is controlled to run, and in the running process of the first boot loader or when the preset parameter is determined, it is detected that the preset parameter is switched from the second preset value to the first preset value, it is indicated that the first boot loader runs abnormally, the first boot loader needs to be debugged, the starting and running of the first boot loader are stopped, and the running data of the first boot loader is stored.
The preset parameter is a first preset value or a second preset value, which may be determined based on whether the first boot loader can operate normally, that is, the system automatically adjusts the value of the preset parameter, and when the first boot loader is abnormal, the value of the preset parameter is set to the first preset value; and when the first boot loader can normally run, setting the value of the preset parameter as a second preset value.
In addition, the following may be also possible:
and obtaining an adjusting instruction output by the first processor or the second processor, and adjusting the preset parameter to be a first preset value or a second preset value based on the adjusting instruction.
That is, in this embodiment, the adjustment of the preset parameter value may be automatically implemented based on the judgment of whether the first boot loader can normally operate by the system, or may be manually set by an operator, that is, whether the manual setting requires setting whether the first boot loader is in a state to be debugged, or may be determined based on whether the first boot loader can normally operate, or may be implemented by debugging the first boot loader to update the system version based on design requirements or experimental requirements.
The manual setting of the value of the preset parameter may be performed on the first processor, that is, obtaining the adjustment instruction output by the first processor, or may be performed on the second processor, that is, obtaining the adjustment instruction output by the second processor.
The adjusting instruction output by the first processor is obtained, that is, in the system starting process, the first processor receives the adjusting operation of the operator, and the first processor outputs the adjusting instruction corresponding to the adjusting operation, as shown in Settings in fig. 5, that is, the operator inputs the first processor to adjust the preset parameter Debug, where the preset parameter Debug may be manually adjusted to a first preset value or manually adjusted to a second preset value.
The adjustment instruction output by the second processor is obtained, that is, in the system operation process, the second processor receives the adjustment operation of the operator, and the second processor outputs the adjustment instruction corresponding to the adjustment operation to the preset parameter stored in the first processor, as shown in Utility in fig. 5, that is, the input of the operator on the second processor, so as to adjust the preset parameter Debug, where the preset parameter may be manually adjusted to the first preset value, or the preset parameter may be manually adjusted to the second preset value.
Further, when the first processor determines that the preset parameter is the first preset value, no matter whether the first preset value is achieved by automatic adjustment of the system or manual operation of an operator, as long as the preset parameter is determined to be the first preset value, the system is controlled to restart, so that in the system starting process, when the first processor determines that the preset parameter is the first preset value, in the process of controlling the first boot loader to run, running data of the first boot loader during running are stored.
As long as the preset parameter is detected to be the first preset value, the system needs to be restarted once, so that after the system is restarted, the running parameter of the first boot loader can be stored at the initial running stage of the first boot loader; after the storage of the operating parameters is completed, the system needs to be restarted again, so that after the restart, the operating data of the first boot loader during the operation, which is stored in the last restart, can be read and output.
That is to say, the output of the running data of the first boot loader can be realized only after the first boot loader in the system is detected to be debugged and the first boot loader is debugged, which requires at least two times of restarting the system.
The embodiment discloses a system starting method, wherein in the system starting process, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
The embodiment discloses an electronic device, a schematic structural diagram of which is shown in fig. 7, including:
a first processor 71 and a memory 72.
The first processor 71 is configured to control the first boot loader to run during a system startup process; when the first boot loader outputs the running data, determining whether a preset parameter is a first preset value, wherein the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data;
the memory 72 is used for storing a program for the processor to execute the above-described processing procedures.
Further, the electronic device may further include: a second processor for performing a second processing of the received signal,
the first processor controls the system to restart, and the first processor or the second processor reads and outputs stored running data of the first boot loader during running so as to debug the first boot loader based on the output running data;
the first processor is different from the second processor, and the second processor is used for controlling the operation of the system after the system is started.
Further, the first processor is further configured to: when the preset parameter is a second preset value, controlling the first boot loader to run; and when the first boot loader runs abnormally, adjusting the preset parameters from the second preset value to the first preset value.
Further, the first processor is further configured to: obtaining an adjusting instruction output by the first processor or the second processor; and adjusting the preset parameters to be the first preset value or the second preset value based on the adjusting instruction.
Further, the first processor is further configured to: and if the preset parameter is adjusted to the first preset value from the second preset value, controlling the system to restart so as to store the running data of the first boot loader during running of the first boot loader in the process of controlling the first boot loader to run when the first processor determines that the preset parameter is the first preset value during the starting process of the system.
Further, the electronic device disclosed in this embodiment may further include: a platform management system BMC and/or a non-volatile memory;
the first processor sends the running data to a platform management system for storage; and/or the first processor stores the operating data to the non-volatile memory.
Further, the first processor controls the system to restart, and the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, including:
in the process of restarting the system, the first processor reads the stored running data through the reading module; and outputting the running data to the serial port terminal, and storing the running data in the first boot loader running log.
Further, the first processor controls the system to restart, and the first processor or the second processor reads and outputs the stored running data of the first boot loader during running, including:
in the process of restarting the system, the first processor adjusts the preset parameters to a second preset value and controls a second boot loader to run; and when the system starts to finish running, the second processor reads and outputs the stored running data.
The electronic device disclosed in this embodiment is implemented based on the system starting method disclosed in the above embodiment, and details are not described here.
The embodiment discloses an electronic device, wherein in the starting process of a system, a first boot loader is controlled to run, when the first boot loader outputs running data, a first processor determines whether a preset parameter is a first preset value, and the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of the first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data. In the scheme, in the starting process of the system, when the first processor determines that the first boot loader is in the state to be debugged, the running data of the first boot loader during running is stored, so that a debugger can debug the first boot loader directly based on the stored running data, and the problem that the system cannot be started normally is avoided.
The embodiment of the present application further provides a readable storage medium, where a computer program is stored, and the computer program is loaded and executed by a processor to implement each step of the system starting method, where a specific implementation process may refer to descriptions of corresponding parts in the foregoing embodiment, and details are not described in this embodiment.
The present application also proposes a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the electronic device executes the method provided in the various optional implementation manners based on the system starting method aspect or the system starting system aspect.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A system startup method, comprising:
controlling a first boot loader to run in the system starting process;
when the first boot loader outputs running data, the first processor determines whether a preset parameter is a first preset value, wherein the preset parameter is used for indicating whether the first boot loader is in a state to be debugged;
if the preset parameter is a first preset value, storing running data of a first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data.
2. The method of claim 1, further comprising:
the control system is restarted, and the first processor or the second processor reads and outputs stored running data of the first boot loader during running so as to debug the first boot loader based on the output running data;
the first processor is different from the second processor, and the second processor is used for controlling the operation of the system after being started.
3. The method of claim 1, further comprising:
if the preset parameter is a second preset value, controlling a first boot loader to operate;
and if the first boot loader runs abnormally, adjusting the preset parameters from a second preset value to a first preset value.
4. The method of claim 1, further comprising:
obtaining an adjusting instruction output by the first processor or the second processor;
and adjusting the preset parameter to be a first preset value or a second preset value based on the adjusting instruction.
5. The method of claim 3 or 4, further comprising:
and if the preset parameter is adjusted to the first preset value from the second preset value, controlling the system to restart so as to store running data of the first boot loader during running of the first boot loader in the process of controlling the first boot loader to run when the first processor determines that the preset parameter is the first preset value during the starting process of the system.
6. The method of claim 1, wherein the storing the operational data of the first boot loader runtime comprises:
the first processor sends the running data to a platform management system for storage;
and/or the presence of a gas in the gas,
the first processor stores the operating data to a non-volatile memory.
7. The method of claim 2, wherein the control system rebooting, the first processor or the second processor reading and outputting stored runtime data of the first boot loader runtime, comprises:
during the system restarting process, the first processor reads the stored running data through a reading module;
and outputting the running data to a serial port terminal, and storing the running data in a first boot loader running log.
8. The method of claim 2, wherein the control system rebooting, the first processor or the second processor reading and outputting stored runtime data of the first boot loader runtime, comprises:
in the process of restarting the system, the first processor adjusts the preset parameter to a second preset value and controls a second boot loader to run;
and when the system starts to finish running, the second processor reads and outputs the stored running data.
9. An electronic device, comprising:
the first processor is used for controlling the operation of the first boot loader in the system starting process; when the first boot loader outputs running data, determining whether a preset parameter is a first preset value, wherein the preset parameter is used for indicating whether the first boot loader is in a state to be debugged; if the preset parameter is a first preset value, storing running data of a first boot loader during running in the process of controlling the first boot loader to run so as to debug the first boot loader based on the running data;
and the memory is used for storing the program of the processor for executing the processing procedure.
10. A readable storage medium storing at least one set of instructions;
the set of instructions is for being called and performing at least a system-initiated method as in any one of the above.
CN202111461694.5A 2021-12-01 2021-12-01 System starting method and electronic equipment Pending CN114153509A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111461694.5A CN114153509A (en) 2021-12-01 2021-12-01 System starting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111461694.5A CN114153509A (en) 2021-12-01 2021-12-01 System starting method and electronic equipment

Publications (1)

Publication Number Publication Date
CN114153509A true CN114153509A (en) 2022-03-08

Family

ID=80456099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111461694.5A Pending CN114153509A (en) 2021-12-01 2021-12-01 System starting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114153509A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2453351A1 (en) * 2010-11-13 2012-05-16 Giga-Byte Technology Co., Ltd. Method of multiple boot manager
CN104346265A (en) * 2013-07-29 2015-02-11 比亚迪股份有限公司 Terminal equipment and acquisition method and device for log information thereof
CN110673974A (en) * 2019-08-20 2020-01-10 中科创达软件股份有限公司 System debugging method and device
CN111694704A (en) * 2019-03-12 2020-09-22 杭州海康威视数字技术股份有限公司 Debugging information output method and device, electronic equipment and storage medium
CN112540874A (en) * 2020-12-08 2021-03-23 广东小天才科技有限公司 Intelligent device crash log collection method and system, electronic device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2453351A1 (en) * 2010-11-13 2012-05-16 Giga-Byte Technology Co., Ltd. Method of multiple boot manager
CN104346265A (en) * 2013-07-29 2015-02-11 比亚迪股份有限公司 Terminal equipment and acquisition method and device for log information thereof
CN111694704A (en) * 2019-03-12 2020-09-22 杭州海康威视数字技术股份有限公司 Debugging information output method and device, electronic equipment and storage medium
CN110673974A (en) * 2019-08-20 2020-01-10 中科创达软件股份有限公司 System debugging method and device
CN112540874A (en) * 2020-12-08 2021-03-23 广东小天才科技有限公司 Intelligent device crash log collection method and system, electronic device and storage medium

Similar Documents

Publication Publication Date Title
US8468342B2 (en) Computer system and method for performing integrity detection on the same
USRE40092E1 (en) Method for quickly booting a computer system
US20040255106A1 (en) Recovery of operating system configuration data by firmware of computer system
EP1873638A1 (en) Portable apparatus supporting multiple operating systems and supporting method therefor
CN108304282B (en) Control method of double BIOS and related device
US9715267B2 (en) Method for switching operating systems and electronic apparatus
US10146626B2 (en) Detecting and handling an expansion card fault during system initialization
US20130339718A1 (en) Information processing device and method for controlling information processing device
US7631224B2 (en) Program, method, and mechanism for taking panic dump
US10083084B2 (en) Method of error detecting during a booting process, and a computer system for implementing the same
US5987625A (en) Method and apparatus for testing network bootable devices
EP2750034A2 (en) Electronic device having updatable bios and bios updating method thereof
CN111124509B (en) Server starting method and device
CN115113905A (en) Firmware upgrading method and firmware upgrading device
CN116009899B (en) Mirror image making method and device of operating system, electronic equipment and storage medium
JPH08129495A (en) Computer system and self test method therefor
CN114153509A (en) System starting method and electronic equipment
US20120047358A1 (en) Method and system for accelerating booting process
CN111400113B (en) Complete machine self-checking method, device and system of computer system
JP5348120B2 (en) Program, method and mechanism for collecting panic dump
CN114237722A (en) System starting method, device, equipment and engineering vehicle
WO2008048581A1 (en) A processing device operation initialization system
CN111176689A (en) Information processing method and electronic device
EP3798831B1 (en) Resilient upgradable boot loader with power reset
WO2023075769A1 (en) Remediation action initiation responsive to storage control feature disabling

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