Operating system setting method, first electronic equipment and second electronic equipment

By setting the installation logic files of the target operating system, the installation and deployment of the operating system is automatically completed, solving the problem of complex and inefficient operating system deployment in the existing technology, and achieving efficient and accurate operating system installation.

CN119938078AInactive Publication Date: 2025-05-06BEIJING LINX SOFTWARE CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510088301.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The deployment process of existing operating systems is complex, relies on manual operation, is inefficient and error-prone.

Method used

By determining the system installation parameters corresponding to the target operating system and the second electronic device waiting to be installed, the installation logic file of the target operating system is set, and stored in the target installation and deployment of the operating system is automatically completed.

Benefits of technology

It greatly improves the installation efficiency of the operating system, reduces manual errors, and reduces labor and time costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938078A_ABST
    Figure CN119938078A_ABST
Patent Text Reader

Abstract

The invention discloses a setting method of an operating system, first electronic equipment and second electronic equipment, and generally relates to the technical field of computers. The method is applied to first electronic equipment provided with target installation equipment, the first electronic equipment comprises a target operating system, and the method comprises the following steps: determining system installation parameters of second electronic equipment corresponding to the target operating system according to the target operating system, the second electronic device is an electronic device waiting for installation of the target operating system; and setting an installation logic file of the target operating system according to the system parameters of the target operating system and the system installation parameters of the second electronic equipment, and storing the installation logic file in the target installation equipment. The installation efficiency of the target operating system can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to the field of computer technology, and more particularly to a method for setting an operating system, a first electronic device, and a second electronic device. Background Art

[0002] With the continuous development of electronic equipment operating systems, operating systems can be customized to meet different customer needs and different markets.

[0003] In the related art, for customized operating systems, the deployment process in electronic devices (such as computers) is relatively complicated, and it is often necessary to rely on manual operations to complete the entire deployment process. The deployment process is complicated, inefficient, and prone to errors. Summary of the invention

[0004] In view of the above-mentioned defects or deficiencies in the related art, it is desired to provide an operating system setting method, a first electronic device and a second electronic device, which can solve the problem that the deployment process of some operating systems in terminals (such as computers) is relatively complicated, and it often needs to rely on manual operation to complete the entire deployment process. The deployment process is complicated, inefficient, and prone to errors, thereby greatly improving the installation efficiency.

[0005] In a first aspect, a method for setting an operating system is provided, which is applied to a first electronic device provided with a target installation device, wherein the first electronic device is an electronic device including a target operating system, and the method includes: Determining, according to the target operating system, system installation parameters of a second electronic device corresponding to the target operating system, where the second electronic device is an electronic device waiting to install the target operating system, and the system installation parameters include installation firmware parameters of the second electronic device and system parameters of the second electronic device corresponding to the target operating system; According to the system parameters of the target operating system and the system installation parameters of the second electronic device, an installation logic file of the target operating system is set and stored in the target installation device, wherein the installation logic file includes: an installation trigger file corresponding to the target operating system and the second electronic device, a call partition file corresponding to the target operating system and the second electronic device, and a partition file corresponding to the target operating system and the second electronic device; The installation trigger file is used to: when a trigger input is received, instruct the target installation device to start executing the system image of the target operating system; the calling partition file is used to: when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and execute the installation process of the target operating system through the partition file.

[0006] In the present application, in a first electronic device provided with a target installation device and including a target operating system, the system installation parameters of a second electronic device corresponding to the target operating system are first determined according to the target operating system (the second electronic device is an electronic device waiting to install the above-mentioned target operating system, and the above-mentioned system installation parameters include the installation firmware parameters of the second electronic device and the system parameters corresponding to the second electronic device and the target operating system); then, according to the system parameters of the target operating system and the system installation parameters of the second electronic device, the installation logic file of the target operating system is set and stored in the target installation device; the installation logic file includes: an installation trigger file, a calling partition file and a partition file corresponding to the target operating system and the second electronic device; wherein the installation trigger file can, upon receiving a trigger input, instruct the target installation device to start executing the system image of the target operating system, and the calling partition file can, when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and execute the installation of the target operating system through the partition file. In this way, by obtaining and determining the system installation parameters corresponding to the target operating system of the second electronic device, and combining the structure and system installation parameters of the target operating system itself, the installation logic file of the target operating system is set in the target installation device. Since the installation logic file is set for the second electronic device according to the target operating system, when the target installation device is subsequently set in the first electronic device, the installation logic file can help automatically complete the installation, deployment and setting process of the target operating system, thereby avoiding the need for manual installation of the operating system, high error rate, labor cost and time cost, and greatly improving the installation efficiency of the operating system.

[0007] In a second aspect, a method for setting an operating system is provided, which is applied to a second electronic device provided with a target installation device, wherein the target installation device includes a target operating system, and the method includes: receiving a trigger input from a user for installing a logic file in the target installation device, the trigger input being used to trigger the target installation device to execute a system image of the target operating system in the second electronic device; In response to the trigger input, the system image of the target operating system is started and the partition file is called by triggering the installation trigger file in the installation logic file, and the target installation device is triggered by calling the partition file to mirror the partition file system in the second electronic device.

