CN116719549B - Novel Linux operating system lossless upgrading method - Google Patents

Novel Linux operating system lossless upgrading method Download PDF

Info

Publication number
CN116719549B
CN116719549B CN202310963057.0A CN202310963057A CN116719549B CN 116719549 B CN116719549 B CN 116719549B CN 202310963057 A CN202310963057 A CN 202310963057A CN 116719549 B CN116719549 B CN 116719549B
Authority
CN
China
Prior art keywords
upgrading
updating
upgrade
update
flag bit
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
CN202310963057.0A
Other languages
Chinese (zh)
Other versions
CN116719549A (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.)
Kirin Software Co Ltd
Original Assignee
Kirin 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 Kirin Software Co Ltd filed Critical Kirin Software Co Ltd
Priority to CN202310963057.0A priority Critical patent/CN116719549B/en
Publication of CN116719549A publication Critical patent/CN116719549A/en
Application granted granted Critical
Publication of CN116719549B publication Critical patent/CN116719549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The novel nondestructive upgrading method for the Linux operating system comprises the following steps: after the system is started, judging the update and upgrade operation zone bit of the system; if the system is identified to be empty in the system starting process, normally entering an operating system, and setting the update and upgrade operation flag bit as environment preparation after receiving a system upgrade request; constructing a stacked file system as a root file system through an overlay fs file system; setting the system update upgrade execution software to be self-started and loaded into the system; judging whether the system updating and upgrading execution software is started normally or not, if so, judging whether a system updating and upgrading operation flag bit is a result check or not; if not, setting a system updating and upgrading operation flag bit as system upgrading; the system updating and upgrading software acquires necessary data for updating and upgrading the system and executes the operation of updating and upgrading the system. And the operation of each part is automatically converted and executed through the system updating and upgrading operation zone bit and the operation state, so that a user does not need to participate in specific operation.

Description

