CN102455929A - Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image - Google Patents

Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image Download PDF

Info

Publication number
CN102455929A
CN102455929A CN2011102393069A CN201110239306A CN102455929A CN 102455929 A CN102455929 A CN 102455929A CN 2011102393069 A CN2011102393069 A CN 2011102393069A CN 201110239306 A CN201110239306 A CN 201110239306A CN 102455929 A CN102455929 A CN 102455929A
Authority
CN
China
Prior art keywords
mirror image
script
oem
linux
mkoemiso
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
CN2011102393069A
Other languages
Chinese (zh)
Other versions
CN102455929B (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 CN201110239306.9A priority Critical patent/CN102455929B/en
Publication of CN102455929A publication Critical patent/CN102455929A/en
Application granted granted Critical
Publication of CN102455929B publication Critical patent/CN102455929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method for conveniently generating an original equipment manufacturer (OEM) Linux installation mirror image. The method comprises the following steps of: 1) selecting and installing a kickstart file which corresponds to an OEM; 2) selecting a path of an installation optical disk or an installation mirror image of a common Linux system; and 3) operating a script mkoemiso.sh of the invention to obtain the corresponding OEM Linux installation mirror image. By adoption of the method provided by the invention, the OEM Linux installation mirror image can be conveniently generated by using the script of the invention. By using the OEM Linux installation mirror image, a Linux system which is required by a client can be installed in an automatic mode instead of in a manual mode.

Description

The method that the convenient generation of a kind of ability OEM Linux installs mirror image
Technical field
The present invention relates to generate the method that OEM Linux installs mirror image, refer to that especially a kind of generation OEM Linux installs mirror image, the method that its convenient generation of ability OEM Linux that can not have the needed Linux of robotization ground installation client of post installs mirror image.
Background technology
In some OEM application client scene, need operator-less to accomplish the installation linux system automatically.Linux system is installed usually, and under the guiding of installation procedure, the user needs progressively to accomplish alternately the input and the affirmation of corresponding information.Divide and select, use which kind of language, user name password, which software package or the like is installed such as: fdisk.In the whole erection process, the user will wait for aside, accomplishes these operations alternately, and the completion system installs smoothly.The mirror image that uses the present invention to generate is installed linux system, and the user only needs single stepping to start installation; System will accomplish automatically to be installed and sets.Install Once you begin, carry out that the user need not carry out any operation in the process.This installation mirror image is applied in the system of the identical setting of installation in enormous quantities, and effect is particularly remarkable.
In the prior art, in order to improve installation effectiveness, Red Hat Linux begins the function of supporting one to be called kickstart.Make in this way; Only need what a Kickstart auto answer configuration file of predefined; And Kickstart leaves on the build-in services device, and lets installation procedure know the position of this configuration file, and installation procedure just can own read from this document configuration is installed in installation process; So just avoid loaded down with trivial details man-machine interaction, realized unattended robotization installation.
Can generate the Kickstart configuration file through several different methods; No matter using which kind of method is exactly nothing but to create an answer file; When installing a Red Hat Linux machine; Red Hat Linux installation procedure all can be created a kickstart configuration file, writes down your true installation configuration.If you hope to install like realization and certain system class, can generate yourself's kickstart configuration file based on the kickstart configuration file of this system.This document is positioned at/root/anaconda-ks.cfg; Yet the function of kickstart of the prior art; Be the unmanned Linux installation method of a kind of (network startup+network installation) Network Based, also do not have method can utilize mirror optical disk just can realize starting and install automatically Linux.
If OEM client provides the linux system real needs, such as: fdisk, speech selection, which software package, root user password or the like are installed.Script of the present invention just can generate required OEM Linux mirror image easily.Such mirror image offers the client, just installation system easily.The explanation of giving an example: be burnt to CD to this OEM Linux mirror image; Start with this CD vectoring computer, can accomplish the installation of OEM linux system.Certainly, use the approach of gained OEM Linux mirror image to be not limited thereto.
Summary of the invention
The method that the object of the present invention is to provide the convenient generation of a kind of ability OEM Linux that mirror image is installed, this installation mirror image can not have the robotization ground of post the needed Linux of client are installed.
The present invention provides the convenient generation of a kind of ability OEM the method that Linux installs mirror image, and it comprises following steps:
1.1. select the kickstart file corresponding with OEM vendor;
1.2. select common linux system fixing disc or mirror path be installed;
1.3. operation mkoemiso.sh script can generate OEM Linux mirror image is installed;
Comprise in the step 1.3: this mkoemiso.sh script of 1.3.1 imports the kickstart file automatically and installs in the mirror image; 1.3.2 this mkoemiso.sh script calls sed order is revised fixing disc automatically or the configuration file of mirror image is installed, and is fused to the kickstart file in this installation mirror image; 1.3.3 this mkoemiso.sh script calls mkisofs order generates needed installation mirror image automatically.
In the step 1.3; This mkoemiso.sh script is from employing the sed order; In linux system fixing disc or installation mirror configuration file, contain in the row of common linux system installation parameter at all, after this installation parameter, add the invoke code that is directed to the kickstart file automatically
In the step 1.3; Mkoemiso.sh is a bash script; It is with the common linux system fixing disc in kickstart file in the step 1.1 and the step 1.2 or mirror path is installed is parameter, and with common linux system fixing disc or mirror image is installed is an option; This mkoemiso.sh script is ordered with sed, perhaps installs in the mirror configuration file at system's fixing disc, adds quoting the kickstart file.
In the step 1.1, if the installation system boot in the MBR of hard disk, writes " bootloader--location=mbr " and " zerombr " hereof; If the installation system boot is not in the MBR of hard disk then do not write, otherwise the data on the original MBR can be capped.
In the step 1.3, under the default situations, when not using option, be that common linux system is installed image file wherein for linux system fixing disc or parameter that mirror path is installed; If what select in the step 1.2 is common linux system fixing disc path, just must use option.
Before carrying out the sed order, this mkoemiso.sh script extracts a temp directory, and also together puts into this temp directory to the kickstar file in the step 1.1 earlier the common linux system fixing disc in the step 1.2 or all the elements of mirror image; After this, the sed order is revised the linux system fixing disc in this temp directory or the mirror configuration file is installed.
Last mkoemiso.sh script calls mkisofs order the content in the temp directory, is made into linux system ISO mirror image.
Through adopting the method in this patent, can use script of the present invention to generate the method that OEM Linux installs mirror image easily.This OEM Linux installs mirror image, can not have the robotization ground of post the needed linux system of client is installed.
Description of drawings
Fig. 1 is for generating the method realization flow figure that OEM Linux installs mirror image.
Embodiment
For characteristic of the present invention and advantage thereof are more clearly understood,, elaborate like hereinafter below in conjunction with accompanying drawing.This only supplies the usefulness of explanation, in patented claim, does not receive the restriction of this kind structure.
Method realization flow of the present invention is as shown in Figure 1, and concrete process step is following:
1. the adaptive as required selection kickstart file corresponding with OEM vendor; (like step 1) among Fig. 1.For example with/tmp/oem.ks is this kickstart file, passes to the script of next step as a parameter; From the file type angle, this oem.ks is exactly a text.Use any one text edit software, just can carry out the compilation operation of oem.ks easily.
1.1. what time must be noted that about being provided with of subregion in the Kickstart file:
If 1.1.1. the installation system boot is in the MBR of hard disk.Write " bootloader--location=mbr " and " zerombr " hereof.If the installation system boot is not in the MBR of hard disk then do not write, otherwise the data on the original MBR can be capped.
1.1.2. if write " clearpart--all--initlabel ", all subregions and data on the hard disk all can be cleared.
2. select common linux system fixing disc or mirror path is installed; (like step 1) among Fig. 1 for example: mirror image is installed is at/opt/linux.iso.The complete path and the filename of this mirror image are passed to the script of next step as parameter.
3. as in the step 2 among Fig. 1, filename that this step obtains with step 1 and step 2 or path be as parameter, operation mkoemiso.sh script.Quote above-mentioned oem.ks in for example and/opt/linux.iso, the order that in this step, will carry out is ./mkoemiso.sh/tmp/oem.ks/opt/linux.iso.Below script is further specified:
3.1. mkoemiso.sh is a bash script, can on linux system, move easily.Script has two parameters and an option.Using form: mkoemiso.sh [d] < kickstartfile>< iso|dir >.The using form brief description is following:
3.1.1. parameter < kickstartfile>is the kickstart file in the step 1
3.1.2. parameter < iso|dir>is the common linux system fixing disc in the step 2 or mirror path is installed.
3.1.2.1. under the default situations, when just not using option-d, this parameter is that common linux system is installed image file
3.1.2.2. if selection is common linux system fixing disc path, just must use option-d
3.2. behind the operation mkoemiso.sh script, script is accomplished following key step automatically:
3.2.1. all the elements that the common linux system in the step 2 is installed medium (CD or mirror image), extract a temp directory/tmp/dir1 (for explain supposition be/tmp/dir1).Continue to use the filename of supposing in the example in the preceding text.Main operation in the code is following:
3.2.1.1. mount?-o?loop?/opt/linux?/mnt
3.2.1.2. cp?-av?/mnt?/tmp/dir1
3.2.2. also together put into the oem.ks in the step 1 (kickstar file) the temp directory dir1 of 3.1..The order of script executing is: cp/tmp/oem.ks/tmp/dir1/ks.cfg
Revise the isolinux/isolinux.cfg file among the temp directory dir1 among the 3.1. 3.2.3. use the sed order.The purpose of operation is like this: when using the installation system that generates OEM Linx, quote the kickstart file, linux system is installed automatically.
3.2.3.1. this part main content of operation is: script is from employing the sed order, and the corresponding position in the isolinux/isolinux.cfg file adds quoting of ks.cfg (kickstart file).Just contain in the row of " LABEL=" Neokylin " " " LABEL=" Neokylin at all " add afterwards " ks=cdrom: //ks.cfg "
3.2.3.2. main scripted code is: if [e " ${DIR}/isolinux/isolinux.cfg "]
;then sed?-i?-e?'/LABEL="Neokylin"[[:blank:]]*$/s,$,?ks=cdrom://ks.cfg,'?-e '/nomodeset$/s,$,?ks=cdrom://ks.cfg,' "${DIR}/isolinux/isolinux.cfg"
;?fi
Just this type of is installed in the configuration file at isolinux/isolinux.cfg; All contain in the row of common linux system installation parameter (for example " LABEL=" Neokylin "); add the invoke code that is directed to the kickstart file afterwards at this installation parameter (for example " LABEL=" Neokylin "); So that the linux system ISO mirror image installation procedure that this method is made is read the content of kickstart file and is accomplished auto answer realization installation automatically when need are mutual.
3.2.3.3. theing contents are as follows before the operation:
3.2.3.3.1. append?initrd=initrd.img?stage2=hd:LABEL="Neokylin"
3.2.3.3.2. append?initrd=initrd.img?stage2=hd:LABEL="Neokylin"?xdriver=vesa?nomodeset
3.2.3.4. theing contents are as follows after the operation:
3.2.3.4.1. append?initrd=initrd.img?stage2=hd:LABEL="Neokylin"
ks=cdrom://ks.cfg
3.2.3.4.2. append?initrd=initrd.img?stage2=hd:LABEL="Neokylin"?ks=cdrom://ks.cfg xdriver=vesa?nomodeset
3.2.3.5. the present invention makes up existing order, uses the shell script method, revises corresponding configuration file automatically by demand.Use shell script mkoemiso.sh of the present invention, generate oem mirror image is installed, operate very simple and fast.As long as carry out script mkoemiso.sh, for example: mkoemiso.sh/tmp/oem.ks/opt/linux.iso; Just can generate automatically a needed oem install mirror image (/tmp/oem.iso).This script has been accomplished several functions automatically: 1) import the oem.ks file automatically and install in the mirror image; 2) call the sed order and revise isolinux/isolinux.cfg automatically, be fused to oem.ks in this installation mirror image; 3) call the mkisofs order, generate needed installation mirror image automatically.
3.2.4. call the mkisofs order,, be made into linux system ISO mirror image the content among the temp directory dir1 among the 3.1..The order that operation is carried out is following: mkisofs-f-o/tmp/oem.iso-b isolinux/isolinux.bin-no-emul-boot-boot-load-size 4-boot-info-table-R-J-allow-leading-dots-V " OEM Linux "-T-l "/tmp/dir1 ".
4. like step 3 among Fig. 1, be operation mkoemiso.sh script, generated OEM Linux mirror image automatically.
Through adopting the method in this patent, can use script of the present invention to generate the method that OEM Linux installs mirror image easily.This OEM Linux installs mirror image, can not have the robotization ground of post the needed linux system of client is installed.
Only the above person is merely preferred embodiment of the present invention, when not limiting practical range of the present invention with this; So, allly change and modify according to claim of the present invention and the simple equivalent done of creation description, all should still belong in the scope that patent of the present invention contains.

