CN110427286A - Gateway server main preparation system restoration methods - Google Patents
Gateway server main preparation system restoration methods Download PDFInfo
- Publication number
- CN110427286A CN110427286A CN201910734412.0A CN201910734412A CN110427286A CN 110427286 A CN110427286 A CN 110427286A CN 201910734412 A CN201910734412 A CN 201910734412A CN 110427286 A CN110427286 A CN 110427286A
- Authority
- CN
- China
- Prior art keywords
- standby
- file system
- kernel
- main
- uboot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
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/1433—Saving, restoring, recovering or retrying at system level during software upgrading
-
- 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/1438—Restarting or rejuvenating
-
- 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
- G06F11/1469—Backup restoration techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
- Hardware Redundancy (AREA)
Abstract
The present invention proposes a kind of gateway server main preparation system restoration methods, belongs to system upgrade field.Technical solution of the present invention main points are as follows: main uboot program and standby uboot bootstrap are set, while main kernel corresponding with main uboot bootstrap and host file system are set, setting standby kernel corresponding with standby uboot bootstrap and standby file system;The main uboot bootstrap is set as not being upgraded, flash be it is read-only, the standby uboot bootstrap, main kernel and host file system, standby kernel and be set as to be upgraded for file system.The problem of system caused by the present invention can be prevented because of accident power-off in escalation process or other accidents on flash is imperfect, and the system of ultimately causing can not restart.
Description
Technical field
The present invention relates to system updating technologies, the in particular to technology of gateway server main preparation system restoration methods.
Background technique
Under Internet era overall background, any place requires connection internet.Simplest such as household radio road
By device, the main rear end equipment as online will cause home network not make normally once system can not normally start
With.The network equipment in demanding such as commercial place, once network interruption, will affect place cash register, checking storehouse is deposited, searches member system
The productions activities such as system are lost inestimable.
Existing system is all single uboot and single kernel, then problem is exactly user in escalation process, if unexpected
Power-off, because system does not upgrade completion, causes system not start normally.
Summary of the invention
The object of the present invention is to provide a kind of gateway server main preparation system restoration methods, can use the scheme of main preparation system
Guarantee that commercial or enterprise-level gateway server system normally starts.
The present invention solves its technical problem, the technical solution adopted is that: gateway server main preparation system restoration methods, packet
It includes:
Main uboot program and standby uboot bootstrap are set, while being arranged in master corresponding with main uboot bootstrap
Core and host file system, setting standby kernel corresponding with standby uboot bootstrap and standby file system;
The main uboot bootstrap is set as not being upgraded, flash be it is read-only, the standby uboot bootstrap,
Main kernel and host file system, standby kernel and standby file system are set as to be upgraded;
If device powers down, main uboot bootstrap on startup can school at this time when upgrading standby uboot bootstrap
Whether normal standby uboot bootstrap is tested, if normally, guiding standby uboot bootstrap to start, then guiding in corresponding
Core starting, and load corresponding file system;If abnormal, corresponding kernel is directly guided to start, and load corresponding
File system can upgrade standby uboot bootstrap after the file system starting;
If when upgrading main kernel and host file system, a mark first is arranged to host file system at this time in device powers down
The value of will, the mark is non-zero positive integer, and is saved in flash, after normally upgrading successfully, this mark is understood, by the mark
Value is set as zero;Corresponding uboot bootstrap first judges whether the value of the mark is zero when guiding main kernel, if it is not,
It then proves that host file system powers off in escalation process, causes host file system abnormal, directly guide standby kernel and standby at this time
File system, standby file system normally start;
If device powers down starts main kernel and host file system at this time, main when upgrading standby kernel and standby file system
After file system starting, directly upgrade standby kernel and standby file system.
Particularly, it guides standby uboot bootstrap to start, then guides corresponding kernel to start, and load corresponding
When file system, preferentially start main kernel, and load corresponding host file system, if main kernel and host file system are upgrading
In the process, then restart standby kernel, and load corresponding standby file system.
Further, the non-zero positive integer is 1.
Particularly, corresponding uboot bootstrap is preferentially drawn by main uboot bootstrap when guiding main kernel
Lead main kernel.
Further, standby kernel and standby file cannot be upgraded at this time if having started to standby kernel and standby file system
System can only upgrade main kernel and host file system.
The invention has the advantages that main preparation system can be used by above-mentioned gateway server main preparation system restoration methods
Scheme guarantee that commercial or enterprise-level gateway server system normally starts, prevent because accident power-off in escalation process or other
The problem of system on flash caused by accident is imperfect, and the system of ultimately causing can not restart can guarantee system in escalation process
In, accident power-off can also restore automatically, to prevent depot repair.
Specific embodiment
Below with reference to embodiment, the technical schemes of the invention are described in detail.
Gateway server main preparation system restoration methods of the present invention, comprising:
Main uboot program and standby uboot bootstrap are set, while being arranged in master corresponding with main uboot bootstrap
Core and host file system, setting standby kernel corresponding with standby uboot bootstrap and standby file system;
The main uboot bootstrap is set as not being upgraded, flash be it is read-only, the standby uboot bootstrap,
Main kernel and host file system, standby kernel and standby file system are set as to be upgraded;
If device powers down, main uboot bootstrap on startup can school at this time when upgrading standby uboot bootstrap
Whether normal standby uboot bootstrap is tested, if normally, guiding standby uboot bootstrap to start, then guiding in corresponding
Core starting, and load corresponding file system;If abnormal, corresponding kernel is directly guided to start, and load corresponding
File system can upgrade standby uboot bootstrap after the file system starting;No matter uboot standby in this way is guided
Program whether OK, kernel and file system normal boot;
If when upgrading main kernel and host file system, a mark first is arranged to host file system at this time in device powers down
The value of will, the mark is non-zero positive integer, and is saved in flash, after normally upgrading successfully, this mark is understood, by the mark
Value is set as zero;Corresponding uboot bootstrap first judges whether the value of the mark is zero when guiding main kernel, if it is not,
It then proves that host file system powers off in escalation process, causes host file system abnormal, directly guide standby kernel and standby at this time
File system, standby file system normally start;
If device powers down starts main kernel and host file system at this time, main when upgrading standby kernel and standby file system
After file system starting, directly upgrade standby kernel and standby file system.
In the above method, guides standby uboot bootstrap to start, then guide corresponding kernel to start, and load correspondence
File system when, preferentially start main kernel, and load corresponding host file system, if main kernel and host file system are rising
During grade, then restart standby kernel, and load corresponding standby file system.
In the above method, in order to corresponding with zero, as needed, the non-zero positive integer mentioned is preferably 1, or its
His positive integer.Corresponding uboot bootstrap preferentially guides main kernel by main uboot bootstrap when guiding main kernel,
Main kernel can also be guided in case of uboot bootstrap.If having started to standby kernel and standby file system, cannot upgrade at this time standby
Kernel and standby file system, can only upgrade main kernel and host file system.
Embodiment
The embodiment of the present invention is using double uboot bootstrap, dual core+file system mode, that is to say, that uboot
Bootstrap, kernel and file system have a spare tyre, in this example, such as main uboot bootstrap by uboot.img expression,
Standby uboot bootstrap indicates that main kernel is indicated by kernel.img by uboot-bk.img, and standby kernel passes through
Kernel-bk.img is indicated.
The present embodiment is in order to achieve the purpose that make system even if successfully booting up standby system in the case where main system is destroyed
It works normally.Illustrate first:
Main uboot.img can not be upgraded, and flash is read-only;
Standby uboot-bk.img can be upgraded;
Main kernel.img+ host file system: it can be upgraded
Standby kernel.img+ is for file system: can be upgraded.
When practical application:
If 1, upgraded for uboot-bk.img, device powers down, the process that system normally starts is as follows:
If device powers down, main uboot.img can verify standby uboot- on startup at this time in upgrading uboot-bk.img
Whether bk.img is normal;
If normal: if guide standby uboot-bk.img to start, then guide main kernel to start, and load master file system
System;
If abnormal: if directly guide main kernel to start, and load host file system, can be right after host file system starting
Standby uboot-bk.img upgrades;
Though uboot-bk.img standby so whether OK, can ensure file system normal boot.
If 2, upgrading main kernel.img+ host file system, device powers down, the process that system normally starts is as follows:
1) upgrade main kernel.img+ host file system, first set a mark [upg_kernel=to host file system
1], and it is saved in flash, after normally upgrading successfully, removes this mark;
2) uboot first judges the value of upg_kernel in Boot Dernel, if it is 1, proves that host file system is rising
It is powered off during grade, causes system abnormal, directly guide standby kernel.img+ for file system when drawing, standby file system is just
Often starting.
If 3, upgrading standby kernel.img+ for file system, device powers down, starting at this time is main kernel.img+
Host file system after host file system starting, upgrades standby kernel.img+ directly for file system.
If system has started to standby kernel.img+ for file system, cannot upgrade for system at this time standby
Kernel.img+ can only upgrade main kernel.img+ host file system for file system.
Through this embodiment, positive system can just be protected in escalation process, accident power-off can also restore automatically, to prevent returning factory's dimension
It repairs.
Claims (5)
1. gateway server main preparation system restoration methods characterized by comprising
Main uboot program and standby uboot bootstrap are set, at the same be arranged main kernel corresponding with main uboot bootstrap and
Host file system, setting standby kernel corresponding with standby uboot bootstrap and standby file system;
The main uboot bootstrap is set as not being upgraded, flash be it is read-only, the standby uboot bootstrap, lead in
Core and host file system, standby kernel and standby file system are set as to be upgraded;
If device powers down, main uboot bootstrap can verify standby on startup at this time when upgrading standby uboot bootstrap
Whether uboot bootstrap is normal, if normally, guiding standby uboot bootstrap to start, corresponding kernel then being guided to open
It is dynamic, and load corresponding file system;If abnormal, corresponding kernel is directly guided to start, and load corresponding file
System can upgrade standby uboot bootstrap after the file system starting;
If when upgrading main kernel and host file system, a mark first is arranged to host file system at this time in device powers down, should
The value of mark is non-zero positive integer, and is saved in flash, after normally upgrading successfully, understands this mark, the value of the mark is set as
Zero;Corresponding uboot bootstrap first judges whether the value of the mark is zero, if it is not, then proving when guiding main kernel
Host file system powers off in escalation process, causes host file system abnormal, directly guides standby kernel and standby file system at this time
System, standby file system normally start;
If device powers down starts main kernel and host file system, master file at this time when upgrading standby kernel and standby file system
After system starting, directly upgrade standby kernel and standby file system.
2. gateway server main preparation system restoration methods according to claim 1, which is characterized in that standby uboot is guided to draw
The starting of lead sequence when then guiding corresponding kernel to start, and loading corresponding file system, preferentially starts main kernel, and add
Corresponding host file system is carried, if main kernel and host file system just in escalation process, restart standby kernel, and load pair
The standby file system answered.
3. gateway server main preparation system restoration methods according to claim 1, which is characterized in that the non-zero positive integer
It is 1.
4. gateway server main preparation system restoration methods according to claim 1, which is characterized in that corresponding uboot draws
Lead sequence preferentially guides main kernel by main uboot bootstrap when guiding main kernel.
5. gateway server main preparation system restoration methods according to claim 1, which is characterized in that if started to standby
Kernel and standby file system cannot upgrade standby kernel and standby file system at this time, can only upgrade main kernel and host file system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910734412.0A CN110427286B (en) | 2019-08-09 | 2019-08-09 | Gateway server main and standby system recovery method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910734412.0A CN110427286B (en) | 2019-08-09 | 2019-08-09 | Gateway server main and standby system recovery method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110427286A true CN110427286A (en) | 2019-11-08 |
CN110427286B CN110427286B (en) | 2022-11-11 |
Family
ID=68415275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910734412.0A Active CN110427286B (en) | 2019-08-09 | 2019-08-09 | Gateway server main and standby system recovery method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110427286B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111258812A (en) * | 2020-01-10 | 2020-06-09 | 成都千立网络科技有限公司 | Terminal access equipment fault recovery system based on linux kernel |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1749963A (en) * | 2004-09-14 | 2006-03-22 | 华为技术有限公司 | Upgrading method for Boot software and recovering method for Boot software |
WO2012071945A1 (en) * | 2010-12-03 | 2012-06-07 | 中兴通讯股份有限公司 | Method and device for backing up and upgrading bootstrap |
CN105653405A (en) * | 2015-12-31 | 2016-06-08 | 北京锐安科技有限公司 | Fault processing method and system of U-boot |
CN107704258A (en) * | 2017-10-27 | 2018-02-16 | 深圳市恒扬数据股份有限公司 | Uboot upgrade methods, system and terminal device |
CN109032846A (en) * | 2018-08-08 | 2018-12-18 | 京信通信系统(中国)有限公司 | Equipment remote backup upgrade method, device, computer storage medium and equipment |
-
2019
- 2019-08-09 CN CN201910734412.0A patent/CN110427286B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1749963A (en) * | 2004-09-14 | 2006-03-22 | 华为技术有限公司 | Upgrading method for Boot software and recovering method for Boot software |
WO2012071945A1 (en) * | 2010-12-03 | 2012-06-07 | 中兴通讯股份有限公司 | Method and device for backing up and upgrading bootstrap |
CN105653405A (en) * | 2015-12-31 | 2016-06-08 | 北京锐安科技有限公司 | Fault processing method and system of U-boot |
CN107704258A (en) * | 2017-10-27 | 2018-02-16 | 深圳市恒扬数据股份有限公司 | Uboot upgrade methods, system and terminal device |
CN109032846A (en) * | 2018-08-08 | 2018-12-18 | 京信通信系统(中国)有限公司 | Equipment remote backup upgrade method, device, computer storage medium and equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111258812A (en) * | 2020-01-10 | 2020-06-09 | 成都千立网络科技有限公司 | Terminal access equipment fault recovery system based on linux kernel |
Also Published As
Publication number | Publication date |
---|---|
CN110427286B (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101719072A (en) | Embedded type terminal equipment software upgrading method and upgrading device | |
CN102222011A (en) | Software upgrading method for set-top box and set-top box | |
CN108874437B (en) | Online cloud updating method for android application program | |
CN106454498B (en) | The method of Android platform management USB device | |
CN106331862A (en) | Set-top box software upgrading method and set-top box | |
CN103186390A (en) | Home gateway and software upgrading method thereof | |
CN103945264A (en) | Set top box application program upgrading method | |
CN111417926A (en) | Unmanned aerial vehicle and firmware upgrading method thereof | |
CN101567962A (en) | Double-Loader updating method for set-top box | |
WO2022188690A1 (en) | Method and apparatus for upgrading electronic device | |
CN102081539A (en) | Reliable software upgrade method for dual-mode terminal | |
CN103079108B (en) | The method of starter motor top box and Set Top Box | |
CN110427286A (en) | Gateway server main preparation system restoration methods | |
CN107071570A (en) | A kind of set top box upgrading method and device | |
CN107656765A (en) | A kind of method, system and the terminal device of equipment initialization | |
CN102243591B (en) | Method for improving Loader-upgrading stability of set top box by adopting two zone bits | |
CN108664255B (en) | Software upgrading method and device | |
CN112612498A (en) | Embedded equipment upgrading method and embedded equipment | |
CN111352764B (en) | Chip repairing method, device, equipment and storage medium | |
CN106933637A (en) | The restorative procedure and device of a kind of system partitioning | |
CN103731301A (en) | Dual backup achieving method of remote network system | |
CN111857740A (en) | Software upgrading method and device | |
CN106648777A (en) | Software upgrading method and software upgrading method | |
KR101529713B1 (en) | Method for improving system stability of android devices in abnormal power switching, and computer-readable recording medium for the same | |
CN114546455A (en) | MCU software upgrading method and device for double partitions |
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 |