A kind of method and apparatus for making class Unix operating system update bags
Technical field
The present invention relates to a kind of AKU of operating system, a kind of class Unix operating system update bags that make are particularly related to
Method and apparatus.
Background technology
In the prior art, the upgrading of operating system is that operating system is risen with the relatively low other level of AKU to higher other
Level, technically improves to some extent and perfect, more previous version is greatly improved.Meanwhile, the upgrading of operating system makes its work(
More powerful, more humane, more preferable it can use.
Made on issued operating system basis and distribution AKU is a very complicated thing, and typically
ROMPaq be required for change native operating system.Therefore, the upgrading of operating system becomes lengthy and tedious, is difficult to realize.
The content of the invention
In view of this, it is an object of the invention to propose a kind of method and dress for making class Unix operating system update bags
Put, can greatly simplify the manufacturing process of operating system update bag, and improve adaptability and the flexibility of operating system.
A kind of method for making class Unix operating system update bags provided based on the above-mentioned purpose present invention, including following step
Suddenly:
S1:Class Unix operation system image bags to be upgraded are obtained, and start operating system to be upgraded;
S2:Rebuild class Unix operating system nucleus and initial memory root file system, and by the operating system after reconstruction
Kernel and the internal memory root file system initially completed are copied under described mount directory;
S3:Generate class Unix operating system update bag image files;
S4:By the AKU image file of generation and the operating system nucleus rebuild, the root file system initialized again
The standard image format of bootstrap support is packaged into, that is, generates class Unix operating system update bags.
Alternatively, the class Unix operating systems to be upgraded are the class Unix operating systems started based on image file, institute
What is stated is based on the writeable implementation method of class Unix operating systems that image file starts:First, transported in class Unix operating systems
During row, the modification to class Unix operating systems is stored in delta file;Secondly, will when starting class Unix operating systems
Image file is merged with delta file, and operation retains the class Unix operating systems of modification.
Further, the method for making class Unix operating system update bags needs insertion to want before step S2 is carried out
The configuration processor called, including:
Obtain the catalogue of the storage medium institute carry of operating system update bag image;
The basic bag image of operating system is found in the catalogue of the carry, and is mounted under temp directory;
By the basic bag image of operating system of the carry under temp directory, it will be operated by calling union file system interface
System-based bag image merged with internal memory root file system obtain basis merge bag;
By operating system update bag image carry in temp directory, then it will be grasped by calling union file system interface again
Make system upgrade bag image merged with internal memory root file system obtain upgrading merge bag;
Judge under mount directory whether there is rootsave files, if in the presence of, directly progress next step;If not depositing
Then first creating under rootsave files, rootsave files and storing delta file, then performing next step;
By the delta file under rootsave files by calling union file system interface and internal memory root file system
Merge and obtain file merging bag.
Further, step S3 is that described basis merging bag, upgrading merging bag and file merging bag are packed together
Image file of the read-only image with form is wrapped into operating system basis.
Further, step S4 is that described basis merging bag, upgrading merging bag and file merging bag are packed together
Into image file and rebuild operating system nucleus, initialization root file system be packaged into again bootstrap support mark
Quasi- image format, that is, generate class Unix operating system update bags.
Further, by the AKU image file of generation and the operating system nucleus rebuild, the root file system of initialization
System is packaged into the standard image format ISO9660 of bootstrap support again.
Based on above-mentioned purpose, present invention also offers a kind of device for making class Unix operating system update bags, including:
Acquisition module, for obtaining operation system image bag to be upgraded, and starts operating system to be upgraded;
Module is rebuild, is connected with the acquisition module, for rebuilding class Unix operating system nucleus, and by after reconstruction
Class Unix operating system nucleus is copied under described mount directory;
Initialization module, is connected with the acquisition module, for initial memory root file system, and by after initialization
Internal memory root file system is copied under described mount directory;
Packetization module, is connected with the reconstruction module, the initialization module, for generating class Unix operating systems respectively
AKU image file, and by the AKU image file of generation and rebuild operating system nucleus, initialization root file system
System is packaged into the standard image format of bootstrap support again, that is, generates class Unix operating system update bags.
Alternatively, it is the class started based on image file that described acquisition module, which obtains operation system image bag to be upgraded,
Unix operating systems, it is described to be based on the writeable implementation method of class Unix operating systems that image file starts:First, in class
During Unix operating systems, the modification to class Unix operating systems is stored in delta file;Secondly, class Unix is being started
During operating system, image file is merged with delta file, operation retains the class Unix operating systems of modification.
Further, the device for making class Unix operating system update bags also includes insertion module, the insertion mould
Block one end is connected with the acquisition module, and the other end is connected with described reconstruction module, described initialization module respectively, is used for
The configuration processor to be called when insertion starts, including:
Obtain the catalogue of the storage medium institute carry of operating system update bag image;
The basic bag image of operating system is found in the catalogue of the carry, and is mounted under temp directory;
By the basic bag image of operating system of the carry under temp directory, it will be operated by calling union file system interface
System-based bag image merged with internal memory root file system obtain basis merge bag;
By operating system update bag image carry in temp directory, then it will be grasped by calling union file system interface again
Make system upgrade bag image merged with internal memory root file system obtain upgrading merge bag;
Judge under mount directory whether there is rootsave files, if in the presence of, directly progress next step;If not depositing
Then first creating under rootsave files, rootsave files and storing delta file, then performing next step;
By the delta file under rootsave files by calling union file system interface and internal memory root file system
Merge and obtain file merging bag.
Further, described packetization module by the AKU image file of generation and rebuild operating system nucleus, just
The root file system of beginningization is packaged into the standard image format of bootstrap support again, that is, generates operating system update bag;
Then the image file being packaged into described basis merging bag, upgrading merging bag and file merging bag together and the behaviour of reconstruction
Make system kernel, the root file system of initialization and be packaged into the standard image format of bootstrap support again, that is, generate class
Unix operating system update bags.
From the above it can be seen that the method and apparatus for the making class Unix operating system update bags that the present invention is provided,
By obtaining class Unix operation system image bags to be upgraded, and start operating system to be upgraded;Rebuild class Unix operating systems
Kernel and initial memory root file system, and by the operating system nucleus after reconstruction and the internal memory root file system initially completed
It is copied under described mount directory;Generate class Unix operating system update bag image files;By the AKU image text of generation
Part and the operating system nucleus rebuild, the root file system of initialization are packaged into the standard image lattice of bootstrap support again
Formula.So as to the intensive class Unix operating system update bags of the method and apparatus for making class Unix operating system update bags
Manufacturing process, has provided the user a kind of upgrading experience of class Unix operating systems the most convenient.
Brief description of the drawings
Fig. 1 is the method flow diagram that the embodiment of the present invention makes class Unix operating system update bags;
The flow chart for the configuration processor that Fig. 2 calls for the embodiment of the present invention;
Fig. 3 is the structural representation for the device that the embodiment of the present invention makes class Unix operating system update bags.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with specific embodiment, and reference
Accompanying drawing, the present invention is described in more detail.
Refering to the method flow diagram for shown in Fig. 1, being embodiment of the present invention making class Unix operating system update bags, including:
Step 101, class Unix operation system image bags to be upgraded are obtained, and start operating system to be upgraded.
In embodiment, class Unix operating systems to be upgraded are the class Unix operating systems started based on image file.Institute
What is stated is based on the writeable implementation method of class Unix operating systems that image file starts:
First, in class Unix operating systems, the modification to class Unix operating systems is stored in delta file.
Can be the modification of user to the modifications of class Unix operating systems, or the automatic progress of system modification.Class Unix operating systems
Started based on read-only image file.Delta file is stored in storage device.
Secondly, when starting class Unix operating systems, image file is merged with delta file, operation retains modification
Class Unix operating systems.
Step 102, the configuration processor to be called is inserted, its main implementation process is as follows:As shown in Fig. 2 real for the present invention
The flow chart for the configuration processor that example is called is applied, wherein:
Step 201, the catalogue of the storage medium institute carry of operating system update bag image is obtained.In the present embodiment, should
Mount directory is /bolod.
Step 202, the basic bag image of operating system is found in the catalogue of the carry, and is mounted to interim mesh
Under record.
Step 203, the basic bag image of operating system by carry under temp directory, is connect by calling union file system
Mouthful the basic bag image of operating system is merged with internal memory root file system and to obtain basic merging bag.
Step 204, by operating system update bag image carry in temp directory, then again by calling union file system
Interface, which merges operating system update bag image and internal memory root file system to obtain upgrading, merges bag.
Step 205, judge under mount directory whether there is rootsave files, if in the presence of, directly progress step
206;If being not present, first create under rootsave files, rootsave files and store delta file, then perform step
206。
Step 206, by the delta file under rootsave files by calling union file system interface and interior counterfoil
File system, which is merged, obtains file merging bag.
Step 103, class Unix operating system nucleus and initial memory root file system are rebuild, and by the operation after reconstruction
System kernel and the internal memory root file system initially completed are copied under described mount directory.
Step 104, class Unix operating system update bag image files are generated.
In one embodiment of the invention, it is that described basis is merged into bag, upgrading merging bag and file to merge bag
The image file with form with the read-only image of operating system basis bag is packaged into together.
Step 105, by the AKU image file of generation and the operating system nucleus rebuild, the root file system of initialization
The standard image format of bootstrap support is packaged into again, that is, generates operating system update bag.
In embodiment, by reflecting that described basis merging bag, upgrading merging bag and file merging bag are packaged into together
As file and the operating system nucleus rebuild, the root file system of initialization are packaged into the standard image of bootstrap support again
Form, that is, generate class Unix operating system update bags.In an embodiment of the present invention, it is packaged into the standard of bootstrap support
Image format ISO9660.
Join shown in Fig. 3, be the structural representation of the producing device of embodiment of the present invention class Unix operating system update bags, bag
Include:
Acquisition module 301, its major function includes:
1)Obtain operation system image bag to be upgraded.
In embodiment, class Unix operating systems to be upgraded are the class Unix operating systems started based on image file.Institute
What is stated is based on the writeable implementation method of class Unix operating systems that image file starts:
First, in class Unix operating systems, the modification to class Unix operating systems is stored in delta file.
Can be the modification of user to the modifications of class Unix operating systems, or the automatic progress of system modification.Class Unix operating systems
Started based on read-only image file.Delta file is stored in storage device.
Secondly, when starting class Unix operating systems, image file is merged with delta file, operation retains modification
Class Unix operating systems.
2)Start operating system to be upgraded.
Module 302 is inserted, is connected with acquisition module 301, insertion module 302 needs to insert the execution journey to be called when starting
Sequence.Wherein, the implementation process of the configuration processor is as shown in Figure 2.
Module 303 is rebuild, is connected with insertion module 302, class Unix operating system nucleus can be rebuild, and by after reconstruction
Class Unix operating system nucleus be copied under described mount directory.
Initialization module 304, with insertion module 302 be connected, can with initial memory root file system, and will initialize after
Internal memory root file system be copied under described mount directory.
Packetization module 305, is connected, its major function includes with rebuilding module 303, initialization module 304 respectively:
1)Generate class Unix operating system update bag image files:Described basis is merged into bag, upgrading and merges bag and text
Part clamping simultaneously wraps the image file being packaged into together with the read-only image of operating system basis bag with form.
2)The AKU image file of generation and the operating system nucleus rebuild, the root file system of initialization are beaten again
The standard image format of bootstrap support is bundled into, that is, generates operating system update bag.
It is that described basis is merged into bag, upgrading merging bag and file to merge bag together as embodiments of the invention
The image file being packaged into and the operating system nucleus rebuild, the root file system of initialization are packaged into bootstrap support again
Standard image format, that is, generate class Unix operating system update bags.In an embodiment of the present invention, it is packaged into bootstrap
The standard image format ISO9660 of support.
According to describe above, the preparation method and device of the class Unix operating system update bags that the present invention is realized, wound
Proposing for the property made generates class Unix operating system update bag image files;By the AKU image file of generation and the behaviour rebuild
Make system kernel, the root file system of initialization and be packaged into the standard image format of bootstrap support again, that is, obtain class
Unix operating system update bags;It greatly simplify making and the distribution process of class Unix operating system update bags;At the same time,
The present invention need not change the image file of native operating system;Finally, whole described class Unix operating system update bags
Preparation method and device are easy, compact, it is easy to accomplish, so as to provide the user a kind of making class Unix operations the most convenient
The experience of the method and apparatus of system upgrade bag.
Those of ordinary skill in the art should be understood:The specific embodiment of the present invention is the foregoing is only, and
The limitation present invention is not used in, within the spirit and principles of the invention, any modifications, equivalent substitutions and improvements done etc.,
It should be included within protection scope of the present invention.