Claims (7)

1. the convenient generation of ability OEM Linux method that mirror image is installed is characterized in that it comprises following steps:
1.1. select the kickstart file corresponding with OEM vendor;
1.2. select common linux system fixing disc or mirror path be installed;
1.3. operation mkoemiso.sh script generates OEM Linux mirror image is installed;
Comprise in the step 1.3: this mkoemiso.sh script of 1.3.1 imports the kickstart file automatically and installs in the mirror image; 1.3.2 this mkoemiso.sh script calls sed order is revised fixing disc automatically or the configuration file of mirror image is installed, and is fused to the kickstart file in this installation mirror image; 1.3.3 this mkoemiso.sh script calls mkisofs order generates needed installation mirror image automatically.
2. the method for claim 1; It is characterized in that: in the step 1.3; This mkoemiso.sh is a bash script; It is with the common linux system fixing disc in kickstart file in the step 1.1 and the step 1.2 or mirror path is installed is parameter, and with common linux system fixing disc or mirror image is installed is an option; This mkoemiso.sh script is ordered with sed, perhaps installs in the mirror configuration file at system's fixing disc, adds quoting the kickstart file.
3. the method for claim 1; It is characterized in that: in the step 1.3; This mkoemiso.sh script is from employing the sed order; In linux system fixing disc or installation mirror configuration file, contain in the row of common linux system installation parameter at all, after this installation parameter, add the invoke code that is directed to the kickstart file automatically.
4. the method for claim 1 is characterized in that: in the step 1.1, if the installation system boot in the MBR of hard disk, writes " bootloader--location=mbr " and " zerombr " hereof; If the installation system boot is not in the MBR of hard disk then do not write, otherwise the data on the original MBR can be capped.
5. the method for claim 1 is characterized in that: in the step 1.3, under the default situations, when not using option, be that common linux system is installed image file for linux system fixing disc or parameter that mirror path is installed wherein; If what select in the step 1.2 is common linux system fixing disc path, just must use option.
6. like claim 1,2 or 3 described methods; It is characterized in that: before carrying out the sed order; This mkoemiso.sh script is earlier the common linux system fixing disc in the step 1.2 or all the elements of mirror image; Extract a temp directory, and also together put into this temp directory to the kickstar file in the step 1.1; After this, the sed order is revised the linux system fixing disc in this temp directory or the mirror configuration file is installed.
7. method as claimed in claim 6 is characterized in that: last mkoemiso.sh script calls mkisofs order the content in the temp directory, is made into linux system ISO mirror image.
CN201110239306.9A 2011-08-19 2011-08-19 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image Active CN102455929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110239306.9A CN102455929B (en) 2011-08-19 2011-08-19 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110239306.9A CN102455929B (en) 2011-08-19 2011-08-19 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image

