CN102567058B - Method for preparing image file for installing Linux operating system - Google Patents

Method for preparing image file for installing Linux operating system Download PDF

Info

Publication number
CN102567058B
CN102567058B CN201110443216.1A CN201110443216A CN102567058B CN 102567058 B CN102567058 B CN 102567058B CN 201110443216 A CN201110443216 A CN 201110443216A CN 102567058 B CN102567058 B CN 102567058B
Authority
CN
China
Prior art keywords
file
installation
operating system
linux operating
startup
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.)
Active
Application number
CN201110443216.1A
Other languages
Chinese (zh)
Other versions
CN102567058A (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.)
China Standard Software Co Ltd
Original Assignee
China Standard Software 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 China Standard Software Co Ltd filed Critical China Standard Software Co Ltd
Priority to CN201110443216.1A priority Critical patent/CN102567058B/en
Publication of CN102567058A publication Critical patent/CN102567058A/en
Application granted granted Critical
Publication of CN102567058B publication Critical patent/CN102567058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for preparing an image file for installing a Linux operating system. The method comprises the following steps of: acquiring a software package required by manufacturing the Linux operating system; creating a metadata file catalog of the software package; judging whether a standby installation file and a standby startup file which are required when the Linux operating system is installed are generated or not, if so, performing a step of generating the image file, otherwise, performing a step of creating an installation file; creating the installation file, namely creating the installation file and a startup file which are required when the Linux operating system is installed; and generating the image file, namely creating the image file based on the standby installation file and the standby startup file which are required when the Linux operating system is installed or the installation file and the startup file which are created in the step of creating the installation file and are required when the Linux operating system is installed, the software package and the metadata file catalog. By the method, the speed of preparing the image file for installing the Linux operating system is improved.

Description

A kind of method of the image file for the preparation of installation linux operating system
Technical field
The present invention relates to a kind of image file method for making for installing operating system, relate in particular to the image file method for making for linux operating system is installed.
Background technology
Along with increasing linux operating system personalize development, linux operating system is carried out in personalize development and debug process, need to generate current exploitation version linux operating system ISO file (for example, support ISO 9660 file system of optical disc medium), for issuing or test.Especially in development and testing stage of linux operating system, because needs repeatedly generate ISO file in order to installation testing, and generate the stand-by period that ISO file all needs to expend the operating system exploitation/tester long period at every turn, therefore, how to generate rapidly the ISO file of linux operating system, become an important research topic.
Current, linux community organization has developed a kind of method of making the ISO file of linux operating system by pungi technology.While making ISO file by pungi fabrication techniques, after operation " pungi-G-C-B – I " (having omitted other possible parameter), pungi can generate ISO file by four-stage as shown in Figure 1.
First stage is collection phase (Gather stage), collects/download the software package that making linux operating system will be used, for example gcc, kernel, firefox, openoffice etc. in this stage.
Subordinate phase is the catalogue stage (Createrepo stage) that creates the meta data file that comprises software package, in this stage, and the information that will use when the dependence of parsing software package and reading software bag, the meta data file of generation xml form.Meta data file comprises for example repomd.xml, primary.xml.gz, filelists.xml.gz, other.xml.gz etc., the information that will use when depositing the dependence of software package and reading software bag.
Phase III is to create installation phase (BuildInstall stage), installation file and the startup file that while linux operating system being installed for creating, will use, for example isolinux/boot.msg, isolinux/isolinux.bin, isolinux/initrd.img, images/install.img, ima ges/boot.iso etc.This stage may spend the longer time.
Fourth stage is to create ISO document stage (CreateIso stage), for integrating the Miscellaneous Documents that above-mentioned each stage generates, to prepare ISO file.
In brief, traditional pungi technology is come for the preparation of the ISO file that linux operating system is installed by above-mentioned four-stage.In detail can be with reference to https: //fedorahosted.org/pungi/wiki/PungiDocs.
But, when the method for making the ISO file of linux operating system by pungi order generates ISO file, each generative process still needs (for example to take the longer time, tens minutes to tens of minutes are not etc.), this obviously has influence on exploitation/tester's work efficiency possibly.
Summary of the invention
One of technical matters to be solved by this invention be need to provide a kind of can be more quickly for the preparation of the method for image file that the linux operating systems such as such as fedora are installed.
In order to solve the problems of the technologies described above, the invention provides one, for the preparation of the method for image file that linux operating system is installed.The method comprises:
Software package obtaining step, obtains and makes the software package that linux operating system will be used;
Meta data file directory creating step, the meta data file catalogue of establishment software package;
Determining step, for the installation file and the startup file that judge whether will use will generate the standby installation linux operating system using time, if judged result is no, enters image file and generates step, otherwise, enter installation file foundation step;
Installation file foundation step, creates installation file and the startup file that when linux operating system is installed, will use;
Image file generates step, the installation file that will use when installation linux operating system based on described standby use and startup file or in described installation file foundation step, create installation linux operating system time installation file and startup file, described software package and the described meta data file catalogue that will use create described image file.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, in described determining step, by the installation file and the startup file that judge whether will use while there is the standby described installation linux operating system using, judge whether installation file and the startup file that will generate the standby installation linux operating system using time, will use, wherein, if be judged as installation file and the startup file that will use while there is the standby described installation linux operating system using, described judged result is no, otherwise, described judged result is yes.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, in described determining step, by judging whether to exist the flag information of indicating to carry out described installation file foundation step, judge whether installation file and the startup file that will generate the standby installation linux operating system using time, will use, wherein, if be judged as the flag information of indicating to carry out described installation file foundation step described in existing, described judged result is no, otherwise described judged result is yes.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, in described installation file foundation step, the installation file that will use during also by created installation linux operating system and startup file or their compressed package store assigned catalogue into.In described determining step, by judging whether to exist described assigned catalogue and/or whether having by judging installation file and startup file or their compressed package that will use when linux operating system is installed in described assigned catalogue, installation file and the startup file that while judging whether to exist the installation linux operating system of standby use, will use.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, utilize the pungi order of band-G parameter to carry out the processing of described software package obtaining step.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, utilize creatrepo order to carry out described meta data file directory creating step.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, first customizing comps.xml file needs the list of the software package of installing with amendment, and then utilizes creatrepo order to carry out described meta data file directory creating step.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, utilize mkisofs order to carry out described image file and generate step.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, carry out described method by carrying out single command, wherein,
If described single command, with the parameter about whether carrying out the information of described installation file foundation step, is determined described judged result according to the value of described parameter;
If described single command is without the parameter about whether carrying out the information of described installation file foundation step, described judged result be set to no, to enter described installation file foundation step.
According to the method for the image file for the preparation of installation linux operating system of another aspect of the invention, described linux operating system is fedora operating system.
Compared with prior art, the present invention can have the following advantages:
Installation file and startup file that the present invention once will use when the standby installation linux operating system using of preparation before can making full use of, improved the speed for the preparation of the image file of installation linux operating system.
In multiple step of the present invention, take full advantage of the partial function/order in pungi technology, reduced research staff's development amount.
Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, or understand by implementing the present invention.Object of the present invention and other advantages can be realized and be obtained by specifically noted structure in instructions, claims and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions,, is not construed as limiting the invention jointly for explaining the present invention with embodiments of the invention.In the accompanying drawings:
Fig. 1 is for the preparation of the schematic flow sheet of image file that linux operating system is installed in prior art;
Fig. 2 is the schematic flow sheet for the preparation of the image file of installation linux operating system according to first embodiment of the invention;
Fig. 3 and 4 is the schematic flow sheets for the preparation of the image file of installation linux operating system according to second embodiment of the invention.
Embodiment
Describe embodiments of the present invention in detail below with reference to drawings and Examples, to the present invention, how application technology means solve technical matters whereby, and the implementation procedure of reaching technique effect can fully understand and implement according to this.It should be noted that, only otherwise form conflict, each feature in each embodiment and each embodiment in the present invention can mutually combine, and the technical scheme forming is all within protection scope of the present invention.
In addition, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
The first embodiment
The present embodiment provides a kind of method of the image file for the preparation of installation linux operating system.Describe each step of the present embodiment in detail below with reference to Fig. 2.
Step S210, obtains and makes the software package that linux operating system will be used.
For example, by the partial function of pungi technology, utilize the pungi order of band-G parameter to carry out the processing of this step, technician removes the trouble of again writing code from like this.
Step S220, creates software package meta data file.
For example, can carry out by the creatrepo order in pungi technology the processing of this step, to deduct the trouble of again making the code of realizing this treatment scheme.
More specifically, first customizing comps.xml file needs the list of the software package of installing with amendment, and then utilizes creatrepo order to carry out this step.
Step S230, for the installation file and the startup file that judge whether will use will generate the standby installation linux operating system using time, if judged result is yes, enters step S240, otherwise, step S250.
Can, by the installation file and the startup file that judge whether will use while there is the standby installation linux operating system using, judge whether installation file and the startup file that will generate the standby installation linux operating system using time, will use.More specifically, if be judged as installation file and the startup file that will use while there is the standby installation linux operating system using, the judged result in this step is no, be illustrated in this process of preparing image file, do not create installation file and the startup file that when linux operating system is installed, will use.Otherwise, if be judged as installation file and the startup file that will use while there is not the standby installation linux operating system using, the judged result in this step is yes, be illustrated in this process of preparing image file, create installation file and the startup file that when linux operating system is installed, will use.
In one implementation, can be by judging whether to exist assigned catalogue and/or whether having by judging installation file and startup file or their compressed package that will use when linux operating system is installed in this assigned catalogue, installation file and the startup file that while judging whether to exist the installation linux operating system of standby use, will use.
In addition, can also, by judging whether there is the flag information of indicating to perform step S240, judge whether installation file and the startup file that will generate the standby installation linux operating system using time, will use.More specifically, there is if be judged as the flag information of indicating to perform step S240, for example, be judged as user and be provided with a parameter or variable, no matter whether the value of this variable or Parametric Representation there is assigned catalogue and/or by judging whether have installation file and startup file or their compressed package that will use when linux operating system is installed in assigned catalogue, prepare in the process of image file at this, all should create installation file and the startup file that when linux operating system is installed, will use, the judged result of this step is yes, thereby enter step S240.Otherwise if this parameter does not exist, or the value representation of this variable need not create installation file and the startup file that will use when linux operating system is installed, the judged result of this step is no, thereby directly enters step S250.
Like this, can control neatly whether perform step S240 by a variable or parameter are set, thereby raise the efficiency.For example, if know that user oneself this preparation is the operation of preparing for the first time image file, can not exist, user can carry out to perform step by force the operation of S240 by the way.Or, when user thinks while no matter whether having existed installation file for subsequent use and startup file all will regenerate them, can whether be performed step easily the operation of S240 by the own control of user.
In this case, also can carry out by carrying out single command the method for the present embodiment, for example, if this single command, with the parameter about whether performing step the information of S240, represents this parameter with " B ", carry out the judged result of determining step S230 according to the value of this parameter; Otherwise if this single command is not with " B " parameter, the judged result of step S230 is set to noly, indicates to perform step S240.
Step S240, creates installation file and the startup file that when linux operating system is installed, will use.
For example, can utilize processing that the buildinstall order in pungi technology carries out this step to reduce technician's development amount as far as possible.
In addition the installation file that will use when, this step also can be by created installation linux operating system and startup file or their compressed package store assigned catalogue into.
Step S250, the installation file that will use when installation linux operating system based on above-mentioned standby use and startup file or in step S240, create installation linux operating system time the software package meta data file catalogue that generates in the software package that obtains in the installation file that will use and startup file, step S210 and step S220 create the image file for linux operating system is installed.
In addition, it will be understood by those skilled in the art that under the enlightenment of the present embodiment, can form different embodiment by the order of amendment above steps.For example, the order of step S210 to S240 can be adjusted arbitrarily.
The second embodiment
The present embodiment is a special case of the first embodiment.In the present embodiment, be provided with a flag information, this flag information represents whether be the method for carrying out for the first time according to the present embodiment, if for the first time, indicate to carry out installation file and the startup file that while creating installation linux operating system, will use, otherwise, if not for the first time, represent not carry out creating installation file and the startup file that when linux operating system is installed, will use.
Describe in detail below with reference to accompanying drawing 3 and Fig. 4.
Fig. 3 illustrates when utilizing for the first time the present embodiment method to make the flow process when the iso file of linux operating system is installed.
First, utilize pungi order, operation parameter is "-G-C-B ", successively to carry out respectively the operation corresponding with Gather, Createrepo, Buildinstall stage order.
Then, after comps.xml file is modified, for example, revise and/or add after the software package name that needs to install, carrying out createrepo order, to produce repodata catalogue.
Then move mkisofs order, to generate ISO 9660 files, can, by these ISO 9660 burning files in CD, be installed in the computing machine that linux operating system need to be installed to facilitate.
In addition, the catalogue images also pungi order being produced becomes compressed package with file and other essential documentings in isolinux, during for the later method of carrying out the present embodiment.
Fig. 4 illustrates when not being to utilize for the first time the present embodiment method to make the flow process when the iso file of linux operating system is installed.
Utilize pungi order, operation parameter is "-G ", to carry out the operation of Gather stage order.
Then decompress at the images that utilizes for the first time the present embodiment method to make to generate when the iso file of linux operating system is installed and the compressed package of isolinux catalogue and alternative document, to obtain installation file and startup file.
Then, comps.xml file is modified to revise and/or add after the software package information that needs to install, carry out createrepo order, to produce repodata catalogue, like this, created the meta data file catalogue of dependence and the meta data file etc. of having deposited software package.
Recycling mkisofs order, to generate ISO 9660 files, can be burnt in CD.
The above; be only preferably embodiment of the present invention, but protection scope of the present invention is not limited to this, any those skilled in the art are in the disclosed technical scope of the present invention; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.
Those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that multiple calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Although the disclosed embodiment of the present invention as above, the embodiment that described content just adopts for the ease of understanding the present invention, not in order to limit the present invention.Technician in any the technical field of the invention; do not departing under the prerequisite of the disclosed spirit and scope of the present invention; can do any amendment and variation what implement in form and in details; but scope of patent protection of the present invention, still must be as the criterion with the scope that appending claims was defined.