[0008] According to a third aspect, a first electronic device is provided, wherein the first electronic device is provided with a target installation device, the first electronic device is an electronic device including a target operating system, and the first electronic device includes: a determination module, configured to determine, according to a target operating system, system installation parameters of a second electronic device corresponding to the target operating system, wherein the second electronic device is an electronic device waiting to install the target operating system, and the system installation parameters include installation firmware parameters of the second electronic device and system parameters corresponding to the target operating system of the second electronic device; an execution module, configured to set an installation logic file of the target operating system according to system parameters of the target operating system and system installation parameters of the second electronic device, and store the file in the target installation device, wherein the installation logic file includes: an installation trigger file corresponding to the target operating system and the second electronic device, a call partition file corresponding to the target operating system and the second electronic device, and a partition file corresponding to the target operating system and the second electronic device; The installation trigger file is used to: when a trigger input is received, instruct the target installation device to start executing the system image of the target operating system; the calling partition file is used to: when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and perform the installation process of the target operating system through the partition file.

[0009] In a fourth aspect, a second electronic device is provided, wherein the second electronic device is provided with a target installation device, wherein the target installation device includes a target operating system, and the second electronic device includes: A receiving module, configured to receive a trigger input from a user for installing a logic file in the target installation device, wherein the trigger input is used to trigger the target installation device to execute a system image of the target operating system in the second electronic device; The mirror module is used to start executing the system image of the target operating system and trigger calling the partition file by triggering the installation trigger file in the installation logic file in response to the trigger input, and trigger the target installation device to mirror the partition file system in the second electronic device by calling the partition file.

[0010] In a fifth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in the first aspect or the second aspect is implemented.

[0011] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0012] In a seventh aspect, a computer program product is provided. The computer program product includes instructions, and the instructions are executed by a processor to implement the method described in the first aspect or the second aspect.

[0013] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings: Figure 1 One of the flowcharts of the method for setting the operating system provided in the embodiment of the present application; Figure 2 A schematic diagram of a partition file in a method for setting an operating system provided in an embodiment of the present application; Figure 3 A second flowchart of a method for setting an operating system provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a first electronic device provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a second electronic device provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0015] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0016] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0017] With the continuous development of electronic technology, the operating system of electronic devices is also developing. Since the needs of users are different, customized operating systems are not uncommon. Customized operating systems have been widely used in various fields, such as embedded Linux customized operating systems.

[0018] Since a customized operating system has more special programs and scripts than a conventional operating system, its deployment process often requires manual operation by professionals to complete the deployment and installation process of the completed operating system.

[0019] In the related art, assuming that the operating system is an embedded Linux customized operating system, a GRUB boot loader is often used, and the GRUB configuration and deployment process requires manual execution of each step.

[0020] Understandably, this manual operation process is often inefficient, and because it often requires professional installation, it will also increase labor costs and time costs. At the same time, manual installation is also prone to installation errors and even installation failures, resulting in poor user experience, which delays time and further reduces efficiency. This installation method lacks automation and intelligent support, which is obviously inconsistent with current needs.

[0021] Based on this, the present application proposes a method, device, equipment and medium for setting up an operating system, which can solve the problem that the deployment process of some operating systems in terminals (such as computers) is relatively complicated, and it often needs to rely on manual operation to complete the entire deployment process. The deployment process is complicated, inefficient, and prone to errors, thereby greatly improving installation efficiency.

[0022] Figure 1 It is a flowchart of a method for setting an operating system provided in an embodiment of the present application. The executor of the method may be a first electronic device provided with a target installation device, and the first electronic device is an electronic device including a target operating system.

[0023] In the embodiment of the present application, the target installation device is a movable mobile installation device having writing and outputting functions.

[0024] Exemplarily, the target installation device may be a USB flash drive or a write-on / write-off optical disk.

[0025] In the embodiment of the present application, the first electronic device may be an electronic device capable of compiling files related to the operating system.

[0026] In the embodiment of the present application, the first electronic device Exemplarily, the first electronic device may be a computer.

[0027] In one example, when the target installation device is a USB flash drive, the first electronic device is an electronic device having a USB interface.

[0028] In one example, when the target installation device is a write-out optical disc, the first electronic device can be an electronic device with an optical drive device, or an electronic device with a USB interface, and the USB interface can transmit data between the target installation device by connecting to a mobile optical drive.

[0029] like Figure 1 As shown, the method includes the following steps 301 and 302: Step 301: According to the target operating system, determine the system installation parameters of the second electronic device corresponding to the target operating system.

[0030] In the embodiment of the present application, the second electronic device is an electronic device waiting to install the target operating system.

[0031] It can be understood that in an embodiment of the present application, in order to complete the automatic installation of the target operating system in a second electronic device other than the first electronic device, it is necessary to first compile the installation logic file according to the characteristics of the target operating system itself and the characteristics of the second electronic device, so that in the subsequent process of copying and installing the target operating system to the second electronic device, the installation logic file can be used to trigger the second electronic device to automatically complete the installation of the target operating system.

[0032] Therefore, it is necessary to first obtain and determine the system installation parameters corresponding to the target operating system and the second electronic device, so that the installation logic files in the subsequent installation process of the target operating system can be confirmed according to the system installation parameters.

[0033] In the embodiment of the present application, the system installation parameters include installation firmware parameters of the second electronic device and system parameters corresponding to the second electronic device and the target operating system.

[0034] Exemplarily, the installation firmware parameters may include parameters of device firmware that the second electronic device must participate in during the installation process.

[0035] It can be understood that the embodiment of the present application requires the first electronic device to set up an installation logic file that can automatically install the target operating system on other electronic devices, such as a second electronic device. Therefore, the parameters of the above-mentioned device firmware may include kernel firmware that matches the hardware of the target operating device involved in the installation in the second electronic device, as well as a device tree that may be required.