Publications (2)

Publication Number Publication Date
CN102455929A true CN102455929A (en) 2012-05-16
CN102455929B CN102455929B (en) 2015-03-25

Family

ID=46039142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110239306.9A Active CN102455929B (en) 2011-08-19 2011-08-19 Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image

Country Status (1)

Country Link
CN (1) CN102455929B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856343A (en) * 2012-12-05 2014-06-11 北京华胜天成科技股份有限公司 Method and system for configurating virtual machine network information
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
CN104572154A (en) * 2013-10-23 2015-04-29 北京天地超云科技有限公司 Quick deployment method for RHEL (red hat enterprise Linux) operating system and applications
CN104572468A (en) * 2015-01-20 2015-04-29 浪潮电子信息产业股份有限公司 Quick authentication test method based on NeoKylin
CN105446850A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Monitoring method and apparatus
CN106126202A (en) * 2016-06-13 2016-11-16 浪潮(北京)电子信息产业有限公司 The installation method of a kind of server OS, Apparatus and system
CN106713516A (en) * 2017-03-31 2017-05-24 山东超越数控电子有限公司 Method for quickly making mirror image of oVirt cloud platform computing node
CN107315597A (en) * 2017-07-28 2017-11-03 郑州云海信息技术有限公司 The generation method and device of a kind of operating system configuration file
CN107450934A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of method for making self-defined ESXI system images
CN108958750A (en) * 2018-06-29 2018-12-07 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and medium for installing (SuSE) Linux OS
CN116483396A (en) * 2023-06-21 2023-07-25 麒麟软件有限公司 Implementation method for multi-kckstart combined automatic installation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320473A1 (en) * 2007-06-21 2008-12-25 James Laska Methods and systems for dynamically generating installation configuration files for software
CN101763277A (en) * 2009-11-30 2010-06-30 英业达股份有限公司 Method for automatically mounting operating system
CN101916197A (en) * 2010-07-22 2010-12-15 北京东土科技股份有限公司 Method for controlling self-starting program of system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320473A1 (en) * 2007-06-21 2008-12-25 James Laska Methods and systems for dynamically generating installation configuration files for software
CN101763277A (en) * 2009-11-30 2010-06-30 英业达股份有限公司 Method for automatically mounting operating system
CN101916197A (en) * 2010-07-22 2010-12-15 北京东土科技股份有限公司 Method for controlling self-starting program of system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
闫格 等: "一种全自动建立Linux网络环境的方案设计与实施", 《漳州师范学院学报(自然科学版)》, vol. 19, no. 4, 31 December 2006 (2006-12-31), pages 45 - 49 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856343B (en) * 2012-12-05 2017-07-07 北京华胜天成科技股份有限公司 Configure the method and system of virtual machine network information
CN103856343A (en) * 2012-12-05 2014-06-11 北京华胜天成科技股份有限公司 Method and system for configurating virtual machine network information
CN104572154A (en) * 2013-10-23 2015-04-29 北京天地超云科技有限公司 Quick deployment method for RHEL (red hat enterprise Linux) operating system and applications
CN105446850A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Monitoring method and apparatus
CN104375867A (en) * 2014-11-25 2015-02-25 浪潮电子信息产业股份有限公司 Method for manufacturing ISO mirror image by customizing Linux system
CN104572468A (en) * 2015-01-20 2015-04-29 浪潮电子信息产业股份有限公司 Quick authentication test method based on NeoKylin
CN106126202A (en) * 2016-06-13 2016-11-16 浪潮(北京)电子信息产业有限公司 The installation method of a kind of server OS, Apparatus and system
CN106713516A (en) * 2017-03-31 2017-05-24 山东超越数控电子有限公司 Method for quickly making mirror image of oVirt cloud platform computing node
CN107315597A (en) * 2017-07-28 2017-11-03 郑州云海信息技术有限公司 The generation method and device of a kind of operating system configuration file
CN107450934A (en) * 2017-08-18 2017-12-08 郑州云海信息技术有限公司 A kind of method for making self-defined ESXI system images
CN108958750A (en) * 2018-06-29 2018-12-07 郑州云海信息技术有限公司 A kind of method, apparatus, equipment and medium for installing (SuSE) Linux OS
CN116483396A (en) * 2023-06-21 2023-07-25 麒麟软件有限公司 Implementation method for multi-kckstart combined automatic installation
CN116483396B (en) * 2023-06-21 2023-09-26 麒麟软件有限公司 Implementation method for multi-kckstart combined automatic installation