Novel Linux operating system lossless upgrading method
Technical Field
The invention relates to the technical field of Linux operating system upgrading, in particular to a novel lossless upgrading method for a Linux operating system.
Background
In the daily maintenance process, the Linux operating system needs to be updated and upgraded for various components, wherein when key components such as a Linux kernel, an init program, a system initialization related configuration file, a device driver and the like are updated, various problems such as incapability of starting the operating system and the like are easily caused by various anomalies in the updating and upgrading process.
As shown in fig. 1, the current linux operating system update and upgrade method mainly comprises: and acquiring system updating and upgrading data, wherein the system updating and upgrading data comprises necessary resources required by system updating/upgrading, and performing operations such as adding, deleting and modifying system files according to the updating and upgrading data so as to finish the system updating and upgrading operation. The system updating according to the updated upgrade data comprises the step of applying the updated upgrade data to the linux system through a linux specific upgrade program or manual operation.
The existing method for updating the operating system after the updated upgrade data is acquired cannot avoid destructive influence on the system due to abnormal conditions in the upgrade process and cannot avoid influence on the operating system caused by unexpected results generated after the upgrade is successful. When the operating system is damaged or unexpected system upgrading results such as serious discomfort are generated, the linux operating system is easy to have serious conditions that cannot be started, is inconvenient to recover to a normal state, and even cannot recover to a state before upgrading through a normal operation means.
Disclosure of Invention
The invention aims to provide a novel Linux operating system nondestructive upgrading method, which aims to solve the problems that the system is damaged due to abnormal conditions in the upgrading process and the operating system is influenced by unexpected results generated after the upgrading is successful in the existing Linux operating system upgrading method.
The purpose of the invention is realized in the following way:
the invention discloses a novel nondestructive upgrading method for a Linux operating system, which comprises the following steps:
s1, after a system is started, judging a system updating and upgrading operation zone bit;
if the system is empty, waiting for a request of updating and upgrading the system, and setting a flag bit of updating and upgrading the system as environmental preparation after receiving the request of updating and upgrading the system; responding to the request of the user for restarting the update immediately or restarting the update next time; step S21, if the system update operation flag bit is identified as environmental preparation in the system starting process, executing step S22-step S27;
s22, constructing a stacked file system through an overlay fs file system to serve as a root file system;
s23, setting system updating and upgrading execution software to be self-starting, and loading the system updating and upgrading execution software into a system;
step S24, judging whether the system updating, upgrading and executing software is started normally, if not, exiting and restarting the system; if yes, go to step S25-step S27;
s25, judging whether a system updating and upgrading operation flag bit is a result check; if not, executing step S26;
step S26, the self-started system updating and upgrading software sets a system updating and upgrading operation flag bit as system updating, and step S27 is executed;
step S27, the system updating and upgrading software acquires necessary data for updating and upgrading the system, executes the system updating and upgrading operation and sets the system updating and upgrading operation state.
If the system updating and upgrading operation flag bit is identified to be in a system upgrading state in the system starting process, the following process is needed:
step S31, if the system updating and upgrading operation flag bit is identified to be in the system upgrading state in the system starting process, judging whether the system updating and upgrading operation state is successful or not; if not, executing the step S32-the step S34;
s32, emptying the content of the update operation partition of the system;
s33, setting a system updating and upgrading operation flag bit to be empty;
and step S34, normally mounting the system root partition and starting the linux operating system.
In step S31, if it is determined that the system update operation status is a successful status, the following steps are executed:
s41, setting a system updating and upgrading operation flag bit as a result to check;
after the completion of step S41, step S22 to step S25 are executed.
After step S25, if it is determined that the system update upgrade operation flag bit is a result check, the following steps are executed:
step S51, setting a system updating and upgrading operation flag bit as successful upgrading.
After step S51, if it is identified that the flag bit of the system update operation is in the result checking state during the system start-up process, step S32-step S34 are executed. After step S51, if it is identified that the upgrade flag bit of the system update operation is successful in the system start process, the content of the upgrade operation partition is synchronized in the system root partition, and steps S32-S34 are executed.
In step S27, after the system update operation is completed, a system update operation state is set according to the execution result, where the system update operation state includes success, failure and exception.
After step S27 is completed, the system is exited and restarted.
The specific content of step S22 is as follows: and superposing and mounting a system root partition and a system update and upgrade operation partition through an overlay fs file system to serve as a root file system of a system update and upgrade environment, wherein the system root partition is mounted as lowerdir, and the system update and upgrade operation partition is mounted as upperdir.
The beneficial effects of the invention are as follows:
in the invention, after receiving the user update and upgrade request, the system automatically builds and enters the system update and upgrade operation running environment in the next starting process, and executes the system update and upgrade operation and update and upgrade state self-checking, and after confirming that the final system update and upgrade are successful, the result is synchronized into the actual system partition, and the original system environment is not affected by midway abnormal exit or update and upgrade failure. The whole process automatically converts and executes each part of operation through the system updating and upgrading operation zone bit and the operation state, and a user does not need to participate in specific operation, so that the method is simple, convenient and safe.
Drawings
FIG. 1 is a schematic diagram of a related art structure of the present invention;
FIG. 2 is a flowchart of a method for lossless upgrade of a Linux operating system according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The invention relates to a novel nondestructive upgrade method for a Linux operating system, which is shown in figures 1-2 and comprises the following steps:
1. and after the system is started, judging the update and upgrade operation flag bit of the system. In this embodiment, after the system is started, the UPGRADE STATUS description file UPGRADE-STATUS stored in the specified location of the hard disk is read, and whether the UPGRADE operation flag bit upgrade_status_mask of the system is empty is determined. If the description file does not exist or the UPGRADE_STATUS_MASK value is null, a request for a system update UPGRADE is awaited. After receiving the request for waiting for updating and upgrading the system, the system updating and upgrading operation flag bit upgrade_status_mask is set to be the environment ready state upgrade_preparation (as shown in fig. 2).
In response to the user restarting the update immediately or restarting the update request next time.
2. And if the system is restarted after the previous operation is completed and the system update and upgrade operation flag bit is identified to be environment preparation in the system starting process, executing the steps 3-8.
3. And constructing a stacked file system as a root file system through an overlay fs file system. The specific contents are as follows: and superposing and mounting a system root partition and a system update and upgrade operation partition through an overlay fs file system to serve as a root file system of a system update and upgrade environment, wherein the system root partition is mounted as lowerdir, and the system update and upgrade operation partition is mounted as upperdir. The partition file system type and the root partition file system type do not need to be consistent in the system updating and upgrading operation. More specifically, the following is:
creating an upgrade partition mounting point and mounting a system upgrade operation partition to the catalog in a readable and writable mode, such as/sysroot_upper; and (3) clearing the system updating and upgrading operation partition, namely deleting/sysroot_upper/directory content, and respectively creating an overlayfs stack mounting work directory, such as/sysroot_upper/upper,/sysroot_upper/work.
Creating a temporary mounting point of the root partition and mounting the original operating system root partition to the temporary mounting point in a read-only mode, such as/sysroot_ro. And superposing and mounting the root partition and the system updating and upgrading operation partition through the overlayfs file system to create a new readable and writable root file system rootfs consistent with the original system, wherein the mounting point of the root partition is used as lowerdir, and the system updating and upgrading operation partition is used as upperdir.
Such as: bin/mount-t overlay-o
lowerdir=/sysroot_ro,upperdir=/sysroot_upper/upper,workdir=/sysroot_upper/work overlay ${rootmnt};
Wherein $ { rootmnt } is the root file system rootfs after superposition. It should be noted that the type of the partition file system of the system update and upgrade operation and the type of the root partition file system do not need to be consistent (i.e. the type of the partition file system of the system update and upgrade operation and the type of the root partition file system may be consistent or inconsistent), only the overlayfs mount needs to be satisfied, and no special requirement is required, and all of ext3, ext4, xfs and the like may be required.
4. Setting the system update upgrade execution software to be self-starting and loading the system into the system.
In this embodiment:
setting the system update upgrade execution software to be self-starting, including copying a system md service file of the system update upgrade execution software to a/etc/system md/system related directory and enabling the service to automatically start the update upgrade execution software; or adding the execution software start script conforming to the SysV management format into the/etc/init.d catalog and enabling the execution software start script to realize self-start along with the completion of the system through SysV-rc-conf.
A system service file refers to a configuration file that can be recognized by a system and launch a particular program service by its content, such as:
/etc/systemd/system/multi-user.target.wants/system-upgrade.service。
after the system updating and upgrading execution software is automatically started along with the system service initialization, the init is started to the rootfs generated by the color to the upper part, and the system service is loaded through the init program to complete the system initialization.
5. Judging whether the system updating, upgrading and executing software is started normally or not, if not, exiting and restarting the system; if yes, go to step 6-step 8.
6. Judging whether the system updating and upgrading operation flag bit is a result check. And determining the next operation by judging the update operation flag bit through the self-started system update and update execution software. The self-started system updating and upgrading execution software judges and executes the system updating and upgrading operation and the system running environment state self-checking. If not, executing the steps 7-8.
7. And setting a system updating and upgrading operation flag bit for system upgrading by the self-started system updating and upgrading software.
8. The system updating and upgrading software acquires necessary data for updating and upgrading the system, executes the system updating and upgrading operation and sets the system updating and upgrading operation state. In this embodiment, the system update upgrade software interacts with and obtains relevant information of system upgrade and corresponding upgrade patch from the system update upgrade server, and executes the system update upgrade operation.
The system update upgrade operation includes system update upgrade patch verification, and system update upgrade patch execution. Verifying the system update upgrade patch includes verifying whether the system update upgrade patch is legal through a signature attached to the upgrade system, ignoring the illegal update upgrade patch, and terminating the system update upgrade. And executing the system updating upgrade patch, namely decompressing the patch file after the patch verification is completed, executing an upgrade patch script in the patch, placing the file in the patch at a designated position, and updating and modifying the system file according to the patch script.
In step 8, the specific contents of the system update and upgrade operation state are: the upgrade operation state of the system, including success, failure and abnormality (default null value), needs to be set according to the execution result.
Thereafter, the system is exited and restarted. In this embodiment, the system is restarted: including manual or automatic execution of the reboot system operation by the system software.
9. After restarting the system, the operation of determining the update and upgrade operation flag bit in step 1 is re-executed, and as shown above, in the previous operation, the update and upgrade operation flag bit is set to be the system upgrade in step 7, so in the process of starting the system, when the system update and upgrade operation flag bit is identified to be the system upgrade state, the following process is required at this time:
judging whether the system updating and upgrading operation state is successful or not: if not, the system is emptied to update the content of the upgrade operation partition. In this embodiment, the system update upgrade operation partition content is emptied, including mounting the system update upgrade operation partition and then emptying all the contents of the partition, or directly formatting the partition without mounting; setting a system updating and upgrading operation flag bit to be null; and normally mounting the system root partition and starting the linux operating system.
If the system updating operation state is judged to be a successful state, executing the following steps: setting a system updating and upgrading operation zone bit as a result check; step 3-step 6 above is re-executed, at this time, step 6 will determine that the update upgrade operation flag bit is checked as a result (indicating that the running result of the system update upgrade operation software identifies this state, and also indicates that the update upgrade operation software is running normally, and checks that the running environment state of the system application is passing), in which case step 10 will be executed.
10. Setting the update and upgrade operation flag bit as successful in upgrade, restarting the system, and then re-entering the judgment in the step 1, at this time, judging that the update and upgrade operation flag bit is successful in upgrade, and executing the following operations: synchronizing the system update upgrade operation partition content into the system root partition; and (5) emptying the content of the update operation partition of the system. In this embodiment, the system update upgrade operation partition content is emptied, including mounting the system update upgrade operation partition and then emptying all the contents of the partition, or directly formatting the partition without mounting; setting a system updating and upgrading operation flag bit to be null; and normally mounting the system root partition and starting the linux operating system.
In this embodiment, synchronizing the content of the system update upgrade operation partition into the system root partition includes respectively mounting the system root partition and the system update upgrade operation partition to mounting points, such as/sysroot and/sysroot_upgrade, and synchronizing the content of the system update operation partition into the system root partition through rsync, such as/usr/bin/rsync-aHAX/sysroot_upgrade// sysroot/.
In summary, the novel Linux operating system lossless upgrade technical method mainly relates to four parts, a system update upgrade environment preparation part, a system update upgrade operation part, a system update upgrade result verification part and a system update upgrade result synchronization part. The system updating and upgrading environment preparation part mainly comprises system upgrading operation confirmation, setting of a system updating and upgrading operation flag bit, and system root partition and system updating and upgrading operation partition which are mounted through overlapping of an overlay fs file system. The system updating and upgrading operation part mainly comprises the acquisition of updating and upgrading data, the execution of system updating and upgrading operation and the setting of updating and upgrading states. The system updating and upgrading result checking part mainly comprises checking of updating and upgrading operation states, self-checking of system running states and setting of final result zone bits of system updating and upgrading. The system updating and upgrading result synchronizing part mainly comprises judging of a final result of system updating and upgrading, synchronizing of a system updating and upgrading operation result and emptying of a system updating and upgrading operation flag bit.
The novel Linux operating system lossless upgrading technical method is mainly realized in the way that after a system updating and upgrading request is received, a system updating and upgrading operation zone bit is set to be in an environment preparation state; responding to the request of the user for restarting the update immediately or restarting the update next time; if the system updating and upgrading operation mark is identified as an environment preparation state in the system starting process, the system root partition and the system updating and upgrading operation partition are overlapped and mounted through the overlayfs file system to serve as a root file system of a system updating and upgrading environment, and meanwhile, a system updating and upgrading software self-starting file is copied to a system self-starting service directory to enable the system updating and upgrading operation software to realize self-starting, and the system is normally started; setting a system updating and upgrading operation flag bit of the self-started system updating and upgrading software as a system upgrading state, acquiring necessary data for system updating and upgrading by the system updating and upgrading software, executing system updating and upgrading operation, setting the system updating and upgrading operation state as success or failure after the operation is finished, and automatically executing restarting of the system; judging whether the system updating and upgrading operation state is successful or not when the system updating and upgrading operation zone bit is identified as the system upgrading state in the system starting process, if the operation state is not acquired or fails, directly discarding the content of the system updating and upgrading operation zone, setting the system updating and upgrading operation zone bit as null and normally starting the linux operating system; if the system updating and upgrading operation state is obtained to be successful, setting a system updating and upgrading operation zone bit as a result checking state, mounting a system root partition and a system updating and upgrading operation partition as a root file system through overlapping of overlayfs again, starting a linux operating system, and setting the system updating and upgrading operation zone bit as a successful upgrading and restarting the system when the self-started system updating and upgrading operation software recognizes that the system updating and upgrading operation zone bit is the result checking state; when the system updating and upgrading operation zone bit is identified to be in a result checking state in the system starting process, the content of the system updating and upgrading operation zone is directly discarded, the system updating and upgrading operation zone bit is set to be empty, and a linux operating system is normally started; and when the system updating and upgrading operation zone bit is identified to be successful in the system starting process, synchronizing the content of the system updating and upgrading operation zone into a system root zone, setting the system updating and upgrading operation zone bit to be null, and normally starting the linux operating system.
overlayfs is a stacked file system that relies on and builds on top of other file systems, simply "merging" different directories in the underlying file system. The invention achieves the effect that the upper file system is actually operated and the lower file system is not affected through overlapping fs.
When the self-started system updating and upgrading operation software identifies that the system updating and upgrading operation flag bit is in a result checking state, the system updating and upgrading operation flag bit is set to be successful in upgrading. The mechanism is that the running state of the self-started system updating and upgrading operation software is used as an index of normal system starting and normal running of an application program, and the system updating and upgrading operation software can represent that the system state is basically normal without great abnormal risk.
Overall, the following:
the invention superimposes the system root partition and the system update and upgrade operation partition through the overlay fs file system as a new operating environment system root file system, wherein the system update and upgrade partition is mounted as overlayfs upperdir. The system updating and upgrading operation partition is used as a blank partition for each upgrading operation, so that the file system built after each overlapping and mounting of overlayfs is ensured to be consistent with the original root partition file system environment, and therefore the system updating and upgrading operation is basically consistent with the upgrading operation in the original system environment, and special system upgrading patches are not required to be manufactured;
in the invention, the system updating and upgrading operation environment is automatically built and entered, and the system automatic updating and upgrading operation and the system running basic state check are realized through the self-starting system updating and upgrading operation software;
in the invention, the upgrade result of the system is stored in the independent partition, and the upgrade success is confirmed to have no influence on the basic running state of the system and then is synchronized into the actual root partition, thereby greatly increasing the upgrade safety of the system. In the face of abnormal interruption in the updating and upgrading process of the system, the scenes such as updating and upgrading failure can ensure that the original operating system environment is not destroyed. The whole process does not need special intervention of personnel, and the operation and maintenance guarantee cost is greatly reduced.
According to the novel Linux operating system lossless upgrading method, a special Linux operating system running operating environment is created, the achievement of the operating system upgrading operation completed in the environment is not directly written into a Linux operating system root partition, when the upgrading operation is interrupted or the upgrading operation is completed, the influence of the upgrading operation result on a system is checked first, if the system can reach an expected state, updated content is synchronized into the Linux operating system root partition, and otherwise, the updated content is discarded. On the basis of various linux operating systems, on one hand, abnormal results in the process of updating and upgrading the system can be prevented from being directly written into a system root partition; on the other hand, the updated system state can be automatically checked, and if the system is abnormal, the state of the system before updating and upgrading can be kept unchanged; finally, the invention has a certain effect on the upgrade and maintenance of the upper layer application installed on the linux operating system, and greatly reduces the operation and maintenance cost of the system and the application production environment.
The beneficial effects achieved by the invention are as follows:
after receiving a user updating and upgrading request, automatically constructing and entering a system updating and upgrading operation running environment in the next starting process, executing system updating and upgrading operation and updating and upgrading state self-checking, and synchronizing results into an actual system partition after confirming that the final system updating and upgrading is successful, wherein the original system environment is not affected by midway abnormal exit or upgrading failure; the system updating and upgrading operation environment automatically built after receiving the system upgrading requirement every time is basically consistent with the original system environment, and a system upgrading patch is not required to be specially manufactured; the whole process automatically converts and executes each part of operation through the system updating and upgrading operation zone bit and the operation state, and a user does not need to participate in specific operation, so that the method is simple, convenient and safe.
In addition, the system updating and upgrading operation flag bit is set to ensure high reliability of system upgrading, and the other four states except for the normal state are respectively:
preparing environment: indicating that an upgrading environment is needed in the starting process, and after the starting process is started, anticipating that the system is to be upgraded; and (3) upgrading a system: the system upgrade flag bit is mainly used for judging whether upgrade operation is executed or not, and is convenient to execute upgrade, and then the system upgrade flag bit is switched into a result checking state after restarting; the next system starting process after the system is upgraded is to check the upgrading result, so that the system can be started normally after the upgrading operation is successfully executed; results inspection: if the system upgrade is truly successful, the system upgrade is not determined by the set operation state after the system upgrade is executed, and the operation state only represents that the upgrade operation is normally completed; the success of the system upgrade also needs to be judged by whether the system is normally started or not, so that the result check is a start process check, and after the system upgrade operation is finished, the system can not normally start certain application software (upgrade program itself) to judge whether the system can be normally started or not, so that the system upgrade is a very critical content of lossless upgrade, and only in the state of the result check flag bit, the system upgrade software can set the system upgrade flag bit as successful upgrade; the upgrade is successful (after the result check passes, the upgrade operation flag is set to upgrade success this flag is to tell the upgrade program to synchronize the upgrade result into the root partition, and the flag is cleared immediately after the operation is completed to represent the end of the upgrade).
In summary, the above flag bit is actually four stages of the flag upgrading operation, where the system upgrading flag bit and the result checking flag bit are both the function of converting the upgrading state, and meanwhile, it can be ensured that in the whole process, if there is an artificial forced shutdown or sudden power failure, the system upgrading program can still be continuously and reliably executed at the next start.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (6)

