CN105630515A - Dual-system mirror image guiding method - Google Patents

Dual-system mirror image guiding method Download PDF

Info

Publication number
CN105630515A
CN105630515A CN201410580625.XA CN201410580625A CN105630515A CN 105630515 A CN105630515 A CN 105630515A CN 201410580625 A CN201410580625 A CN 201410580625A CN 105630515 A CN105630515 A CN 105630515A
Authority
CN
China
Prior art keywords
value
mirror image
subregion
bootable
partitions
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
CN201410580625.XA
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.)
Xian Inteview Information and Technology Co Ltd
Original Assignee
Xian Inteview Information and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Inteview Information and Technology Co Ltd filed Critical Xian Inteview Information and Technology Co Ltd
Priority to CN201410580625.XA priority Critical patent/CN105630515A/en
Publication of CN105630515A publication Critical patent/CN105630515A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a dual-system mirror image guiding method, which comprises the steps of 1 reading information in a guiding configuration subarea; 2 reading the value of a guidable subarea number, and if the value is 0, go to step 6, and if the value is 1 or 2, go to step 3 in order; 3 reading a main guiding subarea value; 4a reading the value of a guiding mark (mirror image 0); 4b reading the value of a guiding mark (mirror image 1); 5a setting the guiding mark (mirror image 0) as 1 and beginning loading mirror image 0; 5b setting the guiding mark (mirror image 1) as 1, and beginning loading mirror image 1; 6 guiding a program lighten a trouble lamp if no guidable subarea exists. A dual-system mirror image is provided, and a normal software in the system can be started always whatever leads to upgrade failure, and upgrade operation can be carried out repeatedly until success.

Description