Claims (9)

1. for the preparation of the method for image file that linux operating system is installed, it is characterized in that, comprising:
Software package obtaining step, obtains and makes the software package that linux operating system will be used;
Meta data file directory creating step, the meta data file catalogue of establishment software package;
Determining step, for the installation file and the startup file that judge whether will use will generate the standby installation linux operating system using time, if judged result is no, enters image file and generates step, otherwise, enter installation file foundation step;
Installation file foundation step, creates installation file and the startup file that when linux operating system is installed, will use;
Image file generates step, the installation file that will use when installation linux operating system based on described standby use and startup file or in described installation file foundation step, create installation linux operating system time installation file and startup file, described software package and the described meta data file catalogue that will use create described image file;
Wherein, in described determining step,
Installation file and the startup file that will use when judging whether to exist the standby described installation linux operating system using, installation file and the startup file that while judging whether to generate the installation linux operating system of standby use, will use, wherein,
If be judged as installation file and the startup file that will use while there is the standby described installation linux operating system using, described judged result is no, otherwise described judged result is yes.
2. method according to claim 1, is characterized in that, in described determining step,
Indicate to carry out the flag information of described installation file foundation step by judging whether to exist, judge whether installation file and the startup file that will use will generate the standby installation linux operating system using time, wherein,
If be judged as the flag information of indicating to carry out described installation file foundation step described in existing, described judged result is no, otherwise described judged result is yes.
3. method according to claim 1, is characterized in that, in described installation file foundation step,
The installation file that will use during also by created installation linux operating system and startup file or their compressed package store assigned catalogue into.
4. method according to claim 3, is characterized in that, in described determining step,
By judging whether to exist described assigned catalogue and/or whether having by judging installation file and startup file or their compressed package that will use when linux operating system is installed in described assigned catalogue, installation file and the startup file that while judging whether to exist the installation linux operating system of standby use, will use.
5. method according to claim 1, is characterized in that,
Utilize the pungi order of band-G parameter to carry out the processing of described software package obtaining step.
6. method according to claim 1, is characterized in that,
Utilize creatrepo order to carry out described meta data file directory creating step.
7. method according to claim 6, is characterized in that,
First customizing comps.xml file needs the list of the software package of installing with amendment, and then utilizes creatrepo order to carry out described meta data file directory creating step.
8. method according to claim 1, is characterized in that,
Utilize mkisofs order to carry out described image file and generate step.
9. according to the method described in any one in claim 1 to 8, it is characterized in that, carry out described method by carrying out single command, wherein,
If described single command, with the parameter about whether carrying out the information of described installation file foundation step, is determined described judged result according to the value of described parameter;
If described single command is without the parameter about whether carrying out the information of described installation file foundation step, described judged result be set to no, to enter described installation file foundation step.
CN201110443216.1A 2011-12-26 2011-12-26 Method for preparing image file for installing Linux operating system Active CN102567058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110443216.1A CN102567058B (en) 2011-12-26 2011-12-26 Method for preparing image file for installing Linux operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110443216.1A CN102567058B (en) 2011-12-26 2011-12-26 Method for preparing image file for installing Linux operating system

Publications (2)

Publication Number Publication Date
CN102567058A CN102567058A (en) 2012-07-11
CN102567058B true CN102567058B (en) 2014-11-05

Family

ID=46412559

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110443216.1A Active CN102567058B (en) 2011-12-26 2011-12-26 Method for preparing image file for installing Linux operating system

Country Status (1)

Country Link
CN (1) CN102567058B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103077043B (en) * 2012-11-15 2016-02-10 上海爱数软件有限公司 A kind of method of quick Start-up and operating performance Linux
CN103324474B (en) * 2013-05-22 2016-08-03 中标软件有限公司 Based on (SuSE) Linux OS across the method for System structure ISO and module
CN103530148B (en) * 2013-09-18 2016-09-07 国云科技股份有限公司 A kind of dissemination method of large-scale Linux software kit
CN107643959B (en) * 2016-07-19 2020-08-04 新华三信息技术有限公司 Mirror image file processing method and device
CN107391197A (en) * 2017-07-25 2017-11-24 郑州云海信息技术有限公司 The installation method and device of a kind of (SuSE) Linux OS
CN109901845A (en) * 2017-12-11 2019-06-18 中标软件有限公司 The production method of desktop operating system boot disk
CN109960515B (en) * 2017-12-25 2022-08-02 宏碁股份有限公司 Image file making method and device
CN109614117A (en) * 2018-11-20 2019-04-12 山东超越数控电子股份有限公司 A kind of construction method and system, linux system mirror image of linux system mirror image

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1522893A (en) * 2003-09-09 2004-08-25 深圳市易凯数码有限公司 Flush operating system startup method for vehicle apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101310218B1 (en) * 2008-10-28 2013-09-24 삼성전자주식회사 Method for installing an integrated file and image forming apparatus for installing the integrated file thereby

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1522893A (en) * 2003-09-09 2004-08-25 深圳市易凯数码有限公司 Flush operating system startup method for vehicle apparatus

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Pungi Documentation;wiki PungiDocs;《https://fedorahosted.org/pungi/wiki/PungiDocs》;20081231;正文第1页第1行-第2页最后1行 *
wiki PungiDocs.Pungi Documentation.《https://fedorahosted.org/pungi/wiki/PungiDocs》.2008, *

Also Published As

Publication number Publication date
CN102567058A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN102567058B (en) Method for preparing image file for installing Linux operating system
US9367305B1 (en) Automatic container definition
CN103324474B (en) Based on (SuSE) Linux OS across the method for System structure ISO and module
US8595693B2 (en) Model driven deployment of composite applications
CN102257477B (en) Application development assisting device
US20150082298A1 (en) Packaging and deploying hybrid applications
CN104317587A (en) Automatic android mobile device oriented application generation method
CN107885551A (en) A kind of service arrangement method, apparatus, computer-readable recording medium and storage control
CN101221504B (en) Test script scheduling executing system
CN107479881B (en) Method for synchronizing difference codes, storage medium, electronic device and system
CN110825399B (en) Deployment method and device of application program
CN101382914A (en) Testing method and device for software update file
CN101799753A (en) Method and device for realizing tree structure
US8417688B2 (en) Converting two-tier resource mapping to one-tier resource mapping
CN109766206A (en) A kind of log collection method and system
CN111651950B (en) Generation method, equipment and medium of clock domain crossing time sequence constraint file
US20220382653A1 (en) Storage restore system, storage restore method, and storage medium
CN106599167A (en) System and method capable of supporting incremental upgrading of database
CN106886390B (en) Java object generating and converting method and Java object generating and converting device
CN104572140B (en) A kind of method, apparatus and system of operating system transplantation
CN113467790A (en) Software packaging method and device and readable storage medium
CN111984595A (en) File processing method and device and storage medium
CN102622226B (en) A kind of method generating Linux software package storage
CN103970658A (en) Method and device for testing compatibility between PMON and kernel versions
CN113177020A (en) Data processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant