CN105138362A - Method and device for saving user configuration under Linux system - Google Patents

Method and device for saving user configuration under Linux system Download PDF

Info

Publication number
CN105138362A
CN105138362A CN201510515998.3A CN201510515998A CN105138362A CN 105138362 A CN105138362 A CN 105138362A CN 201510515998 A CN201510515998 A CN 201510515998A CN 105138362 A CN105138362 A CN 105138362A
Authority
CN
China
Prior art keywords
file
compressed
configuration file
configuration
nonvolatile memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510515998.3A
Other languages
Chinese (zh)
Other versions
CN105138362B (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510515998.3A priority Critical patent/CN105138362B/en
Publication of CN105138362A publication Critical patent/CN105138362A/en
Application granted granted Critical
Publication of CN105138362B publication Critical patent/CN105138362B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

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

Abstract

The invention discloses a method and device for saving user configuration under a Linux system. The method includes the steps that a root file system is established through an open-source tool, and a new catalogue is created; configuration files are searched out in the rot fire system and compressed into compressed configuration files, and other system files are compressed into compressed system files; the compressed configuration files and the compressed system files are transferred to a nonvolatile memory, and the compressed configuration files are decompressed into the new catalogue to form configuration file copies; under the action of changing a configuration file instruction, the configuration file copies are changed to obtain new configuration files, and the new configuration files are compressed into new compressed configuration files; when the root file system is restarted, the new compressed configuration files are decompressed to obtain the new configuration files to serve as configuration files of the current Linux system. By means of the method, the safety of the system files is guaranteed while the problem of saving the user configuration is solved, and the user configuration can be saved.

Description

User configured method and device is preserved under a kind of Linux system
Technical field
The linux system technical field that the present invention relates to, preserves user configured method and device under particularly relating to a kind of linux system.
Background technology
At present, when for device build Linux system, the mode adopted is a lot, be broadly divided into two classes: a class is that root file system is directly on nonvolatile memory, namely the file of user operation is on nonvolatile memory, such as, directly select disk, CF card, DOM card and plate to carry file system on the nonvolatile memories such as flash as linux root file system; Another kind of is that system file leaves in RAM, user's direct control be file in RAM.
The first kind described above, by the root file system of carry on nonvolatile memory, can be the read-only types such as romfs, also can be the read-write type such as jiffs, yaffs, ext4.The file system of read-only type meets file security sex chromosome mosaicism, and user can not revise file and deleted file, user cannot be allowed to preserve configuration so also just result in this type; If the file system of read-write type, so namely user operation is file on nonvolatile memory, operate and namely completed preservation, equipment remains the file after operation after restarting, but this mode just loses the security of file, the maloperation of user may cause system irrecoverable.
The Equations of The Second Kind system file that top describes leaves in RAM, and before not having ramfs and tmpfs, usually a part of RAM is made into ramdisk, then the system file of final system is all in ramdisk, and in fict nonvolatile memory.No matter be older ramdisk or newer ramfs and tmpfs, all that system file is put into RAM, user's direct control be file in RAM, in this case, if user amendment or deletion system in file, actual irrelevant with the file on nonvolatile memory, equipment restarts all recovery former states rear.This mode meets the security of file, but does not solve user configured preservation problem, does not also solve the real-time preservation of daily record and abnormal information.
Summary of the invention
Preserve user configured method and device under the object of this invention is to provide a kind of linux system, to realize, while guarantee system file security, solving user configured preservation problem, user's configuration can be preserved.
For solving the problems of the technologies described above, preserve user configured method under the invention provides a kind of linux system, the method comprises:
Root file system initrd under utilizing Open-Source Tools to set up linux system, and new directory newroot is created in internal memory;
In described root file system initrd, find out configuration file, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file;
By described configuration compressed file and described system compresses file migration in nonvolatile memory, and described configuration compressed file solution is depressed in the new directory newroot in described internal memory and forms configuration file copy;
Receive the change configuration file instruction of user's input, under the effect of described change configuration file instruction, change is carried out to the configuration file copy in described internal memory and obtains new configuration file;
Utilize Set up-conservancy order that described new configuration file is beaten compressed package, described new configuration file is compressed in described nonvolatile memory to be formed and newly configures compressed file;
When restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system.
Preferably, described in internal memory, create new directory newroot after, also comprise:
By described new directory newroot carry ramfs file system or tmpfs file system.
Preferably, describedly in described root file system initrd, find out configuration file, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file, comprising:
The configuration file relating to user's Set up-conservancy is found out in described root file system initrd;
Described configuration file is beaten compressed package separately, forms configuration file compressed package and called after config-origin.tar.gz;
Compressed package is beaten in other system file classification in described root file system initrd, forms each system compresses file of classification.
Preferably, describedly utilize Set up-conservancy order that described new configuration file is beaten compressed package, described new configuration file be compressed in described nonvolatile memory to be formed and newly configure compressed file, comprising:
Utilize Set up-conservancy order config-save, compressed package is beaten to described new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file;
Nonvolatile memory described in carry, preserves config-user.tar.g compressed file to described nonvolatile memory;
Described nonvolatile memory is unloaded after preservation completes.
Preferably, described in when restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system, comprising:
When described root file system initrd starts initializtion script, utilize nonvolatile memory described in mount order carry to described root file system initrd;
Detect in described nonvolatile memory and whether there is config-user.tar.gz compressed file; If existed, decompress(ion) config-user.tar.gz compressed file, to newroot/etc catalogue, forms described new configuration file and as the configuration file of current Linux system.
The present invention preserves user configured device under also providing a kind of linux system, comprising:
Setting up module, for utilizing Open-Source Tools to set up root file system initrd under linux system, and creating new directory newroot in internal memory;
First compression module, for finding out configuration file in described root file system initrd, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file;
Transferring module, for by described configuration compressed file and described system compresses file migration in nonvolatile memory, and described configuration compressed file solution is depressed in the new directory newroot in described internal memory and forms configuration file copy;
Change module, for receiving the change configuration file instruction of user's input, under the effect of described change configuration file instruction, carrying out change to the configuration file copy in described internal memory and obtaining new configuration file;
Second compression module, for utilizing Set up-conservancy order that described new configuration file is beaten compressed package, being compressed to described new configuration file in described nonvolatile memory to be formed and newly configuring compressed file;
Start module, during for restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system.
Preferably, described device also comprises:
Carry module, for by described new directory newroot carry ramfs file system or tmpfs file system.
Preferably, described first compression module comprises:
Search unit, for finding out the configuration file relating to user's Set up-conservancy in described root file system initrd;
Independent compression unit, for described configuration file is beaten compressed package separately, forms configuration file compressed package and called after config-origin.tar.gz;
Classified compression unit, for compressed package is beaten in other system file classification in described root file system initrd, forms each system compresses file of classification.
Preferably, described second compression module comprises:
Storage unit, for utilizing Set up-conservancy order config-save, beats compressed package to described new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file;
Carry unit, for nonvolatile memory described in carry, preserves config-user.tar.g compressed file to described nonvolatile memory;
Unloading unit, unloads described nonvolatile memory after having preserved.
Preferably, described startup module comprises:
Initialization module, for when described root file system initrd starts initializtion script, utilizes nonvolatile memory described in mount order carry to described root file system initrd;
Detection module, for detecting in described nonvolatile memory whether there is config-user.tar.gz compressed file; If existed, decompress(ion) config-user.tar.gz compressed file, to newroot/etc catalogue, forms described new configuration file and as the configuration file of current Linux system.
User configured method and device is preserved under a kind of linux system provided by the present invention, configuration file separates from root file system separately, independent packing is compressed, it is deposit in the nonvolatile memory that other system file becomes compressed package, be so system file be deposit in the nonvolatile memory, user can not change the data on nonvolatile memory, then system file can not be modified, and the security of such system file ensures.
And, for configuration file, configuration file is that packing becomes compressed file separately, the compressed file of configuration file is also deposited in the nonvolatile memory, this configuration file is exactly original configuration file in fact, then the compressed file of original configuration file deposits in the nonvolatile memory, and be leave in the catalogue on internal memory to the configuration file obtained after the compressed file decompress(ion) of configuration file, namely the configuration file after decompress(ion) is arranged in memory directory, user can change the data on internal memory, configuration file then on memory directory can be changed by user, new configuration file after change is compressed on nonvolatile memory, compressed file then after new configuration file compression deposits in the nonvolatile memory, after system restart, nonvolatile memory exist the compressed file of original configuration file and the compressed file of new configuration file, deposit in case at the compressed file of new configuration file, use new configuration file, do not use original configuration file, the compressed file solution of new configuration file is pressed into the configuration file of new configuration file as current system, save user like this to arrange, so preserve user configured method and device under a kind of linux system provided by the present invention, realize while guarantee system file security, solve user configured preservation problem, user's configuration can be preserved.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only embodiments of the invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to the accompanying drawing provided.
Fig. 1 is the process flow diagram preserving user configured method under a kind of linux system provided by the present invention;
Fig. 2 is the structural representation preserving user configured device under a kind of linux system provided by the present invention.
Embodiment
Core of the present invention preserves user configured method and device under being to provide a kind of linux system, to realize, while guarantee system file security, solving user configured preservation problem, can preserve user's configuration.
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Please refer to Fig. 1, Fig. 1 is the process flow diagram preserving user configured method under a kind of linux system provided by the present invention, and the method is drawn together:
S11: the root file system initrd under utilizing Open-Source Tools to set up linux system, and new directory newroot is created in internal memory;
Wherein, Open-Source Tools comprises busybox instrument, can create simple file system.After having created new directory newrooot, carry ramfs file system or tmpfs file system.Utilize ramfs or tmpfs can improve ramdisk performance, and take Installed System Memory without the need to unnecessary, ramfs and tmpfs can adjust committed memory size dynamically, and wastes memory headroom in advance unlike ramdisk.
S12: find out configuration file in root file system initrd, beats compressed package and becomes configuration compressed file by configuration file, other system file except configuration file in root file system initrd is beaten compressed package and becomes system compresses file;
Wherein, the configuration file relating to user's Set up-conservancy is found out in root file system initrd, configuration file is beaten compressed package separately, form configuration file compressed package and called after config-origin.tar.gz, compressed package is beaten in other system file classification in root file system initrd, forms each system compresses file of classification.
S13: compressed file and system compresses file migration will be configured in nonvolatile memory, and configuration compressed file solution is depressed in the new directory newroot in internal memory and forms configuration file copy;
S14: the change configuration file instruction receiving user's input, under the effect of change configuration file instruction, carries out change to the configuration file copy in internal memory and obtains new configuration file;
S15: utilize Set up-conservancy order that new configuration file is beaten compressed package, is compressed to new configuration file in nonvolatile memory to be formed and newly configures compressed file;
Wherein, utilize Set up-conservancy order config-save, compressed package is beaten to new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file, nonvolatile memory described in carry, preserves config-user.tar.g compressed file to nonvolatile memory, unloads nonvolatile memory after having preserved.
S16: during new startup root file system initrd, decompress(ion) newly configures compressed file and obtains new configuration file in the nonvolatile memory, using new configuration file as the configuration file under current linux system.
Wherein, when root file system initrd starts initializtion script, utilize mount order carry nonvolatile memory to described root file system initrd, detect in nonvolatile memory and whether there is config-user.tar.gz compressed file, if existed, decompress(ion) config-user.tar.gz compressed file, to newroot/etc catalogue, forms new configuration file and as the configuration file of current Linux system.
Concrete above, such as, first using busybox instrument, making easy file system, for making initrd.
Compressed package is beaten in the final system file classification run, and a compressed package called after config-origin.tar.gz made a call to separately by the file such as, relating to user's Set up-conservancy in/etc catalogue, and other system file beats compressed package by the needs classification of oneself again.All compressed packages are placed into nonvolatile memory, and nonvolatile memory can be hard disk, and DOM dish, CF card, plate carry flash etc.
Then, start in initializtion script at initrd and increase following functions: establishment newroot catalogue, newroot catalogue carry ramfs or tmpfs;
Secondly, start in initializtion script at initrd and continue to add following process: mount order carry nonvolatile memory to initrd /mnt catalogue, check whether to there is config-user.tar.gz, if there is decompress(ion) config-user.tar.gz to newroot/etc catalogue, as the configuration file of final system; If there is no config-user.tar.gz then decompress(ion) config-origin.tar.gz, with the content of the config-origin.tar.gz configuration file as final system.
Again, the last of initializtion script is started at initrd, other necessary system files of decompress(ion) are to newroot catalogue, and unload nonvolatile memory with umount, finally perform chroot or switch_root order, systematic evaluation to newroot, after above operation, namely the root directory of presenting to the final system of user operation is the newroot catalogue of initrd.
After order such as use switch_root etc. is switched to final system, the nonvolatile memory utilizing mount order carry to deposit daily record is to/var/log catalogue.
Finally, the order of increase user's Set up-conservancy is needed in the final system made, such as name config-save, the function of this order beats compressed package to configuration file, compressed package called after config-user.tar.gz, carry nonvolatile memory, preserves config-user.tar.gz to nonvolatile memory, unloading nonvolatile memory.
Therefore, utilize ramfs or tmpfs can improve ramdisk performance, and take Installed System Memory without the need to unnecessary, ramfs and tmpfs can adjust committed memory size dynamically, and wastes memory headroom in advance unlike ramdisk.While resolution system file security sex chromosome mosaicism, independently order is had to allow user preserve configuration, improve the reliability of amendment configuration file, user's arbitrary disposition, when causing confusion, be easy to recover factory-said value, only need to provide order that config-user.tar.gz is deleted and can be completed, namely when user's configuration causes confusion, only need the new configuration compressed file on deletion nonvolatile memory just passable, leave configuration compressed file, this configuration compressed file is exactly the compressed file of original configuration file, so easy recovery original configuration.And, there is the nonvolatile memory independently preserving daily record, facilitate abnormal information to follow the tracks of.
User configured method is preserved under a kind of linux system provided by the present invention, configuration file separates from root file system separately, independent packing is compressed, it is deposit in the nonvolatile memory that other system file becomes compressed package, be so system file be deposit in the nonvolatile memory, user can not change the data on nonvolatile memory, then system file can not be modified, and the security of such system file ensures.
And, for configuration file, configuration file is that packing becomes compressed file separately, the compressed file of configuration file is also deposited in the nonvolatile memory, this configuration file is exactly original configuration file in fact, then the compressed file of original configuration file deposits in the nonvolatile memory, and be leave in the catalogue on internal memory to the configuration file obtained after the compressed file decompress(ion) of configuration file, namely the configuration file after decompress(ion) is arranged in memory directory, user can change the data on internal memory, configuration file then on memory directory can be changed by user, new configuration file after change is compressed on nonvolatile memory, compressed file then after new configuration file compression deposits in the nonvolatile memory, after system restart, nonvolatile memory exist the compressed file of original configuration file and the compressed file of new configuration file, deposit in case at the compressed file of new configuration file, use new configuration file, do not use original configuration file, the compressed file solution of new configuration file is pressed into the configuration file of new configuration file as current system, save user like this to arrange, realize in this way while guarantee system file security, solve user configured preservation problem, user's configuration can be preserved.
Please refer to Fig. 2, Fig. 2 is the structural representation preserving user configured device under a kind of linux system provided by the present invention, and this device comprises:
Setting up module 101, for utilizing Open-Source Tools to set up root file system initrd under linux system, and creating new directory newroot in internal memory;
First compression module 102, for finding out configuration file in root file system initrd, configuration file is beaten compressed package and become configuration compressed file, other system file except configuration file in root file system initrd is beaten compressed package and becomes system compresses file;
Transferring module 103, for configuring compressed file and system compresses file migration in nonvolatile memory, and is depressed into configuration compressed file solution in the new directory newroot in internal memory and forms configuration file copy;
Change module 104, for receiving the change configuration file instruction of user's input, under the effect of change configuration file instruction, carrying out change to the configuration file copy in internal memory and obtaining new configuration file;
Second compression module 105, for utilizing Set up-conservancy order that new configuration file is beaten compressed package, being compressed to new configuration file in nonvolatile memory to be formed and newly configuring compressed file;
Start module 106, during for restarting described root file system initrd, decompress(ion) newly configures compressed file and obtains new configuration file in the nonvolatile memory, using new configuration file as the configuration file under current linux system.
Wherein, described device also comprises:
Carry module, for by new directory newroot carry ramfs file system or tmpfs file system.
Wherein, described first compression module comprises:
Search unit, for finding out the configuration file relating to user's Set up-conservancy in root file system initrd;
Independent compression unit, for configuration file is beaten compressed package separately, forms configuration file compressed package and called after config-origin.tar.gz;
Classified compression unit, for compressed package is beaten in other system file classification in root file system initrd, forms each system compresses file of classification.
Wherein, described second compression module comprises:
Storage unit, for utilizing Set up-conservancy order config-save, beats compressed package to new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file;
Carry unit, for nonvolatile memory described in carry, preserves config-user.tar.g compressed file to nonvolatile memory;
Unloading unit, unloads nonvolatile memory after having preserved.
Wherein, described startup module comprises:
Initialization module, for when root file system initrd starts initializtion script, utilizes mount order carry nonvolatile memory to root file system initrd;
Detection module, for detecting in nonvolatile memory whether there is config-user.tar.gz compressed file; If existed, decompress(ion) config-user.tar.gz compressed file to newroot/etc catalogue, formation new configuration file as the configuration file of current Linux system.
Preserve user configured device under a kind of linux system provided by the present invention, this device comprises to be set up module, the first compression module, transferring module, change module, the second compression module and starts module.In the apparatus, configuration file separates from root file system separately, independent packing is compressed, it is deposit in the nonvolatile memory that other system file becomes compressed package, be so system file be deposit in the nonvolatile memory, user can not change the data on nonvolatile memory, then system file can not be modified, and the security of such system file ensures.
And, for configuration file, configuration file is that packing becomes compressed file separately, the compressed file of configuration file is also deposited in the nonvolatile memory, this configuration file is exactly original configuration file in fact, then the compressed file of original configuration file deposits in the nonvolatile memory, and be leave in the catalogue on internal memory to the configuration file obtained after the compressed file decompress(ion) of configuration file, namely the configuration file after decompress(ion) is arranged in memory directory, user can change the data on internal memory, configuration file then on memory directory can be changed by user, new configuration file after change is compressed on nonvolatile memory, compressed file then after new configuration file compression deposits in the nonvolatile memory, after system restart, nonvolatile memory exist the compressed file of original configuration file and the compressed file of new configuration file, deposit in case at the compressed file of new configuration file, use new configuration file, do not use original configuration file, the compressed file solution of new configuration file is pressed into the configuration file of new configuration file as current system, save user like this to arrange, so this device realizes while guarantee system file security, solve user configured preservation problem, user's configuration can be preserved.
Above to preserving user configured method under a kind of linux system provided by the present invention and device is described in detail.Apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping.It should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention, can also carry out some improvement and modification to the present invention, these improve and modify and also fall in the protection domain of the claims in the present invention.

Claims (10)

1. preserve a user configured method under linux system, it is characterized in that, comprising:
Root file system initrd under utilizing Open-Source Tools to set up linux system, and new directory newroot is created in internal memory;
In described root file system initrd, find out configuration file, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file;
By described configuration compressed file and described system compresses file migration in nonvolatile memory, and described configuration compressed file solution is depressed in the new directory newroot in described internal memory and forms configuration file copy;
Receive the change configuration file instruction of user's input, under the effect of described change configuration file instruction, change is carried out to the configuration file copy in described internal memory and obtains new configuration file;
Utilize Set up-conservancy order that described new configuration file is beaten compressed package, described new configuration file is compressed in described nonvolatile memory to be formed and newly configures compressed file;
When restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system.
2. the method for claim 1, is characterized in that, described in internal memory, create new directory newroot after, also comprise:
By described new directory newroot carry ramfs file system or tmpfs file system.
3. method as claimed in claim 1 or 2, it is characterized in that, describedly in described root file system initrd, find out configuration file, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file, comprising:
The configuration file relating to user's Set up-conservancy is found out in described root file system initrd;
Described configuration file is beaten compressed package separately, forms configuration file compressed package and called after config-origin.tar.gz;
Compressed package is beaten in other system file classification in described root file system initrd, forms each system compresses file of classification.
4. method as claimed in claim 3, is characterized in that, describedly utilizes Set up-conservancy order that described new configuration file is beaten compressed package, described new configuration file is compressed in described nonvolatile memory to be formed newly to configure compressed file, comprising:
Utilize Set up-conservancy order config-save, compressed package is beaten to described new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file;
Nonvolatile memory described in carry, preserves config-user.tar.g compressed file to described nonvolatile memory;
Described nonvolatile memory is unloaded after preservation completes.
5. method as claimed in claim 4, it is characterized in that, described when restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system, comprising:
When described root file system initrd starts initializtion script, utilize nonvolatile memory described in mount order carry to described root file system initrd;
Detect in described nonvolatile memory and whether there is config-user.tar.gz compressed file; If existed, decompress(ion) config-user.tar.gz compressed file, to newroot/etc catalogue, forms described new configuration file and as the configuration file of current Linux system.
6. preserve a user configured device under linux system, comprising:
Setting up module, for utilizing Open-Source Tools to set up root file system initrd under linux system, and creating new directory newroot in internal memory;
First compression module, for finding out configuration file in described root file system initrd, described configuration file is beaten compressed package and becomes configuration compressed file, other system file except described configuration file in described root file system initrd is beaten compressed package and becomes system compresses file;
Transferring module, for by described configuration compressed file and described system compresses file migration in nonvolatile memory, and described configuration compressed file solution is depressed in the new directory newroot in described internal memory and forms configuration file copy;
Change module, for receiving the change configuration file instruction of user's input, under the effect of described change configuration file instruction, carrying out change to the configuration file copy in described internal memory and obtaining new configuration file;
Second compression module, for utilizing Set up-conservancy order that described new configuration file is beaten compressed package, being compressed to described new configuration file in described nonvolatile memory to be formed and newly configuring compressed file;
Start module, during for restarting described root file system initrd, in described nonvolatile memory, described in decompress(ion), new configuration compressed file obtains described new configuration file, using described new configuration file as the configuration file under current linux system.
7. device as claimed in claim 6, it is characterized in that, described device also comprises:
Carry module, for by described new directory newroot carry ramfs file system or tmpfs file system.
8. device as claimed in claims 6 or 7, it is characterized in that, described first compression module comprises:
Search unit, for finding out the configuration file relating to user's Set up-conservancy in described root file system initrd;
Independent compression unit, for described configuration file is beaten compressed package separately, forms configuration file compressed package and called after config-origin.tar.gz;
Classified compression unit, for compressed package is beaten in other system file classification in described root file system initrd, forms each system compresses file of classification.
9. device as claimed in claim 8, it is characterized in that, described second compression module comprises:
Storage unit, for utilizing Set up-conservancy order config-save, beats compressed package to described new configuration file, and called after config-user.tar.gz, form config-user.tar.gz compressed file;
Carry unit, for nonvolatile memory described in carry, preserves config-user.tar.g compressed file to described nonvolatile memory;
Unloading unit, unloads described nonvolatile memory after having preserved.
10. device as claimed in claim 9, it is characterized in that, described startup module comprises:
Initialization module, for when described root file system initrd starts initializtion script, utilizes nonvolatile memory described in mount order carry to described root file system initrd;
Detection module, for detecting in described nonvolatile memory whether there is config-user.tar.gz compressed file; If existed, decompress(ion) config-user.tar.gz compressed file, to newroot/etc catalogue, forms described new configuration file and as the configuration file of current Linux system.
CN201510515998.3A 2015-08-20 2015-08-20 The method and device of user configuration is preserved under a kind of Linux system Active CN105138362B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510515998.3A CN105138362B (en) 2015-08-20 2015-08-20 The method and device of user configuration is preserved under a kind of Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510515998.3A CN105138362B (en) 2015-08-20 2015-08-20 The method and device of user configuration is preserved under a kind of Linux system

Publications (2)

Publication Number Publication Date
CN105138362A true CN105138362A (en) 2015-12-09
CN105138362B CN105138362B (en) 2018-09-07

Family

ID=54723719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510515998.3A Active CN105138362B (en) 2015-08-20 2015-08-20 The method and device of user configuration is preserved under a kind of Linux system

Country Status (1)

Country Link
CN (1) CN105138362B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786489A (en) * 2016-02-18 2016-07-20 山东乾云启创信息科技股份有限公司 Safe and state-free construction method for virtualized computational node
CN105825126A (en) * 2016-03-08 2016-08-03 北京网康科技有限公司 File protecting method and device
CN107861751A (en) * 2017-11-22 2018-03-30 出门问问信息科技有限公司 The amending method and device of configuration file
CN109271206A (en) * 2018-08-24 2019-01-25 晶晨半导体(上海)股份有限公司 A kind of memory compression and store method that exception is live
CN109739823A (en) * 2018-12-27 2019-05-10 郑州云海信息技术有限公司 A kind of method and device for building parallel file system
CN111242577A (en) * 2020-01-13 2020-06-05 中国建设银行股份有限公司 RPA process automation robot deployment method and device and electronic equipment
CN111367854A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Construction method of multi-container root file system
CN111813460A (en) * 2020-06-01 2020-10-23 北京百卓网络技术有限公司 Access method, device, equipment and storage medium for application program matching file
CN113132354A (en) * 2021-03-19 2021-07-16 重庆扬成大数据科技有限公司 Working method for carrying out file processing optimization configuration by remotely logging in government affair data network
CN115629811A (en) * 2022-12-21 2023-01-20 苏州浪潮智能科技有限公司 System stability control method and device
CN115640758A (en) * 2022-12-23 2023-01-24 南京维拓科技股份有限公司 Three-dimensional model digital quality inspection method based on knowledge construction

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831022A (en) * 2012-07-27 2012-12-19 曙光信息产业(北京)有限公司 Method and device for modifying system configuration
CN103634144A (en) * 2013-11-15 2014-03-12 新浪网技术(中国)有限公司 Method, system and equipment for managing multi-IDC (internet data center) cluster configuration file
CN103888491A (en) * 2012-12-20 2014-06-25 鸿富锦精密工业(深圳)有限公司 Diskless workstation start system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831022A (en) * 2012-07-27 2012-12-19 曙光信息产业(北京)有限公司 Method and device for modifying system configuration
CN103888491A (en) * 2012-12-20 2014-06-25 鸿富锦精密工业(深圳)有限公司 Diskless workstation start system and method
CN103634144A (en) * 2013-11-15 2014-03-12 新浪网技术(中国)有限公司 Method, system and equipment for managing multi-IDC (internet data center) cluster configuration file

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786489B (en) * 2016-02-18 2019-05-17 山东乾云启创信息科技股份有限公司 A kind of construction method of the stateless virtualization calculate node of safety
CN105786489A (en) * 2016-02-18 2016-07-20 山东乾云启创信息科技股份有限公司 Safe and state-free construction method for virtualized computational node
CN105825126A (en) * 2016-03-08 2016-08-03 北京网康科技有限公司 File protecting method and device
CN107861751A (en) * 2017-11-22 2018-03-30 出门问问信息科技有限公司 The amending method and device of configuration file
CN109271206A (en) * 2018-08-24 2019-01-25 晶晨半导体(上海)股份有限公司 A kind of memory compression and store method that exception is live
CN111367854B (en) * 2018-12-25 2023-02-28 成都鼎桥通信技术有限公司 Construction method of multi-container root file system
CN111367854A (en) * 2018-12-25 2020-07-03 成都鼎桥通信技术有限公司 Construction method of multi-container root file system
CN109739823A (en) * 2018-12-27 2019-05-10 郑州云海信息技术有限公司 A kind of method and device for building parallel file system
CN111242577A (en) * 2020-01-13 2020-06-05 中国建设银行股份有限公司 RPA process automation robot deployment method and device and electronic equipment
CN111813460A (en) * 2020-06-01 2020-10-23 北京百卓网络技术有限公司 Access method, device, equipment and storage medium for application program matching file
CN113132354A (en) * 2021-03-19 2021-07-16 重庆扬成大数据科技有限公司 Working method for carrying out file processing optimization configuration by remotely logging in government affair data network
CN115629811A (en) * 2022-12-21 2023-01-20 苏州浪潮智能科技有限公司 System stability control method and device
CN115640758A (en) * 2022-12-23 2023-01-24 南京维拓科技股份有限公司 Three-dimensional model digital quality inspection method based on knowledge construction

Also Published As

Publication number Publication date
CN105138362B (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN105138362A (en) Method and device for saving user configuration under Linux system
US9823877B2 (en) Virtual machine backup from storage snapshot
US8738883B2 (en) Snapshot creation from block lists
US10503532B2 (en) Creating a virtual machine clone of the host computing device and handling of virtual machine clone requests via an I/O filter
AU2014374256B2 (en) Systems and methods for improving snapshot performance
US10216531B2 (en) Techniques for virtual machine shifting
US10296423B2 (en) System and method for live virtual incremental restoring of data from cloud storage
CN108241550B (en) Backup and restoration method for operating system
US10356212B2 (en) Application delivery to a computing device using dynamic application volume creation and streaming
US9983791B2 (en) System management controller and method of configuration file backup and recovery
US9558076B2 (en) Methods and systems of cloud-based disaster recovery
CN105335181A (en) OTA upgrade realization method and terminal
CN104866324B (en) A kind of portable operation system constituting method and portable memory
US10108434B2 (en) Booting a computing device by streaming a desktop image over a network
US9613053B1 (en) Techniques for providing access to a virtualized block storage device over a file-based network storage protocol
WO2016183951A1 (en) System upgrade method and terminal
CN104978231A (en) Multisystem device based on internal storage partitions and loading and switching method thereof
CN109445861A (en) System start method, device, computer installation and storage medium
US9195670B1 (en) Tracking write operations for incremental backups of data
WO2018233668A1 (en) Android system-based abnormality recovery method and apparatus, smart device and storage medium
CN103970564A (en) Automatic repairing and upgrading method of embedded operating system and embedded operating system with automatic repairing and upgrading functions
US20150106334A1 (en) Systems and methods for backing up a live virtual machine
US9910662B2 (en) Selectively migrating applications during an operating system upgrade
CN103389905A (en) Plug-in loading method and plug-in loading system
US9411602B2 (en) Techniques for booting an information processing system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant