Search

CN-122019000-A - System image processing method and device, electronic equipment and readable medium

CN122019000ACN 122019000 ACN122019000 ACN 122019000ACN-122019000-A

Abstract

The embodiment of the invention provides a processing method, a device, electronic equipment and a readable medium of a system mirror image, and relates to the technical field of operating systems. And displaying at least two environment options, wherein each environment option respectively represents one desktop environment corresponding to the operating system and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file. And taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting based on the target layer file so as to load an operating system of the desktop environment represented by the target option. The scheme has higher flexibility and improves the operation efficiency of the user.

Inventors

  • ZHANG JIALING
  • SUN YUANBO

Assignees

  • 龙芯中科技术股份有限公司

Dates

Publication Date
20260512
Application Date
20251216

Claims (11)

  1. 1. A processing method of a system mirror image is characterized in that the system mirror image comprises a base layer file of an operating system, at least two graphic service layer files and desktop environment layer files which correspond to at least two desktop environments respectively, and the method comprises the following steps: Displaying at least two environment options, wherein each environment option respectively represents a desktop environment corresponding to the operating system and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file; And taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting based on the target layer file so as to load the operating system of the desktop environment represented by the target option.
  2. 2. The method of claim 1, wherein the system image generation process comprises: Generating the base layer file based on a core component of the operating system; generating graphic service layer files corresponding to the graphic service components respectively based on the graphic service components required by the at least two desktop environments; Based on the desktop environment components corresponding to the at least two desktop environments, desktop environment layer files corresponding to the desktop environment components are respectively generated, and one desktop environment layer file is used for realizing one desktop environment.
  3. 3. The method of claim 2, wherein the generating the base layer file based on the kernel component of the operating system comprises: creating a system catalog, and installing a core component of the operating system in the system catalog; And compressing the system catalog to obtain the base layer file.
  4. 4. The method according to claim 2, wherein generating the graphics service layer file corresponding to each of the graphics service components includes: For any graphic service component, taking the directory where the base layer file is located as a first bottom layer directory, and creating a first upper layer directory for the graphic service component; Installing the graphics service component to the first upper layer directory based on the first lower layer directory and the first upper layer directory; and compressing the first upper-layer directory to obtain a graphic service layer file corresponding to the graphic service component.
  5. 5. The method according to claim 2, wherein generating desktop environment layer files corresponding to the desktop environment components respectively includes: For any desktop environment, taking the catalogue of the base layer file and the catalogue of the graphic service layer file as a second bottom layer catalogue, and creating a second upper layer catalogue for the desktop environment; installing the desktop environment component to the second upper layer directory based on the second lower layer directory and the second upper layer directory; And compressing the second upper-layer directory to obtain the desktop environment layer file.
  6. 6. The method of claim 5, wherein the method further comprises: Identifying duplicate files in the second upper directory; And moving the repeated file to a preset catalogue and compressing the repeated file to obtain a common layer file, and correspondingly deleting the repeated file in the second upper layer catalogue.
  7. 7. The method of claim 1, wherein the dynamically mounting based on the target layer file comprises: Respectively determining file paths corresponding to the target layer files and creating writable catalogues; And creating a root file system based on the file path and the writable directory, and mounting the root file system to the root directory.
  8. 8. The method of claim 1, wherein the system image further comprises an application layer file, and wherein the method further comprises: decompressing the target layer file in response to a system installation request, and merging the target layer file into a hard disk partition of the electronic equipment; program options corresponding to each preset application program in the application program layer are respectively displayed, and the application program corresponding to the program option selected by a user and the preset boot loader are installed to the hard disk partition.
  9. 9. A processing device of a system mirror image is characterized in that the system mirror image comprises a base layer file of an operating system, at least two graphic service layer files and desktop environment layer files which correspond to at least two desktop environments respectively, and the device comprises: the display module is used for displaying at least two environment options, wherein each environment option respectively represents one desktop environment corresponding to the operation and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file; and the first processing module is used for taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting the layer file based on the target layer file so as to load the operating system of the desktop environment represented by the target option.
  10. 10. An electronic device comprising a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface completing communication with each other via the communication bus, the memory for storing executable instructions that cause the processor to perform the method of any one of claims 1-8.
  11. 11. A machine readable medium having instructions stored thereon which, when executed by one or more processors, cause the processors to perform the method of any of claims 1 to 8.

Description

System image processing method and device, electronic equipment and readable medium Technical Field The present invention relates to the field of operating systems, and in particular, to a method and apparatus for processing a system image, an electronic device, and a readable medium. Background Currently, a user may temporarily write a system image (Live image) to be installed into an external storage medium and run the operating system in the external storage medium, thereby experiencing a desktop environment and related functional operations of the operating system in the case where the operating system is not installed. In the related art, a system image often only supports one desktop environment, and when an operating system is accessed through the system image, the operating system of the desktop environment is accessed by default, so that the scheme has low flexibility. If the user wants to experience other desktop environments supported by the operating system, the user often needs to acquire a storage medium storing a system image supporting the other desktop environments and install and run again, so that the operating efficiency is greatly reduced. Disclosure of Invention The embodiment of the invention provides a processing method, a processing device, electronic equipment and a readable medium for system mirror image, which can solve the problems of lower flexibility and higher operation cost of a scheme. In order to solve the problems, the embodiment of the invention discloses a processing method of a system mirror image, wherein the system mirror image comprises a base layer file of an operating system, at least two graphic service layer files and desktop environment layer files which correspond to at least two desktop environments respectively, and the method comprises the following steps: Displaying at least two environment options, wherein each environment option respectively represents a desktop environment corresponding to the operation and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file; And taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting based on the target layer file so as to load the operating system of the desktop environment represented by the target option. On the other hand, the embodiment of the invention discloses a processing device of a system mirror image, wherein the system mirror image comprises a base layer file of an operating system, at least two graphic service layer files and desktop environment layer files which are respectively corresponding to at least two desktop environments, and the device comprises: the display module is used for displaying at least two environment options, wherein each environment option respectively represents one desktop environment corresponding to the operation and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file; and the first processing module is used for taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting the layer file based on the target layer file so as to load the operating system of the desktop environment represented by the target option. In yet another aspect, an embodiment of the present invention discloses an electronic device, including a processor, a memory, a communication interface, and a communication bus, where the processor, the memory, and the communication interface complete communication with each other through the communication bus, and the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to execute the foregoing method. Embodiments of the invention also disclose a machine-readable medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method as described above. The embodiment of the invention has the advantages that the processing method of the system mirror image provided by the embodiment of the invention comprises a base layer file of an operating system, at least two graphic service layer files and desktop environment layer files which are respectively corresponding to the desktop environments. And displaying at least two environment options, wherein each environment option respectively represents one desktop environment corresponding to the operating system and is respectively and correspondingly associated with the base layer file, the graphic service layer file and the desktop environment layer file. And taking the layer file associated with the selected target option in the environment options as a target layer file, and dynamically mounting based on the target layer file so as to load an operating syst