Factory backup method and device for domestic operating system

Automatically deploying customized operating systems on target computers through the MES server and generating backup instructions files, solving the problem of losing customized software and configuration in case of user system failure, realizing fast and reliable factory backup and recovery, and meeting the requirements of automated site passing , improves productivity and backup integrity.

CN119311472APending Publication Date: 2025-01-14ZIGUANG COMPUTER TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411341372.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

When a user system fails, downloading the standard image from the official website for recovery may result in loss of key customized software and configurations, affecting the normal operation of the business.

Method used

Provide a factory backup method for domestic operating systems, automatically deploying customized operating systems on target computers through MES servers, triggering UnisPareted.sh and UnisInstall.sh scripts for partitioning operations and lightweight operating system installation, and generating FactoryBackup.ini files to Record the backup instructions, and perform factory backup operations when the factory equipment is restarted through the BIOS system, and report the backup results to the MES server.

Benefits of technology

Ensures the purity and integrity of backups, provides solutions that quickly restore to initial state, avoids the hassle of reinstallation and configuration, reduces business interruptions and losses caused by system downtime, and improves backup reliability and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311472A_ABST
    Figure CN119311472A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of system backup, in particular to a factory backup method and device for a domestic operating system, and the method comprises the following steps: after automatically deploying a customized operating system, running a UnisPareted.sh script and a UnisInstall.sh script in sequence in an OEM mode so as to perform partition operation and target lightweight operating system installation operation, and generating a FactoryBackup.ini file; the method comprises the following steps: starting a FactoryBackup.ini file, then restarting target factory equipment, reading backup indication information of the FactoryBackup.ini file through a BIOS (Basic Input / Output System), executing factory backup operation, and finally reporting a factory backup result to an MES (Manufacturing Execution System) server. According to the scheme, the automatic station crossing requirement is met, large-scale deployment is achieved, the production efficiency is improved, customized software needs can be recovered when the system is recovered, and the trouble of reinstallation and reconfiguration is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of system backup, and in particular to a factory backup method and device for a domestic operating system. Background Art

[0002] Against the backdrop of the evolving global technological landscape and increasingly fierce competition in core technologies, promoting the research and development and application of domestic operating systems has become one of the important strategies to enhance the industry's independent and controllable capabilities.

[0003] Domestic operating systems are not only designed to provide functions and performance comparable to international mainstream systems, but also pay more attention to security, compatibility and customization capabilities to meet the specific needs of users in different industries. For large customer groups such as corporate users, government agencies, education and research institutions, it is crucial to ensure that the system can be installed smoothly and contains all necessary customization content during the operating system deployment process. At present, the factory MES (manufacturing execution system) server uses PXE (pre-boot execution environment) technology to achieve automatic installation and deployment of the operating system, greatly improving deployment efficiency. However, once the user system fails, if only the standard image is downloaded from the official website for recovery, key customized software and configurations may be lost, affecting the normal operation of the business.

[0004] Therefore, it is particularly important to perform a factory backup of the initial system after system deployment is completed. Summary of the invention

[0005] In view of this, the present invention provides a factory backup method and device for a domestic operating system to solve the problem that when a user system fails, if only a standard image is downloaded from the official website for recovery, key customized software and configurations may be lost, affecting the normal operation of the business.

[0006] In a first aspect, the present invention provides a factory backup method for a domestic operating system, the method comprising:

[0007] Configuring an MES server and automatically deploying a customized operating system on a target computer through the MES server;

[0008] In OEM mode, the MES server triggers the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer to perform partition operations and target lightweight operating system installation operations;

[0009] In OEM mode, the MES server generates a FactoryBackup.ini file in the EFI partition of the target computer; the FactoryBackup.ini file includes backup instruction information;

[0010] Restarting the target factory device, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system;

[0011] After the factory backup operation is completed, the target lightweight operating system is entered to read the factory backup result, and the factory backup result is reported to the MES server.

[0012] In an optional implementation, configuring the MES server and automatically deploying the customized operating system on the target computer through the MES server includes:

[0013] The MES server is configured to automatically deploy the customized operating system of the target computer through the PXE protocol, and the target computer is placed in OEM mode.

