Summary of the invention
Module in storage device in order to solve controller for storage system starting information occurs caused by bad block
The problem of controller system can not normally start, the embodiment of the invention provides a kind of system start method of controller and dresses
It sets.The technical solution is as follows:
On the one hand, a kind of system start method of controller is provided, which comprises
When detecting system enabled instruction, the first storage address and the second storage ground are obtained from the environmental variance of storage
Location, first storage address are the storage address of data needed for start-up operation system, and second storage address is starting text
The storage address of data needed for part system;
Based on first storage address, the data of the first operating system are obtained, and are based on second storage address,
Obtain the data of the first file system;
Based on the data of first operating system, first operating system is verified, based on first text
The data of part system verify first file system;
When first operating system and first file system verify successfully, start first operating system
With first file system.
Optionally, the data based on first operating system, verify first operating system, are based on
The data of first file system verify first file system, comprising:
The first default identifying code and the second default identifying code are obtained, the first default identifying code is to first operation
The pre-set identifying code of system, the second default identifying code are to the pre-set identifying code of the first file system;
Integrality calculating is carried out to the data of first operating system, the first calculating identifying code is obtained, to described first
The data of file system carry out integrality calculating, obtain the second calculating identifying code;
The first calculating identifying code is compared with the described first default identifying code, and described second is calculated and is tested
Card code is compared with the described second default identifying code;
When described first calculate identifying code it is consistent with the described first default identifying code when, determine first operating system school
Test success, when described second calculate identifying code it is consistent with the described second default identifying code when, determine first file system school
Test success.
Optionally, the data based on first operating system, verify first operating system, are based on
The data of first file system, after being verified to first file system, further includes:
When first operating system verifies failure and first operating system is not mirror image operation system, the is obtained
The data of two operating systems, second operating system are to carry out mirror image to first operating system to obtain;Based on described
The data of two operating systems verify second operating system;When second operating system verify it is successfully and described
When first file system is verified successfully, start second operating system and first file system;Alternatively,
When first file system verifies failure and first file system is not mirror file system, the is obtained
The data of two file system, second file system are to carry out mirror image to first file system to obtain;Based on described
The data of two file system verify second file system;When first operating system verify it is successfully and described
When second file system is verified successfully, start first operating system and second file system.
Optionally, the data based on first operating system, verify first operating system, are based on
The data of first file system, after being verified to first file system, further includes:
When first operating system and first file system verify failure, first operating system is judged
Whether it is mirror image operation system, and judges whether first file system is mirror file system;
When first operating system is not mirror image operation system, the data of the second operating system are obtained, based on described
The data of second operating system verify second operating system;
When first file system is not mirror file system, the data of the second file system are obtained, based on described
The data of second file system verify second file system;
When second operating system and second file system verify successfully, start second operating system
With second file system.
Optionally, the method also includes:
When first operating system verifies failure and second operating system verifies successfully, by the environmental variance
In include first storage address replace with start second operating system needed for data storage address;
When first file system verifies failure and second file system verifies successfully, by the environmental variance
In include second storage address replace with start second file system needed for data storage address.
On the other hand, a kind of system starting device of controller is provided, described device includes:
First obtains module, for obtaining first from the environmental variance of storage and depositing when detecting system enabled instruction
Address and the second storage address are stored up, first storage address is the storage address of data needed for start-up operation system, described the
Two storage address are the storage address of data needed for startup file system;
Second obtains module, for being based on first storage address, obtains the data of the first operating system, and be based on
Second storage address obtains the data of the first file system;
Correction verification module verifies first operating system, base for the data based on first operating system
In the data of first file system, first file system is verified;
First starting module, for opening when first operating system and first file system verify successfully
Move first operating system and first file system.
Optionally, the correction verification module includes:
Acquiring unit is used to obtain the first default identifying code and the second default identifying code, the first default identifying code is
To the pre-set identifying code of the first operating system, the second default identifying code is preparatory to first file system
The identifying code of setting;
Computing unit carries out integrality calculating for the data to first operating system, obtains the first calculating verifying
Code carries out integrality calculating to the data of first file system, obtains the second calculating identifying code;
Comparison unit is compared for calculating identifying code for described first with the described first default identifying code, and will
The second calculating identifying code is compared with the described second default identifying code;
Determination unit, for when described first calculate identifying code it is consistent with the described first default identifying code when, described in determination
First operating system verify successfully, when described second calculate identifying code it is consistent with the described second default identifying code when, described in determination
First file system verifies successfully.
Optionally, described device further include:
Second starting module, for working as, first operating system verification fails and first operating system is not mirror image
When operating system, the data of the second operating system are obtained, second operating system is to carry out mirror to first operating system
As obtaining;Based on the data of second operating system, second operating system is verified;When second operation system
When system verifies successfully and first file system is verified successfully, start second operating system and first file system
System;Alternatively,
Third starting module, for working as, first file system verification fails and first file system is not mirror image
When file system, the data of the second file system are obtained, second file system is to carry out mirror to first file system
As obtaining;Based on the data of second file system, second file system is verified;When first operation system
When system verifies successfully and second file system is verified successfully, start first operating system and second file system
System.
Optionally, described device further include:
Judgment module is used to verify when failing when first operating system and first file system, judges institute
State whether the first operating system is mirror image operation system, and judges whether first file system is mirror file system;
Third obtains module, for when first operating system is not mirror image operation system, obtaining the second operation system
The data of system verify second operating system based on the data of second operating system;
4th obtains module, for obtaining the second file system when first file system is not mirror file system
The data of system verify second file system based on the data of second file system;
4th starting module, for opening when second operating system and second file system verify successfully
Move second operating system and second file system.
Optionally, described device further include:
First replacement module, for working as, first operating system verification fails and second operating system verifies successfully
When, data needed for first storage address for including in the environmental variance is replaced with starting second operating system
Storage address;
Second replacement module, for working as, first file system verification fails and second file system verifies successfully
When, data needed for second storage address for including in the environmental variance is replaced with starting second file system
Storage address.
Technical solution provided in an embodiment of the present invention has the benefit that in embodiments of the present invention, works as controller
When detecting system enabled instruction, the first storage address and the second storage address can be obtained from the environmental variance of storage,
It is the storage address of data needed for the storage address and startup file system of data needed for obtaining start-up operation system, then base
In the first storage address, the data of the first operating system are obtained, and are based on the second storage address, obtain the first file system
Data, and then the first operating system and the first file system can be verified, when the first operating system and the first file system
When system is verified successfully, illustrate that bad block does not occur for the first operating system and the memory module of the first file system, thus first
Operating system and the first file system can normally start, and then guarantee the stable operation of controller.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
The embodiment of the invention provides a kind of system start methods of controller, referring to Fig. 1, this method comprises:
Step 101: when detecting system enabled instruction, the first storage address and are obtained from the environmental variance of storage
Two storage address, the first storage address are the storage address of data needed for start-up operation system, and the second storage address is starting text
The storage address of data needed for part system.
Step 102: it is based on the first storage address, obtains the data of the first operating system, and be based on the second storage address,
Obtain the data of the first file system.
Step 103: the data based on the first operating system verify the first operating system, are based on the first file system
The data of system verify the first file system.
Step 104: when the first operating system and the first file system verify successfully, starting the first operating system and the
One file system.
It in embodiments of the present invention, can be from the environmental variance of storage when controller detects system enabled instruction
The first storage address and the second storage address are obtained, that is to say the storage address and starting of data needed for obtaining start-up operation system
The storage address of data needed for file system is then based on the first storage address, obtains the data of the first operating system, Yi Jiji
In the second storage address, obtain the data of the first file system, so can to the first operating system and the first file system into
Row verification illustrates the first operating system and the first file system when the first operating system and the first file system verify successfully
Bad block does not occur for the memory module of system, so that the first operating system and the first file system can normally start, and then guarantees
The stable operation of controller.
Optionally, the data based on the first operating system, verify the first operating system, are based on the first file system
Data, the first file system is verified, comprising:
The first default identifying code and the second default identifying code are obtained, the first default identifying code is preparatory to the first operating system
The identifying code of setting, the second default identifying code are to the pre-set identifying code of the first file system;
Integrality calculating is carried out to the data of the first operating system, the first calculating identifying code is obtained, to the first file system
Data carry out integrality calculating, obtain the second calculating identifying code;
First calculating identifying code is compared with the first default identifying code, and calculates identifying code and second in advance for second
If identifying code compares;
When first calculate identifying code it is consistent with the first default identifying code when, determine that the first operating system verifies successfully, when the
Two calculate identifying codes it is consistent with the second default identifying code when, determine that the first file system verifies successfully.
Optionally, the data based on the first operating system, verify the first operating system, are based on the first file system
Data, after being verified to the first file system, further includes:
When the first operating system verifies failure and the first operating system is not mirror image operation system, the second operation system is obtained
The data of system, the second operating system are to carry out mirror image to the first operating system to obtain;Based on the data of the second operating system, to
Two operating systems are verified;When the second operating system verifies successfully and the first file system verifies successfully, the second behaviour of starting
Make system and the first file system;Alternatively,
When the first file system verifies failure and the first file system is not mirror file system, the second file system is obtained
The data of system, the second file system are to carry out mirror image to the first file system to obtain;Based on the data of the second file system, to
Two file system are verified;When the first operating system verifies successfully and the second file system verifies successfully, the first behaviour of starting
Make system and the second file system.
Optionally, the data based on the first operating system, verify the first operating system, are based on the first file system
Data, after being verified to the first file system, further includes:
When the first operating system and the first file system verify failure, judge whether the first operating system is mirror image behaviour
Make system, and judges whether the first file system is mirror file system;
When the first operating system is not mirror image operation system, the data of the second operating system are obtained, based on the second operation
The data of system verify the second operating system;
When the first file system is not mirror file system, the data of the second file system are obtained, are based on the second file
The data of system verify the second file system;
When the second operating system and the second file system verify successfully, start the second operating system and the second file system
System.
Optionally, this method further include:
When the first operating system verify failure and the second operating system verify successfully when, will include in environmental variance first
The storage address of data needed for storage address replaces with the second operating system of starting;
When the first file system verify failure and the second file system verify successfully when, will include in environmental variance second
The storage address of data needed for storage address replaces with the second file system of starting.
All the above alternatives, can form the alternative embodiment of the disclosure according to any combination, and the present invention is real
It applies example and this is no longer repeated one by one.
The embodiment of the invention provides a kind of system start method of controller, A referring to fig. 2, this method comprises:
Step 201: when detecting system enabled instruction, the first storage address and are obtained from the environmental variance of storage
Two storage address, the first storage address are the storage address of data needed for start-up operation system, and the second storage address is starting text
The storage address of data needed for part system.
It should be noted that the environmental variance includes the multiple parameters of the system running environment of controller, such as system number
According to storage address, using installation path etc., therefore, can be from the ring of storage when controller detects system enabled instruction
The first storage address and the second storage address are obtained in the variable of border.
In addition, the system enabled instruction is used to start the operating system and file system of controller, and system starting refers to
Enabling can be triggered by user by the switch button of push-button controller.
Furthermore controller can be run institute in advance by terminal connected to the controller by the staff of production of hydrocarbons
The program, the operating system current to controller that need carry out mirror image operation system, the file current to controller that mirror image obtains
System carries out the storages such as the obtained mirror file system of mirror image in the controller, when controller factory included operating system and
When file system breaks down and can not normally start, controller can be made just by mirror image operation system and mirror file system
Often starting.Certainly, in practical applications, when controller is connect with the terminal of staff before being initiated, work people
Member can also trigger the operation of interruption system starting after opening controller and starting switch, to pass through the end of connection controller
End manually selects starting controller factory included operating system and file system or mirror image operation system and image file
System.When the operation of interruption system starting is not detected in preset duration, controller will be automatically according in environmental variance
First storage address and the second storage address start-up operation system and file system.
In addition, in practical applications, staff can carry out subregion to the storage device of controller, and controller is gone out
File system and mirror file system included when included operating system, mirror image operation system, factory are respectively stored in when factory
The different zones of storage device, thus the region where the data of the operating system and file system included when controller factory
When bad block occurs, controller can be by mirror image operation system and mirror file system, to start controller.
For example, staff can be with when the storage device of controller is NAND Flash (NAND type flash memory)
Subregion is carried out to NAND Flash, division result is as shown in Figure 2 B, wherein the size of first area can be 256KB (K word
Section), it include that the embodiment of the present invention is provided for storing BPS (Board Support Package, board suppot package), in the BPS
System start method corresponding to program, the size of second area can be 128KB, be used for storage environment variable, third area
The size in domain can be 2MB (Mbytes), the operating system data included for storage control factory, the size of the fourth region
It can be 2MB, be used for memory image operating system data, the size in the 5th region can be 10MB, go out for storage control
The included file system data of factory, the size in the 6th region can be 10MB, be used for memory image file system data, remaining empty
Between be District 7 domain, for storing application and application data etc. other data.In practical applications, the storage device of controller can
NAND Flash is thought, it is of course also possible to for other storage devices such as NOR Flash (NOR type flash memories).
Each starting for controller, what the operating system and file system and last time that this starts when controller started
When operating system and inconsistent file system, there are failures for the operating system and file system that illustrate last time starting, control at this time
The storage address of data needed for the first storage address for including in environmental variance can be replaced with this start-up operation system by device, will
The storage address of data needed for the second storage address for including in environmental variance replaces with this startup file system that is to say
The corresponding operating system of one storage address is controller the last operating system that can normally start before current time,
The corresponding file system of second storage address is controller the last file system that can normally start before current time
System, when so as to so that controller starting next time, can directly deposit the corresponding operating system of the first storage address and second
The corresponding file system in storage address is verified, without to having determined that there are the operating system of failure and file system before
It is verified, to save the starting time of controller, improves the starting efficiency of controller.
Each starting for controller, since the operating system of controller starting can be the operation system carried when factory
System, or mirror image operation system, therefore the corresponding data of the first storage address can be the behaviour carried when starting factory
Data needed for making system, or data needed for starting mirror image operation system, similarly, due to the text of controller starting
Part system file system included when can be to dispatch from the factory, or mirror file system, therefore second storage address is corresponding
Data file system included when can be for starting factory needed for data, or needed for starting mirror file system
Data.
Step 202: it is based on the first storage address, obtains the data of the first operating system, and be based on the second storage address,
Obtain the data of the first file system.
As the storage address that the first storage address is data needed for start-up operation system, correspondingly, the first operation system
The data of system are data needed for start-up operation system, similarly, since the second storage address is data needed for startup file system
Storage address, correspondingly, the data of first file system are data needed for startup file system.
Step 203: obtaining the first default identifying code and the second default identifying code, which is to grasp to first
Make the pre-set identifying code of system, which is to the pre-set identifying code of the first file system.
Wherein, controller can obtain the first default identifying code from data needed for start-up operation system, from startup file
The second default identifying code is obtained in data needed for system, which is the operation that can normally start to controller
System data obtains and is stored in local identifying code after carrying out integrality calculating, which is to controller energy
Enough file system datas normally started obtain after carrying out integrality calculating and are stored in local identifying code.
It should be noted that in practical applications, it can to the integrality calculating of operating system data and file system data
To pass through MD5 (Message Digest Algorithm 5, message digest algorithm the 5th edition), SHA (Secure Hash
Algorithm, Secure Hash Algorithm) etc. integral algorithms realize, the default identifying code of first obtained and the second default identifying code
It all can be a character string.
Step 204: integrality calculating being carried out to the data of the first operating system, the first calculating identifying code is obtained, to first
The data of file system carry out integrality calculating, obtain the second calculating identifying code.
Controller carries out integrality calculating to the data of the first operating system by the integral algorithm of storage, available
First calculates identifying code, carries out integrality calculating to the data of the first file system, available second calculates identifying code.
Step 205: the first calculating identifying code being compared with the first default identifying code, and calculates identifying code for second
It is compared with the second default identifying code.
If the data of current first operating system have integrality, tested by the first calculating that integrality is calculated
It is consistent with the first default identifying code to demonstrate,prove code, if the data of current first operating system do not have integrality, passes through integrality
First be calculated calculates identifying code and the first default identifying code is inconsistent.Similarly, if current first file system
Data have integrality, then the second calculating identifying code being calculated by integrality is consistent with the second default identifying code, if
The data of current first file system do not have integrality, then the second calculating identifying code and second being calculated by integrality
Default identifying code is inconsistent.
Step 206: when first calculate identifying code it is consistent with the first default identifying code when, determine the first operating system verify at
Function, when second calculate identifying code it is consistent with the second default identifying code when, determine that the first file system verifies successfully.
When first calculates identifying code and the first default identifying code is inconsistent, determine that the verification of the first operating system fails, when
Second when calculating identifying code and inconsistent the second default identifying code, determines that the verification of the first file system fails.
So far, controller can realize the data based on the first operating system with through the above steps 203 to step 206, right
First operating system is verified, based on the data of the first file system, the process that the first file system is verified.
Step 207: when the first operating system and the first file system verify successfully, starting the first operating system and the
One file system.
When the first operating system verifies successfully, it can determine that the first operating system can normally start, when the first file
When system check success, it can determine that the first file system can normally start, so that controller can star the first operation system
System and the first file system, and then stable operation.
Further, after verifying to the first operating system and the first file system, controller be can also be performed
Either step in following step (1), step (2) and step (3), comprising:
Step (1): when the first operating system verifies failure and the first operating system is not mirror image operation system, the is obtained
The data of two operating systems, the second operating system are to carry out mirror image to the first operating system to obtain;Based on the second operating system
Data verify the second operating system;When the second operating system verifies successfully and the first file system verifies successfully, open
Dynamic second operating system and the first file system.
When the first operating system verifies failure and the first operating system is not mirror image operation system, it that is to say that controller goes out
When the included operating system of factory breaks down, the second operating system namely mirror image operation system can star, to start control
Device.Before starting mirror image operation system, also need to verify mirror image operation system, when mirror image operation system check at
When function, illustrate that mirror image operation system can normally start.
In addition, that is to say that controller goes out when the first operating system verifies failure and the second operating system also verifies failure
When the included operating system of factory and mirror image operation system break down, controller can carry out alarm sounds, for example make alarm
The flashing of LED (Light Emitting Diode, light emitting diode) lamp, display alarm sounds window etc., and then staff exists
Controller can be overhauled after viewing alarm sounds.
Furthermore when the first operating system verifies failure and the first operating system is mirror image operation system, illustrate controller
The included operating system of factory is verified before current time to be had there are failure, and the first storage address has been replaced by
The storage address of data needed for starting mirror image operation system, and the operating system and mirror image operation for dispatching from the factory included in current controller
System breaks down, even if file system is normal, controller also can not normally start, therefore controller can be warned directly
Report prompt.
Step (2): when the first file system verifies failure and the first file system is not mirror file system, the is obtained
The data of two file system, the second file system are to carry out mirror image to the first file system to obtain;Based on the second file system
Data verify the second file system;When the first operating system verifies successfully and the second file system verifies successfully, open
Dynamic first operating system and the second file system.
When the first file system verifies failure and the first file system is not mirror file system, it that is to say that controller goes out
When the included file system of factory breaks down, the second file system namely mirror file system can star, to start control
Device.Before starting mirror file system, also need to verify mirror file system, when mirror file system verification at
When function, illustrate that mirror file system can normally start.
In addition, that is to say that controller goes out when the first file system verifies failure and the second file system also verifies failure
When the included file system of factory and mirror file system break down, controller can carry out alarm sounds, for example make alarm
The flashing of LED (Light Emitting Diode, light emitting diode) lamp, display alarm sounds window etc., and then staff exists
Controller can be overhauled after viewing alarm sounds.
Furthermore when the first file system verifies failure and the first file system is mirror file system, illustrate controller
The included file system of factory is verified before current time to be had there are failure, and the second storage address has been replaced by
The storage address of data needed for starting mirror file system, and the file system and image file for dispatching from the factory included in current controller
System breaks down, even if operating system is normal, controller also can not normally start, therefore controller can be warned directly
Report prompt.
Step (3): when the first operating system and the first file system verify failure, whether judge the first operating system
For mirror image operation system, and judge whether the first file system is mirror file system;When the first operating system is not mirror image
When operating system, the data for obtaining the second operating system carry out school to the second operating system based on the data of the second operating system
It tests;When the first file system is not mirror file system, the data of the second file system are obtained, based on the second file system
Data verify the second file system;When the second operating system and the second file system verify successfully, starting second
Operating system and the second file system.
When the first operating system and the first file system verify failure, need to judge whether the first operating system is mirror
Whether picture operating system and the first file system are mirror file system, when the first operating system is not mirror image operation system
And first file system when not being mirror file system, illustrate that controller factory included operating system and file system occur
Failure, later when to the second operating system and the second file system namely mirror image operation system and mirror file system verification at
When function, mirror image operation system and mirror file system can star, so that controller be made normally to start.
In addition, illustrating to produce in current controller when verifying failure to the second operating system and the second file system
There is failure in included operating system and file system and mirror image operation system and mirror file system, at this time controller
Alarm sounds can be carried out, and then staff can overhaul controller after viewing alarm sounds.
Furthermore when the first operating system is mirror image operation system, and the first file system is mirror file system, explanation
The included operating system of controller factory and file system is verified before current time has there are failure, and first deposits
The storage address of data needed for storage address has been replaced by starting mirror image operation system, the second storage address have been replaced by starting
The storage address of data needed for mirror file system, and the file system for dispatching from the factory included in current controller and image file system
System and mirror image operation system and mirror file system break down, and controller can directly carry out alarm sounds at this time.
In addition, following step can also be performed after controller execution above-mentioned steps (1), step (2) and step (3)
(4) and at least one of step (5).
Step (4): it when the first operating system verifies failure and the second operating system verifies successfully, will be wrapped in environmental variance
The storage address of data needed for the first storage address included replaces with the second operating system of starting.
Step (5): it when the first file system verifies failure and the second file system verifies successfully, will be wrapped in environmental variance
The storage address of data needed for the second storage address included replaces with the second file system of starting.
By executing at least one of above-mentioned steps (4) and step (5), controller can be corresponding by the first storage address
Operating system replace with this operating system that can normally start, or the corresponding file system of the second storage address is replaced
It is changed to this file system that can normally start, thus when starting controller next time, it can be directly to replaced operation
System or file system are verified, to save the starting time of controller, improve the starting efficiency of controller.
It in embodiments of the present invention, can be from the environmental variance of storage when controller detects system enabled instruction
The first storage address and the second storage address are obtained, that is to say the storage address and starting of data needed for obtaining start-up operation system
The storage address of data needed for file system is then based on the first storage address, obtains the data of the first operating system, Yi Jiji
In the second storage address, obtain the data of the first file system, so can to the first operating system and the first file system into
Row verification illustrates the first operating system and the first file system when the first operating system and the first file system verify successfully
Bad block does not occur for the memory module of system, so that the first operating system and the first file system can normally start, and then guarantees
The stable operation of controller.
Referring to Fig. 3 A, the embodiment of the invention provides a kind of system starting device 300 of controller, which includes:
One, which obtains module 301, second, obtains module 302, correction verification module 303 and the first starting module 304.
First obtains module 301, for obtaining first from the environmental variance of storage when detecting system enabled instruction
Storage address and the second storage address, the first storage address are the storage address of data needed for start-up operation system, the second storage
Address is the storage address of data needed for startup file system;
Second obtains module 302, for being based on the first storage address, obtains the data of the first operating system, and be based on
Second storage address obtains the data of the first file system;
Correction verification module 303 verifies the first operating system for the data based on the first operating system, based on the
The data of one file system verify the first file system;
First starting module 304, for starting first when the first operating system and the first file system verifys successfully
Operating system and the first file system.
Optionally, referring to Fig. 3 B, correction verification module 303 includes:
Acquiring unit 3031 is used to obtain the first default identifying code and the second default identifying code, the first default identifying code is
To the pre-set identifying code of the first operating system, the second default identifying code is to the pre-set verifying of the first file system
Code;
Computing unit 3032 carries out integrality calculating for the data to the first operating system, obtains the first calculating verifying
Code carries out integrality calculating to the data of the first file system, obtains the second calculating identifying code;
Comparison unit 3033, for comparing with the first default identifying code the first calculating identifying code, and by second
Identifying code is calculated to compare with the second default identifying code;
Determination unit 3034, for when first calculate identifying code it is consistent with the first default identifying code when, determine the first operation
System check success, when second calculate identifying code it is consistent with the second default identifying code when, determine that the first file system verifies successfully.
Optionally, referring to Fig. 3 C, the device further include:
Second starting module 305, for working as, the verification of the first operating system fails and the first operating system is not mirror image operation
When system, the data of the second operating system are obtained, the second operating system is to carry out mirror image to the first operating system to obtain;Based on
The data of two operating systems verify the second operating system;When the second operating system verifies successfully and the first file system
When verifying successfully, start the second operating system and the first file system;Alternatively,
Third starting module 306, for working as, the verification of the first file system fails and the first file system is not image file
When system, the data of the second file system are obtained, the second file system is to carry out mirror image to the first file system to obtain;Based on
The data of two file system verify the second file system;When the first operating system verifies successfully and the second file system
When verifying successfully, start the first operating system and the second file system.
Optionally, referring to Fig. 3 D, the device further include:
Judgment module 307 is used to verify when failing when the first operating system and the first file system, judges the first operation
Whether system is mirror image operation system, and judges whether the first file system is mirror file system;
Third obtains module 308, for obtaining the second operating system when the first operating system is not mirror image operation system
Data the second operating system is verified based on the data of the second operating system;
4th obtains module 309, for obtaining the second file system when the first file system is not mirror file system
Data the second file system is verified based on the data of the second file system;
4th starting module 310, for starting second when the second operating system and the second file system verifys successfully
Operating system and the second file system.
Optionally, referring to Fig. 3 E, the device further include:
First replacement module 311 is used for when the first operating system verifies failure and the second operating system verifies successfully, will
The storage address of data needed for the first storage address for including in environmental variance replaces with the second operating system of starting;
Second replacement module 312 is used for when the first file system verifies failure and the second file system verifies successfully, will
The storage address of data needed for the second storage address for including in environmental variance replaces with the second file system of starting.
In conclusion in embodiments of the present invention, it, can be from the ring of storage when controller detects system enabled instruction
The first storage address and the second storage address are obtained in the variable of border, with that is to say the storage of data needed for obtaining start-up operation system
The storage address of data needed for location and startup file system is then based on the first storage address, obtains the number of the first operating system
According to, and it is based on the second storage address, the data of the first file system are obtained, and then can be to the first operating system and the first text
Part system is verified, and when the first operating system and the first file system verify successfully, illustrates the first operating system and
Bad block does not occur for the memory module of one file system, so that the first operating system and the first file system can normally start,
And then guarantee the stable operation of controller.
It should be understood that system of the system starting device of controller provided by the above embodiment in starting controller
When, only the example of the division of the above functional modules, in practical application, it can according to need and divide above-mentioned function
With being completed by different functional modules, i.e., the internal structure of equipment is divided into different functional modules, to complete above description
All or part of function.In addition, the system starting device of controller provided by the above embodiment and the system of controller open
Dynamic embodiment of the method belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.