Also Published As

Publication number Publication date
CN102455929B (en) 2015-03-25

Similar Documents

Publication Publication Date Title
CN102455929B (en) Method for conveniently generating original equipment manufacturer (OEM) Linux installation mirror image
US8250458B2 (en) Method, system, and software tool for emulating a portal application
US7783993B2 (en) Content-based navigation and launching on mobile devices
RU2469385C2 (en) Thin client software development environment
US8533741B2 (en) Methods for launching a program application
CN108415698B (en) The method of control is added in the technical ability of voice dialogue platform
CN104375867A (en) Method for manufacturing ISO mirror image by customizing Linux system
US20080163201A1 (en) Apparatuses for launching a program application
JP6412276B2 (en) Virtual machine creation method and apparatus
JP2014191832A (en) Method for displaying pages for executing applications, and device therefor
CN104731602A (en) Method for separating Android mirror image burning process
US20060074952A1 (en) System and method to enable platform personality migration
CN111026723B (en) Big data cluster management control method and device, computer equipment and storage medium
CN104536788A (en) System and method enabling installation of application to be automatic
US20210281481A1 (en) Secure management of devices
CN106648792A (en) Method and device for installing virtualized operating system on server
Peacock Creating Development Environments with Vagrant
US20190384585A1 (en) Modification package
CN104965720A (en) Method and apparatus for installing an application
CN109634685B (en) Starting and stopping method and related device for PXE function of PCH gigabit Ethernet
KR101196748B1 (en) Data backup method in mobile telecommunication terminal equipment
JP5268390B2 (en) User operation proxy device
Dauti Installing and Configuring Windows 10: 70-698 Exam Guide: Learn to deploy, configure, and monitor Windows 10 effectively to prepare for the 70-698 exam
JP2015041179A (en) Device apparatus, control method, and computer program
Levy et al. MacOS Support Essentials 12-Apple Pro Training Series: Supporting and Troubleshooting MacOS Monterey

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