[0036] Exemplarily, the system parameters corresponding to the target operating system may include possible installation types of the target operating system in the second electronic device.

[0037] In one example, possible installation types of the target operating system include: installing the target operating system, restoring the target operating system, backing up the target operating system, etc.

[0038] Exemplarily, the system parameters corresponding to the target operating system may also include a data classification method of the target operating system itself.

[0039] In one example, the data classification method of the target operating system itself includes: partitions of different directories in the target operating system, log storage partitions in the target operating system, and root partitions in the target operating system. These partitions can generate automated partition scripts by writing scripts, and then write them into partition files in the installation logic file.

[0040] It is understandable that when the target operating system is a customized embedded Linux operating system, storage media and partitioning schemes can be obtained according to customized requirements, including but not limited to system installation or backup recovery log storage partitions, home directory partitions, root partitions, etc.

[0041] Exemplarily, the system parameters corresponding to the target operating system may also include an installation patch file of the target operating system, and the installation patch file may be subsequently written into a partition file in the installation logic file.

[0042] In the embodiment of the present application, the target operating system may be any operating system.

[0043] In an example, the target operating system may be an embedded Linux system, wherein the embedded Linux system may be a customized, non-universal embedded Linux system.

[0044] Step 302: according to the system parameters of the target operating system and the system installation parameters of the second electronic device, set the installation logic file of the target operating system and store it in the target installation device.

[0045] It can be understood that from the foregoing content, after determining the system parameters of the target operating system and the system installation parameters of the second electronic device, the installation logic file of the above-mentioned target operating system can be set. After setting the installation logic file of the target operating system, it is stored in the target installation device, and the target installation device can be subsequently set to be used in the second electronic device.

[0046] Furthermore, when storing the installation logic file of the above-mentioned target operating system in the target installation device, the installation logic file and the system data file corresponding to the target operating system can be stored together in the target installation device; or the target installation device itself may already store the system data file corresponding to the target operating system, and only the logic file of the installation logic file of the target operating system needs to be stored, and the embodiments of the present application do not impose any restrictions on this.

[0047] In one example, when the target installation device is a USB flash drive, the USB flash drive is connected to the USB interface of the second electronic device, so that the target operating device including the installation logic file can be operated, and the target operating system can be automatically deployed in the second electronic device through the installation logic file.

[0048] In one example, when the target installation device is a CD, the CD is connected to the CD-ROM drive of the second electronic device, or the CD is placed in a mobile CD-ROM drive and connected to the USB interface of the second electronic device, so that the target operating device including the installation logic file can be operated, and the target operating system can be automatically deployed in the second electronic device through the installation logic file.

[0049] In an embodiment of the present application, the above-mentioned process of setting the installation logic file of the target operating system and storing it in the target installation device can be directly executed in the target installation device, that is, setting and storing the installation logic file in the target installation device through the first electronic device; or the installation logic file can be first set in the first electronic device, and then the installation logic file is stored in the target installation device. The embodiment of the present application is not limited to this.

[0050] In an embodiment of the present application, the above-mentioned installation logic file includes: an installation trigger file corresponding to the above-mentioned target operating system and the above-mentioned second electronic device, a calling partition file corresponding to the above-mentioned target operating system and the above-mentioned second electronic device, and a partition file corresponding to the above-mentioned target operating system and the above-mentioned second electronic device.

[0051] In an embodiment of the present application, the above-mentioned installation trigger file is used to: when a trigger input is received, instruct the above-mentioned target installation device to start executing the system image of the above-mentioned target operating system; the above-mentioned calling partition file is used to: when the above-mentioned target installation device starts executing the system image of the above-mentioned target operating system, instruct the above-mentioned target installation device to call the calling partition file and execute the installation process of the above-mentioned target operating system through the above-mentioned partition file.

[0052] It is understandable that in the embodiment of the present application, the installation logic file includes files with logical progressive relationships and different functionalities, which are installation trigger files, call partition files, and partition files. In the first electronic device, each file in the installation logic file is static file data, which will play a logical progression with each other in subsequent other electronic devices, such as the second electronic device, and automatically complete the system image. Among them, the system image may include the installation of the aforementioned target operating system, the recovery of the aforementioned target operating system, and the update of the aforementioned target operating system. The type of system image can be executed according to the scenario requirements of the second electronic device. Please refer to the subsequent content for details, which will not be repeated here.

[0053] Exemplarily, the trigger input is used to indicate: an input received in the second electronic device, that is, an input indicating the start of the installation logic file.

[0054] Furthermore, the installation trigger file is used to indicate the start of the system imaging process, and the startup action triggers the calling of the partition file, thereby calling the installation system that executes the system imaging process, and then executing and completing the installation process of the target operating system in the installation system through the partition file.