A kind of bootstrap technique of dual system mirror image
Technical field
The present invention relates to the communications field, be specifically related to the bootstrap technique of a kind of dual system mirror image.
Background technology
Due to the appearance of constantly progress and the new business of technology, can providing for home gateway user of low cost better service by updating the method for family gateway equipment software. But the upgrading of software exists certain risk, in such as escalation process, the power down of equipment accident or operational error will result in the infringement of whole system software, if the home gateway of single system image, this time can only be delivered to producer and keep in repair by equipment.
Summary of the invention
The technical problem to be solved in the present invention is to provide the bootstrap technique of a kind of dual system mirror image, being equipped with dual system mirror image, whatsoever situation causes upgrading unsuccessfully, has a normal software to start in system all the time, updating operation can be repeatedly performed, until upgrading successfully.
For reaching above-mentioned purpose, technical scheme is as follows:
The bootstrap technique of a kind of dual system mirror image, comprises the following steps:
Step one, the information read in boot configuration subregion;
Step 2, reading the value of the bootable number of partitions, if being 0, jumping to step 6, if being that 1 or 2 orders perform step 3;
Step 3, reading main boot partition value, if the value of main boot subregion is 0, perform step 4a, if the value of main boot subregion is 1, performing step 4b, if being-1, jumping to step 6;
Step 4a, read leader label (mirror image 0) value, if being 0 or 5, perform step 5a, otherwise perform step 4b;
Step 4b, read leader label (mirror image 1) value, if being 0 or 5, perform step 5b, otherwise perform step 4a;
Step 5a, leader label (mirror image 0) being set to 1, starting load images 0, if loading unsuccessfully, the value arranging leader label (mirror image 0) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 1; If loading successfully, leader label (mirror image 0) being set to 3, guiding completes;
Step 5b, leader label (mirror image 1) is set to 1, starts load images 1; If loading unsuccessfully, the value arranging leader label (mirror image 1) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 0; If loading successfully, leader label (mirror image 1) being set to 3, guiding completes;
Step 6, not having the subregion that can guide, bootstrap lights malfunction indicator lamp.
In a preferred embodiment of the invention, described main boot subregion refer to equipment start after boot partition will the subregion at system image place of load operating, its possible value is 0,1 ,-1;
When value is that 0 expression mirror image 0 is as main boot subregion;
When value is that 1 expression mirror image 1 is as main boot subregion;
When value does not have main boot subregion for-1 expression.
In a preferred embodiment of the invention, described leader label is for recording the startup situation of system image, and the information that its value includes has: can start, and starts to guide, loads unsuccessfully, load successfully, start unsuccessfully, start successfully, system exception, corresponding value is 0,1,2,3,4,5,6.
In a preferred embodiment of the invention, the described bootable number of partitions is used for avoiding bootstrap to be absorbed in startup endless loop when starting all failed at mirror image 0 and mirror image 1, and bootable number of partitions value can be 0,1,2; 0 represents the subregion not having to guide; 1 indicates a subregion that can guide, and 2 represent that two subregions can guide.
By technique scheme, the invention has the beneficial effects as follows:
The present invention is equipped with dual system mirror image, and whatsoever situation causes upgrading unsuccessfully, has a normal software to start in system all the time, and updating operation can be repeatedly performed, until upgrading successfully.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the structured flowchart of the present invention.
Detailed description of the invention
For the technological means making the present invention realize, creation characteristic, reach purpose and effect and be easy to understand, below in conjunction with being specifically illustrating, the present invention is expanded on further.
Reference Fig. 1, the guiding system of a kind of dual system mirror image, including:
One bootstrap, is responsible for load operating board suppot package, is the software program run at first after system boot;
One board suppot package, including operating system and device drives;
And an application program, it is the core of systems soft ware, application program operates on board suppot package, it is provided that the visible various services of user, various services include the fire wall in home gateway, service on net, configuration management, dial-up connection, voice and video service, the setting of home automation.
Described board suppot package and application program are packaged with constituting system image, are provided with at least two group system mirror images in the present system.
In family gateway equipment, bootstrap and system image are burnt on the different subregions of flash memory device, deposit boot configuration subregion, device configuration file and system running log except also having other subregion on flash memory.
For having the home gateway of double-mirror, it is necessary to two subregions carry out storage system mirror image. two subregions are called: mirror image 0 and mirror image 1.
The active and standby information of boot configuration partitioned record system image and the situation of guiding, this is the basis that the present invention realizes. The realization of dual system will realize according to the information recorded here. Below the content of boot configuration subregion is elaborated:
Boot configuration subregion includes three members: main boot subregion, leader label, the bootable number of partitions.
This main boot subregion: main boot subregion refer to equipment start after boot partition will the subregion at system image place of load operating. its possible value is 0,1 ,-1;
When value is that 0 expression mirror image 0 is as main boot subregion.
When value is that 1 expression mirror image 1 is as main boot subregion.
When value does not have main boot subregion for-1 expression.
This leader label: leader label is for recording the startup situation of system image. The information that its value includes has: can start, and starts to guide, loads unsuccessfully, load successfully, start unsuccessfully, start successfully, system exception, and corresponding value is 0, and 1,2,3,4,5,6.
Leader label has two parts, the startup situation of a record mirror image 0, the startup situation of a record mirror image 1. and it is normal for can starting expression mirror image, it is possible to directed program loading operation.
Start to guide and represent that bootstrap starts loading system mirror image.
Load and unsuccessfully represent the failure of boot program loads system image.
Load and successfully represent that bootup process terminates, perform system image by starting.
Start unsuccessfully refer to mirror image bring into operation after self initialization procedure failure.
Start and successfully refer to that system initialization completes, start to provide miscellaneous service ability.
System exception refers to and occurs in that critical defect in system operation.
This bootable number of partitions: the bootable number of partitions is used for avoiding bootstrap to be absorbed in startup endless loop when starting all failed at mirror image 0 and mirror image 1. Bootable number of partitions value can be 0,1,2.
0 represents the subregion not having to guide. 1 indicates a subregion that can guide, and 2 represent that two subregions can guide.
When the bootable number of partitions is 0, bootstrap can pass through LED light prompt facility fault.
The bootstrap technique of a kind of dual system mirror image, comprises the following steps:
Step one, the information read in boot configuration subregion;
Step 2, reading the value of the bootable number of partitions, if being 0, jumping to step 6, if being that 1 or 2 orders perform step 3;
Step 3, reading main boot partition value, if the value of main boot subregion is 0, perform step 4a, if the value of main boot subregion is 1, performing step 4b, if being-1, jumping to step 6;
Step 4a, read leader label (mirror image 0) value, if being 0 or 5, perform step 5a, otherwise perform step 4b;
Step 4b, read leader label (mirror image 1) value, if being 0 or 5, perform step 5b, otherwise perform step 4a;
Step 5a, leader label (mirror image 0) being set to 1, starting load images 0, if loading unsuccessfully, the value arranging leader label (mirror image 0) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 1. If loading successfully, leader label (mirror image 0) being set to 3, guiding completes;
Step 5b, leader label (mirror image 1) is set to 1, starts load images 1; If loading unsuccessfully, the value arranging leader label (mirror image 1) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 0; If loading successfully, leader label (mirror image 1) being set to 3, guiding completes;
Step 6, not having the subregion that can guide, bootstrap lights malfunction indicator lamp.
After bootstrap completes loading, program will jump to perform in system image, if system image self initializes unsuccessfully, then arranging its leader label is 4, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, otherwise it is set to another partition value (current mirror image is 0 be just set to 1, and current mirror image is 1 be just set to 0), then restarts system. Run succeeded if initialized, then arranging its leader label is that 5. systems enter normal operating condition.
If fatal defect occurs in running, then arranging its leader label is 6, the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, otherwise it is set to another partition value (current mirror image is 0 be just set to 1, and current mirror image is 1 be just set to 0), then restarts system.
The ultimate principle of the present invention and principal character and advantages of the present invention have more than been shown and described. Skilled person will appreciate that of the industry; the present invention is not restricted to the described embodiments; described in above-described embodiment and description is that principles of the invention is described; without departing from the spirit and scope of the present invention; the present invention also has various changes and modifications, and these changes and improvements both fall within the claimed scope of the invention. Claimed scope is defined by appending claims and equivalent thereof.

