CN101192161B - Method for updating image file - Google Patents

Method for updating image file Download PDF

Info

Publication number
CN101192161B
CN101192161B CN2006101468349A CN200610146834A CN101192161B CN 101192161 B CN101192161 B CN 101192161B CN 2006101468349 A CN2006101468349 A CN 2006101468349A CN 200610146834 A CN200610146834 A CN 200610146834A CN 101192161 B CN101192161 B CN 101192161B
Authority
CN
China
Prior art keywords
image file
work
server
image
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.)
Expired - Fee Related
Application number
CN2006101468349A
Other languages
Chinese (zh)
Other versions
CN101192161A (en
Inventor
王宗斌
朱陈启源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec Corp filed Critical Inventec Corp
Priority to CN2006101468349A priority Critical patent/CN101192161B/en
Publication of CN101192161A publication Critical patent/CN101192161A/en
Application granted granted Critical
Publication of CN101192161B publication Critical patent/CN101192161B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a method of updating image file and is applied to a server; when a storage location of the server wants to update the working image file, the working image file of a first image area of the storage location is firstly stored in a second image area of the storage location and is used as a backup image file in order that the server can use the updated working image file of the first image area to start the processing of an operating system; when the server can not use the updated working image file to start the processing of the operating system, the server can automatically select the back image file to complete the processing of starting the operating system and can automatically restore the state of the storage location before the update.

Description

Upgrade the method for image file
Technical field
The invention relates to server, especially a kind of work image file or backup image file can selected automatically of finger finished the processing that starts the operating system, and when the processing that server is selected to start the operating system with the backup image file, server can recover the method for the state of storage element before renewal automatically.
Background technology
Server is a kind of high-performance computer, it mainly acts on the node that is as network, to store or to handle the data on the network, server has the processing power higher than general personal computer, stability, reliability, security, extensibility and manageability, especially, progress along with current various electronic communication technologies, and the information flow demand that grows with each passing day, general company or group use server so that services such as relevant information, download, mail to be provided, and have become quotidian ordinary affair.Therefore, how the processing power and the stability of server can improve, and make server that more stable, more humane information environment for use and service environment can be provided, and being becomes to estimate one of most important key of server.Based on previous reasons, the manufacturer of server is at the unusual condition of server because of a variety of causes generation, causes the problem of data in server access or network service disruption, constantly develops new technology, phase can solve variety of issue, improves the stability of server.
For example, be provided with an IPMI (IntelligentPlatform Management Interface in the present server, be called for short: IPMI), IPMI is with baseboard management controller (Baseboard Management controller, be called for short: BMC), several standard interfaces (as: I that passes through 2C/IPMB interface, Serial/Modem interface, LAN interface ... Deng), the sensor set with needing monitored assembly (as: central processor temperature, voltage, rotation speed of the fan etc.) in the server is connected, in order to collect from the sensing value of each sensor.When baseboard management controller when sensing value judges that the monitored assembly of server has serious anomalous event to produce, baseboard management controller can be carried out and correct action, make server can continue to provide service, or time-out provide service to avoid more grave error.
And the firmware (firmware) of aforesaid baseboard management controller in order to judge whether the monitored assembly of server has serious anomalous event to produce, be that mode with image file is stored in the storage element (as: flash memory), when the firmware of baseboard management controller need upgrade, be to use the start loading procedure (boot loader) in the start block of storage element to upgrade, yet, the start loading procedure under at disc operating system (DOS) (Disk Operating System, be called for short: DOS) handle, therefore, the start loading procedure provides quite simple in order to user's Interface design of upgrading firmware, so causing the user is quite inconvenient on the image file that upgrades firmware.
In addition, cabinet (chassis for effective management server, or claim enclosure) and interchanger (switch), what make that server can be stable provides various services or resource, and server is installed a cabinet and (as: the Roadrunner ﹠amp of switch management system; Chassis Management System, be called for short: RCMS), and cabinet and switch management system use file system (File System) to be stored in the interior more than one image file of reservoir (as: hard disk), for the user, if will carry out the renewal of cabinet and switch management system in file system, really be too in complexity, again, if cabinet and the failure of switch management system update are the image files before can't automatically restoring to.
By as can be known above-mentioned, for making server have purposes such as higher processing power, stability, reliability, security, extensibility and manageability, to in server, add in the renewal process of various image files, there is as above listed operation inconvenience maybe can't automatically restore to problems such as image file before, so, if can develop a kind of method of upgrading image file, solve foregoing problems, believe what dealer and consumer expected.
Summary of the invention
Because aforesaid many disappearances, the inventor is through the permanent research and experiment of making great efforts, and development and Design goes out a kind of " upgrading the method for image file " of the present invention finally, in the hope of by proposition of the present invention, can contribute to some extent society.
A purpose of the present invention, provide a kind of method of upgrading image file, this method is applied in a server, when the server desire is upgraded a work image file, the image file of will working earlier saves as a backup image file, after making server start shooting again, the processing that starts the operating system with the work image file after upgrading, and after if server is started shooting again, and the processing that can't start the operating system with the work image file after upgrading, server can be selected automatically to back up the processing that image file starts the operating system again, and recover the state of storage element before renewal automatically, so, promptly solve the problem that traditional server is operated inconvenience and can't be recovered storage element automatically.
Description of drawings
Fig. 1 is the synoptic diagram of storage element of the present invention;
Fig. 2 is the action flow chart of server update work image file of the present invention and backup image file;
Fig. 3 is that server of the present invention upgrades the action flow chart that conditional code is started shooting again according to image.
Symbol description:
Storage element ... 1 start block ... 10
First image area ... 12 second image areas ... 14
Embodiment
For above and other objects of the present invention, feature and advantage can be become apparent, cited below particularlyly go out preferred embodiment, and cooperate appended graphicly, be described in detail below:
The present invention is a kind of method of upgrading image file, this method is applied in the server, see also shown in Figure 1, at least be provided with a storage element 1 (as: flash memory (flash)) in the server, server is partitioned into a start block 10 in advance in storage element 1, one first image area 12 and one second image area 14, the block 10 of wherein starting shooting stores a start loading procedure (boot loader) in advance and an image upgrades conditional code, first image area 12 stores a work image file (workable image file) in advance, second image area 14 is to be used for storing a backup image file (second image file), and the backup image file duplicate be identified in first image area 12 can normal operation the work image file, see also shown in Figure 2, when the server desire will newly be worked image file when being updated to storage element 1, server is according to carrying out the following step:
(1) the present work image file that will be stored in first image area 12 copies to second image area 14 as the backup image files, and the image file of will newly working copies to first image area, 12 conduct work image files: in the present invention, in order to determine the integrality of the new image file that the server desire is upgraded, reach definite new work image file and finished the action of renewal, the step of server update work image file and backup image file comprises:
(10) begin the initialization upgraded, image is upgraded conditional code be set at first numerical value, first numeric representation is not the start first time after the work image file of first image area 12 is updated at present: in a preferred embodiment of the present invention, it is with eight binary number value representation that image upgrades conditional code, wherein first is to represent whether be the start first time after the work image file of first image area 12 is updated, first binary value " 0 " is expressed as start for the first time, and it not is start for the first time that first binary value " 1 " is expressed as; Whether the work image file of second bit representation first image area 12 is updated success, and the work image file can operate normally, the binary value of second position " 0 " is expressed as and upgrades successfully and can operate normally, and the binary value of second position " 1 " is expressed as the renewal failure and can't operates normally; When then representing to start shooting, the 3rd position to carry out boot action with work image file or backup image file, binary value " 0 " expression of the 3rd position is carried out boot action with the work image file, binary value " 1 " expression of the 3rd position is carried out boot action with the backup image file, as for eight positions, the 4th position to the, then still undefined.So, in this embodiment, when server begins to carry out initialization, be not start for the first time, and upgrade, and server should be with the work image file when this start shooting, be that first setting value of upgrading conditional code with image is " 10000000 ";
(11) judge newly whether the content of work image file is complete, if carry out step (12), otherwise carries out step (10); Whether complete in this embodiment, judge content the method for new work image file, whether the amount of capacity that can be the new work image file that inspection receives is wrong; Or check that according to one calculation equation calculates the content of new work image file, and in order to obtaining a check code (as: check sum), and judge whether check code is correct, whether complete in order to the content of judging new work image file;
(12) when the make new advances content of work image file of judgement be complete, be that setting of image renewal conditional code is a second value, and the work image file in first image area 12 copied to second image area 14 as the backup image file, and the image file of newly working copies in first image area 12 as the work image file; In this embodiment, second value is used for representing not to be start for the first time, if and server upgrades with the backup image file, whether can upgrade success in this step and can't learn as for follow-up, and in order to simplify follow-up treatment step, so the second value that image upgrades conditional code is set at " 10100000 ";
(13) image file that judges whether again successfully will newly work duplicates in first image area 12, if carry out step (14), otherwise carries out step (15);
(14) image is upgraded conditional code and be set at third value, because before this step, determined that new work image file successfully copies in first image area 12, therefore, third value will represent that not necessarily the work image file successfully duplicates in first image area 12, but must represent that the work image file upgrades back start for the first time and will carry out boot action with the work image file in first image area 12 when starting shooting again, obtaining the conditional code to reach the information that to carry out boot action with the work image file in first image area 12 when starting shooting again for the work image file upgrades back start for the first time so that can upgrade from image during follow-up again start.So among this embodiment, the binary code values that image upgrades the third value of conditional code can be set at " 01000000 " or " 00000000 ";
(15) image is upgraded conditional code and maintain second value, again start, because before this step, determined that new work image file does not successfully copy in first image area 12, and in the content of judging new work image file is complete step, (has been step 12), has been preset as and is used for expression and upgrades start for the first time, if and server upgrades with the backup image file, so, in this step, need not to change the binary numeral that image upgrades conditional code.
(2) start again, and upgrade the conditional code decision according to image and will carry out in-cycle work again with work image file or backup image file; In this embodiment, after server is carried out the step of renewal work image file, image upgrades conditional code may be first numerical value (i.e. " 10000000 "), second value (i.e. " 10100000 "), or third value (i.e. " 01000000 " or " 00000000 "), or image renewal conditional code is set to one the 4th numerical value, the 4th numerical value upgrades for the first time and again after the start in order to be illustrated in, server can't be with the successfully executive operating system of image file of working, and work image file and fail the running, and need with the backup image file start shooting again again.In this embodiment, the 4th numerical value is with binary numeral " 11100000 " expression, and upgrades the step that conditional code is started shooting again according to image when server, sees also shown in Figure 3ly, and comprising: start shooting again (200);
(201) upgrade the conditional code decision according to image and will carry out in-cycle work again with work image file or backup image file, if upgrading conditional code, the image that receives is set to third value, promptly indicate to carry out in-cycle work again with the work image file, then carry out step (202), and, then carry out step (208) if the image that receives upgrades conditional code and is set to first numerical value, second value or the 4th numerical value;
(202) image is upgraded conditional code and be set at the 4th numerical value, in this step, be with image upgrade conditional code be set at the 4th numerical value be the hypothesis server can't with work image file successfully start the operating system, so that in follow-up step, when server really can't successfully start the operating system with the work image file, not be used in again and set;
(203) start the operating system;
(204) decision operation system being activated of success whether if carry out step (205), otherwise carried out step (206);
(205) the decision operation system is activated or is activated by the backup image file by the work image file, if start the operating system by the work image file, then carry out step (207), otherwise, represent that promptly operating system is to be activated by the backup image file, then carries out step (210);
(206) image is upgraded conditional code and keep the 4th numerical value, return step (200) and handle;
(207) image is upgraded conditional code and be set at first numerical value, represent that promptly the work image file is updated smoothly, the image file of after this can working starts the operating system, and promptly finishes.
(208) received image renewal conditional code is set to first numerical value in this step, second value or the 4th numerical value one of them, wherein first numerical value is to be started the operating system by the work image file, and second value or the 4th numerical value are to be started the operating system by the backup image file, therefore, this step still need judge by work image file start the operating system or by the backup image file start the operating system, if start the operating system and carry out step (209) by the backup image file, otherwise, i.e. expression is to be started the operating system by the work image file, then carries out step (203);
(209) start the operating system by the backup image file in second image area 14, promptly, carry out step (204) again with backup image file initiating task;
(210) the backup image file of second image area 14 is copied in first image area 12 as the work image file, the state before promptly first image area 12 and second image area 14 return to and upgrade is handled according to the following step again;
(211) judge whether storage element 1 recovers success, if carry out step (212), otherwise, carry out step (213);
(212) image is upgraded conditional code and be set at first numerical value, enter the state that wait is started shooting next time again;
(213) image is upgraded conditional code and be set at second value, enter the state that wait is started shooting next time again.
By as can be known above-mentioned, the storage element 1 of server is cut apart two independently image areas, and deposit the work image file respectively and back up image file, after being updated of the work image file success of storage element 1, server can select work image file or backup image file to finish the processing that starts the operating system automatically, and if server can be selected with backup after image file finishes the processing that starts the operating system, can recover the state of storage element 1 before renewal automatically again, and then solve the problem that traditional server is operated inconvenience and can't be recovered storage element 1 automatically.
The above only is a specific embodiment of the present invention, but structural attitude of the present invention is not limited thereto, and anyly is familiar with this skill person in field of the present invention, can think easily and variation or modification, all can be encompassed in the claim of this case.

Claims (10)

1. method of upgrading image file, this method is applied in the server, and when this server desire was updated to a storage element of this server with new work image file, this server carried out the following step:
The initialization that begins to upgrade, image renewal conditional code is set at one first numerical value in the set start block of this storage element with being stored in, this first numeric representation is not the start first time after the work image file in the one first set image area of this storage element is updated at present, and this server should be to carry out in-cycle work with this work image file when this is started shooting;
Whether the content of judging the work image file that this is new is complete;
When the content of judging this new work image file is complete, promptly setting this image renewal conditional code is a second value, and with the work image file in this first image area copy to one second set image area of this storage element as the backup image file, and this new work image file is copied in this first image area as the work image file, and this second value is to be used for representing not to be start for the first time, and this server is to upgrade with the backup image file;
And judge whether successfully this new work image file to be copied in this first image area; And
When judging successfully this new work image file is copied in this first image area, then setting this image renewal conditional code is a third value, this third value represents that this work image file upgrades back start for the first time, and to carry out boot action with the work image file in this first image area when starting shooting again, and start again, and, carry out in-cycle work again with the work image file in this first image area according to this third value in the start block.
2. the method for claim 1, the content that wherein ought judge this new work image file is not complete, then returns the initialized step that begins to upgrade and restarts to handle.
3. the method for claim 1 wherein ought not judged and successfully this new work image file copied in this first image area, then this image is upgraded conditional code and maintains this second value.
4. the method for claim 1, wherein this server inspection is received should new work image file amount of capacity whether wrong, as the whether complete foundation of the content of judging the work image file that this is new.
5. the method for claim 1, wherein this server is to check that according to one calculation equation calculates the content of this new work image file, in order to obtaining a check code, and judge whether this check code is correct, whether complete in order to the content of judging the work image file that this is new.
6. the method for claim 1, wherein this server decision will be carried out under the situation of in-cycle work again with this work image file, this image upgrades conditional code can be set to one the 4th numerical value before the in-cycle work again, the 4th numerical value upgrades for the first time and again after the start in order to be illustrated in, this server can't be with this work image file executive operating system successfully, and this work image file and fail running and need back up image file with this and start shooting again.
7. method as claimed in claim 6 also comprises:
Utilize this work image file to start this operating system;
Judge whether being activated of success of this operating system;
When judging successful being activated of this operating system, and this operating system is to be activated by this work image file, then this image upgraded conditional code and is set at this first numerical value.
8. method as claimed in claim 7, wherein ought judge this operating system the success be activated the step of then starting shooting again.
9. the method for claim 1 wherein ought be judged this new work image file and successfully not be copied in this first image area, then keeps this image and upgrades conditional code at this second value, and this server step of starting shooting again then comprises:
Again start, and, carry out in-cycle work again with the backup image file in this second image area according to this second value in this start block;
Start the operating system by this backup image file;
When being activated of this operating system success, then the backup image file of this second image area is copied in this first image area as the work image file state before promptly this first image area and this second image area return to and upgrade;
And judge whether this storage element recovers success; And
Recover success when judging this storage element, then this image has been upgraded conditional code and be set at this first numerical value, entered the state that wait is started shooting next time again.
10. method as claimed in claim 9 wherein ought be judged storage element and not recover successfully as yet, then image is upgraded conditional code and is set at second value, enters the state that wait is started shooting next time again.
CN2006101468349A 2006-11-23 2006-11-23 Method for updating image file Expired - Fee Related CN101192161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101468349A CN101192161B (en) 2006-11-23 2006-11-23 Method for updating image file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101468349A CN101192161B (en) 2006-11-23 2006-11-23 Method for updating image file

Publications (2)

Publication Number Publication Date
CN101192161A CN101192161A (en) 2008-06-04
CN101192161B true CN101192161B (en) 2011-08-17

Family

ID=39487170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101468349A Expired - Fee Related CN101192161B (en) 2006-11-23 2006-11-23 Method for updating image file

Country Status (1)

Country Link
CN (1) CN101192161B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375844A (en) * 2013-08-12 2015-02-25 中兴通讯股份有限公司 Firmware upgrading method and device
CN104699565A (en) * 2013-12-10 2015-06-10 光阳工业股份有限公司 File backup method for motorcycle tachograph
CN108710692A (en) * 2018-05-22 2018-10-26 北京经纬恒润科技有限公司 A kind of automobile part production line test system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1439128A (en) * 2000-01-07 2003-08-27 汤姆森特许公司 Method and apparatus for baking up application code upon power failure during a code update
CN1598773A (en) * 2003-09-17 2005-03-23 三星电子株式会社 Booting and boot code update method and system thereof
CN1811707A (en) * 2005-01-25 2006-08-02 英业达股份有限公司 Automatic updating and back-up BIOS method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1439128A (en) * 2000-01-07 2003-08-27 汤姆森特许公司 Method and apparatus for baking up application code upon power failure during a code update
CN1598773A (en) * 2003-09-17 2005-03-23 三星电子株式会社 Booting and boot code update method and system thereof
CN1811707A (en) * 2005-01-25 2006-08-02 英业达股份有限公司 Automatic updating and back-up BIOS method

Also Published As

Publication number Publication date
CN101192161A (en) 2008-06-04

Similar Documents

Publication Publication Date Title
CN100461128C (en) Self-monitoring and updating of firmware over a network
US7870548B2 (en) Method for updating an image file
US6195695B1 (en) Data processing system and method for recovering from system crashes
US8621452B2 (en) Device driver rollback
US5426775A (en) Method and a device for booting a computer at a programmed time
CN107590272B (en) Operating system snapshot realization method based on Overlay file system
US20050010835A1 (en) Autonomic non-invasive backup and storage appliance
US7694169B2 (en) Restoring a client device
EP2477111B1 (en) Computer system and program restoring method thereof
US20040153733A1 (en) Method and system for operating system recovery and method of using build-to-configuration mode to model computer system
CN102521289B (en) File synchronization method, device and system
CN108958767B (en) Safety mode automatic upgrading method based on minimum system backup implementation
US7818622B2 (en) Method for recovering data processing system failures
CN112083972B (en) BMC system configuration method, device, equipment and readable storage medium
JP2011053741A (en) Computer program for managing setting information database
CN104572354A (en) Backup and restoration method for operating system based on restoration service and equipment thereof
CN101192161B (en) Method for updating image file
CN101286886B (en) Method and device to recover configuring information of network appliance
US20040221024A1 (en) Apparatus and method for setting environment of client in client / server system, and program recording medium therefor
JPH11272459A (en) Rewriting method for rewritable non-volatile memory and method/system for restoring fault of application program
CN106897063B (en) Method and system for permanently adding OS boot entry to BIOS based on EFI
CN112433739B (en) Firmware upgrading method
KR101576370B1 (en) System and method for remote restoration of computer system, and computer-readable recording medium with program therefor
CN116627519A (en) Multisystem starting method of embedded equipment
KR100980086B1 (en) external input output device for computer system recovery and use method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110817

Termination date: 20161123

CF01 Termination of patent right due to non-payment of annual fee