CN109558275A - A kind of method and electronic equipment of the factory reset based on educational system - Google Patents
A kind of method and electronic equipment of the factory reset based on educational system Download PDFInfo
- Publication number
- CN109558275A CN109558275A CN201811250660.XA CN201811250660A CN109558275A CN 109558275 A CN109558275 A CN 109558275A CN 201811250660 A CN201811250660 A CN 201811250660A CN 109558275 A CN109558275 A CN 109558275A
- Authority
- CN
- China
- Prior art keywords
- file systems
- surface layer
- file
- topmost paper
- factory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1479—Generic software techniques for error detection or fault masking
- G06F11/1482—Generic software techniques for error detection or fault masking by means of middleware or OS functionality
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses the method and electronic equipment of a kind of factory reset based on educational system, wherein, method is comprising steps of be divided into three underlying file systems, topmost paper system and surface layer file system levels for original file systems, wherein based on underlying file systems, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon in topmost paper system;Using surface layer file system as final mount directory, when modifying to surface layer file system, change is stored in topmost paper system;When needing to reset original file systems, topmost paper system is emptied, and pass through underlying file systems factory reset.Through the invention, when the case where resetting occurs needing in operating system, topmost paper system can be directly emptied, factory state can be restored by underlying file systems.The present invention is specifically modified without paying close attention to application and system, empties that file system operation is rapid, so that system be allow to be promptly restored to the state of factory.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of methods of the factory reset based on educational system
And electronic equipment.
Background technique
In operating system use process, system update and user's operation frequently can lead to system file damage, using meaning
It is outer delete, program update it is incompatible lead to the situations such as application crashes, and recovery system need user need to have system it is certain
Managerial ability, but operating system is a complicated engineering, ordinary user often have no ability to the experience that problem is excluded and
Ability, common solution are to reinstall operating system.
But operating system is reinstalled, needs again to configure computer, it is also necessary to application program etc. is reinstalled,
Very file may also be lost simultaneously, while the time for installing operating system is also longer, efficiency is lower.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the recovery factory based on educational system that the purpose of the present invention is to provide a kind of
The method and electronic equipment of setting, it is intended to the problems such as solving complicated system recovery procedure in the prior art, low efficiency.
Technical scheme is as follows:
A method of the factory reset based on educational system, wherein comprising steps of
Original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels,
Based on middle underlying file systems, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon upper layer
In file system;
Using surface layer file system as final mount directory, when modifying to surface layer file system, change is protected
It is stored in topmost paper system;
When needing to reset original file systems, topmost paper system is emptied, and extensive by underlying file systems
Multiple default setting.
The method of the factory reset based on educational system, wherein when emptying topmost paper system, simultaneously
Empty surface layer file system.
The method of the factory reset based on educational system, wherein the modification that surface layer file system is carried out
Operation including system update and user to surface layer file system.
The method of the factory reset based on educational system, wherein the underlying file systems save interior
Holding includes operating system physical file.
The method of the factory reset based on educational system, wherein when need to original file systems carry out
When resetting, topmost paper system is emptied, and specifically include by the step of underlying file systems factory reset:
When needing to reset original file systems, topmost paper system is emptied;
Restart original file systems;
Pass through underlying file systems factory reset.
The method of the factory reset based on educational system, wherein periodically underlying file systems are carried out standby
Part.
The method of the factory reset based on educational system, wherein when being backed up every time, covering is last
The content backed up.
A kind of electronic equipment, wherein include:
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels,
Based on middle underlying file systems, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon upper layer
In file system;
Using surface layer file system as final mount directory, when modifying to surface layer file system, change is protected
It is stored in topmost paper system;
When needing to reset original file systems, topmost paper system is emptied, and extensive by underlying file systems
Multiple default setting.
A kind of non-volatile computer readable storage medium storing program for executing, wherein the non-volatile computer readable storage medium storing program for executing is deposited
Computer executable instructions are contained, when which is executed by one or more processors, may make described one
The method that a or multiple processors execute the factory reset based on educational system.
A kind of computer program product, wherein non-volatile computer is readable to be deposited computer program product including being stored in
Computer program on storage media, computer program include program instruction, when program instruction is executed by processor, make the place
Manage the method that device executes the factory reset based on educational system.
The utility model has the advantages that through the invention, when the case where resetting occurs needing in operating system, can directly empty topmost paper
System, modifications all in this way can all be removed, since underlying file systems are always maintained at the state of system factory, so passing through
Underlying file systems can restore factory state.The present invention is specifically modified without paying close attention to application and system, empties file system behaviour
Make rapidly, so that system be allow to be promptly restored to the state dispatched from the factory.
Detailed description of the invention
Fig. 1 is a kind of flow chart of the method preferred embodiment of the factory reset based on educational system of the present invention.
Fig. 2 is the structural block diagram of a kind of electronic equipment preferred embodiment of the present invention.
Specific embodiment
The present invention provides the method and electronic equipment of a kind of factory reset based on educational system, of the invention to make
Purpose, technical solution and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that this place is retouched
The specific embodiment stated is only used to explain the present invention, is not intended to limit the present invention.
Referring to Fig. 1, Fig. 1 is a kind of method preferred embodiment of the factory reset based on educational system of the present invention
Flow chart, as shown, itself comprising steps of
S1, original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels,
Wherein based on underlying file systems, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon
In layer file system;
S2, using surface layer file system as final mount directory, when modifying to surface layer file system, will change
It is stored in topmost paper system;
S3, when needing to reset original file systems, empty topmost paper system, and pass through underlying file systems
Factory reset.
Through the invention, when the case where resetting occurs needing in operating system, topmost paper system can be directly emptied, in this way
All modifications can all be removed, since underlying file systems are always maintained at the state of system factory, so passing through bottom document
System can restore factory state.The present invention is specifically modified without paying close attention to application and system, and it is rapid to empty file system operation, from
And system is allow to be promptly restored to the state dispatched from the factory.
Specifically, in the step S1, original file systems are divided into underlying file systems, topmost paper system and table
Layer three level of file system, wherein based on underlying file systems, topmost paper system is superimposed on underlying file systems, table
Layer file system is superimposed upon in topmost paper system.
The present invention is that original file systems are converted to a union file system, and union file system is a lightweight
Hierarchical file system.The present invention mainly by original file systems be divided into lowerdir (underlying file systems)/upperdir (on
Layer file system) three levels of/mergeddir (surface layer file system), wherein by lowerdir (underlying file systems) conduct
Basis, herein on be superimposed upperdir (topmost paper system), ultimately produce mergeddir (surface layer file system).
Union file system (UnionFS) is a kind of layering, lightweight and high performance file system, it is supported to text
Different directories can be mounted to the same virtual file as the primary superposition submitted and come from level to level by the modification of part system
Under system.
Union file system is the basis of Docker mirror image.Mirror image can be inherited by being layered, based on basic mirror
As (there is no father's mirror image), can make various specific using mirror image.In addition, difference Docker container can share some bases
The file system layer of plinth, while oneself exclusive change layer is added, substantially increase the efficiency of storage.
AUFS used in Docker (AnotherUnionFS) is exactly a kind of union file system.AUFS supports to be each
A member directories (branch of similar Git) set read-only (readonly), read-write (readwrite) and write out (whiteout-
Able) permission, while having the concept of a similar layering in AUFS, the branch of read-only authority can be carried out in logic incrementally
It modifies (not influencing read-only part).
Union file system not only can to each catalogue set read-only (Readonly), read-write (Readwrite) and
(Whiteoutable) permission is write, while union file system can also support the mechanism of layering, for example, can be to read-only authority
It is incrementally modified in logic without influencing read-only part part.
Union file system supports the file system being mounted to different directories under the same Virtual File System.It can be with
The Branch of the Branch (branch) of an one Readonly and Writeable is united carry in same file
Under system.
Typical Linux starts to operation and needs two FileSystem (file system), BootFS (guidance file system
System) and RootFS (root file system).
BootFS mainly includes BootLoader (boot loader) and Kernel (kernel), and BootLoader mainly draws
Load Kernel is led, after Boot success, Kernel is loaded into memory BootFS just by Umount (forced unloading).
What RootFS included be exactly in typical linux system /standard directories and the file such as dev ,/proc ,/bin.
RootFS after actuation, is set to Readonly first by Linux, is switched to after carrying out a series of inspections
Readwrite is for users to use.Then the carry Readwrite file system on the RootFS file system of Readonly.
And it is superimposed upwards so that the structure of one group of Readonly and Readwrite constitutes the fortune of a Container (container)
Column catalogue, each be referred to as a file system Layer (layer).
The characteristic of union file system so that each can only be present in the modification of Readonly layers of file/directory
In the Writeable layer on upper layer.In this way since there is no competition and also multiple Container can share Readonly file
System layer.Generally speaking for Container, entire RootFS becomes read-write, but in fact all modifications
It is all written in the writeable layer of top layer, image does not save User Status, can be used for template, reconstruction and duplication.
The present invention also exactly realizes the setting of three layers of file system using above-mentioned union file system.
In the step S2, using surface layer file system as final mount directory, carried out when to surface layer file system
When modification, change is stored in topmost paper system.
In above-mentioned union file system, surface layer file system is final mount directory, i.e. the operation of user is all in table
It is operated in layer file system, when user modifies to surface layer file system, change (i.e. modification content) is stored in
In topmost paper system, but not directly operate lowerdir (underlying file systems).Underlying file systems therein are mainly
For saving system file, such as operating system physical file.
In the present invention, underlying file systems are the file system of operating system physical file, and topmost paper system is conduct
The file system of system modification gets out mergeddir (surface layer file system) by union file system, operating system is transported
File system when row is switched to mergeddir (surface layer file system).
It further, include the behaviour of system update and user to surface layer file system to the modification that surface layer file system carries out
Make.The content that i.e. topmost paper system is saved is mainly system update content and user's operation data.
By aforesaid operations, during operating system, the data such as system update, user's operation can be all stored in
Upperdir (topmost paper system), and the file system lowerdir (underlying file systems) where operating system physical file
Never it is modified.
In the step S3, when needing to reset original file systems, topmost paper system is emptied, and pass through
Underlying file systems factory reset.
When operating system (original file systems) occurs needing the case where resetting, upperdir file system is directly emptied
(topmost paper system), modifications all in this way can all be removed, and be since lowerdir (underlying file systems) is always maintained at
The state of system factory, to realize recovery factory state.
Further, when emptying topmost paper system, while surface layer file system is emptied, surface layer file system is not due to relating to
And system physical file, so can equally be purged, it is ensured that factory state can be restored.
Further, when needing to reset original file systems, topmost paper system is emptied, and pass through bottom document
The step of system factory reset, specifically includes:
When needing to reset original file systems, topmost paper system is emptied;
Restart original file systems;
Pass through underlying file systems factory reset.
When carrying out system resetting, topmost paper system can be first emptied, entire original file systems are then restarted, because of bottom
Layer file system be not modified, so can be by underlying file systems come factory reset.
In addition, in system operation, since underlying file systems may change due to uncontrollable
Become, so underlying file systems can be backed up, and the underlying file systems backed up can operate normally, so can lead to
Crossing the underlying file systems of backup, ensure can reset system.
It is currently preferred that underlying file systems are backed up in timing, i.e., backup is primary at regular intervals, such as
A underlying file systems are backed up every other month, it is ensured that underlying file systems are newest file system.
In addition, the last content backed up of covering, the underlying file systems saved are most when being backed up every time
New underlying file systems.
The present invention is specifically modified without paying close attention to application and system, and emptying file system is a very quickly operation,
These systems can be promptly restored to the state of factory, and operation of the present invention is simple, and operation threshold is low, high-efficient.
The present invention also provides a kind of electronic equipment 10, as shown in Fig. 2, comprising:
Processor 110 is adapted for carrying out each instruction, and
Equipment 120 is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor 110:
Original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels,
Based on middle underlying file systems, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon upper layer
In file system;
Using surface layer file system as final mount directory, when modifying to surface layer file system, change is protected
It is stored in topmost paper system;
When needing to reset original file systems, topmost paper system is emptied, and extensive by underlying file systems
Multiple default setting.
The processor 110 can for general processor, digital signal processor (DSP), specific integrated circuit (ASIC),
Field programmable gate array (FPGA), single-chip microcontroller, ARM (Acorn RISC Machine) or other programmable logic device are divided
Any combination of vertical door or transistor logic, discrete hardware component or these components.In addition, processor can also be any
Conventional processors, microprocessor or state machine.Processor also may be implemented as calculating the combination of equipment, for example, DSP and Wei Chu
Manage combination, multi-microprocessor, one or more microprocessors combination DSP core, any other this configuration of device.
It stores equipment 120 and is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software
Program, non-volatile computer executable program and module, such as the recovering based on educational system in the embodiment of the present invention
The corresponding program instruction of method of factory's setting.Processor by operation be stored in storage equipment in non-volatile software program,
Instruction and unit, at the various function application and data of the method for the factory reset based on educational system
Reason, i.e. realization above method embodiment.
It has been described in detail in the method for particular technique details in front about above-mentioned electronic equipment 10, so it will not be repeated.
The present invention also provides a kind of non-volatile computer readable storage medium storing program for executing, the non-volatile computer readable storage
Media storage has computer executable instructions, when which is executed by one or more processors, may make
The method that one or more of processors execute the factory reset based on educational system.
The present invention also provides a kind of computer program product, computer program product includes being stored in non-volatile computer
Computer program on readable storage medium storing program for executing, computer program include program instruction, when program instruction is executed by processor, are made
The method that the processor executes the factory reset based on educational system.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.
Claims (10)
1. a kind of method of the factory reset based on educational system, which is characterized in that comprising steps of
Original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels, indsole
Based on layer file system, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon topmost paper
In system;
Change is stored in when modifying to surface layer file system using surface layer file system as final mount directory
In topmost paper system;
When needing to reset original file systems, topmost paper system is emptied, and recover by underlying file systems
Factory's setting.
2. the method for the factory reset according to claim 1 based on educational system, which is characterized in that on emptying
When layer file system, while emptying surface layer file system.
3. the method for the factory reset according to claim 1 based on educational system, which is characterized in that surface layer text
The modification that part system carries out includes the operation of system update and user to surface layer file system.
4. the method for the factory reset according to claim 1 based on educational system, which is characterized in that the bottom
The content that file system saves includes operating system physical file.
5. the method for the factory reset according to claim 1 based on educational system, which is characterized in that when needs pair
When original file systems are reset, topmost paper system, and the step of passing through underlying file systems factory reset are emptied
It specifically includes:
When needing to reset original file systems, topmost paper system is emptied;
Restart original file systems;
Pass through underlying file systems factory reset.
6. the method for the factory reset according to claim 1 based on educational system, which is characterized in that periodically the bottom of to
Layer file system is backed up.
7. the method for the factory reset according to claim 6 based on educational system, which is characterized in that carry out every time
When backup, the last content backed up of covering.
8. a kind of electronic equipment characterized by comprising
Processor is adapted for carrying out each instruction, and
Equipment is stored, is suitable for storing a plurality of instruction, described instruction is suitable for being loaded and being executed by processor:
Original file systems are divided into three underlying file systems, topmost paper system and surface layer file system levels, indsole
Based on layer file system, topmost paper system is superimposed on underlying file systems, and surface layer file system is superimposed upon topmost paper
In system;
Change is stored in when modifying to surface layer file system using surface layer file system as final mount directory
In topmost paper system;
When needing to reset original file systems, topmost paper system is emptied, and recover by underlying file systems
Factory's setting.
9. a kind of non-volatile computer readable storage medium storing program for executing, which is characterized in that the non-volatile computer readable storage medium
Matter is stored with computer executable instructions, when which is executed by one or more processors, may make institute
State the side that one or more processors perform claim requires the described in any item factory resets based on educational system of 1-7
Method.
10. a kind of computer program product, which is characterized in that computer program product can including being stored in non-volatile computer
The computer program on storage medium is read, computer program includes program instruction, when program instruction is executed by processor, makes institute
State the method that processor perform claim requires the described in any item factory resets based on educational system of 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811250660.XA CN109558275A (en) | 2018-10-25 | 2018-10-25 | A kind of method and electronic equipment of the factory reset based on educational system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811250660.XA CN109558275A (en) | 2018-10-25 | 2018-10-25 | A kind of method and electronic equipment of the factory reset based on educational system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109558275A true CN109558275A (en) | 2019-04-02 |
Family
ID=65865223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811250660.XA Pending CN109558275A (en) | 2018-10-25 | 2018-10-25 | A kind of method and electronic equipment of the factory reset based on educational system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109558275A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100281083A1 (en) * | 2009-05-04 | 2010-11-04 | Moka5, Inc. | Policy-based layered filesystem management |
US20150378849A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Method and device for backing up, restoring a virtual machine |
CN107341073A (en) * | 2017-06-08 | 2017-11-10 | 北京优帆科技有限公司 | A kind of method and device for realizing container compatible mainframe fictitious host computer image file |
CN107423166A (en) * | 2017-08-09 | 2017-12-01 | 郑州云海信息技术有限公司 | A kind of data processing method and system based on overlay file system |
CN107479922A (en) * | 2017-08-04 | 2017-12-15 | 深圳市中兴物联科技有限公司 | A kind of flash data management method, device and computer-readable recording medium |
CN107590272A (en) * | 2017-09-26 | 2018-01-16 | 天津麒麟信息技术有限公司 | A kind of operating system snapshot implementing method based on Overlay file system |
CN108228353A (en) * | 2017-12-29 | 2018-06-29 | 北京元心科技有限公司 | resource access control method, device and corresponding terminal |
US20180276214A1 (en) * | 2017-03-21 | 2018-09-27 | International Business Machines Corporation | Sharing container images between mulitple hosts through container orchestration |
-
2018
- 2018-10-25 CN CN201811250660.XA patent/CN109558275A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100281083A1 (en) * | 2009-05-04 | 2010-11-04 | Moka5, Inc. | Policy-based layered filesystem management |
US20150378849A1 (en) * | 2014-06-30 | 2015-12-31 | International Business Machines Corporation | Method and device for backing up, restoring a virtual machine |
CN105446826A (en) * | 2014-06-30 | 2016-03-30 | 国际商业机器公司 | Virtual machine backup and recovery method and device |
US20180276214A1 (en) * | 2017-03-21 | 2018-09-27 | International Business Machines Corporation | Sharing container images between mulitple hosts through container orchestration |
CN107341073A (en) * | 2017-06-08 | 2017-11-10 | 北京优帆科技有限公司 | A kind of method and device for realizing container compatible mainframe fictitious host computer image file |
CN107479922A (en) * | 2017-08-04 | 2017-12-15 | 深圳市中兴物联科技有限公司 | A kind of flash data management method, device and computer-readable recording medium |
CN107423166A (en) * | 2017-08-09 | 2017-12-01 | 郑州云海信息技术有限公司 | A kind of data processing method and system based on overlay file system |
CN107590272A (en) * | 2017-09-26 | 2018-01-16 | 天津麒麟信息技术有限公司 | A kind of operating system snapshot implementing method based on Overlay file system |
CN108228353A (en) * | 2017-12-29 | 2018-06-29 | 北京元心科技有限公司 | resource access control method, device and corresponding terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9286052B1 (en) | Upgrading software on a pair of nodes in a clustered environment | |
US10911065B2 (en) | Computer system and method including selectively compressing data files and directories based on an operator indication and representing the amount of available free space | |
US6205558B1 (en) | Recovery of file systems after modification failure | |
US9442753B2 (en) | Creating virtual machines | |
US10067835B2 (en) | System reset | |
EP3769224B1 (en) | Configurable recovery states | |
CN110088733A (en) | The layout based on accumulation layer of virtual machine (vm) migration | |
US20080104441A1 (en) | Data processing system and method | |
US8539184B2 (en) | On demand storage group management with recapture | |
CN105593829B (en) | Method, system and the medium of file system object are excluded from original image backup | |
US10705867B2 (en) | Hypervisor exchange with virtual machines in memory | |
CN104268097A (en) | Metadata processing method and system | |
CN106258006A (en) | Use status information recovery system | |
WO2017214369A1 (en) | Systems and methods for implementing dynamic file systems | |
EP3769225B1 (en) | Free space pass-through | |
CN109558275A (en) | A kind of method and electronic equipment of the factory reset based on educational system | |
US11620136B2 (en) | Space snapshots | |
KR20190130903A (en) | Method and system for swapping booting disk | |
TWI693550B (en) | Backup method for supporting multi-dsik architecture of virtual machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190402 |