[0014] In an optional implementation, triggering the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer by the MES server to perform partition operations and target lightweight operating system installation operations includes:

[0015] Run the UnisParted.sh script on the target computer through the MES server and perform a partition operation on the reserved hard disk space to create a reserved partition;

[0016] The UnisInstall.sh script is run on the target computer through the MES server, and the target lightweight operating system downloaded from the MES server is installed in the target computer; the target lightweight operating system is used to perform a factory backup operation and record the factory backup result when the target factory device is started or restarted.

[0017] In an optional implementation, the step of running the UnisParted.sh script on the target computer through the MES server and performing a partition operation on the reserved hard disk space includes:

[0018] Run the UnisParted.sh script on the target computer through the MES server, and check whether there is a storage backup partition in the target computer during the running process;

[0019] If the storage backup partition does not exist, create a new storage partition and format the new storage partition into FAT format;

[0020] The new storage partition is mounted and a volume label is set, and information of the new storage partition is written into a file system table to perform automatic mounting in a read-only form.

[0021] In an optional implementation, the backup indication information includes a factory backup event trigger point; the FactoryBackup.ini file also includes communication indication information with the MES server; the communication indication information includes the MES server LAN address, external network address, target computer serial number and target computer MAC address.

[0022] In an optional implementation, restarting the target factory device and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system includes:

[0023] Restarting the target factory equipment through the MES server, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system;

[0024] If the backup indication information indicates triggering a factory backup operation, the factory backup operation is performed to back up the root partition, the boot partition and the EFI partition, and the factory backup result is written into the log file of the reserved partition.

[0025] In an optional implementation, after the factory backup operation is completed, entering the target lightweight operating system to read the factory backup result, and reporting the factory backup result to the MES server includes:

[0026] After the factory backup operation is completed, enter the target lightweight operating system to read the factory backup result, and report the factory backup result to the MES server through the HTTP protocol;

[0027] If the factory backup result indicates that the factory backup is successful, the FactoryBackup.ini file is deleted; if the factory backup result indicates that the factory backup fails, the next operation instruction fed back by the MES server is obtained.

[0028] In a second aspect, the present invention provides a factory backup device for a domestic operating system, the device comprising:

[0029] A customized system deployment module, used to configure the MES server and automatically deploy the customized operating system on the target computer through the MES server;

[0030] A script execution module, used to trigger the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer through the MES server in OEM mode to perform partition operations and target lightweight operating system installation operations;

[0031] A FactoryBackup.ini file generation module, used to generate a FactoryBackup.ini file in the EFI partition of the target computer through the MES server in OEM mode; the FactoryBackup.ini file includes backup instruction information;

[0032] A factory backup operation execution module, used to restart the target factory device and read the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system;

[0033] The factory backup result reporting module is used to enter the target lightweight operating system to read the factory backup result after the factory backup operation is completed, and report the factory backup result to the MES server.

[0034] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby execute a factory backup method of a domestic operating system according to the first aspect or any corresponding embodiment thereof.

[0035] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a factory backup method for a domestic operating system according to the first aspect or any corresponding embodiment thereof.

[0036] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute a factory backup method for a domestic operating system according to the first aspect or any corresponding embodiment thereof.

[0037] The technical solution provided by the present invention may include the following beneficial effects:

[0038] The present invention can quickly and batch-install and deploy operating systems in a factory environment, meet the requirements of automated station transfer, achieve large-scale deployment, and improve production efficiency;

[0039] The present invention performs backup at the beginning of system installation, ensuring the purity and integrity of the backup. When a problem occurs in the system, a solution for quickly restoring to the initial state can be provided. If the user includes customized software requirements in the factory backup, the customized software requirements will also be restored when the system is restored, avoiding the trouble of reinstallation and configuration. When a system failure occurs, it can also be quickly restored to a normal state, thereby reducing business interruptions and losses caused by system downtime.

[0040] The BIOS-level backup of the present invention is performed at the hardware level, is independent of any operating system or software environment, has higher reliability and stability, and reduces the risk of backup data being tampered with or destroyed due to operating system vulnerabilities or malware attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 It is a flowchart of a factory backup method of a domestic operating system according to an embodiment of the present invention;

[0043] Figure 2 It is a flowchart of another factory backup method of a domestic operating system according to an embodiment of the present invention;

[0044] Figure 3 It is a flowchart of another factory backup method of a domestic operating system according to an embodiment of the present invention;

[0045] Figure 4 is a structural block diagram of a factory backup device of a domestic operating system according to an embodiment of the present invention;

[0046] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0048] According to an embodiment of the present invention, an embodiment of a factory backup method for a domestic operating system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] In this embodiment, a factory backup method for a domestic operating system is provided. Figure 1 is a flow chart of a factory backup method of a domestic operating system according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:

[0050] Step S101 , configuring an MES server, and automatically deploying a customized operating system on a target computer through the MES server.

[0051] Furthermore, the MES (Manufacturing Execution System) server is an operating system for controlling and managing production processes, which can remotely control the operating system installation process of the computer. The target computer refers to a device that needs to install a customized operating system, which runs a domestic operating system. The customized operating system is a domestic operating system and software customized for a specific purpose or a customer. In this embodiment, a customized operating system is automatically installed on the target computer through the MES (Manufacturing Execution System) server. This process usually includes the selection, configuration and installation of the operating system.

[0052] Step S102: in OEM mode, triggering the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer through the MES server to perform partitioning operations and target lightweight operating system installation operations.

[0053] Furthermore, the OEM mode is the "Original Equipment Manufacturer Mode", which is the mode of the device at the factory or customization stage. The UnisPareted.sh script is used to perform partition operations, that is, to divide the hard disk into different areas to store different data to ensure that there is enough space to install the operating system and other necessary applications. The UnisInstall.sh script is used to install the target lightweight operating system, which refers to an operating system that occupies less resources and has a fast startup speed.

[0054] Step S103, in OEM mode, generating a FactoryBackup.ini file in the EFI partition of the target computer through the MES server; the FactoryBackup.ini file includes backup instruction information.

[0055] Furthermore, the EFI (Extensible Firmware Interface) partition is a special partition on a computer hard disk for storing boot-related information. Generating the FactoryBackup.ini file is to create a FactoryBackup.ini file in the EFI partition. The FactoryBackup.ini file is a configuration file that contains backup instruction information for indicating how to perform system backup.

[0056] Step S104, restarting the target factory device, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system.

[0057] Furthermore, the BIOS system is a basic input and output system, which is the first software that runs when the computer starts up. It is responsible for initializing the hardware and loading the operating system. This embodiment restarts the target computer so that the BIOS system can perform new configuration and operation. When the target computer starts up, the BIOS system reads the backup instruction information in the FactoryBackup.ini file, and performs the backup operation of the customized operating system according to the instructions in the FactoryBackup.ini file, and backs up the current customized operating system configuration and data to a specified location so that it can be restored when needed.

[0058] Step S105, after the factory backup operation is completed, enter the target lightweight operating system to read the factory backup result, and report the factory backup result to the MES server.

[0059] Furthermore, after the customized operating system completes the factory backup operation, it restarts and enters the newly installed lightweight operating system. The BIOS system checks the backup results in the lightweight operating system to determine whether the backup is successful, and sends the backup result information to the MES server for monitoring, recording or further processing.

[0060] The purpose of this embodiment is to provide a method for implementing factory backup of a domestic operating system and satisfying automated station transfer. The system can be factory backed up after the factory MES server automatically deploys the system through PXE, so that if a problem occurs in the system during use, it is convenient for users to restore the system to the factory state. Providing factory backup is an effective means of recovering from system failures and can also effectively reduce customer complaints.

[0061] In summary, the present invention can quickly and batch-install and deploy operating systems in a factory environment, meet the requirements of automated station transfer, achieve large-scale deployment, and improve production efficiency;

[0062] The present invention performs backup at the beginning of system installation, ensuring the purity and integrity of the backup. When a problem occurs in the system, a solution for quickly restoring to the initial state can be provided. If the user includes customized software requirements in the factory backup, the customized software requirements will also be restored when the system is restored, avoiding the trouble of reinstallation and configuration. When a system failure occurs, it can also be quickly restored to a normal state, thereby reducing business interruptions and losses caused by system downtime.