[0055] In the method provided in the embodiment of the present application, in a first electronic device provided with a target installation device and including a target operating system, the system installation parameters of a second electronic device corresponding to the target operating system are first determined according to the target operating system (the second electronic device is an electronic device waiting to install the above-mentioned target operating system, and the above-mentioned system installation parameters include the installation firmware parameters of the second electronic device and the system parameters corresponding to the second electronic device and the target operating system); then, according to the system parameters of the target operating system and the system installation parameters of the second electronic device, the installation logic file of the target operating system is set and stored in the target installation device; the installation logic file includes: an installation trigger file, a calling partition file and a partition file corresponding to the target operating system and the second electronic device; wherein the installation trigger file can, upon receiving a trigger input, instruct the target installation device to start executing the system image of the target operating system, and the calling partition file can, when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and execute the installation of the target operating system. In this way, by obtaining and determining the system installation parameters corresponding to the target operating system of the second electronic device, and combining the structure and system installation parameters of the target operating system itself, the installation logic file of the target operating system is set in the target installation device. Since the installation logic file is set for the second electronic device according to the target operating system, when the target installation device is subsequently set in the first electronic device, the installation logic file can help automatically complete the installation, deployment and setting process of the target operating system, thereby avoiding the need for manual installation of the operating system, high error rate, labor cost and time cost, and greatly improving the installation efficiency of the operating system.

[0056] In another embodiment of the present application, a specific implementation method for determining system installation parameters is also provided. Exemplarily, the specific implementation of "determining the system installation parameters of the second electronic device corresponding to the target operating system according to the target operating system" mentioned above includes: determining the system installation parameters of the second electronic device corresponding to the target operating system and setting the image boot directory for the second electronic device.

[0057] In an embodiment of the present application, the mirroring guide directory is used to generate a mirroring guide display interface in the second electronic device, and the mirroring guide display interface includes multiple display controls, and different display controls are used to indicate different mirroring modes.

[0058] It can be understood that for the possible image types of the target operating system mentioned above, including installing the target operating system, restoring the target operating system, backing up the target operating system, etc., in order to facilitate user operation in the second electronic device during subsequent actual use, an image boot directory can be set, and the image boot directory only includes all possible installation types of the above-mentioned target operating system with high readability to facilitate user selection.

[0059] Exemplarily, when the possible installation types of the target operating system include installing the target operating system, restoring the target operating system, and backing up the target operating system, the image boot directory may include display controls corresponding to the three options: installing, restoring, and backing up.

[0060] Furthermore, the above-mentioned display control may correspond to different modes of operating the control. For example, the display control may be operated by actual contact (such as clicking), or may include non-contact operations, such as voice operations. The embodiment of the present application does not limit the control mode of the display control.

[0061] For example, the multiple display controls include: "install" control and "recover" control. In the subsequent process of installing the target operating system, the second electronic device displays "install", and the user can enter the system installation mode by selecting the control. The second electronic device displays "recover", and the user can enter the recovery mode by selecting the control. It should be noted that the control contents are not limited to the above, and the control options can be flexibly changed according to customized requirements.

[0062] In another embodiment of the present application, a specific implementation method of the installation trigger file in the setting process is also provided when the installation logic file includes the above-mentioned installation trigger file. Exemplarily, when the above-mentioned installation logic file includes the above-mentioned installation trigger file, the "setting the installation logic file of the above-mentioned target operating system and storing it in the above-mentioned target installation device" mentioned in the above text includes: compiling the above-mentioned installation sub-trigger file by the above-mentioned first compilation method, and compiling the above-mentioned jump file by the above-mentioned second compilation method; setting the first trigger relationship between the above-mentioned installation sub-trigger file and the above-mentioned jump file, and storing the above-mentioned installation sub-trigger file, the above-mentioned jump file and the above-mentioned first trigger relationship in the above-mentioned target installation device.

[0063] Exemplarily, the installation trigger file includes: the installation sub-trigger file and the jump file.

[0064] Exemplarily, the jump file is used to assist the installation initial startup file in the installation trigger file to jump to the installation sub-trigger file when receiving the trigger input, and the installation sub-trigger file is used to trigger the target installation device to start executing the system image of the target operating system.

[0065] In one example, when the target operating system is a customized embedded Linux operating system, the jump file may include a shim file; the installation sub-trigger file may include a UEFI file; and the installation initial startup file may include a grub file.

[0066] Furthermore, the above-mentioned shim file, UEFI file, and grub file may be files in the ESP partition.

[0067] Exemplarily, the first compilation mode may include one compilation mode, which may include multiple first compilation sub-modes, and different first compilation sub-modes are used to compile different files in the installation trigger file.

[0068] For example, a shim file can be generated by the shim open source software; a grub file, for example, grubaa64.efi can be generated by the grub-mkimage tool.

[0069] Next, we use the embedded Linux operating system as the target operating system to combine Figure 2 Make a description, Figure 2 Used to display the file contents of the installation trigger file and subsequent partition files.

[0070] As can be seen from the above content, the jump file may include a shim file; the above-mentioned installation sub-trigger file may include a UEFI file; the above-mentioned installation initial startup file may include a grub file. The reason for such setting is that in the subsequent process of deploying the automated deployment of the embedded Linux operating system in the second electronic device, GRUB can be regarded as a program running on UEFI. In this way, the installation and startup phase of the system image of the embedded Linux operating system can be roughly divided into three steps, and the order is: UEFI->GRUB->KERNEL. In the installation and startup phase, UEFI cannot jump directly to GRUB, but will jump through some shims. Therefore, shim is a jump file between UEFI and GRUB.

[0071] For esp partitions, grubaa64.efi is GRUB, which needs to be compiled through grub-mkimage; other efi files are shim, which can be generated by compiling open source software.

[0072] When the subsequent target installation device is set in the second electronic device and the second electronic device executes the installation and startup phase of the system image, the actual calling process of the file in the esp partition is: uefi→efi / boot / BOOTAA64.EFI→efi / boot / grubaa64.efi→efi / boot / grubaa64.efi / default.cfg→linx / grub.cfg.