1. The novel nondestructive upgrading method for the Linux operating system is characterized by comprising the following steps of:
s1, after a system is started, judging a system updating and upgrading operation zone bit;
if the system is empty, waiting for a request of updating and upgrading the system, and setting a flag bit of updating and upgrading the system as environmental preparation after receiving the request of updating and upgrading the system; responding to the request of the user for restarting the update immediately or restarting the update next time; step S21, if the system update operation flag bit is identified as environmental preparation in the system starting process, executing step S22-step S27;
s22, constructing a stacked file system through an overlay fs file system to serve as a root file system;
s23, setting system updating and upgrading execution software to be self-starting, and loading the system updating and upgrading execution software into a system;
step S24, judging whether the system updating, upgrading and executing software is started normally, if not, exiting and restarting the system; if yes, go to step S25-step S27;
s25, judging whether a system updating and upgrading operation flag bit is a result check; if the system updating and upgrading operation flag bit is judged to be checked as a result, executing a step S51, wherein the step S51 is to set the system updating and upgrading operation flag bit to be successful; if not, executing step S26;
step S26, the self-started system updating and upgrading software sets a system updating and upgrading operation flag bit as system updating, and step S27 is executed;
step S27, the system updating and upgrading software acquires necessary data for updating and upgrading the system, executes the system updating and upgrading operation and sets the system updating and upgrading operation state;
restarting after the system updating and upgrading operation is finished, if the system updating and upgrading operation flag bit is identified to be successful in upgrading in the system starting process, synchronizing the content of the system updating and upgrading operation partition into a system root partition and executing steps S32-S34; if the system updating operation flag bit is identified to be in the system updating state in the system starting process, the following process is needed:
step S31, if the system updating and upgrading operation flag bit is identified to be in the system upgrading state in the system starting process, judging whether the system updating and upgrading operation state is successful, and if not, executing the steps S32-S34;
s32, emptying the content of the update operation partition of the system;
s33, setting a system updating and upgrading operation flag bit to be empty;
and step S34, normally mounting the system root partition and starting the linux operating system.
2. The method for lossless upgrade of a novel Linux operating system according to claim 1, wherein in step S31, if it is determined that the system upgrade operation status is a successful status, the following steps are performed:
s41, setting a system updating and upgrading operation flag bit as a result to check;
after the step S41 is completed, the step S22-the step S25 are executed;
after step S25, if it is determined that the system update upgrade operation flag bit is a result check, the following steps are executed:
step S51, setting a system updating and upgrading operation flag bit as successful upgrading.
3. The method for non-destructive upgrade of a novel Linux operating system according to claim 1, wherein after step S51, if it is identified that the system upgrade operation flag bit is in the result check state during the system start-up process, steps S32-S34 are performed.
4. The method for lossless upgrade of a novel Linux operating system according to claim 1, wherein in step S27, after the system update upgrade operation is completed, a system update upgrade operation state is set according to an execution result, and the system update upgrade operation state includes success, failure and abnormality.
5. The method for non-destructive upgrade of a novel Linux operating system according to claim 1, wherein after step S27 is completed, the system is exited and restarted.
6. The novel Linux operating system lossless upgrade method according to claim 1, wherein the specific content of step S22 is: and superposing and mounting a system root partition and a system update and upgrade operation partition through an overlay fs file system to serve as a root file system of a system update and upgrade environment, wherein the system root partition is mounted as lowerdir, and the system update and upgrade operation partition is mounted as upperdir.
CN202310963057.0A 2023-08-02 2023-08-02 Novel Linux operating system lossless upgrading method Active CN116719549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310963057.0A CN116719549B (en) 2023-08-02 2023-08-02 Novel Linux operating system lossless upgrading method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310963057.0A CN116719549B (en) 2023-08-02 2023-08-02 Novel Linux operating system lossless upgrading method