[0063] The BIOS-level backup of the present invention is performed at the hardware level, is independent of any operating system or software environment, has higher reliability and stability, and reduces the risk of backup data being tampered with or destroyed due to operating system vulnerabilities or malware attacks.

[0064] In this embodiment, another factory backup method of a domestic operating system is provided. Figure 2 is a flow chart of another factory backup method of a domestic operating system according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0065] Step S201 , configuring the MES server, automatically deploying the customized operating system of the target computer through the PXE protocol, and placing the target computer in OEM mode.

[0066] For further information, see Figure 3 The flowchart of another method for factory backup of a domestic operating system is shown. In this embodiment, in the factory, the MES (manufacturing execution system) server uses PXE (pre-boot execution environment) to automatically deploy the customized image. After the deployment is completed, it stays in OEM mode. Among them, the MES server configures the PXE service and hosts the customized operating system image. Through the PXE protocol, the target computer obtains the customized image from the MES server, and the customized image includes the pre-configured customized operating system, driver and other necessary software images.

[0067] Step S202: In OEM mode, the MES server runs the UnisParted.sh script on the target computer and partitions the reserved hard disk space to create a reserved partition.

[0068] In an optional implementation, the step S202 includes:

[0069] Run the UnisParted.sh script on the target computer through the MES server, and check whether there is a storage backup partition in the target computer during the running process;

[0070] If the storage backup partition does not exist, create a new storage partition and format the new storage partition into FAT format;

[0071] The new storage partition is mounted and a volume label is set, and the information of the new storage partition is written into the file system table for automatic mounting in read-only form.

[0072] Furthermore, OEM mode is often used to automate system installation and configuration during large-scale production. Equipment manufacturers will pre-install operating systems and other necessary software so that end users can use these devices directly without having to perform cumbersome installation and configuration steps. In this embodiment, the UnisPareted.sh script is run in OEM mode. During the running of the UnisPareted.sh script, the hard disk space reserved for storing backup points in the customized operating system is operated to partition the reserved space. That is, in OEM mode, when this embodiment executes the UnisPareted.sh script, the script will process the hard disk space reserved in the system for storing backup points. The UnisPareted.sh script runs in OEM mode, triggering a series of automated configuration tasks. The script identifies the hard disk space reserved in the target computer for storing backup points. The reserved space is partitioned by the UnisPareted.sh script and divided into available partitions for subsequent storage of backup data.

[0073] This embodiment describes the execution process code of the UnisParted.sh script as follows:

[0074] First, determine whether a partition with the volume label unisbackup exists. If so, exit:

[0075] if lsblk -o PARTLABEL|grep -q "unisbackup";then;

[0076] echo "A partition named unisbackup already exists in the system, no need to create one";

[0077] exit 0;

[0078] If the unisback partition does not exist, you need to create a new partition:

[0079] echo-e"n\n\n\n+40G\nw\n"|fdisk / dev / nvme0n1;

[0080] This command will create a 40G partition at the end of the hard disk with the device path / dev / nvme0n1;

[0081] Get the device name of the new partition:

[0082] part=$(fdisk-l / dev / nvme0n1|grep"^ / dev / nvme0n1"|tail-n 1|awk'{print$1}');

[0083] This command is used to obtain the device path of the new partition, such as / dev / nvme0n1p7;

[0084] Format the new partition as fat. Currently, the BIOS can only write to hard disks in this format:

[0085] mkfs.fat$part;

[0086] The part in the above command is the variable defined in the previous step. This command will format the part partition as fat.

[0087] Set the volume label of the new partition to:

[0088] num=$(fdisk-l / dev / nvme0n1|grep"^ / dev / nvme0n1"|tail-n 1|awk'{match($1, / [0-9]+$ / );print substr($1,RSART+RLENGTH-1)}');

[0089] parted / dev / nvme0n1 name$num unisbackup;

[0090] Set a volume label for the newly created partition:

[0091] dosfslabel$part"UnisBackup";

[0092] Mount the newly created partition:

[0093] MOUNT_POINT=" / media / UnisBackup";

[0094] mkdir -p "$MOUNT_POINT";

[0095] mount$part"$MOUNT_POINT";

[0096] Get the UUID of the new partition and write the new partition information to the file system table:

[0097] UUID=$(blkid-s UUID|grep$part|awk-F'UUID=""{print$2}'|sed's / " / / g');

[0098] echo "">> / etc / fstab;

[0099] echo "#$part">> / etc / fstab;

[0100] echo "UUID=$UUID$MOUNT_POINT vfat ro,relatime,nofail 0 2">> / etc / fstab;

[0101] The above command will write the new partition information to the system file table / etc / fstab, and set the mount mode to ro (read-only). This ensures that the partition will be automatically mounted after entering the system, and is mounted in read-only mode. Users in the system cannot delete or modify files under the partition.

[0102] After running the UnisParted.sh script, you also need to copy the 99-hide-unisbackup-partitions.rules file to the / etc / udev / rules.d folder to hide the partition under the system.

[0103] In the above scheme, this embodiment first lists the volume labels of all partitions through the lsblk command, and then uses grep to check whether there is a partition named "unisbackup" (i.e., the above-mentioned storage backup partition). If it exists, the script ends. If it does not exist, the fdisk command is used to create a new partition on the device / dev / nvme0n1 with a size of 40GB. The partition list is obtained through fdisk-l, and grep and awk are used to extract the device path of the newly created partition, such as / dev / nvme0n1p7. After that, the mkfs.fat command is used to format the new partition into the FAT file system format, the partition number is extracted through fdisk-l, and the volume label is set to "unisbackup" with parted, and the dosfslabel command is used to set the volume label of the FAT partition to "UnisBackup". Next, create a mount point directory / media / UnisBackup and mount the new partition to the directory, obtain the UUID of the new partition, and write it into the / etc / fstab file so that the partition can be automatically mounted when the system starts. The mount options include read-only (ro), delay time (relatime), and no error (nofail) when the mount fails. Copy the 99-hide-unisbackup-partitions.rules file to the / etc / udev / rules.d directory to hide the partition in the system. After running, this embodiment also copies the 99-hide-unisbackup-partitions.rules file to the / etc / udev / rules.d folder to hide the partition, so that the partition is not displayed in the system to prevent user misoperation or protect the content of the partition.

[0104] Step S203, in OEM mode, the UnisInstall.sh script is run on the target computer through the MES server, and the target lightweight operating system downloaded from the MES server is installed on the target computer; the target lightweight operating system is used to perform the factory backup operation and record the factory backup result when the target factory device is started or restarted.

[0105] Further, in OEM mode, this embodiment executes the UnisInstall.sh script, which downloads the prepared small system from the MES server and installs the small system (the small system is the above-mentioned target lightweight operating system). The UnisInstall.sh script downloads a prepared small system image or installation package from the MES server. The small system is usually a customized and configured operating system or software environment suitable for specific purposes or device requirements. The UnisInstall.sh script installs the small system image on the target computer, which includes copying the file system to the hard disk, setting the boot program, configuring system settings, etc.

[0106] Step S204: in the OEM mode, a FactoryBackup.ini file is generated in the EFI partition of the target computer through the MES server; the FactoryBackup.ini file includes backup instruction information.

[0107] Furthermore, the backup indication information includes a factory backup event trigger point; the FactoryBackup.ini file also includes communication indication information with the MES server; the communication indication information includes the MES server LAN address, extranet address, target computer serial number and target computer MAC address.

[0108] Furthermore, the FactoryBackup.ini file mainly writes some necessary information to communicate with the MES server through the network. The FactoryBackup.ini file includes:

[0109] pre_test_internal_network: MES server LAN address, that is, the network communication interface address for testing the LAN where the MES server is located;

[0110] pre_test_external_network: external network address, that is, the network communication interface address for external network testing;

[0111] SN: target computer serial number, i.e. computer SN;

[0112] EventPoint: FactoryBackup, which is the factory backup event trigger point, used to identify the name or category of the event point and to track the context of the backup event;

[0113] MAC: MAC address of the target computer.

[0114] Furthermore, in OEM mode, the MES server generates a FactoryBackup.ini file in the EFI partition, which is an identification file for the BIOS to determine whether a factory backup is required. The file content is the necessary information for communication with the MES server required for automated station passing, including the address for network communication with the server, the unique identification of the machine (MAC, SerialNum) and other information.