Claims (4)

1. the bootstrap technique of a dual system mirror image, it is characterised in that comprise the following steps:
Step one, the information read in boot configuration subregion;
Step 2, reading the value of the bootable number of partitions, if being 0, jumping to step 6, if being that 1 or 2 orders perform step 3;
Step 3, reading main boot partition value, if the value of main boot subregion is 0, perform step 4a, if the value of main boot subregion is 1, performing step 4b, if being-1, jumping to step 6;
Step 4a, read leader label (mirror image 0) value, if being 0 or 5, perform step 5a, otherwise perform step 4b;
Step 4b, read leader label (mirror image 1) value, if being 0 or 5, perform step 5b, otherwise perform step 4a;
Step 5a, leader label (mirror image 0) being set to 1, starting load images 0, if loading unsuccessfully, the value arranging leader label (mirror image 0) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 1; If loading successfully, leader label (mirror image 0) being set to 3, guiding completes;
Step 5b, leader label (mirror image 1) is set to 1, starts load images 1; If loading unsuccessfully, the value arranging leader label (mirror image 1) is 2, and the value of the bootable number of partitions subtracts 1, if the value of the bootable number of partitions is-1, the value arranging main boot subregion is-1, is otherwise set to 0; If loading successfully, leader label (mirror image 1) being set to 3, guiding completes;
Step 6, not having the subregion that can guide, bootstrap lights malfunction indicator lamp.
2. the bootstrap technique of a kind of dual system mirror image according to claim 1, it is characterised in that described main boot subregion refer to equipment start after boot partition will the subregion at system image place of load operating, its possible value is 0,1 ,-1;
When value is that 0 expression mirror image 0 is as main boot subregion;
When value is that 1 expression mirror image 1 is as main boot subregion;
When value does not have main boot subregion for-1 expression.
3. the bootstrap technique of a kind of dual system mirror image according to claim 1, it is characterised in that described leader label is for recording the startup situation of system image, the information that its value includes has: can start, and starts to guide, loads unsuccessfully, load successfully, start unsuccessfully, start successfully, system exception, corresponding value is 0,1,2,3,4,5,6.
4. the bootstrap technique of a kind of dual system mirror image according to claim 1, it is characterized in that, the described bootable number of partitions is used for avoiding bootstrap to be absorbed in startup endless loop when starting all failed at mirror image 0 and mirror image 1, and bootable number of partitions value can be 0,1,2; 0 represents the subregion not having to guide; 1 indicates a subregion that can guide, and 2 represent that two subregions can guide.
CN201410580625.XA 2014-10-27 2014-10-27 Dual-system mirror image guiding method Pending CN105630515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410580625.XA CN105630515A (en) 2014-10-27 2014-10-27 Dual-system mirror image guiding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410580625.XA CN105630515A (en) 2014-10-27 2014-10-27 Dual-system mirror image guiding method

Publications (1)

Publication Number Publication Date
CN105630515A true CN105630515A (en) 2016-06-01

Family

ID=56045505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410580625.XA Pending CN105630515A (en) 2014-10-27 2014-10-27 Dual-system mirror image guiding method

Country Status (1)

Country Link
CN (1) CN105630515A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911502A (en) * 2017-02-22 2017-06-30 烽火通信科技股份有限公司 A kind of upgrade method and system of intelligent home gateway equipment
CN109446008A (en) * 2018-10-31 2019-03-08 Oppo广东移动通信有限公司 A kind of failure cause detection method, failure cause detection device and terminal device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911502A (en) * 2017-02-22 2017-06-30 烽火通信科技股份有限公司 A kind of upgrade method and system of intelligent home gateway equipment
CN106911502B (en) * 2017-02-22 2019-11-12 烽火通信科技股份有限公司 A kind of upgrade method and system of intelligent home gateway equipment
CN109446008A (en) * 2018-10-31 2019-03-08 Oppo广东移动通信有限公司 A kind of failure cause detection method, failure cause detection device and terminal device
CN109446008B (en) * 2018-10-31 2022-02-08 Oppo广东移动通信有限公司 Fault reason detection method, fault reason detection device and terminal equipment

Similar Documents

Publication Publication Date Title
CN102238093B (en) Service interruption prevention method and device
US20140376362A1 (en) Dynamic client fail-over during a rolling patch installation based on temporal server conditions
JP2009230171A (en) Update management program, management node, update management method, and cluster system
CN102571462B (en) Self-protecting method for long-distance upgrading of optical network unit
CN109062598A (en) A kind of safe OTA upgrade method and system
CN102622280A (en) Control method and control device used for software version upgrade and based on dual file system
CN104915226A (en) Network device software starting method, device and network device
CN108134690B (en) Network service deployment process control method, device and system
US9380001B2 (en) Deploying and modifying a service-oriented architecture deployment environment model
CN108897576B (en) Method for rapidly starting BOOT based on ARM chip
US10019345B2 (en) Executing multi-version tests against a multi-version application
CN106484464A (en) Tuner chip driving method and electronic equipment
CN111880738A (en) Method for automatically creating and mounting LVM (logical volume manager) volume in K8s environment
CN108108198A (en) For the method and system of computer system
CN103490929B (en) Manufacturing and implement method for multi-adaptive firmware of server
CN106512397A (en) Data loading method for game server and game server
CN105630515A (en) Dual-system mirror image guiding method
CN108304140B (en) Flash memory data management method and device and microcontroller
CN106372160A (en) Distributive database and management method
CN108170456A (en) The firmware upgrade method and device of electronic equipment
CN101266566A (en) Multi- test scene automatic dispatch system and method
CN106528114A (en) Android firmware application, android firmware and firmware upgrading method
CN105634879A (en) System for updating home gateway
CN105868101B (en) A kind of method for testing software
CN111338652B (en) Operating system mirror image manufacturing method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160601