Publications (2)

Publication Number Publication Date
CN116719549A CN116719549A (en) 2023-09-08
CN116719549B true CN116719549B (en) 2023-11-28

Family

ID=87868185

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310963057.0A Active CN116719549B (en) 2023-08-02 2023-08-02 Novel Linux operating system lossless upgrading method

Country Status (1)

Country Link
CN (1) CN116719549B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1300761A1 (en) * 2001-10-04 2003-04-09 Brendan Tschabold Methods for upgrading or updating data and software on computers
CN102243594A (en) * 2011-07-26 2011-11-16 重庆大唐科技股份有限公司 Method for safely and remotely upgrading embedded Linux system software
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN106598781A (en) * 2016-11-30 2017-04-26 惠州华阳通用电子有限公司 System software upgrading method
CN114003258A (en) * 2021-10-29 2022-02-01 武汉深之度科技有限公司 Software upgrading method, computing equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1300761A1 (en) * 2001-10-04 2003-04-09 Brendan Tschabold Methods for upgrading or updating data and software on computers
CN102243594A (en) * 2011-07-26 2011-11-16 重庆大唐科技股份有限公司 Method for safely and remotely upgrading embedded Linux system software
CN104461594A (en) * 2013-09-22 2015-03-25 杭州海康威视数字技术股份有限公司 Updating method and device of embedded operating system
CN106598781A (en) * 2016-11-30 2017-04-26 惠州华阳通用电子有限公司 System software upgrading method
CN114003258A (en) * 2021-10-29 2022-02-01 武汉深之度科技有限公司 Software upgrading method, computing equipment and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Linux智能手机上自动升级模块的设计与实现;胡祝华,赵瑶池,胡诗雨;《工业控制计算机》;第第25卷卷(第第6期期);全文 *