[0115] That is to say, in OEM mode, the FactoryBackup.ini file is generated in the EFI partition of the target computer to identify whether the BIOS system needs to be backed up at the factory, ensuring that the target computer can communicate correctly with the MES server during automation and complete the factory backup task.

[0116] Step S205, restarting the target factory device, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system.

[0117] In an optional implementation, the step S205 includes:

[0118] The target factory device is restarted, and the backup instruction information of the FactoryBackup.ini file is read through the BIOS system to perform a factory backup operation on the customized operating system, including:

[0119] Restart the target factory equipment through the MES server, and read the backup instruction information of the FactoryBackup.ini file through the BIOS system;

[0120] If the backup instruction information indicates triggering a factory backup operation, the factory backup operation is performed to back up the root partition, the boot partition, and the EFI partition, and the factory backup result is written into the log file of the reserved partition.

[0121] Further, after all the above work is completed, the MES server restarts the target computer, and determines whether a factory backup is required according to the FactoryBackup.ini identification file in the BIOS system. If necessary, a factory backup is performed in the BIOS system. The backup is performed by partition, and the root partition / , boot partition and EFI partition are backed up, and the backup results are written to the log file of the reserved partition (i.e., the above log file). That is, after the MES server completes all the above work, it will send a restart signal to the target computer to start the factory backup process. When the target computer starts, the BIOS system will first read the FactoryBackup.ini file in the EFI partition, and determine whether a backup needs to be performed according to the content in the FactoryBackup.ini file. If the file indicates that a backup is required, the BIOS will perform the backup operation. The backup usually includes the root partition ( / ), which is the main storage location for the customized operating system and application programs; the / boot partition, which contains the files required to start the customized operating system; and the EFI partition, which contains the boot loader and startup configuration data. The backup data will be stored in the reserved partition on the hard disk, which has been created and formatted by the previous script (such as UnisParted.sh). After the backup is complete, the BIOS system will write the backup results to a log file in the reserved partition, including information such as the backup success or failure status, backup time, and backup data volume. The backup result log file provides a detailed record of the backup operation for subsequent verification and troubleshooting, helping manufacturers ensure the success of the backup and diagnose problems when necessary.

[0122] Step S206, after the factory backup operation is completed, enter the target lightweight operating system to read the factory backup result, and report the factory backup result to the MES server through the HTTP protocol.

[0123] Furthermore, after the factory backup is completed, the embodiment enters the small system, reads the result of the factory backup, and reports the result of the factory backup to the MES server based on the network communication of the HTTP protocol. If successful, the FactoryBackup.ini file is deleted. If failed, the MES server is waited for to return the result and the next operation to be performed is determined.

[0124] Step S207: if the factory backup result indicates that the factory backup is successful, the FactoryBackup.ini file is deleted; if the factory backup result indicates that the factory backup fails, the next operation instruction fed back by the MES server is obtained.

[0125] Furthermore, after the target computer completes the factory backup, it boots normally into the small system, which is a streamlined operating system used to perform specific tasks such as backup and reporting. After the small system is started, it reads the log file stored in the reserved partition to obtain the results of the factory backup. The small system sends the backup results as a data packet to the MES server through an HTTP request. After receiving the backup results, the MES server will perform subsequent processing. If the backup is successful, the MES server instructs the small system to delete the FactoryBackup.ini file to clear the backup mark, indicating that the backup process has been completed. After receiving the instruction from the MES server, the small system will delete the FactoryBackup.ini file under the EFI partition to complete the cleanup of the backup process. If the backup fails, the small system will wait for further instructions from the MES server. The MES server may decide whether to retry the backup, skip the backup, or take other remedial measures based on the cause of the failure and the backup strategy.

[0126] In summary, the present invention can quickly and batch-install and deploy operating systems in a factory environment, meet the requirements of automated station transfer, achieve large-scale deployment, and improve production efficiency;

[0127] The present invention performs backup at the beginning of system installation, ensuring the purity and integrity of the backup. When a problem occurs in the system, a solution for quickly restoring to the initial state can be provided. If the user includes customized software requirements in the factory backup, the customized software requirements will also be restored when the system is restored, avoiding the trouble of reinstallation and configuration. When a system failure occurs, it can also be quickly restored to a normal state, thereby reducing business interruptions and losses caused by system downtime.

