CN112799876A - System one-key restoration method and device suitable for computer operating system - Google Patents
System one-key restoration method and device suitable for computer operating system Download PDFInfo
- Publication number
- CN112799876A CN112799876A CN202011591046.7A CN202011591046A CN112799876A CN 112799876 A CN112799876 A CN 112799876A CN 202011591046 A CN202011591046 A CN 202011591046A CN 112799876 A CN112799876 A CN 112799876A
- Authority
- CN
- China
- Prior art keywords
- key
- recovery
- sideband controller
- program
- sideband
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000011084 recovery Methods 0.000 claims abstract description 44
- 238000005192 partition Methods 0.000 claims abstract description 34
- 230000006399 behavior Effects 0.000 claims description 6
- 238000004891 communication Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1435—Saving, restoring, recovering or retrying at system level using file system or storage system metadata
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Library & Information Science (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for restoring a system key suitable for a computer operating system, wherein the method comprises the following steps: a user presses a one-key reduction key to send a key state signal to the sideband controller; the sideband controller records the received key state signal as a key event and controls the whole computer to be electrified; the CPU of the whole machine loads a bootstrap program which is not stored in the disk partition; the bootstrap program judges whether the sideband controller records a key event; after the sideband controller judges that the key event is recorded by the bootstrap program, the bootstrap program guides to start the recovery management system; and after the recovery management system is started, automatically loading a recovery program to load the image file of the working system to complete system recovery. The invention stores the bootstrap program in the storage medium of the non-disk partition, and solves the problem that the system cannot be restored if the data of the disk partition where the bootstrap program is located is damaged. In addition, the invention also solves the problem that the system can not be restored after the file system of the partition where the working system is located is damaged.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for restoring a system one-key suitable for a computer operating system.
Background
The operating system is booted by a boot program, which is a small program that starts to execute when the system is powered on, initializes hardware devices, prepares a software environment, brings the software and hardware environments of the system to an appropriate state, and finally starts the operating system. In the using process, the operating system can not be started and the equipment can not work normally due to human misoperation, software damage, hardware failure and the like. In order to solve such a serious failure, the operating system and the software application are usually required to be reinstalled, and system failure recovery of some professional devices may also require field operation of a professional, even returning to the factory for maintenance, which is time-consuming, labor-consuming and high in cost.
In order to solve the trouble of reinstalling the system, a one-key restoration method is generally adopted to restore the system to a normal operable state at present. However, in the conventional system key recovery method, a boot loader (bootloader) and an operating system are placed on the same disk, for example, the boot loader is placed in a first partition of the disk, a working system1 is placed in second and third partitions of the disk, a recovery management system2 is placed in fourth and fifth partitions of the disk, and system backup data is placed in a sixth partition of the disk. And the equipment is normally started and enters a working system1, daily service is processed under the working system1, when the working system1 is damaged and cannot be started, a bootstrap program guides the starting of a recovery management system2, a second partition and a third partition of a disk are mounted under the system2, and a previously backed-up system1 file is copied to the corresponding partitions to complete the recovery of the system. However, the existing system one-bond reduction method has the following two technical problems:
firstly, the boot program and the system are placed on the same disk, the boot of the recovery management system2 needs to be completed by relying on the boot program, if the data of the partition where the boot program is located is damaged, the system2 cannot be booted, and the subsequent system recovery process cannot be completed;
secondly, the partition corresponding to system1 is mounted under system2, and the system recovery is completed by copying the system1 file which is backed up in advance to the corresponding partition, on the premise that the partition corresponding to system1 is intact and the file system is not damaged, if the file system on the partition corresponding to system1 is damaged, the system recovery can not be completed.
Disclosure of Invention
The invention aims to provide a system one-key restoration method and a system one-key restoration device suitable for a computer operating system, which are used for solving the problem that the system cannot be restored after partition data of a boot program and a partition file system of a working system1 are damaged.
In order to achieve the purpose, the invention adopts the following technical scheme:
the method for restoring the system key suitable for the computer operating system comprises the following specific steps:
1) a user presses a one-key reduction key to send a key state signal to the sideband controller;
2) the sideband controller records the received key state signal as a key event and controls the whole computer to be powered on;
3) the CPU of the whole machine loads a bootstrap program which is not stored in the disk partition of the whole machine;
4) the bootstrap program judges whether the sideband controller records the key event;
5) after the guiding program judges that the sideband controller records the key event, guiding to start a recovery management system 2;
6) after the recovery management system2 is started, a recovery program is automatically loaded to load the image file of the working system1 to complete system recovery.
As a preferred scheme of the present invention, the sideband controller is an MCU micro-control unit or a CPLD programmable logic device.
As a preferred aspect of the present invention, the boot program is stored in the EEPROM memory in the form of firmware.
As a preferred aspect of the present invention, the key event is recorded in a register in the sideband controller.
As a preferable scheme of the present invention, the one-key reduction key is in communication connection with the sideband controller through a GPIO interface led out from the sideband controller.
The invention also provides a system one-key restoring device suitable for the computer operating system, which comprises:
the one-key reduction key is pressed by a user to send a key state signal to the sideband controller;
the sideband controller is connected with the one-key reduction key and is used for recording the received key state signal as a key event and controlling the whole computer to be electrified;
the bootstrap program loading module is used for automatically loading the bootstrap program which is not stored in the disk partition of the whole computer after the whole computer is powered on;
the key behavior judgment module is connected with the bootstrap loading module and used for judging whether the sideband controller records the key event or not through the bootstrap;
the system guiding module is connected with the key behavior judging module, is used for guiding to start the recovery management system2 after the guiding program judges that the key event is recorded in the sideband controller, and is used for guiding to start the working system1 after the guiding program judges that the key event is not recorded in the sideband controller;
and the system recovery module is connected with the system boot module and is used for automatically loading a recovery program after the recovery management system2 is started so as to load the mirror image file of the working system1 to complete system recovery.
As a preferred scheme of the present invention, the sideband controller is an MCU micro-control unit or a CPLD programmable logic device.
As a preferable aspect of the present invention, the boot program is stored in an EEPROM memory of the CPU of the entire machine in the form of firmware.
As a preferable scheme of the present invention, the one-key reduction key is in communication connection with the sideband controller through a GPIO interface led out from the sideband controller.
The invention has the following beneficial effects:
1. the boot program is stored in the EEPROM memory in a firmware form, but not in a corresponding partition in a magnetic disk, so that the problem that the system cannot be restored if the data of the partition in which the boot program is located is damaged is solved.
2. The system recovery does not depend on the partition file system, the system one-key recovery can be implemented as long as the medium for storing the mirror image file of the working system1 is not physically damaged, the reliability is extremely high, and the problem that the system cannot be recovered after the partition file system where the system1 is located is damaged is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below. It is obvious that the drawings described below are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a flowchart illustrating a method for system key recovery for a computer operating system according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a system-on-key recovery apparatus for a computer operating system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an implementation of the one-key reduction method of the system.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Wherein the showings are for the purpose of illustration only and are shown by way of illustration only and not in actual form, and are not to be construed as limiting the present patent; to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numerals in the drawings of the embodiments of the present invention correspond to the same or similar components; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "inner", "outer", etc. are used for indicating the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, it is only for convenience of description and simplification of description, but it is not indicated or implied that the referred device or element must have a specific orientation, be constructed in a specific orientation and be operated, and therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and are not to be construed as limitations of the present patent, and the specific meanings of the terms may be understood by those skilled in the art according to specific situations.
In the description of the present invention, unless otherwise explicitly specified or limited, the term "connected" or the like, if appearing to indicate a connection relationship between the components, is to be understood broadly, for example, as being fixed or detachable or integral; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or may be connected through one or more other components or may be in an interactive relationship with one another. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
As shown in fig. 1 and fig. 3, the method for restoring a system key applicable to a computer operating system according to an embodiment of the present invention includes:
step 1) a user presses a one-key reduction key on a machine for a plurality of seconds to send a key state signal to a sideband controller;
step 2) the sideband controller records the received key state signal as a key event and controls the whole machine (the whole machine refers to equipment carrying a working system 1) to be powered on;
step 3) the CPU of the whole machine loads a bootstrap program which is not stored in the disk partition of the whole machine;
step 4) the bootstrap program judges whether the sideband controller records a key event;
step 5) after the bootstrap program judges that the sideband controller records the key event, the bootstrap starts and resumes the management system 2;
and step 6) after the recovery management system2 is started, automatically loading a recovery program to load the image file of the working system1 to complete system recovery.
In the above technical solution, the sideband controller is relative to the device main controller CPU, and in the present invention, the sideband controller may adopt an mcu (microcontroller unit) micro control unit or a cpld (complex Programmable Logic device) Programmable Logic device.
In this embodiment, the boot program is preferably stored in a form of firmware in a powered erasable programmable read-only memory (EEPROM).
In step 4), the method for the bootstrap program to judge whether the sideband controller records the key event specifically comprises the following steps:
the boot program attempts to read the key press event recorded by the sideband controller,
if the reading is successful, judging that the sideband controller records a key event;
if the reading is unsuccessful, the sideband controller is judged not to record the key event.
The key events recorded by the sideband controller are preferably stored in a register of the sideband controller.
In this embodiment, the one-key restore key is in communication connection with the sideband controller through a GPIO interface led out from the sideband controller.
It should be noted that system2 is a system for recovery management, and includes a recovery script for startup execution and an image file (full image or partition image) of system1, and system2 does not need a file system on a partition corresponding to system1, so system2 can complete system recovery as long as the storage medium storing the image file of system1 is not physically damaged.
The system one-key restoration method provided by the invention is realized by a system bootstrap program and firmware of a sideband controller, the system1 and the system2 are cooperatively deployed, the two systems are completely decoupled, the system restoration does not depend on system files on a partition corresponding to the system1, and the problem that the system cannot be restored after a file system on the partition where the working system1 is located is damaged in the prior art is solved. In addition, the boot program is stored in the EEPROM memory instead of the disk partition, and the problem that the system cannot be restored after the data of the partition where the boot program is located is damaged in the prior art is solved.
The present invention also provides a system one-key restoring apparatus suitable for a computer operating system, as shown in fig. 2, the apparatus comprising:
a one-key restore button, by which a user can send a button status signal to a sideband controller (preferably, a MUC micro-control unit or a CPLD programmable logic device);
the sideband controller is connected with the one-key reduction key and is used for recording the received key state signal as a key event and controlling the whole machine (equipment carrying a working system 1) to be powered on; the one-key reduction key is connected with a GPIO interface led out from the sideband controller to realize communication connection with the sideband controller;
the boot program loading module is used for automatically loading the boot program which is not stored in the disk partition of the whole machine (preferably stored in an EEPROM memory) after the whole machine is powered on;
the key behavior judgment module is connected with the bootstrap loading module and used for judging whether the sideband controller records a key event or not through the bootstrap;
the system guiding module is connected with the key behavior judging module, is used for guiding to start the recovery management system2 after the guiding program judges that the sideband controller records the key event, and is used for guiding to start the working system1 after the guiding program judges that the sideband controller does not record the key event;
and the system recovery module is connected with the system guide module and is used for automatically loading a recovery program after the recovery management system2 is started so as to load the mirror image file of the working system1 to complete system recovery.
It should be understood that the above-described embodiments are merely preferred embodiments of the invention and the technical principles applied thereto. It will be understood by those skilled in the art that various modifications, equivalents, changes, and the like can be made to the present invention. However, such variations are within the scope of the invention as long as they do not depart from the spirit of the invention. In addition, certain terms used in the specification and claims of the present application are not limiting, but are used merely for convenience of description.
Claims (9)
1. A system one-key restoration method applicable to a computer operating system is characterized by comprising the following specific steps:
1) a user presses a one-key reduction key to send a key state signal to the sideband controller;
2) the sideband controller records the received key state signal as a key event and controls the whole computer to be powered on;
3) the CPU of the whole machine loads a bootstrap program which is not stored in the disk partition of the whole machine;
4) the bootstrap program judges whether the sideband controller records the key event;
5) after the guiding program judges that the sideband controller records the key event, guiding to start a recovery management system 2;
6) after the recovery management system2 is started, a recovery program is automatically loaded to load the image file of the working system1 to complete system recovery.
2. The system one-key recovery method applicable to computer operating systems of claim 1, wherein the sideband controller is an MCU (microprogrammed control Unit) or a CPLD (Complex programmable logic device).
3. The system one-key restore method for computer operating systems of claim 1, wherein the boot program is stored in an EEPROM or FLASH memory in firmware.
4. The system-on-a-key recovery method for a computer operating system of claim 1, wherein the key press event is recorded in a register in the sideband controller.
5. The system one-key reduction method applicable to the computer operating system, according to claim 1, wherein the one-key reduction key is in communication connection with the sideband controller through a GPIO interface led out from the sideband controller.
6. A system-on-key recovery apparatus for a computer operating system, comprising:
the one-key reduction key is used for sending a key state signal to the sideband controller by pressing the one-key reduction key by a user;
the sideband controller is connected with the one-key reduction key and is used for recording the received key state signal as a key event and controlling the whole computer to be electrified;
the bootstrap program loading module is used for automatically loading the bootstrap program which is not stored in the disk partition of the whole computer after the whole computer is powered on;
the key behavior judgment module is connected with the bootstrap loading module and used for judging whether the sideband controller records the key event or not through the bootstrap;
the system guiding module is connected with the key behavior judging module, is used for guiding to start the recovery management system2 after the guiding program judges that the key event is recorded in the sideband controller, and is used for guiding to start the working system1 after the guiding program judges that the key event is not recorded in the sideband controller;
and the system recovery module is connected with the system boot module and is used for automatically loading a recovery program after the recovery management system2 is started so as to load the mirror image file of the working system1 to complete system recovery.
7. The system one-key recovery device applicable to computer operating systems of claim 6, wherein the sideband controller is an MCU (microprogrammed control Unit) or a CPLD (Complex programmable logic device).
8. The system one-key recovery device applicable to the computer operating system of claim 6, wherein the boot program is stored in an EEPROM or FLASH memory of the overall CPU in a firmware form.
9. The system one-key reduction device suitable for the computer operating system according to claim 6, wherein the one-key reduction key is in communication connection with the sideband controller through a GPIO interface led out from the sideband controller.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011591046.7A CN112799876A (en) | 2020-12-29 | 2020-12-29 | System one-key restoration method and device suitable for computer operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011591046.7A CN112799876A (en) | 2020-12-29 | 2020-12-29 | System one-key restoration method and device suitable for computer operating system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112799876A true CN112799876A (en) | 2021-05-14 |
Family
ID=75805462
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011591046.7A Pending CN112799876A (en) | 2020-12-29 | 2020-12-29 | System one-key restoration method and device suitable for computer operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112799876A (en) |
-
2020
- 2020-12-29 CN CN202011591046.7A patent/CN112799876A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111143132B (en) | BIOS recovery method, device, equipment and readable storage medium | |
CN109542744B (en) | Method, device, storage medium and terminal for detecting abnormal starting problem of terminal | |
US7203865B2 (en) | Application level and BIOS level disaster recovery | |
CN101647013B (en) | Bookmark and configuration file for installation sequence | |
CN101873462A (en) | DVR (Digital Video Recorder) as well as data backup and recovery method and system thereof | |
CN108345464A (en) | A kind of the startup method and Android vehicle device of Android system | |
CN110119330A (en) | Method for automatically restoring BIOS file of cloud backup server BIOSROM | |
CN108431781A (en) | The self diagnosis of the mistake of device driver detection and automatic diagnostic data are collected | |
CN101207519A (en) | Version server, operation maintenance unit and method for restoring failure | |
CN114116280A (en) | Interactive BMC self-recovery method, system, terminal and storage medium | |
CN113672306B (en) | Server component self-checking abnormity recovery method, device, system and medium | |
KR20000049321A (en) | Auto-recovery system of LINUX using a flash card | |
KR102079131B1 (en) | The computer recovery system | |
CN104077250A (en) | Connection processing method and device for intelligent terminal and storage equipment | |
US5734810A (en) | Client server system performing automatic reconnection and control method thereof | |
TWI764454B (en) | Firmware corruption recovery | |
WO2024113995A1 (en) | Bmc heterogeneous upgrading method and system, device, and readable storage medium | |
KR100605031B1 (en) | A method for upgrading and restoring embeded systems by using usb memory device | |
WO2024119787A1 (en) | Method and apparatus for amd server system installation power-off processing, device and medium | |
CN100394392C (en) | Computer programe reduction-mode automatic starting control method and system | |
CN109634782B (en) | Method and device for detecting system robustness, storage medium and terminal | |
CN112799876A (en) | System one-key restoration method and device suitable for computer operating system | |
CN111522690A (en) | Data storage device and method for maintaining normal startup operation of data storage device | |
KR20160059181A (en) | Apparatus and method for controlling updating software of AVN system in vehicle | |
KR20130075807A (en) | An atm with back-up hdd for booting and the booting method there of |
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 |