[0073] In another embodiment of the present application, a specific implementation method of the partition file in the setting process is also provided when the installation logic file includes the above-mentioned partition file. Exemplarily, when the above-mentioned installation logic file includes the above-mentioned partition file, the "setting the installation logic file of the above-mentioned target operating system in the above-mentioned target installation device" mentioned above includes: compiling the first boot file, the installation startup kernel file, and the installation mode file of the target operating system through the above-mentioned second compilation method; setting the second trigger relationship between the above-mentioned first boot file, the installation startup kernel file, and the installation mode file of the target operating system, generating a data packet corresponding to the partition file, and storing the data packet and the second trigger relationship in the above-mentioned target installation device.

[0074] Exemplarily, the above-mentioned first boot file is used to trigger the installation startup kernel file of the target operating system; the above-mentioned installation startup kernel file is used to: trigger the installation subsystem and installation method file of the above-mentioned target operating system, and execute the installation process of the target operating system in the above-mentioned second electronic device through the installation subsystem according to the installation subfile in the installation method file.

[0075] In one example, when the target operating system is a customized embedded Linux operating system, the first boot file may include a grub.cfg file; the installation startup kernel file may be used to start the kernel file to call the installation subsystem, and the embedded Linux operating system is installed, restored or backed up through the installation subsystem, wherein the installation, restoration or backup correspond to different files respectively; the target operating system installation method file may include: the installation file, restoration file or backup file of the embedded Linux operating system, and subsequently the installation subsystem calls one of the files in the second electronic device to perform installation, restoration or backup. Figure 2 As shown, the installation file can be a file in the linx.system directory, and the recovery file can be a file in the back.system directory.

[0076] Furthermore, a patch package file may be included, which is used when the installation subsystem calls one of the files to perform installation, recovery or backup. The patch package file may be Figure 2For example, after the second electronic device calls the installation file, that is, the file in the linx.system directory, the user.app.patch file is called; or after the second electronic device calls the recovery file, that is, the file in the back.system directory, the user.app.patch file is called.

[0077] It should be noted that in the partition file, the function selection configuration is set for the installation subsystem. Figure 2 The function in the ramdisk function selection configuration can be used to trigger the installation subsystem and installation mode file of the above target operating system when it is used as a subsystem.

[0078] In one example, if Figure 2 As shown in the figure, the linx.system directory is the storage directory for the file system to be installed and the system initialization deployment patch, including the MD5 value under the linx.system directory.

[0079] In one example, if Figure 2 As shown in the figure, the back.system directory is the storage directory of the file system to be restored, including the MD5 value under the back.system directory.

[0080] In one example, if Figure 2 As shown in the figure, user.app.patch is the file patch of the application or configuration information that the user needs to deploy by system initialization, including the MD5 value in the user.app.patch directory.

[0081] In another embodiment of the present application, a specific implementation method of calling a partition file during the setting process is also provided when the installation logic file includes the above-mentioned calling partition file. Exemplarily, when the above-mentioned installation logic file includes the above-mentioned calling partition file, the "setting the above-mentioned installation logic file of the above-mentioned target operating system in the above-mentioned target installation device" mentioned above includes: setting a calling partition file that matches the above-mentioned installation trigger file and the above-mentioned partition file, so that after the above-mentioned installation trigger file receives the trigger input, the above-mentioned partition file can execute the system image in the installation subsystem running the above-mentioned calling partition file.

[0082] In an example, when the target operating system is a customized embedded Linux operating system, the calling partition file may be a ramdisk file.

[0083] It is understandable that after the second electronic device subsequently runs the ramdisk file, the ramdisk file is generated as a subsystem that enables the aforementioned partition file to execute the installation process. Specifically, the ramdisk file can be initialized as an init file during operation to implement the initialization mounting and debugging mode of the target operating system.

[0084] Furthermore, the mechanism of the ramdisk file can be used to automatically trigger and run the init file in the second electronic device. Therefore, the init file can be customized to implement the target installation device initialization mounting and the running conditions of the partition file installation to be executed.

[0085] It is understandable that, for the target operating system, after the partition file is prepared, the partition file can be made into an img system image, and the system image can be burned into the target installation device through the system burning software. Among them, making the partition file into an img system image can be completed by a self-built script.

[0086] Figure 3 It is a flowchart of a method for setting an operating system provided in an embodiment of the present application. The execution subject of the method may be a second electronic device provided with a target installation device, wherein the target installation device includes a target operating system.

[0087] In the embodiment of the present application, the target installation device, the target operation device, the first electronic device, and the second electronic device can refer to the above description and will not be repeated here.

[0088] like Figure 3 As shown, the method includes the following steps 401 and 402: Step 401: receiving a trigger input from a user for installing a logic file in the target installation device.

[0089] In the embodiment of the present application, the trigger input is used to trigger the target installation device to execute the system image of the target operating system in the second electronic device.

[0090] In the embodiment of the present application, the above-mentioned installation logic file can refer to the above description and will not be repeated here.

[0091] Step 402: In response to the trigger input, the system image of the target operating system is started and the partition file is called by triggering the installation trigger file in the installation logic file, and the target installation device is triggered to mirror the partition file system in the second electronic device by calling the partition file.

[0092] Optionally, in an embodiment of the present application, before the above-mentioned receiving the user's trigger input for installing the logic file in the target installation device, the operating system setting method provided in the embodiment of the present application also includes: receiving the user's first input for the installation logic file in the target installation device; in response to the first input, displaying the image boot display interface of the target operating system; receiving the user's second input for the target display control in the image boot display interface; in response to the second input, determining the target mode of the system image according to the target input.

[0093] Exemplarily, the above-mentioned method of starting to execute the system image of the target operating system by triggering the installation trigger file in the installation logic file and triggering the calling of the partition file. The operating system setting method provided in the embodiment of the present application includes: starting to execute the system image of the target operating system by triggering the installation trigger file in the installation logic file, and triggering the calling of the partition file according to the target mode of the system image.

[0094] Exemplarily, the mirroring guide display interface includes a plurality of display controls, and different display controls are used to indicate different mirroring modes.

[0095] In an example, the above-mentioned mirroring mode may include: installation, recovery, and backup.

[0096] Exemplarily, the mirroring guide display interface may refer to the above description and will not be described in detail here.

[0097] Exemplarily, the system image of the target operating system may be any one of a variety of system image modes, which is not limited in the embodiments of the present application.

[0098] The following takes the target operating system as an embedded Linux operating system as an example, combined with the above description of the installation logic file, and describes the mirroring process of the system to the second electronic device when a target installation device including the target operating system is set on the second electronic device.

[0099] When the second electronic device receives the user's first input on the installation logic file of the embedded Linux operating system in the target installation device, it will display the mirror boot display interface, which includes: "install" display control and "recover" display control, which are used to indicate the installation of the embedded Linux operating system and the recovery of the embedded Linux operating system, respectively.

[0100] 1) After the second electronic device receives the second input of the user to the "install" display control, it selects the operation of installing the embedded Linux operating system; at this time, the second electronic device will execute the automated script to initialize the system after GRUB boots into the ramdisk minimum system in the target installation device, and then verify the MD5 value of the file system under the link.system directory. If the verification passes, the system installation deployment and system initialization will begin.

[0101] 2) After the second electronic device receives the second input of the user to the "recover" display control, it selects the operation of restoring the embedded Linux operating system; at this time, the second electronic device will execute the automated script to initialize the system after GRUB boots into the ramdisk minimum system in the target installation device, and then verify the MD5 value of the file system under the back.system directory. If the verification passes, the system will be restored.

[0102] The present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the training rule determination method described in the present application is implemented. For example, the following can be executed: Figure 1 or Figure 3 The individual steps of the method are shown.

[0103] The present invention provides a computer program product, which includes instructions that are executed by a processor when the processor executes the instructions. Figure 1 or Figure 3 The individual steps of the method are shown.

[0104] It should be noted that although the operations of the method of the present invention are described in a particular order in the drawings, this does not require or imply that the operations must be performed in this particular order or that all illustrated operations must be performed to achieve desired results.

[0105] Figure 4 This is a block diagram of a first electronic device according to an embodiment of the present application. The first electronic device is provided with a target installation device, and the first electronic device is an electronic device including a target operating system. Figure 4 The device includes a first determining module 601 and an executing module 602.

[0106] A first determining module 601 is used to determine, according to a target operating system, system installation parameters of a second electronic device corresponding to the target operating system, where the second electronic device is an electronic device waiting to install the target operating system, and the system installation parameters include installation firmware parameters of the second electronic device and system parameters of the second electronic device corresponding to the target operating system; An execution module 602 is used to set an installation logic file of the target operating system according to the system parameters of the target operating system and the system installation parameters of the second electronic device, and store the file in the target installation device, wherein the installation logic file includes: an installation trigger file corresponding to the target operating system and the second electronic device, a call partition file corresponding to the target operating system and the second electronic device, and a partition file corresponding to the target operating system and the second electronic device; The installation trigger file is used to: when a trigger input is received, instruct the target installation device to start executing the system image of the target operating system; the calling partition file is used to: when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and perform the installation process of the target operating system through the partition file.

[0107] In one embodiment, the first determination module 601 is specifically used to determine the system installation parameters of the second electronic device corresponding to the target operating system, and set the image boot directory for the second electronic device; wherein the image boot directory is used to generate a image boot display interface in the second electronic device, and the image boot display interface includes multiple display controls, and different display controls are used to indicate different installation methods.

[0108] In one embodiment, when the installation logic file includes the installation trigger file, the execution module 602 is specifically used to: compile the installation sub-trigger file, the jump file and the installation initial startup file in the installation trigger file by using the first compilation method; set a first trigger relationship between the installation sub-trigger file, the jump file and the installation initial startup file, and store the installation sub-trigger file, the jump file and the first trigger relationship in the target installation device; the installation trigger file includes: the installation sub-trigger file and the jump file, the jump file is used to: when receiving the trigger input, assist the installation initial startup file in the installation trigger file to jump to the installation sub-trigger file, and the installation sub-trigger file is used to trigger the target installation device to start executing the system image of the target operating system.

[0109] In one embodiment, when the installation logic file includes the partition file, the execution module 602 is specifically used to: compile the first boot file, the installation startup kernel file, and the installation mode file of the target operating system through the second compilation method; set the second trigger relationship between the first boot file, the installation startup kernel file, and the installation mode file of the target operating system, generate a data packet corresponding to the partition file, and store the data packet and the second trigger relationship in the target installation device; wherein, the first boot file is used to trigger the installation startup kernel file of the target operating system; the installation startup kernel file is used to: trigger the installation subsystem and installation mode file of the target operating system, and execute the installation process of the target operating system through the installation subsystem in the second electronic device according to the installation subfile in the installation mode file.