[0128] The BIOS-level backup of the present invention is performed at the hardware level, is independent of any operating system or software environment, has higher reliability and stability, and reduces the risk of backup data being tampered with or destroyed due to operating system vulnerabilities or malware attacks.

[0129] In this embodiment, a factory backup device for a domestic operating system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0130] This embodiment provides a factory backup device for a domestic operating system, such as Figure 4 As shown, including:

[0131] A customized system deployment module 401 is used to configure an MES server and automatically deploy a customized operating system on a target computer through the MES server;

[0132] The script execution module 402 is used to trigger the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer through the MES server in the OEM mode to perform partition operations and target lightweight operating system installation operations;

[0133] A FactoryBackup.ini file generating module 403 is used to generate a FactoryBackup.ini file in the EFI partition of the target computer through the MES server in the OEM mode; the FactoryBackup.ini file includes backup instruction information;

[0134] The factory backup operation execution module 404 is used to restart the target factory device and read the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform the factory backup operation on the customized operating system;

[0135] The factory backup result reporting module 405 is used to enter the target lightweight operating system to read the factory backup result after the factory backup operation is completed, and report the factory backup result to the MES server.

[0136] In some optional implementations, the customized system deployment module 401 is further used to:

[0137] Configure the MES server to automatically deploy the customized operating system to the target computer through the PXE protocol and put the target computer in OEM mode.

[0138] In some optional implementations, the script execution module 402 is further used to:

[0139] Run the UnisParted.sh script on the target computer through the MES server and partition the reserved hard disk space to create a reserved partition;

[0140] The UnisInstall.sh script is run on the target computer through the MES server, and the target lightweight operating system downloaded from the MES server is installed on the target computer; the target lightweight operating system is used to perform factory backup operations and record factory backup results when the target factory device is started or restarted.

[0141] In some optional implementations, the script execution module 402 is further used to:

[0142] Run the UnisParted.sh script on the target computer through the MES server, and check whether there is a storage backup partition in the target computer during the running process;

[0143] If the storage backup partition does not exist, create a new storage partition and format the new storage partition into FAT format;

[0144] The new storage partition is mounted and a volume label is set, and the information of the new storage partition is written into the file system table for automatic mounting in read-only form.

[0145] In some optional implementations, the backup indication information includes a factory backup event trigger point; the FactoryBackup.ini file also includes communication indication information with the MES server; the communication indication information includes the MES server LAN address, external network address, target computer serial number and target computer MAC address.

[0146] In some optional implementations, the factory backup operation execution module 404 is further used to:

[0147] Restart the target factory equipment through the MES server, and read the backup instruction information of the FactoryBackup.ini file through the BIOS system;

[0148] If the backup instruction information indicates triggering a factory backup operation, the factory backup operation is performed to back up the root partition, the boot partition, and the EFI partition, and the factory backup result is written into the log file of the reserved partition.

[0149] In some optional implementations, the factory backup result reporting module 405 is further used to:

[0150] After the factory backup operation is completed, enter the target lightweight operating system to read the factory backup result, and report the factory backup result to the MES server through the HTTP protocol;

[0151] If the factory backup result indicates that the factory backup is successful, the FactoryBackup.ini file is deleted. If the factory backup result indicates that the factory backup fails, the next operation instruction fed back by the MES server is obtained.

[0152] In summary, the present invention can quickly and batch-install and deploy operating systems in a factory environment, meet the requirements of automated station transfer, achieve large-scale deployment, and improve production efficiency;

[0153] The present invention performs backup at the beginning of system installation, ensuring the purity and integrity of the backup. When a problem occurs in the system, a solution for quickly restoring to the initial state can be provided. If the user includes customized software requirements in the factory backup, the customized software requirements will also be restored when the system is restored, avoiding the trouble of reinstallation and configuration. When a system failure occurs, it can also be quickly restored to a normal state, thereby reducing business interruptions and losses caused by system downtime.

[0154] The BIOS-level backup of the present invention is performed at the hardware level, is independent of any operating system or software environment, has higher reliability and stability, and reduces the risk of backup data being tampered with or destroyed due to operating system vulnerabilities or malware attacks.

