CN113377398A - Operating system upgrading method - Google Patents
Operating system upgrading method Download PDFInfo
- Publication number
- CN113377398A CN113377398A CN202110641370.3A CN202110641370A CN113377398A CN 113377398 A CN113377398 A CN 113377398A CN 202110641370 A CN202110641370 A CN 202110641370A CN 113377398 A CN113377398 A CN 113377398A
- Authority
- CN
- China
- Prior art keywords
- operating system
- target
- configuration file
- target machine
- machine
- 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
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000008929 regeneration Effects 0.000 claims abstract description 45
- 238000005192 partition Methods 0.000 claims description 27
- 230000003068 static effect Effects 0.000 claims description 10
- 238000009434 installation Methods 0.000 claims description 9
- 238000011069 regeneration method Methods 0.000 claims description 9
- 239000003999 initiator Substances 0.000 claims description 3
- 238000011084 recovery Methods 0.000 description 2
- 230000001172 regenerating effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010367 cloning Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000002349 favourable effect Effects 0.000 description 1
- 239000007858 starting material Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- 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
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Abstract
The invention provides an operating system upgrading method, which comprises the following steps: installing a target operating system on a source machine, and configuring to form a configuration file corresponding to the target operating system; backing up the target operating system by adopting regeneration software to form a master disk mirror image of the target operating system; storing regeneration software, a master disk mirror image, a configuration file and an automatic upgrading script on a host; adopting the host to log in a target machine and sending an automatic upgrading script to the target machine; and executing the automatic upgrading script in the target machine so that the automatic upgrading script executes preset operations on the regeneration software, the master disk image and the configuration file to complete the upgrading of the operating system of the target machine. The invention can quickly realize the upgrading of the operating system in a remote mode.
Description
Technical Field
The invention relates to the technical field of industrial computers, in particular to an operating system upgrading method.
Background
The special computer is usually disposed in an industrial field or other places with severe environment, and in most cases, it is very inconvenient for a maintainer to complete the operation of maintaining and upgrading an operating system by connecting and logging in machines one by one on the field when the maintainer wants to maintain and upgrade the operating system. Inefficiency and risks. Particularly, for a special computer or an industrial personal computer which is used in an industrial field and has no external display interface or USB interface, when a machine system is upgraded and maintained, a technician is often required to go to the industrial field to unpack the machine, externally connect input and output equipment, log in the machine one by one, and upgrade the system of the equipment.
Disclosure of Invention
The operating system upgrading method provided by the invention can quickly realize the upgrading of the operating system in a remote mode.
The invention provides an operating system upgrading method, which comprises the following steps:
installing a target operating system on a source machine, and configuring to form a configuration file corresponding to the target operating system;
backing up the target operating system by adopting regeneration software to form a master disk mirror image of the target operating system;
storing regeneration software, a master disk mirror image, a configuration file and an automatic upgrading script on a host;
adopting the host to log in a target machine and sending an automatic upgrading script to the target machine;
and executing the automatic upgrading script in the target machine so that the automatic upgrading script executes preset operations on the regeneration software, the master disk image and the configuration file to complete the upgrading of the operating system of the target machine.
Optionally, the process of automatically upgrading the script includes:
the automatic upgrading script at least divides a hard disk of a target machine into a new subarea;
downloading the regeneration software, the master disk mirror image and the configuration file to the new partition, and decompressing the regeneration software to the new partition;
storing the configuration file to a target address;
updating and applying the configuration file to complete the configuration of the boot;
and restarting the target machine so that the target machine is started from the new partition according to the starting guide and restores the master disk image to the target machine.
Optionally, before the updating the configuration file, the method further includes:
and backing up the original configuration file corresponding to the configuration file in the target machine.
Optionally, downloading the regeneration software, the master image, and the configuration file to the new partition includes:
and downloading the regeneration software, the master disk image and the configuration file to a new partition through a file transfer FTP service.
Optionally, restarting the target machine includes:
directing the target machine to boot from the new partition into a regeneration dragon software;
and restoring the master disk mirror image to the target machine according to the guidance of the regeneration software.
Optionally, configuring to form a configuration file corresponding to the target operating system includes:
copying the user attribute configuration file 40_ custom of the target operating system, and modifying the user attribute configuration file so that the user attribute configuration file can guide the system to enter an installation disk of the regeneration dragon software.
Optionally, modifying the user attribute profile comprises: and modifying a system initiator grub parameter in the user attribute configuration file.
Optionally, after installing the target operating system on the source machine, the method further includes: and configuring a static IP address for the target operating system.
Optionally, logging in the target machine by using the host, and sending the automatic upgrade script to the target machine includes:
and remotely logging in a target machine through a static IP (Internet protocol) by using a secure shell SSH (secure Shell) service on the host, and uploading the automatic upgrading script to the target machine through a file transfer FTP (file transfer protocol) service.
Optionally, the source machine is the same model as the target machine.
In the technical scheme provided by the invention, the target operating system installed on the source machine is backed up by the regeneration software to form the master disk mirror image, and then the operating system is upgraded by adopting the mode of restoring the target machine by the master disk mirror image and the regeneration software, so that the working efficiency is greatly improved, and the operation risk, the operation difficulty and the cost are reduced. Because the technical scheme provided by the invention adopts the mother disk mirror image, the automatic upgrading script and the regeneration software to upgrade the target machine, the host only needs to send data and files required by system upgrading, and does not need to control the target machine, so that the method can be realized by adopting one common host without arranging a server or modifying a start item of a basic input/output system bios, and has advantages in cost and operation simplicity. The method can realize the remote online system upgrade of the batch machines only with low cost investment.
Drawings
FIG. 1 is a flowchart of an operating system upgrade method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an automatic upgrade script execution method according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides an operating system upgrading method, as shown in fig. 1, including:
installing a target operating system on a source machine, and configuring to form a configuration file corresponding to the target operating system; in some embodiments, the source machine is a machine used to install and customize the target operating system according to customer needs; in some preferred embodiments, the source machine and the target machine to be upgraded are the same type of machine, so that the running environment of the target operating system is the same as that of the source machine and the target machine, which is more favorable for the smooth running of the target operating system after being installed to the target machine.
Backing up the target operating system by adopting regeneration software to form a master disk mirror image of the target operating system; in some embodiments, the player software is a free open source disaster recovery, hard disk cloning tool, and in this step, the player software is used to clone the hard disk of the source machine installed with the target operating system to form a master disk, so that the master disk is subsequently cloned to the hard disk of the target machine to complete the upgrade of the target machine.
Storing regeneration software, a master disk mirror image, a configuration file and an automatic upgrading script on a host; in some embodiments, the host is a machine for storing a master disk image, regenerating software, an automation upgrade script, and other files, and communicating with and operating on the target machine. It should be understood by those skilled in the art that in the present implementation, when one machine has the functions of both the host machine and the source machine, the host machine and the source machine may be the same machine.
Adopting the host to log in a target machine and sending an automatic upgrading script to the target machine; in some preferred embodiments, the target machine is remotely logged on via static IP using a secure shell SSH service on the host, and the automatic upgrade script is uploaded to the target machine via a file transfer FTP service.
And executing the automatic upgrading script in the target machine so that the automatic upgrading script executes preset operations on the regeneration software, the master disk image and the configuration file to complete the upgrading of the operating system of the target machine. In some embodiments, the automatic upgrade script mainly changes the starting path of the target machine into an installation disk of the regenerated software by replacing the configuration file, and then restarts the target machine. And in the restarting process of the target machine, starting from an installation disk of the regeneration software, entering the regeneration software, and then restoring the target machine according to the mirror image of the master disk.
In the technical scheme provided by this embodiment, a target operating system installed on a source machine is backed up by using a replay software to form a master disk mirror image, and then the operating system is upgraded by using a mode of restoring the target machine by using the master disk mirror image and the replay software, so that the working efficiency is greatly improved, and the operating risk, the operating difficulty and the cost are reduced. Because the technical scheme provided by the embodiment adopts the mother disk mirror image, the automatic upgrading script and the regeneration software to upgrade the target machine, the host only needs to send data and files required by system upgrading, and does not need to control the target machine, so that the host can adopt an ordinary host without arranging a server or modifying a start item of the bios, and the method has advantages in cost and operation simplicity. The method can realize the remote online system upgrade of the batch machines only with low cost investment.
As an alternative embodiment, as shown in fig. 2, the process of automatically upgrading the script includes:
the automatic upgrading script at least divides a hard disk of a target machine into a new subarea; in some embodiments, since the file needs to be stored during the restoration process, a new partition is divided in this step for storing the replay software, the master disk image, the configuration file, and the like.
Downloading the regeneration software, the master disk mirror image and the configuration file to the new partition, and decompressing the regeneration software to the new partition; in some embodiments, the spin software is decompressed to the new partition, so that when the target machine is booted from the new partition, the spin software can be booted and entered.
Storing the configuration file to a target address; in some embodiments, the configuration file is stored to a location corresponding to the system to replace the original configuration file in the target machine system, so that the configuration file can be applied in a subsequent boot process.
Updating and applying the configuration file to complete the configuration of the boot;
and restarting the target machine so that the target machine is started from the new partition according to the starting guide and restores the master disk image to the target machine.
In the embodiment, the system updating of the target machine is completed through the running of the script, manual intervention is not needed, and the operation difficulty and the risk of misoperation of the upgrading of the operating system are reduced.
As an optional implementation manner, before updating the configuration file, the method further includes: and backing up the original configuration file corresponding to the configuration file in the target machine. In some embodiments, the original configuration file is backed up, so that the file transmission process in the upgrading process can be performed again by using the original configuration file when the upgrading of the operating system fails.
As an optional implementation, downloading the regeneration software, the master image, and the configuration file to the new partition includes: and downloading the regeneration software, the master disk image and the configuration file to a new partition through a file transfer FTP service. In some embodiments, the FTP service is a service dedicated to file transfer, which can stably and safely transfer data to the target machine, and ensure successful upgrading.
As an optional implementation, after restarting the target machine, the method includes:
directing the target machine to boot from the new partition into a regeneration dragon software; in some embodiments, since the new partition decompresses the replay software, the replay software can be entered when the new partition is started, and the system is restored under the guidance of the replay software in the subsequent execution process.
And restoring the master disk mirror image to the target machine according to the guidance of the regeneration software. In some embodiments, the player software controls the whole system recovery process to recover the data of the master disk image to the system of the target machine.
As an optional implementation manner, configuring and forming a configuration file corresponding to the target operating system includes: copying the user attribute configuration file 40_ custom of the target operating system, and modifying the user attribute configuration file so that the user attribute configuration file can guide the system to enter an installation disk of the regeneration dragon software. In some embodiments, the user attribute profile 40_ store is modified to form the profile to be applied when the target machine reboots. When the system is restored, the file is covered and replaced by the corresponding user attribute configuration file in the master disk image, so that after the system is restored, the target machine cannot enter the installation disk of the regeneration software when being restarted. As a preferred embodiment, modifying the user attribute profile comprises: and modifying a system initiator grub parameter in the user attribute configuration file.
As an optional implementation, after installing the target operating system on the source machine, the method further includes: and configuring a static IP address for the target operating system. In the system upgrading process, the connection between the host and the target machine needs to be carried out by adopting a static IP address, and the static IP is configured for the system, so that the system can be used in the next system upgrading process, and a foundation is provided for the next system upgrading.
Based on the above embodiments, an exemplary implementation is as follows:
and installing the target operating system to be upgraded on the source machine according to the requirements of the client.
And after the target operating system is installed, configuring a static IP for the network card of the target operating system.
Copying a user attribute configuration file under a target operating system/etc/grub.d/' directory, namely a 40_ custom file, editing the file, and adding a starter parameter, namely a grub parameter, into the file so that the system can be correctly guided to enter a regeneration dragon installation disk and automatically restored.
And backing up the configured system as a master disk in a partition-to-image mode by using regeneration software.
And copying the backup master disk image, the regeneration software, the edited 40_ custom file and the automatic upgrade script to the host.
And remotely logging in the target machine through static IP by using an SSH service on the host computer, and uploading the automatic upgrading script to the target machine through an ftp service.
Running an automatic upgrading script in the target machine, the script will automatically complete the following work:
the script firstly carries out partition operation on the hard disk;
mounting the newly divided partitions to the mnt directory;
downloading a required system image file through ftp service, regenerating a dragon installation file and a configured 40_ custom file;
decompressing the regeneration dragon installation file into a new partition;
for the convenience of differentiation, live (new partition) under "/mnt/" is renamed to "clonezillar-live";
in order to avoid the problem in the system upgrading process, backing up a 40_ custom original file in a target machine in advance;
copying a 40_ custom file configured in advance in a source machine to a corresponding directory;
and executing an update-grub2 command to update the grub file, adding a custom starting item, restarting the machine, guiding the system to start from the regeneration dragon mounting disc, automatically restoring the system, and finishing system upgrading.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. An operating system upgrade method, comprising:
installing a target operating system on a source machine, and configuring to form a configuration file corresponding to the target operating system;
backing up the target operating system by adopting regeneration software to form a master disk mirror image of the target operating system;
storing regeneration software, a master disk mirror image, a configuration file and an automatic upgrading script on a host;
adopting the host to log in a target machine and sending an automatic upgrading script to the target machine;
and executing the automatic upgrading script in the target machine so that the automatic upgrading script executes preset operations on the regeneration software, the master disk image and the configuration file to complete the upgrading of the operating system of the target machine.
2. The operating system upgrade method according to claim 1, wherein the process of automatically upgrading a script comprises:
the automatic upgrading script at least divides a hard disk of a target machine into a new subarea;
downloading the regeneration software, the master disk mirror image and the configuration file to the new partition, and decompressing the regeneration software to the new partition;
storing the configuration file to a target address;
updating and applying the configuration file to complete the configuration of the boot;
and restarting the target machine so that the target machine is started from the new partition according to the starting guide and restores the master disk image to the target machine.
3. The os upgrade method according to claim 2, further comprising, before updating the configuration file:
and backing up the original configuration file corresponding to the configuration file in the target machine.
4. The operating system upgrade method of claim 2, wherein downloading the regeneration software, the master image, and the configuration file to the new partition comprises:
and downloading the regeneration software, the master disk image and the configuration file to a new partition through a file transfer FTP service.
5. The operating system upgrade method of claim 2, wherein restarting the target machine comprises:
directing the target machine to boot from the new partition into a regeneration dragon software;
and restoring the master disk mirror image to the target machine according to the guidance of the regeneration software.
6. The operating system upgrade method of claim 1, wherein configuring to form a configuration file corresponding to the target operating system comprises:
copying the user attribute configuration file 40_ custom of the target operating system, and modifying the user attribute configuration file so that the user attribute configuration file can guide the system to enter an installation disk of the regeneration dragon software.
7. The operating system upgrade method according to claim 6, wherein modifying the user attribute profile comprises: and modifying a system initiator grub parameter in the user attribute configuration file.
8. The operating system upgrade method according to claim 1, further comprising, after installing the target operating system on the source machine: and configuring a static IP address for the target operating system.
9. The operating system upgrade method of claim 1, wherein logging in to a target machine with the host and sending an automatic upgrade script to the target machine comprises:
and remotely logging in a target machine through a static IP (Internet protocol) by using a secure shell SSH (secure Shell) service on the host, and uploading the automatic upgrading script to the target machine through a file transfer FTP (file transfer protocol) service.
10. The operating system upgrade method according to claim 1, wherein the source machine is the same model as the target machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110641370.3A CN113377398A (en) | 2021-06-09 | 2021-06-09 | Operating system upgrading method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110641370.3A CN113377398A (en) | 2021-06-09 | 2021-06-09 | Operating system upgrading method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113377398A true CN113377398A (en) | 2021-09-10 |
Family
ID=77573024
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110641370.3A Pending CN113377398A (en) | 2021-06-09 | 2021-06-09 | Operating system upgrading method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113377398A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020124245A1 (en) * | 2000-08-14 | 2002-09-05 | Alvin Maddux | Method and apparatus for advanced software deployment |
US20020156877A1 (en) * | 2001-04-23 | 2002-10-24 | Lu James C. | System and method for the duplication of a software system onto an appropriate target computer |
CN108241550A (en) * | 2016-12-23 | 2018-07-03 | 研祥智能科技股份有限公司 | A kind of operating system backup and reduction method |
CN108958742A (en) * | 2017-05-26 | 2018-12-07 | 华为技术有限公司 | A kind of method of batch installing operating system, relevant device and system |
CN109634625A (en) * | 2018-12-17 | 2019-04-16 | 武汉烽火信息集成技术有限公司 | A kind of OpenStack dispositions method and system based on Clonezilla |
CN112527328A (en) * | 2020-12-03 | 2021-03-19 | 曙光信息产业(北京)有限公司 | System cloning method, device, electronic equipment and computer readable storage medium |
CN112559006A (en) * | 2020-12-11 | 2021-03-26 | 携程旅游网络技术(上海)有限公司 | Enterprise client automatic upgrading method, system, equipment and storage medium |
-
2021
- 2021-06-09 CN CN202110641370.3A patent/CN113377398A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020124245A1 (en) * | 2000-08-14 | 2002-09-05 | Alvin Maddux | Method and apparatus for advanced software deployment |
US20020156877A1 (en) * | 2001-04-23 | 2002-10-24 | Lu James C. | System and method for the duplication of a software system onto an appropriate target computer |
CN108241550A (en) * | 2016-12-23 | 2018-07-03 | 研祥智能科技股份有限公司 | A kind of operating system backup and reduction method |
CN108958742A (en) * | 2017-05-26 | 2018-12-07 | 华为技术有限公司 | A kind of method of batch installing operating system, relevant device and system |
CN109634625A (en) * | 2018-12-17 | 2019-04-16 | 武汉烽火信息集成技术有限公司 | A kind of OpenStack dispositions method and system based on Clonezilla |
CN112527328A (en) * | 2020-12-03 | 2021-03-19 | 曙光信息产业(北京)有限公司 | System cloning method, device, electronic equipment and computer readable storage medium |
CN112559006A (en) * | 2020-12-11 | 2021-03-26 | 携程旅游网络技术(上海)有限公司 | Enterprise client automatic upgrading method, system, equipment and storage medium |
Non-Patent Citations (3)
Title |
---|
ISEMURA, S.; SAWAI, S.; SHIMOKARIYA, N.; UCHIHASHI, H.; SEKINE, T.; FUJIKAWA, S.;: "Expess5800/BladeServer management software", NEC TECHNICAL JOURNAL, vol. 55, no. 7, 31 July 2002 (2002-07-31) * |
李春林;: "浅析使用RIS远程安装操作系统", 中国科技信息, no. 20, 15 October 2006 (2006-10-15) * |
王建;何亮;沈菊鸿;: "一种远程自动安装中标麒麟操作系统的方法", 计算机应用与软件, no. 03, 15 March 2017 (2017-03-15) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8819670B2 (en) | Automated software installation with interview | |
US6976062B1 (en) | Automated software upgrade utility | |
CN111399984A (en) | File recovery method and system based on virtual machine backup data | |
JP2005523485A (en) | Appliance server with drive partitioning scheme to accommodate increased application size | |
JP6089065B2 (en) | Update method and computer system | |
WO2017185954A1 (en) | Method, host, and system for implementing usb device management | |
CN108874459B (en) | Rapid starting method and device based on virtualization technology | |
CN105824722A (en) | Backup restoring system for computer cloud | |
WO2017124799A1 (en) | Firmware management method and device | |
CN110209525B (en) | Operating system restoration method and device | |
US20190205109A1 (en) | Computer system, baseboard management controller, and os installation method | |
CN111104147A (en) | BMC upgrading method, device, terminal and storage medium | |
WO2018049798A1 (en) | Method and apparatus for reconstructing cache partition | |
CN113391828B (en) | Method and system for realizing system disk RAID division and installing operating system | |
US10606632B2 (en) | Preventing interruption during virtual machine reboot | |
US8689048B1 (en) | Non-logging resumable distributed cluster | |
CN116400934B (en) | Project automatic deployment method based on jenkins | |
CN113377398A (en) | Operating system upgrading method | |
CN111782236A (en) | System software upgrading method and device, storage medium and all-in-one machine equipment | |
CN110795113B (en) | Redis cluster service installation method, server and medium | |
JP2011203917A (en) | Program for generating installation instructing file and installer controlling program | |
CN113934443A (en) | Software upgrading system | |
KR100792786B1 (en) | Method for os restoring of computer using backup image file | |
CN105653300B (en) | Name-oriented application system upgrading system and method | |
KR102282468B1 (en) | Apparatus and method for controlling network camera |
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 |