CN109614117A - A kind of construction method and system, linux system mirror image of linux system mirror image - Google Patents
A kind of construction method and system, linux system mirror image of linux system mirror image Download PDFInfo
- Publication number
- CN109614117A CN109614117A CN201811383771.8A CN201811383771A CN109614117A CN 109614117 A CN109614117 A CN 109614117A CN 201811383771 A CN201811383771 A CN 201811383771A CN 109614117 A CN109614117 A CN 109614117A
- Authority
- CN
- China
- Prior art keywords
- catalogue
- mirror image
- area
- linux
- operating component
- 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
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/63—Image based installation; Cloning; Build to order
-
- 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/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
Abstract
The present invention a kind of construction method and system, linux system mirror image of linux system mirror image, wherein method includes: the actuating section for constructing linux system mirror image, is stored under root file system to the specified directory of actuating section;The system operating component part for constructing linux system mirror image, under the specified directory of storage system operating component to system operating component part;It is packaged actuating section and the system operating component part of linux system mirror image, generates system image file.Process of the present invention is simple, applied widely, has good technological value and wide application prospect.
Description
Technical field
The present invention relates to field of computer technology, and in particular to the construction method and system of a kind of linux system mirror image,
Linux system mirror image.
Background technique
Linux system is widely used with its open source property and freedom, can be by linux system kernel and being
System is cut, and constructs completely new linux system, it is made to be more suitable for work requirements.
But when traditional linux system building, the carry hard disk in linux system is needed to be constructed, linux system
It is mounted directly in a hard disk, the archive of linux system mirror image can not be carried out.For this purpose, being somebody's turn to do when needing to use on other computers
It usually requires to carry out linux system building again when customized linux system, it is extremely inconvenient.
To solve the above problems, the present invention proposes the construction method and system, linux system of a kind of linux system mirror image
Mirror image.
Summary of the invention
It is an object of the present invention to propose the construction method and system, Linux system mirror of a kind of linux system mirror image
Picture, to solve the above technical problems.
In a first aspect, the present invention proposes a kind of construction method of linux system mirror image, comprising:
The actuating section of linux system mirror image is constructed, is stored under root file system to the specified directory of actuating section;
Construct the system operating component part of linux system mirror image, storage system operating component to system operating component portion
Under the specified directory divided;
It is packaged actuating section and the system operating component part of linux system mirror image, generates system image file.
In the above scheme, system operating component part includes Boot catalogue, rootfs catalogue.
In the above scheme, system operating component includes customized Linux system, system kernel, adaptation layer driving file;
The system kernel, adaptation layer driving file are stored under Boot catalogue;The customized Linux system is stored in rootfs mesh
Under record.
In the above scheme, actuating section includes Grub catalogue, isolinux catalogue;It is deposited under the isolinux catalogue
Contain root file system.
In the above scheme, include executable script in the root file system, when script execution can be realized:
Carry hard disk is divided into the firstth area and the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the
The UUID value in 2nd area;
Firstth area in automatic carry file under change rootfs catalogue, the secondth area UUID value be the firstth area read,
The UUID value in the secondth area;
System starting is executed in the firstth area.
In the above scheme, it can also be achieved when the script execution:
After carry hard disk is divided into the firstth area and the secondth area, the firstth area, the secondth area are formatted respectively.
Second aspect, the present invention propose a kind of building system of linux system mirror image, comprising:
Actuating section constructs module, for constructing the actuating section of linux system mirror image, storage root file system to starting
Under partial specified directory;
System operating component part constructs module, for constructing the system operating component part of linux system mirror image, stores
Under system operating component to the specified directory of system operating component part;
Image file generation module, it is raw for being packaged actuating section and the system operating component part of linux system mirror image
At system image file.
The third aspect, the present invention propose a kind of linux system mirror image, including actuating section, system operating component part;
The actuating section includes Grub catalogue, isolinux catalogue, is stored with root file under the isolinux catalogue
System;
System operating component part includes Boot catalogue, rootfs catalogue, is stored with system under the Boot catalogue
Kernel, adaptation layer drive file, are stored with customized linux system under the rootfs catalogue.
In the above scheme, include executable script in the root file system, when script execution can be realized:
Carry hard disk is divided into the firstth area and the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the
The UUID value in 2nd area;
Firstth area in automatic carry file under change rootfs catalogue, the secondth area UUID value be the firstth area read,
The UUID value in the secondth area;
System starting is executed in the firstth area.
In the above scheme, it can also be achieved when the script execution:
After carry hard disk is divided into the firstth area and the secondth area, the firstth area, the secondth area are formatted respectively.
The construction method for a kind of linux system mirror image that above-mentioned first aspect proposes, by constructing linux system respectively
The actuating section and system component portion of mirror image, then above-mentioned actuating section and system component portion are packaged and generate image file,
It realizes linux system mirror image and is detached from hard disk presence, the installation and application of linux system mirror image can be more suitable for.The present invention
The construction method process of the linux system mirror image of proposition is simple, applied widely, has good technological value and wide
Application prospect.
The building system technical effect obtained and first party for a kind of linux system mirror image that above-mentioned second aspect proposes
The technical effect that corresponding technological means obtains in face is approximate, repeats no more herein.
A kind of linux system mirror image that the above-mentioned third aspect proposes includes actuating section and system component portion, can be passed through
The root file system of actuating section storage is executed, realizes the subregion and carry of system operating component part, and then realize Linux system
The installation of system.Further it is proposed that linux system mirror image, rootfs mesh in change system operating component part can be passed through
Content under record, changes linux kernel and system for content, so that customized linux system more meets work requirements,
The mirror image does not depend on hard disk presence, and application is very convenient.
Detailed description of the invention
Illustrate the embodiment of the present invention in order to clearer, attached drawing needed in the embodiment is done into simple Jie below
It continues, it is clear that, drawings in the following description are only some embodiments of the invention, for those of ordinary skill in the art
For, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of construction method flow chart of linux system mirror image provided in an embodiment of the present invention.
Fig. 2 is a kind of building system structure diagram of linux system mirror image provided in an embodiment of the present invention.
Fig. 3 is a kind of structural schematic diagram of linux system mirror image provided in an embodiment of the present invention.
Specific embodiment
With reference to the attached drawing in the embodiment of the present invention, clear and complete retouch is carried out to the technical solution in inventive embodiments
It states, it is clear that described embodiment is only a part of the embodiments of the present invention, rather than whole embodiments.Based on the present invention
In embodiment, those of ordinary skill in the art without making creative work, every other implementation obtained
Example, belongs to the scope of the present invention.
In order to make those skilled in the art better understand the present invention program, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.
As shown in Figure 1, in one embodiment, a kind of construction method of linux system mirror image is disclosed, comprising:
SS1, the actuating section for constructing linux system mirror image are stored under root file system to the specified directory of actuating section;
SS2, the system operating component part for constructing linux system mirror image, storage system operating component to system operation group
Under the specified directory of part part;
SS3, the actuating section for being packaged linux system mirror image and system operating component part, generate system image file.
In one embodiment, above system operating component part includes Boot catalogue, rootfs catalogue;Above system fortune
Row component includes customized Linux system, system kernel, adaptation layer driving file;Wherein, system kernel, adaptation layer driving text
Part is stored under Boot catalogue, and customized Linux system is stored under rootfs catalogue, and above-mentioned customized Linux system passes through
Busybox constructs minimum system, increases the driving and application program of needs on the basis of minimum system, has it
The common function of Linux and required specific function.
Further, above-mentioned actuating section includes Grub catalogue, isolinux catalogue, is deposited under above-mentioned isolinux catalogue
Contain root file system.
Specifically, above-mentioned root file system is initrd file, executable script, above-mentioned foot are stored in initrd file
It can be realized when this execution:
Carry hard disk is divided into the firstth area and the secondth area;
Format the firstth area, the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the
The UUID value in 2nd area changes under rootfs catalogue the firstth area in automatic carry file, the UUID value in the secondth area is the read
The UUID value in one area, the secondth area;
System starting is executed in the firstth area.
To above-mentioned technical proposal, it should be noted that the construction method of linux system mirror image proposed by the present invention is by dividing
Not Gou Jian linux system mirror image actuating section and system component portion, then above-mentioned actuating section and system component portion are beaten
Packet generates image file, realizes linux system mirror image and is detached from hard disk presence, can be more suitable for the peace of linux system mirror image
Dress and application.
As shown in Figure 2, in one embodiment, a kind of building system of linux system mirror image is disclosed, comprising:
Actuating section constructs module, for constructing the actuating section of linux system mirror image, storage root file system to starting
Under partial specified directory;
System operating component part constructs module, for constructing the system operating component part of linux system mirror image, stores
Under system operating component to the specified directory of system operating component part;
Image file generation module, it is raw for being packaged actuating section and the system operating component part of linux system mirror image
At system image file.
In one embodiment, above system operating component part includes Boot catalogue, rootfs catalogue;Above system fortune
Row component includes customized Linux system, system kernel, adaptation layer driving file;Wherein, system kernel, adaptation layer driving text
Part is stored under Boot catalogue, and customized Linux system is stored under rootfs catalogue, and above-mentioned customized Linux system passes through
Busybox constructs minimum system, increases the driving and application program of needs on the basis of minimum system, has it
The common function of Linux and required specific function.
Further, above-mentioned actuating section includes Grub catalogue, isolinux catalogue, is deposited under above-mentioned isolinux catalogue
Contain root file system.
Specifically, above-mentioned root file system is initrd file, executable script, above-mentioned foot are stored in initrd file
It can be realized when this execution:
Carry hard disk is divided into the firstth area and the secondth area;
Format the firstth area, the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the
The UUID value in 2nd area changes under rootfs catalogue the firstth area in automatic carry file, the UUID value in the secondth area is the read
The UUID value in one area, the secondth area;
System starting is executed in the firstth area.
To above-mentioned technical proposal, it should be noted that the building system of linux system mirror image proposed by the present invention passes through
Actuating section building module, system operating component part building module, image file generation module are used cooperatively, and are realized point
Not Gou Jian linux system mirror image actuating section and system component portion, then above-mentioned actuating section and system component portion are beaten
Packet generates image file, exists so that Linux system image is detached from hard disk, can be more suitable for linux system mirror image
Installation and application.
As shown in Figure 3, in one embodiment, a kind of linux system mirror image, including actuating section, system fortune are disclosed
Row components;
Actuating section described above includes Grub catalogue, isolinux catalogue, is stored with root file under isolinux catalogue
System;
Above system operating component part includes Boot catalogue, rootfs catalogue, be stored under Boot catalogue system kernel,
Adaptation layer drives file, is stored with customized Linux system under rootfs catalogue.
Specifically, include executable script in above-mentioned root file system, when above-mentioned script execution, can be realized:
Carry hard disk is divided into the firstth area and the secondth area;
Format the firstth area, the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the
The UUID value in 2nd area changes under rootfs catalogue the firstth area in automatic carry file, the UUID value in the secondth area is the read
The UUID value in one area, the secondth area;
System starting is executed in the firstth area.
To above-mentioned technical proposal, it should be noted that linux system mirror image proposed by the present invention is by executing actuating section
The root file system of storage realizes the subregion and carry of system operating component part, the final installation for realizing linux system.
Further it is proposed that linux system mirror image, rootfs mesh in change system operating component part can be passed through
Content under record, changes linux kernel and system for content, so that customized linux system more meets work and needs
It asks, which does not depend on hard disk presence, and application is very convenient.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.
Claims (10)
1. a kind of construction method of linux system mirror image characterized by comprising
The actuating section of linux system mirror image is constructed, is stored under root file system to the specified directory of actuating section;
Construct the system operating component part of linux system mirror image, storage system operating component to system operating component part
Under specified directory;
It is packaged actuating section and the system operating component part of linux system mirror image, generates system image file.
2. the construction method of linux system mirror image according to claim 1, which is characterized in that
System operating component part includes Boot catalogue, rootfs catalogue.
3. the construction method of linux system mirror image according to claim 2, which is characterized in that
System operating component includes customized Linux system, system kernel, adaptation layer driving file;
The system kernel, adaptation layer driving file are stored under Boot catalogue;
The customized Linux system is stored under rootfs catalogue.
4. the construction method of linux system mirror image according to claim 3, which is characterized in that
Actuating section includes Grub catalogue, isolinux catalogue;
Root file system is stored under the isolinux catalogue.
5. the construction method of linux system mirror image according to claim 4, which is characterized in that
Include executable script in the root file system, when script execution can be realized:
Carry hard disk is divided into the firstth area and the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the secondth area
UUID value;
Change under rootfs catalogue the firstth area in automatic carry file, the UUID value in the secondth area is the firstth area read, second
The UUID value in area;
System starting is executed in the firstth area.
6. the construction method of linux system mirror image according to claim 5, which is characterized in that when the script execution also
It can be achieved:
After carry hard disk is divided into the firstth area and the secondth area, the firstth area, the secondth area are formatted respectively.
7. a kind of building system of linux system mirror image characterized by comprising
Actuating section constructs module, for constructing the actuating section of linux system mirror image, storage root file system to actuating section
Specified directory under;
System operating component part constructs module, for constructing the system operating component part of linux system mirror image, storage system
Under operating component to the specified directory of system operating component part;
Image file generation module generates system for being packaged actuating section and the system operating component part of linux system mirror image
System image file.
8. a kind of linux system mirror image, which is characterized in that including actuating section, system operating component part;
The actuating section includes Grub catalogue, isolinux catalogue,
Root file system is stored under the isolinux catalogue;
System operating component part includes Boot catalogue, rootfs catalogue,
System kernel, adaptation layer driving file are stored under the Boot catalogue,
Customized Linux system is stored under the rootfs catalogue.
9. a kind of system image according to claim 8, which is characterized in that
Include executable script in the root file system, when script execution can be realized:
Carry hard disk is divided into the firstth area and the secondth area;
Carry Boot catalogue is to the firstth area, carry rootfs catalogue to the secondth area;
The UUID value in the firstth area, the secondth area is read respectively;
Start the firstth area in configuration file under change boot catalogue, the UUID value in the secondth area is the firstth area read, the secondth area
UUID value;
Change under rootfs catalogue the firstth area in automatic carry file, the UUID value in the secondth area is the firstth area read, second
The UUID value in area;
System starting is executed in the firstth area.
10. a kind of system image according to claim 9, which is characterized in that can also be achieved when the script execution:
After carry hard disk is divided into the firstth area and the secondth area, the firstth area, the secondth area are formatted respectively.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811383771.8A CN109614117A (en) | 2018-11-20 | 2018-11-20 | A kind of construction method and system, linux system mirror image of linux system mirror image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811383771.8A CN109614117A (en) | 2018-11-20 | 2018-11-20 | A kind of construction method and system, linux system mirror image of linux system mirror image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109614117A true CN109614117A (en) | 2019-04-12 |
Family
ID=66003322
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811383771.8A Pending CN109614117A (en) | 2018-11-20 | 2018-11-20 | A kind of construction method and system, linux system mirror image of linux system mirror image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109614117A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030236927A1 (en) * | 2002-06-19 | 2003-12-25 | Christophe Cleraux | Tool for building multiple OS images |
CN102567058A (en) * | 2011-12-26 | 2012-07-11 | 中标软件有限公司 | Method for preparing image file for installing Linux operating system |
CN106557384A (en) * | 2015-09-25 | 2017-04-05 | 中兴通讯股份有限公司 | Based on the data processing method of Linux, device and system |
CN108415795A (en) * | 2018-02-12 | 2018-08-17 | 人和未来生物科技(长沙)有限公司 | A kind of container Dockerfile, container mirror image rapid generation and system |
-
2018
- 2018-11-20 CN CN201811383771.8A patent/CN109614117A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030236927A1 (en) * | 2002-06-19 | 2003-12-25 | Christophe Cleraux | Tool for building multiple OS images |
CN102567058A (en) * | 2011-12-26 | 2012-07-11 | 中标软件有限公司 | Method for preparing image file for installing Linux operating system |
CN106557384A (en) * | 2015-09-25 | 2017-04-05 | 中兴通讯股份有限公司 | Based on the data processing method of Linux, device and system |
CN108415795A (en) * | 2018-02-12 | 2018-08-17 | 人和未来生物科技(长沙)有限公司 | A kind of container Dockerfile, container mirror image rapid generation and system |
Non-Patent Citations (1)
Title |
---|
王伟: ""基于开源软硬件技术的电力电子嵌入式计算平台"", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7574591B2 (en) | Capturing and restoring application state after unexpected application shutdown | |
US20110072058A1 (en) | Method and System for Large Volume Data Processing | |
CN104468226B (en) | Collocation method and device based on Nginx | |
EP3678019A1 (en) | Mirror image upgrading method and device | |
CN105045663B (en) | The method and system of rapid deployment virtual machine | |
US7689990B2 (en) | Method, system and program for managing executable tasks | |
JP5608985B2 (en) | Image processing apparatus, information processing apparatus, user interface providing method, image processing system, and program | |
JP2011165032A (en) | Computer program and data backup method | |
JPWO2012063339A1 (en) | Computer system, job execution management method, and program | |
CN107430534A (en) | Message processing device, program and recording medium | |
CN109614117A (en) | A kind of construction method and system, linux system mirror image of linux system mirror image | |
CN107391197A (en) | The installation method and device of a kind of (SuSE) Linux OS | |
JP4498245B2 (en) | Color processing method and apparatus | |
KR20160143518A (en) | Image forming apparatus and method for deleting application | |
CN101989209A (en) | Method for starting user operation interface in electronic device | |
JP2015041179A (en) | Device apparatus, control method, and computer program | |
US20090265535A1 (en) | Method and apparatus for setting computer-working-hours-based shutdown options | |
JP2010020845A (en) | Method and device for initializing recording medium | |
JP2008204208A (en) | Automatic generation system of patch application procedure, automatic generation method of patch application procedure and program | |
US20130129098A1 (en) | Automatic render generation of an audio source | |
JP6083079B2 (en) | OS image file creation method and server system | |
JP2011128864A (en) | Data processor, and data processing method and program | |
JP2018018369A (en) | Information processor and program | |
CN108108077A (en) | A kind of desktop management method and device | |
JP2008123053A (en) | File management device and file management program |
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 |
Application publication date: 20190412 |
|
RJ01 | Rejection of invention patent application after publication |