[0155] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0156] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0157] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0158] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0159] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0160] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0161] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0162] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0163] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0164] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the defined scope.

Claims

1. A factory backup method for a domestic operating system, characterized in that: The method comprises: Configuring an MES server and automatically deploying a customized operating system on a target computer through the MES server; In OEM mode, the MES server triggers the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer to perform partition operations and target lightweight operating system installation operations; In OEM mode, the MES server generates a FactoryBackup.ini file in the EFI partition of the target computer; the FactoryBackup.ini file includes backup instruction information; Restarting the target factory device, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system; After the factory backup operation is completed, the target lightweight operating system is entered to read the factory backup result, and the factory backup result is reported to the MES server.

2. The method according to claim 1, characterized in that The configuring of the MES server and automatically deploying the customized operating system on the target computer through the MES server includes: The MES server is configured to automatically deploy the customized operating system of the target computer through the PXE protocol, and the target computer is placed in OEM mode.

3. The method according to claim 1, characterized in that The triggering of the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer by the MES server to perform partition operations and target lightweight operating system installation operations includes: Run the UnisParted.sh script on the target computer through the MES server and perform a partition operation on the reserved hard disk space to create a reserved partition; The UnisInstall.sh script is run on the target computer through the MES server, and the target lightweight operating system downloaded from the MES server is installed in the target computer; the target lightweight operating system is used to perform a factory backup operation and record the factory backup result when the target factory device is started or restarted.

4. The method according to claim 3, characterized in that: The step of running the UnisParted.sh script on the target computer through the MES server and performing a partition operation on the reserved hard disk space includes: Run the UnisParted.sh script on the target computer through the MES server, and check whether there is a storage backup partition in the target computer during the running process; If the storage backup partition does not exist, create a new storage partition and format the new storage partition into FAT format; The new storage partition is mounted and a volume label is set, and information of the new storage partition is written into a file system table to perform automatic mounting in a read-only form.

5. The method according to claim 1, characterized in that The backup indication information includes the factory backup event trigger point; the FactoryBackup.ini file also includes communication indication information with the MES server; the communication indication information includes the MES server LAN address, external network address, target computer serial number and target computer MAC address.

6. The method according to claim 3, characterized in that The step of restarting the target factory device and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system includes: Restarting the target factory equipment through the MES server, and reading the backup instruction information of the FactoryBackup.ini file through the BIOS system; If the backup indication information indicates triggering a factory backup operation, the factory backup operation is performed to back up the root partition, the boot partition and the EFI partition, and the factory backup result is written into the log file of the reserved partition.

7. The method according to any one of claims 1 to 6, characterized in that: After the factory backup operation is completed, entering the target lightweight operating system to read the factory backup result, and reporting the factory backup result to the MES server, including: After the factory backup operation is completed, enter the target lightweight operating system to read the factory backup result, and report the factory backup result to the MES server through the HTTP protocol; If the factory backup result indicates that the factory backup is successful, the FactoryBackup.ini file is deleted; if the factory backup result indicates that the factory backup fails, the next operation instruction fed back by the MES server is obtained.

8. A factory backup device for a domestic operating system, characterized in that: The device comprises: A customized system deployment module, used to configure the MES server and automatically deploy the customized operating system on the target computer through the MES server; A script execution module, used to trigger the execution of the UnisPareted.sh script and the UnisInstall.sh script on the target computer through the MES server in OEM mode to perform partition operations and target lightweight operating system installation operations; A FactoryBackup.ini file generation module, used to generate a FactoryBackup.ini file in the EFI partition of the target computer through the MES server in OEM mode; the FactoryBackup.ini file includes backup instruction information; A factory backup operation execution module, used to restart the target factory device and read the backup instruction information of the FactoryBackup.ini file through the BIOS system to perform a factory backup operation on the customized operating system; The factory backup result reporting module is used to enter the target lightweight operating system to read the factory backup result after the factory backup operation is completed, and report the factory backup result to the MES server.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the factory backup method of a domestic operating system according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute a factory backup method for a domestic operating system according to any one of claims 1 to 7.

Citation Information

Cited By

  • Exception handling method and system for flash memory file system, medium and equipment

    CN121209793A