[0110] In one embodiment, when the installation logic file includes the calling partition file, the execution module 602 is specifically used to: set a calling partition file that matches the installation trigger file and the partition file, so that after the installation trigger file receives the trigger input, the partition file can execute the system image in the installation subsystem running by the calling partition file. Figure 5 This is a block diagram of a second electronic device according to an embodiment of the present application. The second electronic device is provided with a target installation device, and the target installation device includes a target operating system. Figure 5 The second electronic device includes a receiving module 701 and a mirroring module 702.

[0111] A receiving module 701 is used to receive a trigger input from a user for installing a logic file in the target installation device, wherein the trigger input is used to trigger the target installation device to execute a system image of the target operating system in the second electronic device; The mirroring module 702 is used to, in response to the trigger input, start executing the system image of the target operating system by triggering the installation trigger file in the installation logic file and trigger calling the partition file, and trigger the target installation device to mirror the partition file system in the second electronic device by calling the partition file.

[0112] In one embodiment, the second electronic device also includes a display module 703 and a second determination module 704; a receiving module 701, which is used to receive a first input from a user to the installation logic file in the target installation device; the display module 703, which is used to display the image boot display interface of the target operating system in response to the first input, and the image boot display interface includes multiple display controls, and different display controls are used to indicate different image modes; the receiving module 701 is also used to receive a second input from a user to the target display control in the image boot display interface; the second determination module 704 is used to determine the target mode of the system image according to the target input in response to the second input; the image module 702 is specifically used to start executing the system image of the target operating system by triggering the installation trigger file in the installation logic file, and trigger the call of the partition file according to the target mode of the system image.

[0113] It should be understood that the units recorded in the first electronic device and the second electronic device correspond to the various steps in the method described in the accompanying drawings. Therefore, the operations and features described above for the method are also applicable to the first electronic device and the second electronic device and the units contained therein, and will not be repeated here. The first electronic device and the second electronic device can be pre-implemented in the browser or other security application of the computer device, or can be loaded into the browser or its security application of the computer device by downloading or other means. The corresponding units in the first electronic device and the second electronic device can cooperate with the units in the computer device to implement the solution of the embodiment of the present application.

[0114] For the several modules or units mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0115] It should be noted that for details not disclosed in the first electronic device and the second electronic device in the embodiments of the present application, please refer to the details disclosed in the above embodiments of the present application, which will not be repeated here.

[0116] Reference below Figure 6 , Figure 6 A schematic diagram of the structure of a computer device suitable for implementing the embodiments of the present application is shown. Figure 6As shown, the computer system 1700 includes a central processing unit (CPU) 1701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1702 or the program loaded from the storage part 1708 to the random access memory (RAM) 1703. In the RAM 1703, various programs and data required for the operation instructions of the system are also stored. The CPU 1701, the ROM 1702, and the RAM 1703 are connected to each other through a bus 1704. An input / output (I / O) interface 1705 is also connected to the bus 1704.

[0117] The following components are connected to the I / O interface 1705: an input section 1706 including a keyboard, a mouse, etc.; an output section 1707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1708 including a hard disk, etc.; and a communication section 1709 including a network interface card such as a LAN card, a modem, etc. The communication section 1709 performs communication processing via a network such as the Internet. A drive 1710 is also connected to the I / O interface 1705 as needed. A removable medium 1711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1710 as needed, so that a computer program read therefrom is installed into the storage section 1708 as needed.

[0118] In particular, according to an embodiment of the present application, the above reference flow chart Figure 1 or Figure 3 The described process can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1709, and / or installed from a removable medium 1711. When the computer program is executed by the central processing unit (CPU) 1701, the above-mentioned functions defined in the system of the present application are executed.

[0119] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium such as a computer-readable storage medium that can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operating instructions of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the aforementioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operating instruction, or can be implemented with a combination of dedicated hardware and computer instructions.

[0121] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be set in a processor. For example, it may be described as: a processor includes a first receiving module, a second receiving module, and a sending module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.

[0122] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device. The above computer-readable storage medium stores one or more programs, and when the above programs are used by one or more processors to execute the operating system setting method described in the present application.

[0123] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the aforementioned disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present application (but not limited to) by each other to form a technical solution.

Claims

1. A method for setting an operating system, characterized in that: The method is applied to a first electronic device provided with a target installation device, wherein the first electronic device is an electronic device including a target operating system, and includes: Determining, according to the target operating system, system installation parameters of a second electronic device corresponding to the target operating system, where the second electronic device is an electronic device waiting to install the target operating system, and the system installation parameters include installation firmware parameters of the second electronic device and system parameters of the second electronic device corresponding to the target operating system; According to the system parameters of the target operating system and the system installation parameters of the second electronic device, an installation logic file of the target operating system is set and stored in the target installation device, wherein the installation logic file includes: an installation trigger file corresponding to the target operating system and the second electronic device, a call partition file corresponding to the target operating system and the second electronic device, and a partition file corresponding to the target operating system and the second electronic device; The installation trigger file is used to: when a trigger input is received, instruct the target installation device to start executing the system image of the target operating system; the calling partition file is used to: when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and perform the installation process of the target operating system through the partition file.

2. The method according to claim 1, characterized in that The determining of the system installation parameters of the second electronic device corresponding to the target operating system includes: Determine system installation parameters of a second electronic device corresponding to the target operating system, and set an image boot directory for the second electronic device; The mirror image boot directory is used to generate a mirror image boot display interface in the second electronic device, and the mirror image boot display interface includes a plurality of display controls, and different display controls are used to indicate different installation modes.

3. The method according to claim 1, characterized in that In the case where the installation logic file includes the installation trigger file, the step of setting the installation logic file of the target operating system and storing it in the target installation device includes: Compile the installation sub-trigger file, the jump file and the installation initial startup file in the installation trigger file by a first compilation method; Setting a first trigger relationship among the installation sub-trigger file, the jump file and the installation initial startup file, and storing the installation sub-trigger file, the jump file and the first trigger relationship in the target installation device; The installation trigger file includes: the installation sub-trigger file and the jump file, and the jump file is used to: upon receiving the trigger input, assist the installation initial startup file in the installation trigger file to jump to the installation sub-trigger file, and the installation sub-trigger file is used to trigger the target installation device to start executing the system image of the target operating system.

4. The method according to claim 1, characterized in that: In the case where the installation logic file includes the partition file, the step of setting the installation logic file of the target operating system and storing it in the target installation device includes: Compile the first boot file, the installation startup kernel file, and the installation mode file of the target operating system through the second compilation mode; Setting a second trigger relationship between the first boot file, the installation startup kernel file, and the installation mode file of the target operating system, generating a data packet corresponding to the partition file, and storing the data packet and the second trigger relationship in the target installation device; Among them, the first boot file is used to trigger the installation startup kernel file of the target operating system; the installation startup kernel file is used to: trigger the installation subsystem and installation method file of the target operating system, and execute the installation process of the target operating system in the second electronic device through the installation subsystem according to the installation subfile in the installation method file.

5. The method according to claim 1, characterized in that In the case where the installation logic file includes the calling partition file, the setting of the installation logic file of the target operating system and storing it in the target installation device includes: A calling partition file matching the installation trigger file and the partition file is set, so that after the installation trigger file receives a trigger input, the partition file can execute the system image in the installation subsystem running the calling partition file.

6. A method for setting an operating system, characterized in that: Applied to a second electronic device provided with a target installation device, wherein the target installation device includes a target operating system, the method includes: receiving a trigger input from a user for installing a logic file in the target installation device, the trigger input being used to trigger the target installation device to execute a system image of the target operating system in the second electronic device; In response to the trigger input, the system image of the target operating system is started and the partition file is called by triggering the installation trigger file in the installation logic file, and the target installation device is triggered by calling the partition file to mirror the partition file system in the second electronic device.

7. The method according to claim 6, characterized in that Before receiving the trigger input of the user for installing the logic file in the target installation device, the method includes: receiving a first input from a user regarding the installation logic file in the target installation device; In response to the first input, displaying a mirroring boot display interface of the target operating system, wherein the mirroring boot display interface includes a plurality of display controls, and different display controls are used to indicate different mirroring modes; Receiving a second input from a user to a target display control in the mirroring guide display interface; In response to the second input, determining a target mode of the system image according to the target input; The starting and executing the system image of the target operating system by triggering the installation trigger file in the installation logic file and triggering the calling of the partition file includes: The system image of the target operating system is started and executed by triggering the installation trigger file in the installation logic file, and the partition file is called according to the target mode of the system image.

8. A first electronic device, characterized in that: The first electronic device is provided with a target installation device, the first electronic device is an electronic device including a target operating system, and the first electronic device includes: A first determining module is used to determine, according to a target operating system, system installation parameters of a second electronic device corresponding to the target operating system, where the second electronic device is an electronic device waiting to install the target operating system, and the system installation parameters include installation firmware parameters of the second electronic device and system parameters of the second electronic device corresponding to the target operating system; an execution module, configured to set an installation logic file of the target operating system according to system parameters of the target operating system and system installation parameters of the second electronic device, and store the file in the target installation device, wherein the installation logic file includes: an installation trigger file corresponding to the target operating system and the second electronic device, a call partition file corresponding to the target operating system and the second electronic device, and a partition file corresponding to the target operating system and the second electronic device; The installation trigger file is used to: when a trigger input is received, instruct the target installation device to start executing the system image of the target operating system; the calling partition file is used to: when the target installation device starts executing the system image of the target operating system, instruct the target installation device to call the calling partition file and perform the installation process of the target operating system through the partition file.

9. A second electronic device, characterized in that: The second electronic device is provided with a target installation device, the target installation device includes a target operating system, and the second electronic device includes: A receiving module, configured to receive a trigger input from a user for installing a logic file in the target installation device, wherein the trigger input is used to trigger the target installation device to execute a system image of the target operating system in the second electronic device; The mirror module is used to start executing the system image of the target operating system and trigger calling the partition file by triggering the installation trigger file in the installation logic file in response to the trigger input, and trigger the target installation device to mirror the partition file system in the second electronic device by calling the partition file.

10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 5 or any one of claims 6 to 7 is implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 5 or any one of claims 6 to 7 is implemented.

12. A computer program product, comprising instructions, characterized in that: When the instructions are executed by a processor, the method according to any one of claims 1 to 5 or any one of claims 6 to 7 is implemented.

Citation Information

Patent Citations

  • Operating system installation method and device, equipment and medium

    CN112558993A

  • Operating system deployment method, device and equipment and computer readable storage medium

    CN113342365A

  • Operating system installation method and device and computing equipment

    CN115629819A

  • Installation of operating system

    US20200272445A1