Also Published As

Publication number Publication date
CN116719549A (en) 2023-09-08

Similar Documents

Publication Publication Date Title
US9792105B2 (en) Method and system for booting and automatically updating software, and recovering from update error, and computer readable recording medium storing method
US8156373B2 (en) System for disaster recovery backup and a method thereof
CN107809324B (en) Vehicle-mounted automatic diagnosis system equipment and upgrading method thereof
CN109062594A (en) A kind of method that automobile ECU program automatic safe upgrades under embedded QNX/Linux
CN101158906A (en) Customer terminals program automatic update method
US20080209261A1 (en) Data repair and synchronization method of dual flash read only memory
CN109032838B (en) Automatic verification method for consistency of backup and recovery data of virtual machine
CN102163167A (en) Method and device for rescuing system
CN102455954A (en) Power-failure-preventing upgrading method of Linux system
CN106020884A (en) Network camera system online update method
WO2016078060A1 (en) Multi-system terminal system updating method, updating device and terminal
CN113254048B (en) Method, device and equipment for updating boot program and computer readable medium
WO2020029967A1 (en) Method and apparatus for repairing fault in operating system
KR20170067826A (en) Updating of firmware
CN103092659A (en) Digital signal processor (DSP) software upgrading system and upgrading method separated from support environment of emulator
EP2575037A1 (en) Generation apparatus, generation method and computer readable information recording medium
CN114741096A (en) Upgrade processing method, device and storage medium
CN116719549B (en) Novel Linux operating system lossless upgrading method
JP2005284902A (en) Terminal device, control method and control program thereof, host device, control method and control program thereof, and method, system, and program for remote updating
CN104702633A (en) Version updating method and version updating device
CN115437818A (en) Automatic restoration method, system, storage medium and equipment for VxWorks system start failure
CN112764789A (en) Distributed software upgrading method and node
CN100504787C (en) Virtual executing method for installing software, and system
CN110659052B (en) Method and system for updating system software in network equipment and readable storage medium
JP2003280963A (en) Document management system, restoration method, program for performing restoration, and recording medium with program recorded thereon

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
GR01 Patent grant
GR01 Patent grant