Operating system upgrade methods, chips and devices

By configuring multiple operating systems to share a bootloader and kernel in a computing device, and upgrading only the container, the problem of long operating system upgrade times in existing technologies is solved, improving upgrade efficiency and user experience.

CN117891480BActive Publication Date: 2026-11-17XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311871739.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2026-11-17
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In existing technologies, when upgrading the operating system of a computing device, each partition needs to be upgraded, resulting in long upgrade times and affecting user experience.

Method used

By configuring multiple operating systems in a computing device to share the same bootloader and kernel, only the container is upgraded, without upgrading the bootloader and kernel. Based on preset conditions and upgrade strategies, the container to be upgraded is determined.

Benefits of technology

It shortened system upgrade time, improved upgrade efficiency, reduced the impact on running applications, and enhanced system stability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117891480B_ABST
    Figure CN117891480B_ABST
Patent Text Reader

Abstract

This application provides an operating system upgrade method, chip, and device, relating to the field of computer technology. In this method, a computing device includes multiple operating systems, each of which includes a bootloader, kernel, and container. The bootloader and kernel used by the multiple operating systems are identical. Based on this, when an operating system upgrade is required, such as upon receiving an upgrade request, the computing device determines the container of the operating system to be upgraded from among the multiple containers corresponding to the multiple operating systems. Then, the upgrade operation is performed only on the container of the operating system to be upgraded, without upgrading the bootloader and kernel of the operating system to be upgraded. Since the upgrade operation is no longer performed on the bootloader, kernel, etc., of the operating system to be upgraded, the time consumed by the system upgrade is shortened, the efficiency of the system upgrade is improved, and thus the user experience is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an operating system upgrade method, chip, and device. Background Technology

[0002] In related technologies, when a computing device upgrades its operating system, it typically upgrades each partition where the operating system resides. This includes upgrading the bootloader, kernel, root file system, and partitions containing applications. In this case, the system upgrade takes a particularly long time, resulting in extremely low efficiency and severely impacting the user experience. Summary of the Invention

[0003] This application provides an operating system upgrade method, chip, and device that can shorten the time consumed by system upgrades, thereby improving system upgrade efficiency and ultimately enhancing the user experience.

[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0005] In a first aspect, an operating system upgrade method is provided for a computing device, the computing device including multiple operating systems, each of the multiple operating systems including a bootloader, a kernel, and a container, the bootloader and kernel used by the multiple operating systems being the same; the method includes: receiving an upgrade request; the upgrade request being used to request an operating system upgrade; under the condition of satisfying preset conditions, in response to the upgrade request, determining the container of the operating system to be upgraded from multiple containers corresponding to the multiple operating systems; performing an upgrade operation on the container of the operating system to be upgraded, without performing an upgrade operation on the partition where the bootloader and / or kernel of the operating system to be upgraded is located.

[0006] In this scheme, the computing device includes multiple operating systems. Each operating system comprises a bootloader, kernel, and containers, and all operating systems use the same bootloader and kernel. Based on this, when an operating system upgrade is needed, such as upon receiving an upgrade request, if certain conditions are met, the computing device determines the container of the operating system to be upgraded from among the multiple containers corresponding to the multiple operating systems. Then, the upgrade operation is performed only on the container of the operating system to be upgraded; that is, the bootloader and / or kernel of the operating system to be upgraded are not upgraded. Compared to related technologies, since the upgrade operation is no longer performed on the bootloader and / or kernel of the operating system to be upgraded, the number of partitions involved in the upgrade operation is reduced, thereby shortening the system upgrade time, improving system upgrade efficiency, and ultimately enhancing the user experience. Furthermore, by setting preset conditions to determine the container of the operating system to be upgraded, appropriate preset conditions help ensure the stability and reliability of the upgraded operating system when only containers are upgraded.

[0007] In one possible implementation, the multiple containers include a first container and a second container; in response to an upgrade request, determining the container of the operating system to be upgraded from the multiple containers corresponding to multiple operating systems includes: in response to the upgrade request, obtaining a root directory path, the root directory path being used to indicate the container currently in a running state, the root directory path indicating the first container; and determining the second container as the container of the operating system to be upgraded based on the root directory path indicating the first container.

[0008] This implementation provides an upgrade strategy. When multiple containers, including a first container and a second container, receive an upgrade request and obtain the root directory path. The root directory path indicates the currently running container. If the root directory path indicates the first container, then the second container is determined to be the container whose operating system is to be upgraded, thereby enabling the upgrade of the currently non-running container. By determining the upgrade strategy to upgrade the currently non-running container, the operating system upgrade helps avoid affecting the applications in the currently running container, thus reducing the impact of the operating system upgrade on the currently running applications.

[0009] In another possible implementation, the multiple containers include a first container; in response to an upgrade request, determining the container of the operating system to be upgraded from the multiple containers corresponding to multiple operating systems includes: in response to the upgrade request, obtaining a root directory path, the root directory path being used to indicate the container currently in a running state, the root directory path indicating the first container; and determining the first container as the container of the operating system to be upgraded based on the root directory path indicating the first container.

[0010] This implementation provides an alternative upgrade strategy. When multiple containers include a first container, after receiving an upgrade request, the computing device obtains the root directory path, which indicates the currently running container. If the root directory path indicates the first container, then the first container is determined to be the container for the operating system to be upgraded, thereby upgrading the currently running container. By determining the upgrade strategy to upgrade the currently running container, on the one hand, the diversity of choices for the operating system to be upgraded is increased, thus helping to improve the user experience. On the other hand, when the computing device is configured with only one operating system, the system upgrade method provided in this application embodiment can also upgrade only the operating system container, which helps to expand the applicability of the operating system upgrade method provided in this application embodiment.

[0011] In another possible implementation, the upgrade request includes a container identifier that indicates a second container among a plurality of containers; in response to the upgrade request, determining the container of the operating system to be upgraded from the plurality of containers corresponding to the plurality of operating systems includes: in response to the upgrade request, determining the second container as the container of the operating system to be upgraded based on the container identifier indicating the second container.

[0012] In this implementation, by setting an upgrade request packet container identifier, that is, including the identifier of the container of the operating system to be upgraded, the container of the operating system to be upgraded can be determined based on the container identifier after receiving the upgrade request. This helps to improve the efficiency of determining the container of the operating system to be upgraded, and thus helps to improve the efficiency of operating system upgrade.

[0013] In another possible implementation, the upgrade request is also used to indicate the upgrade type, which includes container upgrade or non-container upgrade; under the condition of satisfying preset conditions, in response to the upgrade request, the container of the operating system to be upgraded is determined from the multiple containers corresponding to the multiple operating systems, including: when the upgrade type indicated by the upgrade request is container upgrade, in response to the upgrade request, the container of the operating system to be upgraded is determined from the multiple containers corresponding to the multiple operating systems; container upgrade is used to indicate a single container of the operating system to be upgraded.

[0014] In this implementation, the upgrade request is also used to indicate the upgrade type, which includes container upgrade or non-container upgrade. Only when the upgrade type is container upgrade is the container of the operating system to be upgraded determined from multiple containers. This enables the system to be upgraded according to the upgrade type specified by the user, thereby helping to improve the user experience.

[0015] In another possible implementation, the method further includes: in response to an upgrade request, determining the operating system to be upgraded from multiple operating systems if preset conditions are not met; and performing upgrade operations on the bootloader, kernel, and container of the operating system to be upgraded.

[0016] In this implementation, when preset conditions are not met, the operating system to be upgraded is determined, and the upgrade operation is performed on the bootloader, kernel, and container of the operating system to be upgraded. In this way, by setting appropriate preset conditions, the computing device can be guided to upgrade the entire operating system, thereby providing users with multiple operating system upgrade methods and helping to improve the user experience.

[0017] In another possible implementation, if the preset conditions are not met, in response to the upgrade request, the operating system to be upgraded is determined from multiple operating systems, including: if the upgrade type indicated by the upgrade request is a non-container upgrade, in response to the upgrade request, determining the operating system to be upgraded from multiple operating systems; and performing upgrade operations on the bootloader, kernel, and container of the operating system to be upgraded.

[0018] In this implementation, when the user chooses to upgrade without a container, the computing device receives the upgrade request, determines the operating system to be upgraded from multiple operating systems, and performs upgrade operations on the bootloader, kernel, and container of the operating system to be upgraded. This achieves the upgrade of all partitions where the operating system to be upgraded is located. This helps to provide users with multiple upgrade methods so that users can choose the appropriate upgrade method according to the actual scenario, thereby helping to improve the user experience.

[0019] Another possible implementation involves determining the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems in response to an upgrade request, provided that preset conditions are met. This includes: if the version of the operating system to be upgraded is higher than or equal to the compatible version of the upgrade package of the operating system to be upgraded, determining the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems in response to an upgrade request.

[0020] In this implementation, after receiving an upgrade request, the computing device determines whether the version of the operating system to be upgraded is higher than or equal to the compatible version of the upgrade package of the operating system to be upgraded. If so, it determines the container of the operating system to be upgraded and performs the upgrade operation only on the container of the operating system to be upgraded. This helps to ensure that the upgraded container is compatible with the unupgraded bootloader and kernel, thereby helping to improve the stability and reliability of the upgraded operating system.

[0021] Another possible implementation involves multiple operating systems using the same bootloader and kernel, including different operating systems within multiple operating systems sharing the same bootloader and kernel.

[0022] In this implementation, when a computing device is configured with multiple operating systems, the different operating systems within these multiple operating systems share the same bootloader and kernel. This helps to reduce the storage space occupied when a computing device is configured with multiple operating systems.

[0023] In another possible implementation, multiple operating systems use the same bootloader and kernel, including: the bootloader code and kernel code of different operating systems in multiple operating systems are the same.

[0024] In this implementation, by setting the bootloader code and kernel code of different operating systems to be the same, not only can each operating system use the bootloader and kernel of other operating systems, but it also helps to ensure the integrity of each operating system.

[0025] Secondly, an operating system upgrade apparatus is provided, comprising: functional units for executing any of the methods provided in the first aspect, wherein the actions performed by each functional unit are implemented by hardware or by hardware executing corresponding software. For example, the system upgrade apparatus may include a receiving module, a determining module, and an upgrade module; the receiving module is used to receive an upgrade request; the upgrade request is used to request a system upgrade; the determining module is used, under preset conditions, in response to the upgrade request, to determine the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems; and the upgrade module is used to perform an upgrade operation on the container of the operating system to be upgraded.

[0026] Thirdly, a chip is provided, comprising: a processor and an interface circuit; the interface circuit is used to receive code instructions and transmit them to the processor; the processor is used to execute the code instructions to perform any of the methods provided in the first aspect above.

[0027] Fourthly, a chip is provided, comprising: a processor and a memory, the processor being connected to the memory; the memory being used to store computer-executable instructions, and the processor executing the computer-executable instructions stored in the memory, so that the chip implements any of the methods provided in the first aspect above.

[0028] Fifthly, a computing device is provided, comprising: a power supply and a chip provided in the third aspect / the fourth aspect, wherein the power supply is used to supply power to the chip, and the chip is used to implement any of the methods provided in the first aspect.

[0029] In a sixth aspect, a computer-readable storage medium is provided, storing computer-executable instructions that, when executed on a computer, cause the computer to perform any of the methods provided in the first aspect above.

[0030] In a seventh aspect, a computer program product is provided, comprising: computer execution instructions that, when executed on a computing device, cause the computing device to perform any of the methods provided in the first aspect.

[0031] The technical effects of any of the implementation methods in aspects two through seven can be found in the technical effects of different implementation methods in aspect one, and will not be repeated here. Attached Figure Description

[0032] Figure 1 This is a schematic diagram of an operating system in a related art provided in an embodiment of this application;

[0033] Figure 2 A schematic diagram of a computing device provided in an embodiment of this application;

[0034] Figure 3 An architecture diagram of a system provided in an embodiment of this application;

[0035] Figure 4 A flowchart illustrating a system upgrade method provided in this application embodiment;

[0036] Figure 5 A schematic diagram illustrating the determination of a container to be upgraded, provided as an embodiment of this application;

[0037] Figure 6 A schematic diagram of an interface provided for an embodiment of this application;

[0038] Figure 7 A flowchart illustrating another system upgrade method provided in this application embodiment;

[0039] Figure 8 Another schematic diagram of the interface provided in this application embodiment;

[0040] Figure 9 A schematic diagram illustrating a system upgrade method provided in an embodiment of this application;

[0041] Figure 10 A schematic diagram illustrating an upgrade path provided in an embodiment of this application;

[0042] Figure 11 This is a schematic diagram of a system upgrade device provided in an embodiment of this application. Detailed Implementation

[0043] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0044] In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between the related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. A and B can be singular or plural.

[0045] Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0046] Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0047] The following is a brief introduction to the relevant terms used in the embodiments of this application.

[0048] Containers are a type of virtualization technology in computer operating systems. They can be used to encapsulate and isolate the runtime environments of different applications, thus separating the applications from the operating system. This allows the applications to access only temporarily assigned resources and prevents them from accessing the actual files and folders that exist on the operating system.

[0049] In this embodiment, the container may include a root file system, a system daemon, and applications, etc.

[0050] Partitioning, also known as operating system partitioning or system partitioning, refers to dividing the storage space of a storage device into different sections. Storage devices storing the operating system can be divided into different partitions according to the functional characteristics of the operating system, such as partitions for the boot loader (e.g., uboot), the kernel (e.g., kernel), the root file system (e.g., rootfs), and application partitions.

[0051] In this embodiment of the application, the partition may include a partition for the bootloader, a partition for the kernel, and a partition for the container, etc.

[0052] Root file system (e.g., rootfs): used for managing and storing files.

[0053] Memory file system (ramfs): This is the basic file system launched by the operating system kernel, used for switching containers, mounting / unmounting partitions, system restarts, and interacting with the processor.

[0054] The `change root` (chroot) command is used to change the root directory to a specified directory, that is, to switch the program's runtime environment to the specified directory. After the switch, the old root directory structure and files will not be accessible in the new runtime environment. For example, the `chroot` command can switch from a ramfs environment to the root directory environment of a specified container.

[0055] System daemon (systemd): A process used to start applications and constrain the pre- and post-start dependencies of each application.

[0056] Applications: also known as services, are used to implement relatively independent functions. Different applications can communicate with each other through inter-process communication.

[0057] The following provides an exemplary description of the application scenarios of the embodiments of this application.

[0058] In related technologies, computing devices are typically configured with either a single operating system without backup or a dual operating system with backup. In a single operating system configuration, the bootloader, kernel, and root file system are stored in a single copy on the computing device's storage device. In a dual operating system configuration, the bootloader, kernel, and root file system are stored in two copies on the computing device's storage device.

[0059] For example, such as Figure 1 As shown, the computing device is equipped with dual operating systems, namely Operating System 1 and Operating System 2. Both Operating System 1 and Operating System 2 include a boot loader, kernel, root file system, system daemon, and applications.

[0060] Based on this, if an upgrade to Operating System 2 is required, a complete or incremental refresh will be performed on the partitions containing the bootloader, kernel, root file system, system daemons, and applications of Operating System 2. In other words, all partitions containing Operating System 2 will be completely or incrementally refreshed. In this case, the storage space to be refreshed will be exceptionally large, resulting in a very long upgrade time and extremely low efficiency, severely impacting the user experience.

[0061] In view of this, embodiments of this application provide an operating system upgrade method for a computing device. The computing device includes at least one operating system, and each of the at least one operating system includes a bootloader, a kernel, and a container. Based on this, when an operating system upgrade is required, such as upon receiving an upgrade request, the computing device determines the container of the operating system to be upgraded from at least one container corresponding to the at least one system. Then, the upgrade operation is performed only on the container of the operating system to be upgraded, and the bootloader and / or kernel of the operating system to be upgraded are not upgraded. Compared to solutions in related technologies, since the upgrade operation is no longer performed on the bootloader and / or kernel of the operating system to be upgraded, the number of partitions performing the upgrade operation is reduced, thereby shortening the time consumed by the system upgrade, improving the efficiency of the system upgrade, and thus improving the user experience.

[0062] The system architecture of the embodiments of this application will be described exemplarily below.

[0063] The operating system upgrade method provided in this application is applicable to computing devices, which include at least one management unit. Each management unit may include a processor, memory, and storage devices. The storage device stores at least one operating system, and the processor can run the at least one operating system from the storage device via memory.

[0064] In this embodiment of the application, each operating system in at least one operating system may include a bootloader, a kernel, and containers, etc. The containers of each operating system may include a root file system, a system daemon, and applications, etc.

[0065] It should be noted that in the embodiments of this application, at least one can be one, or there can be multiple. Among them, multiple can be two, or there can be more than two.

[0066] The operating system upgrade method provided in this application is applicable to each management unit of a computing device. When upgrading the operating system based on the operating system upgrade method provided in this application, each management unit can choose to upgrade only the container of the operating system to be upgraded, without having to upgrade the bootloader, kernel, etc. of the operating system to be upgraded.

[0067] In this embodiment, each management unit may further include a read-only memory (ROM). The ROM stores a ROM bootloader. The ROM bootloader indicates the partition address of the bootloader in the storage device. Based on this, when the operating system is started, the management unit can run the ROM bootloader, jump to run the operating system's bootloader based on the partition address indicated by the ROM bootloader, and jump to run the kernel based on the kernel's partition address indicated by the bootloader, thereby restarting the operating system's bootloader and kernel.

[0068] For example, the ROM can be embedded in the processor. For processors of the same model, the code in the ROM can be the same.

[0069] In this embodiment of the application, at least one management unit may include an in-band management unit and an out-of-band management unit.

[0070] For example, an in-band management unit refers to a unit used to implement in-band management, such as a central management unit. In-band management means that the management data of the computing device and the business data of the user are transmitted using the same physical channel.

[0071] For example, an out-of-band management unit refers to a unit used to implement out-of-band management, such as a board management controller (BMC) unit. Out-of-band management means that the management data of the computing device and the service data of the user are transmitted using different physical channels.

[0072] It should be noted that different computing devices may use different names for BMC. For example, some computing devices call it BMC, some call it iLO, and others call it iDRAC. Regardless of whether it is called BMC, iLO, or iDRAC, it can be understood as the BMC in this embodiment of the invention.

[0073] Alternatively, the computing device may include a network device or a terminal device.

[0074] Network devices can include servers. A server can be a single physical or logical server, or it can consist of two or more physical or logical servers that share different responsibilities and work together to perform various server functions. For example, a server can be a blade server, a high-density server, a rack server, or a tower server.

[0075] Terminal devices may include augmented reality (AR) devices, virtual reality (VR) devices, personal digital assistants (PDAs), ultra-mobile personal computers (UMPCs), tablets, laptops, netbooks, desktop computers, all-in-one computers, etc.

[0076] It should be noted that the embodiments of this application do not limit the form of the computing device; the above is merely an illustrative example.

[0077] like Figure 2 The diagram shown is a schematic of a computing device provided in an embodiment of this application.

[0078] For example, see Figure 2 The computing device may include a first management unit and a second management unit. The first management unit may be an out-of-band management unit, which may include a processor 1, a ROM 1, a memory 1, and a storage device 1, etc. The second management unit may be an in-band management unit, which may include a processor 2, a ROM 2, a memory 2, and a storage device 2, etc.

[0079] It needs to be explained that, Figure 2 The computing device shown is merely a structural schematic diagram of a computing device applicable to the embodiments of this application, and does not constitute a limitation on the computing device applicable to the embodiments of this application.

[0080] The following describes the embodiments of this application by taking the out-of-band management unit as an example of the BMC unit.

[0081] In this embodiment of the application, the BMC unit may include at least one operating system. Each of the at least one operating system may include a bootloader, a kernel, and a container.

[0082] When a BMC unit includes an operating system, that operating system may include a bootloader, a kernel, and containers. The containers include a root filesystem, a system daemon (systemd), and at least one application.

[0083] Based on this, an operating system is stored in multiple partitions of storage device 1. For example, the multiple partitions include partition 1, partition 2, and partition 3, where partition 1 stores the bootloader, partition 2 stores the kernel, and partition 3 stores the container.

[0084] It should be noted that the embodiments of this application do not limit the number of applications in the container.

[0085] When a BMC unit includes multiple operating systems, the bootloaders and kernels used by these operating systems are the same. Since the memory file system is kernel-based, if different operating systems use the same kernel, they will also use the same memory file system.

[0086] It should be noted that different operating systems use the same bootloader and kernel, and it can be considered that one operating system can be compatible with the bootloader and kernel of other operating systems.

[0087] The following examples, using methods 1 and 2, illustrate the use of the same bootloader and kernel.

[0088] Method 1: Multiple operating systems share the same bootloader and kernel.

[0089] Different operating systems use different containers.

[0090] For example, the BMC unit includes M operating systems; that is, multiple partitions of storage device 1 store M operating systems, where M is a positive integer greater than 1. Since different operating systems use the same bootloader and kernel, the M operating systems can include one bootloader, one kernel, and M containers, where each container belongs to one operating system; in other words, different containers belong to different operating systems. A container of an operating system can include the root file system of that operating system, the system daemon (systemd), and applications.

[0091] This approach uses the same bootloader and kernel for different operating systems, which helps reduce the storage space occupied by multiple operating systems and thus saves storage resources.

[0092] For example, the storage device 1 may include M+2 partitions, wherein the M+2 partitions may be partition 1, partition 2, partition 3, ..., partition M+2, wherein partition 1 may be used to store the bootloader, partition 2 may be used to store the kernel, and partitions 3, ..., partition M+2 may be used to store M containers.

[0093] It should be noted that the applications in different containers can be the same or different, and this application embodiment does not impose any restrictions on this.

[0094] Method 2: Multiple operating systems use the same bootloader code and the same kernel code. However, each operating system uses a different container.

[0095] In other words, multiple operating systems have independent bootloaders and kernels; however, the bootloader code and kernel code used by different operating systems are the same. In this case, one operating system can also use the bootloader and kernel of another operating system.

[0096] In this approach, different operating systems are configured with independent bootloaders, kernels, and containers, and the bootloader and kernel code used by different operating systems are identical. This not only helps to ensure the integrity of each operating system but also improves interoperability when switching between different operating systems. Furthermore, it allows for direct switching from the container of the currently running operating system to the container of the operating system to be started during system switching, thereby improving the efficiency of system switching.

[0097] It should be noted that for relevant information about containers, please refer to Method 1 above, which will not be repeated here.

[0098] Hereinafter, taking method 1 above as an example, the embodiments of this application will be described by way of example.

[0099] like Figure 3 The diagram shown is a hierarchical schematic of a BMC unit provided in an embodiment of this application.

[0100] See Figure 3 The BMC unit consists of a hardware layer and a software layer. The software layer is the program code that runs on the hardware layer.

[0101] The hardware layer includes the processor, memory, ROM, and storage devices. The software layer includes the operating system (such as the bootloader and kernel). Users can access applications running on the computing device through the file system in the software layer.

[0102] The following, combined with Figure 3 The operating system startup process of the BMC unit is described in an exemplary manner.

[0103] For example, the BMC unit includes a first operating system and a second operating system. The first operating system includes a first container, and the second operating system includes a second container. The first operating system and the second operating system share the same bootloader and kernel.

[0104] It needs to be explained that, in Figure 3In the diagram, the first container is represented by a solid line, indicating a container in a running state. The second container is represented by a dashed line, indicating a container in a non-running state, or a container in a dormant state.

[0105] When the BMC unit powers on, its processor first runs the ROM bootloader, loading it into the BMC unit's memory. Then, based on the partition addresses in the ROM bootloader, the processor runs the operating system stored in the storage device.

[0106] The operating system running on the storage device may include the following steps:

[0107] 1) Run the operating system's bootloader: Switch to the partition where the bootloader is located according to the partition address indicated by the ROM bootloader, load the bootloader into the specified memory address and run it. The specified memory address can be set at the factory. During the running of the bootloader, basic input / output (I / O) configurations can be performed.

[0108] 2) Running the kernel: Based on the partition address indicated by the bootloader, switch to the partition where the kernel is located and load the kernel into the specified memory address for execution. While running the kernel, you can configure and load driver devices, launch the memory file system, etc.

[0109] The kernel includes an upgrade system, which can be used to implement the operating system upgrade method provided in this application embodiment. When launching the memory file system, the upgrade system can be used to launch the memory file system, thereby enabling the memory file system to include the upgrade system and thus enabling the memory file system to be used to implement the operating system upgrade method provided in this application embodiment.

[0110] 3) Run the container: After launching the memory file system, switch to the partition where the first container is located, mount the partition where the first container is located, and mount the initial directory of the first container as the root directory. That is, load the contents of the first container into the specified memory address and run it.

[0111] 4) Run the application: Start the application in the first container through the system daemon in the first container.

[0112] It should be noted that the system architecture and application scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0113] For ease of understanding, the system upgrade method provided in this application will be described below with reference to the above system architecture and accompanying drawings.

[0114] Figure 4 This is a flowchart illustrating an operating system upgrade method according to an exemplary embodiment. Exemplarily, the operating system upgrade method may include the following steps S401-S403.

[0115] The following example, using the operating system of the BMC unit of a computing device, illustrates the method for upgrading the operating system. The processor, storage device, memory, ROM, and operating system mentioned below all belong to the BMC unit and will not be discussed further thereafter.

[0116] The following section uses the example of a BMC unit containing multiple operating systems to illustrate this point. Figure 4 The illustrated embodiments are provided as examples.

[0117] Each of the multiple operating systems includes a bootloader, a kernel, and containers, and the bootloader and kernel used by the multiple operating systems are the same. Each operating system's containers may include a root file system, a system daemon, and at least one application.

[0118] It should be noted that this application embodiment does not limit the number of applications in the container of each operating system, and the applications in containers of different operating systems can be all the same, partially the same, or all different. The following example, where each operating system container includes multiple applications, will be used to illustrate this application embodiment.

[0119] For example, the multiple operating systems may include a first operating system and a second operating system. One of the first and second operating systems may be a BMC architecture operating system (referred to as the BMC system), and the other operating system may be an OpenBMC architecture operating system (referred to as the OpenBMC system).

[0120] The following describes the operating system upgrade method provided in this application embodiment, taking the operating system currently running on the BMC unit (hereinafter referred to as the current operating system) as the first operating system (e.g., the first operating system is the BMC system).

[0121] S401: The computing device receives an upgrade request; the upgrade request is used to request an operating system upgrade.

[0122] In this embodiment, when a user needs to upgrade the operating system of the BMC unit of a computing device, they can send an upgrade request to the BMC unit through an electronic device to request an upgrade of the BMC unit's operating system. The BMC unit can receive the upgrade request sent by the electronic device while running the current operating system.

[0123] It should be noted that in the embodiments of this application, the BMC unit performing a certain operation (such as receiving an upgrade request) may be the processor of the BMC unit performing a certain operation, which will not be described further hereafter.

[0124] For example, an upgrade request may be a request to upgrade the BMC operating system of the BMC unit to the OpenBMC operating system, or it may be a request to upgrade the current version of the BMC operating system to a new version of the BMC operating system, or it may be a request to upgrade the current version of the OpenBMC operating system to a new version of the OpenBMC operating system. This application embodiment does not limit this.

[0125] S402: Under the condition that the preset conditions are met, the computing device responds to the upgrade request and determines the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems.

[0126] The container of the operating system to be upgraded can be called the container to be upgraded or the container to be upgraded, etc., which will not be elaborated on further.

[0127] It should be noted that the operating system to be upgraded can be the operating system currently running on the computing device, or it can be an operating system other than the operating system currently running on the computing device. This application embodiment does not limit this.

[0128] In this embodiment of the application, after receiving an upgrade request, the BMC unit of the computing device determines whether the preset conditions are met. If the preset conditions are met, in response to the upgrade request, it determines the container of the operating system to be upgraded from the multiple containers corresponding to the multiple operating systems configured in the BMC unit.

[0129] It should be noted that the fulfillment of preset conditions will be explained in subsequent embodiments, and will not be repeated here. For details, please refer to [link to relevant documentation]. Figure 7 The example shown.

[0130] In this application embodiment, there are multiple ways to determine the container of the operating system to be upgraded. Hereinafter, the following are exemplary descriptions using methods 1 to 2.

[0131] Method 1: Determine the container of the operating system to be upgraded based on the root directory path.

[0132] In this embodiment of the application, the upgrade strategy may include a first strategy and a second strategy. The first strategy may include upgrading containers that are currently not running, and the second strategy may include upgrading containers that are currently running.

[0133] The implementation process of the first strategy will be illustrated below through steps one and two.

[0134] Step 1: Obtain the root directory path, which indicates the container currently in operation.

[0135] For example, multiple containers may include a first container of a first operating system (e.g., rofs1) and a second container of a second operating system (e.g., rofs2). That is, the first container and the second container are stored in multiple partitions of the storage device of the BMC unit.

[0136] In this embodiment of the application, when the BMC unit of the computing device is powered on, the BMC unit starts the container of the specified operating system based on the chroot instruction and mounts the initial directory of the container of the specified operating system as the root directory.

[0137] For example, the container for the specified operating system can be a first container of a first operating system, and the root directory path can be / mnt / inittramfs / rofs1. It is understood that if the container for the specified operating system is a second container of a second operating system, the root directory path can be / mnt / inittramfs / rofs2.

[0138] Understandably, since the root directory is unique, the root directory path is also unique.

[0139] Step 2: Based on the root directory path indicating the first container, the second container is determined to be the container for the operating system to be upgraded.

[0140] like Figure 5 As shown, after obtaining the root directory path, the BMC unit of the computing device determines the container of the operating system to be upgraded based on the container indicated by the root directory path. If the root directory path is / mnt / inittramfs / rofs1, it indicates that the first container is currently being used, that is, the first container is currently running. Based on the first policy, the BMC unit can determine that the second container is the container of the operating system to be upgraded. If the root directory path is / mnt / inittramfs / rofs2, it indicates that the second container is currently being used, that is, the second container is currently running. Based on the first policy, the BMC unit can determine that the first container is the container of the operating system to be upgraded.

[0141] For example, the root directory path obtained by the BMC unit is / mnt / inittramfs / rofs1, that is, the root directory indicates the first container. Based on this, the BMC unit determines that the second container is the container of the operating system to be upgraded, that is, the container to be upgraded.

[0142] In this approach, when multiple containers corresponding to multiple operating systems include a first container and a second container, after receiving an upgrade request, the computing device obtains the root directory path. The root directory path indicates the currently running container. If the root directory path indicates the first container, then the second container is determined to be the container whose operating system is to be upgraded, thereby enabling the upgrade of the currently non-running container. By determining the upgrade strategy to upgrade the currently non-running container, it helps to avoid affecting the applications in the currently running container when upgrading the operating system, thus helping to reduce the impact of the operating system upgrade on the currently running applications.

[0143] The implementation process of the second strategy will be illustrated below through steps three and four.

[0144] Step 3: Obtain the root directory path, which indicates the container currently in operation.

[0145] For example, containers for multiple operating systems may include a first container for a first operating system.

[0146] In this embodiment of the application, when the BMC unit of the computing device is powered on, the BMC unit starts the container of the specified operating system based on the chroot instruction and mounts the initial directory of the container of the specified operating system as the root directory.

[0147] For example, the container for the specified operating system is the first container of the first operating system, and the root directory path can be / mnt / inittramfs / rofs1.

[0148] It should be noted that other relevant instructions for step three can be found in step one above, and will not be repeated here.

[0149] Step 4: Based on the root directory path indicating the first container, the first container is determined to be the container for the operating system to be upgraded.

[0150] For example, after obtaining the root directory path, the BMC unit of the computing device determines the container of the operating system to be upgraded based on the container indicated by the root directory path. In the case of the root directory path being / mnt / inittramfs / rofs1, it indicates that the first container is currently in use, that is, the first container is currently running. Based on the second strategy, the BMC unit can determine that the first container is the container of the operating system to be upgraded.

[0151] In this approach, when multiple containers corresponding to multiple operating systems include a first container, after receiving an upgrade request, the computing device obtains the root directory path. The root directory path indicates the currently running container. If the root directory path indicates the first container, then the first container is determined to be the container of the operating system to be upgraded, thereby upgrading the currently running container. By determining the upgrade strategy to upgrade the currently running container, on the one hand, the diversity of choices for the operating system to be upgraded is increased, which helps to improve the user experience. On the other hand, when the computing device is configured with only one system, the operating system upgrade method provided in this application embodiment can also be used to upgrade only the container of the operating system, which helps to improve the applicability of the operating system upgrade method provided in this application embodiment.

[0152] Method 2: Determine the container of the operating system to be upgraded based on the container identifier in the upgrade request.

[0153] It should be noted that the container indicated by the container identifier can be a container in a running state or a container in a non-running state; this application embodiment does not impose any restrictions on this.

[0154] In this embodiment of the application, the computing device can identify the second container as the container of the operating system to be upgraded based on the container identifier indicating the second container.

[0155] For example, such as Figure 6 As shown in (a), a first interface is displayed on the user's electronic device. This first interface includes a first control, which indicates the upgrade type, for example, a container upgrade. After the user selects the container upgrade indicated by the first control, they click the next control on the first interface. Figure 6 As shown in (b), in response to a user's action, the electronic device displays a second interface, which includes a second control for indicating the container whose operating system is to be upgraded. After the user selects the second container on the second interface and clicks the next control on the second interface, the electronic device, in response to the user's action, sends an upgrade request to the BMC unit of the computing device. The upgrade request includes an identifier for the second container.

[0156] It should be noted that the number of second controls in this application embodiment is not limited; the above is merely illustrative. The number of second controls can be the same as the number of operating systems in the BMC unit, thereby enabling one second control to indicate a container of one operating system. Furthermore, the interface where the first and second controls are located is also illustrative. For example, the first and second controls can also be placed on the same interface; this application embodiment does not limit this.

[0157] In this embodiment of the application, after receiving the upgrade request, the BMC unit of the computing device parses the upgrade request, obtains the container identifier in the upgrade request, and determines the container indicated by the container identifier (e.g., the second container) as the container of the operating system to be upgraded.

[0158] In this method, by setting the upgrade request to include a container identifier, that is, including the identifier of the container of the operating system to be upgraded, the container of the operating system to be upgraded can be determined based on the container indicated by the container identifier after receiving the upgrade request. This helps to improve the efficiency of determining the container of the operating system to be upgraded, and thus helps to improve the efficiency of system upgrade.

[0159] S403: The computing device performs an upgrade operation on the container of the operating system to be upgraded, but does not perform an upgrade operation on the bootloader and / or kernel of the operating system to be upgraded.

[0160] In this embodiment of the application, the BMC unit of the computing device performs an operation on the container whose operating system is to be upgraded, which may be to perform an upgrade operation on the partition where the container whose operating system is to be upgraded is located.

[0161] For example, the BMC unit can use the upgrade package of the system to be upgraded to refresh the partition (i.e., the partition to be upgraded) where the container of the operating system to be upgraded (i.e., the container to be upgraded) is located. For example, refreshing the root file system, system daemons, and applications of the container to be upgraded.

[0162] For example, the BMC unit can invoke the system upgrade device to perform upgrade operations on the root file system, system daemons, and applications included in the container to be upgraded.

[0163] It should be noted that the method for obtaining the upgrade package for the operating system to be upgraded can be found in related technologies, and this application embodiment does not impose any restrictions on this method.

[0164] In the above embodiments, after receiving an upgrade request, the computing device determines the container whose operating system needs to be upgraded from multiple containers corresponding to multiple operating systems. Then, the upgrade operation is performed only on the container whose operating system needs to be upgraded; that is, the bootloader and / or kernel of the operating system to be upgraded are not upgraded. Compared to related technologies, since the bootloader and kernel of the operating system to be upgraded are no longer upgraded, the number of partitions that need to be upgraded is reduced, the time consumed by the system upgrade is shortened, thereby improving the efficiency of the system upgrade and ultimately improving the user experience.

[0165] It should be noted that the system upgrade method provided in this application embodiment does not limit the operating system architecture. The above is only an exemplary description. For example, the system upgrade method can also be used with the operating system architecture in related technologies (e.g., ...). Figure 1 (See Operating System 1, Operating System 2, etc.).

[0166] Figure 7 This is a flowchart illustrating another operating system upgrade method according to an exemplary embodiment. Exemplarily, this operating system upgrade method may include the following steps S701-S706.

[0167] S701: The computing device receives an upgrade request.

[0168] It should be noted that other related explanations for S701 can be found in S401 above, and will not be repeated here.

[0169] S702: The computing device determines whether the preset conditions are met.

[0170] If the result is yes, it means the preset conditions are met, and then execute S703-S704 below. If the result is no, it means the preset conditions are not met, and then execute S705-S706 below.

[0171] There are several ways to determine whether the preset conditions are met. The following examples, from Method A to Method B, illustrate these methods.

[0172] Method A: Determine whether the preset conditions are met based on the upgrade type indicated in the upgrade request.

[0173] If the upgrade request points to a container, the preset conditions are met. If the upgrade request points to a non-container upgrade, the preset conditions are not met.

[0174] In this embodiment, the upgrade type includes container upgrade and non-container upgrade. Container upgrade refers to upgrading only a single container of the operating system, while full upgrade refers to upgrading the entire operating system, or upgrading all partitions of the operating system, i.e., upgrading the bootloader, kernel, and containers of the operating system.

[0175] It should be noted that container upgrades can also be called rapid upgrades, while non-container upgrades can also be called full upgrades or full partition upgrades, etc.

[0176] In this embodiment of the application, the upgrade request may include a type identifier, which is used to indicate the upgrade type.

[0177] For example, such as Figure 8As shown, the user's electronic device displays a third interface, which includes a first control indicating the upgrade type. The user selects an upgrade type indicated by the first control and then clicks the "Next" control on the third interface. In response to the user's action, the electronic device sends an upgrade request to the computing device. This upgrade request includes a type identifier indicating the selected upgrade type.

[0178] For example, if the user selects container upgrade, the upgrade request may include a container upgrade type identifier. If the user selects non-container upgrade, the upgrade request may include a non-container upgrade type identifier.

[0179] Method B: Determine whether the preset conditions are met based on the version of the operating system to be upgraded and the compatible version of the upgrade package for the operating system to be upgraded.

[0180] If the version of the operating system to be upgraded is higher than or equal to the compatible version, then the preset conditions are met. If the version of the operating system to be upgraded is lower than the compatible version, then the preset conditions are not met.

[0181] In this embodiment, after receiving an upgrade request, the BMC unit of the computing device determines the container of the operating system to be upgraded, and then determines the compatible version indicated by the upgrade package of the operating system to be upgraded. The compatible version indicated by the upgrade package can be considered as the operating system version that the upgraded operating system can be compatible with. If the version of the operating system to be upgraded is higher than or equal to the compatible version indicated by the upgrade package, then the upgrade type is determined to be a container upgrade. In this way, the upgraded operating system can be compatible with the current bootloader and kernel of the system to be upgraded; therefore, only the operating system container needs to be upgraded.

[0182] For example, if the compatible version indicated by the upgrade package is version 5, and the version of the operating system to be upgraded is version 5 or higher (e.g., version 6, version 7, etc.), then the version of the operating system to be upgraded is higher than the compatible version indicated by the upgrade package.

[0183] It should be noted that, regarding how to determine the compatible version indicated by the upgrade package and the version of the currently running operating system, one can refer to the methods in related technologies, and this application embodiment does not impose any limitations on this.

[0184] It should be noted that compatibility between one operating system and another can be considered as the code of one operating system including the code of the other operating system.

[0185] In this embodiment of the application, methods A and B can be used in combination. When methods A and B are used in combination, if the upgrade request indicates a container upgrade and the version of the operating system to be upgraded is higher than or equal to the compatible version indicated by the upgrade package, then the preset condition is determined to be met. If the upgrade request indicates a non-container upgrade, or the version of the operating system to be upgraded is lower than the compatible version indicated by the upgrade package, then the condition is determined not to be met.

[0186] Method C: Determine whether the preset conditions are met based on the bootloader and kernel of the currently running operating system.

[0187] Example 1: If the bootloader and kernel of the currently running operating system are the latest versions, then the preset conditions are met. If the bootloader and / or kernel of the currently running operating system are not the latest versions, then the preset conditions are not met.

[0188] In this embodiment, when the bootloader and kernel of the operating system currently running on the BMC unit are the latest versions (also known as the highest versions), the upgrade type is determined to be a container upgrade; otherwise, the upgrade type is determined to be a non-container upgrade.

[0189] For example, the BMC unit can determine whether the bootloader and kernel of the currently running operating system are the latest versions by comparing the version of the currently running operating system with the version of the upgrade package. If the versions of the currently running operating system and the upgrade package are the same, it can be determined that the bootloader and kernel of the currently running operating system are the latest versions; otherwise, it can be determined that the bootloader and kernel of the currently running operating system are not the latest versions.

[0190] Example 2: If the versions of the bootloader and kernel of the currently running operating system are higher than or equal to the version of the upgrade package, then the preset conditions are met. If the versions of the bootloader and kernel of the currently running operating system are lower than the version of the upgrade package, then the preset conditions are not met.

[0191] It should be noted that the relevant explanations for Example 2 can be found in the explanations for Example 1 above, and will not be repeated here.

[0192] In this approach, when multiple operating systems share the same bootloader and kernel, the upgrade type is determined to be a container upgrade when the bootloader and kernel of the currently running operating system are determined to be the latest version. This allows only the container of the operating system to be upgraded to be upgraded. This not only helps to avoid repeatedly upgrading the bootloader and kernel of the operating system to be upgraded, but also helps to shorten the time consumed by upgrading the operating system.

[0193] It should be noted that methods A to C described above can be used individually or in combination, and this application embodiment does not impose any restrictions on this. S703: The computing device determines the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems.

[0194] S704: The computing device performs an upgrade operation on the container of the operating system to be upgraded, but does not perform an upgrade operation on the bootloader and / or kernel of the operating system to be upgraded.

[0195] It should be noted that the relevant explanations for S703-S704 can be found in S402-S403 above, and will not be repeated here.

[0196] S705: The computing device determines the operating system to be upgraded from multiple operating systems.

[0197] It should be noted that other related explanations for S705 can be found in S402 above, and will not be repeated here.

[0198] S706: The computing device performs upgrade operations on the bootloader, kernel, and containers of the operating system to be upgraded.

[0199] In this embodiment, the BMC unit of the computing device upgrades all contents of the operating system to be upgraded (e.g., bootloader, kernel, and containers), that is, it upgrades the entire partition of the operating system to be upgraded. For example, it performs the upgrade operation on the partition containing the bootloader, kernel, and containers of the operating system to be upgraded.

[0200] For example, the storage device stores a partition table of the operating system, which indicates the partitions where the operating system's bootloader, kernel, root file system, etc., are located. The BMC unit can use the partition table of the operating system to be upgraded to perform a full system upgrade on all partitions of the operating system to be upgraded.

[0201] It should be noted that other related explanations of S706 can be found in S403 above, and will not be repeated here.

[0202] In the above embodiments, the computing device provides users with multiple upgrade methods, such as container upgrades and non-container upgrades. After receiving an upgrade request, the computing device determines whether the upgrade type is a container upgrade and performs different upgrade operations based on the determination result. For example, it may perform the upgrade operation only on the partition where the container of the operating system to be upgraded is located, or it may perform the upgrade operation on the entire partition of the operating system to be upgraded. This helps to improve the diversity of operating system upgrade methods, thereby enabling the selection of appropriate upgrade methods according to actual scenarios. This not only helps to improve the stability and reliability of the system after the upgrade, but also helps to improve the user experience.

[0203] like Figure 9 The diagram shown is a schematic representation of an operating system upgrade method provided in an embodiment of this application.

[0204] The following, combined with Figure 9 The present application provides an exemplary description of a specific operating system upgrade method.

[0205] For example, computing devices provide users with two upgrade paths: one is the regular upgrade path (also known as the full upgrade path), such as... Figure 10 As shown in (a), the regular upgrade path indicates that the entire partition of the operating system to be upgraded will be upgraded. Another type is the container upgrade path, such as... Figure 10 As shown in (b), the container upgrade path is used to indicate that only the partition where the container containing the operating system to be upgraded is located will be upgraded.

[0206] When a user triggers a system upgrade while the computing device is running the original container, the computing device receives the upgrade request and determines whether the upgrade type meets preset conditions. If the result is yes, the computing device uses the container upgrade path to upgrade the operating system to be upgraded, which means: reading the currently existing path (i.e., the root directory path), determining the container to be upgraded based on the root directory path, and then upgrading the partition where the container to be upgraded is located. If the result is no, the computing device uses a full upgrade path to upgrade the operating system to be upgraded, which means: upgrading the entire partition of the operating system to be upgraded, in other words, upgrading the bootloader, kernel, and the partition where the container of the operating system to be upgraded is located.

[0207] If the computing device uses the container upgrade path to upgrade the operating system, after the upgrade is completed, the computing device jumps to the running memory file system and unmounts the root directory of the currently running operating system (i.e., the current root directory) and the partition where the currently running container is located. Then, the computing device jumps to run the upgraded container, thereby enabling the upgrading operating system to start.

[0208] If the computing device uses a full upgrade path to upgrade the operating system, after the upgrade is completed, the computing device jumps to the running memory file system and then returns to the ROM to run the ROM boot program. After that, the computing device can run all partitions of the upgraded operating system in sequence, that is, run the bootloader, kernel, containers, etc. of the upgraded operating system in sequence, thereby realizing the startup of the upgraded operating system.

[0209] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, the operating system upgrade device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0210] This application embodiment can, based on the above method, exemplarily divide the operating system upgrade device into functional modules. For example, the operating system upgrade device may include functional modules corresponding to each functional division, or two or more functions may be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division; in actual implementation, there may be other division methods.

[0211] For example, Figure 11 A possible structural diagram of the operating system upgrade device (denoted as operating system upgrade device 1100) involved in the above embodiments is shown. The actions performed by the operating system upgrade device 1100 are implemented through a computing device or through corresponding software executed by the computing device. The computing device includes multiple operating systems, each of which includes a bootloader, a kernel, and a container. The bootloader and kernel used by the multiple operating systems are the same. The operating system upgrade device 1100 may include a receiving module 1101, a determining module 1102, and an upgrade module 1103. The receiving module 1101 is used to receive upgrade requests; the upgrade request is used to request an operating system upgrade. For example, Figure 4 S401 shown and Figure 7 S701 is shown. The determining module 1102, in response to an upgrade request, determines the container of the operating system to be upgraded from multiple containers corresponding to multiple operating systems, provided that preset conditions are met. For example, Figure 4 S402 and shown Figure 7 The S703 shown. Upgrade module 1103 is used to perform upgrade operations on the container whose operating system is to be upgraded, but not on the bootloader and / or kernel of the operating system to be upgraded. For example, Figure 4 S403 shown and Figure 7 The S704 shown.

[0212] Optionally, the multiple containers include a first container and a second container; the determining module 1102 is specifically used to: in response to an upgrade request, obtain a root directory path, the root directory path being used to indicate the container currently in a running state, the root directory path indicating the first container; and based on the root directory path indicating the first container, determine the second container as the container of the operating system to be upgraded.

[0213] Optionally, the multiple containers include a first container. The determining module 1102 is specifically used to: in response to an upgrade request, obtain a root directory path, the root directory path being used to indicate the currently running container, the root directory path indicating the first container; and based on the root directory path indicating the first container, determine that the first container is the container of the operating system to be upgraded.

[0214] Optionally, the upgrade request includes a container identifier, which indicates a second container among a plurality of containers; the determining module 1102 is specifically used to: in response to the upgrade request, determine the second container as a container of the operating system to be upgraded based on the container identifier indicating the second container.

[0215] Optionally, the upgrade request is also used to indicate the upgrade type, which includes container upgrade or non-container upgrade; the determining module 1102 is specifically used to: in the case that the upgrade type indicated by the upgrade request is container upgrade, in response to the upgrade request, determine the container of the operating system to be upgraded from multiple containers; container upgrade is used to indicate the upgrade of a single container.

[0216] Optionally, the determining module 1102 is further configured to: determine the operating system to be upgraded from multiple operating systems in response to an upgrade request if preset conditions are not met; the upgrading module 1103 is further configured to: perform upgrade operations on the bootloader, kernel, and container of the operating system to be upgraded.

[0217] Optionally, the determining module 1102 is specifically used to: in the case that the upgrade type indicated by the upgrade request is a non-container upgrade, in response to the upgrade request, determine the operating system to be upgraded from multiple operating systems.

[0218] Optionally, the determining module 1102 is further configured to: if the version of the operating system to be upgraded is higher than or equal to the compatible version of the upgrade package of the operating system to be upgraded, in response to the upgrade request, determine the container of the operating system to be upgraded from the containers of multiple operating systems.

[0219] Optionally, multiple operating systems use the same bootloader and kernel, including: different operating systems in multiple operating systems share the same bootloader and kernel, or the bootloader code and kernel code in different operating systems in multiple operating systems are the same.

[0220] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the system upgrade devices 1100 provided above and the description of their beneficial effects can be found in the corresponding method embodiments described above, and will not be repeated here.

[0221] This application also provides a computing device, which includes a processor and a memory. The processor is connected to the memory, and the memory stores computer execution instructions. When the processor executes the computer execution instructions, it implements the system upgrade method described in the above embodiments.

[0222] This application also provides a computer-readable storage medium storing a computer program that, when run on a computing device, causes the computing device to perform any of the methods described above.

[0223] For explanations of the relevant content and descriptions of the beneficial effects in any of the computer-readable storage media provided above, please refer to the corresponding embodiments described above, which will not be repeated here.

[0224] This application also provides a chip. This chip integrates control circuitry for implementing the functions of the aforementioned computing device and one or more ports. Optionally, the functions supported by this chip are as described above and will not be repeated here.

[0225] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The processing unit or processor mentioned above can be a central processing unit, a general-purpose processor, an application-specific integrated circuit (ASIC), a microprocessor (DSP), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.

[0226] This application also provides a computer program product containing instructions that, when executed on a computing device, cause the computing device to perform any of the methods described in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computing device, all or part of the flow or function according to the embodiments of this application is generated. It should be noted that the devices for storing computer instructions or computer programs provided in the embodiments of this application, such as, but not limited to, the aforementioned memory, computer-readable storage medium, and communication chip, are all non-transitory.

[0227] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computing device, all or part of the flow or function according to the embodiments of this application is generated. The computing device can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0228] Computer instructions can be stored in or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computing device, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. A computer-readable storage medium can be any available medium accessible to a computing device or a data storage device such as a server or data center that integrates one or more media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives).

[0229] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, the disclosure, and the appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0230] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

Claims

1. An operating system upgrade method characterized by comprising: A computing device, the computing device including multiple operating systems, each of the multiple operating systems including a bootloader, a kernel, and a container, wherein the bootloader and the kernel used by the multiple operating systems are the same; the method includes: Receive an upgrade request; the upgrade request is used to request an operating system upgrade. Based on the upgrade type indicated in the upgrade request, determine whether the preset conditions are met; or, based on the version of the operating system to be upgraded and the compatible version of the upgrade package for the operating system to be upgraded, determine whether the preset conditions are met; or, based on the bootloader and kernel of the currently running operating system, determine whether the preset conditions are met. If the preset conditions are met, in response to the upgrade request, the container of the operating system to be upgraded is determined from the multiple containers corresponding to the multiple operating systems; The upgrade operation is performed on the container of the operating system to be upgraded, but the upgrade operation is not performed on the bootloader and / or kernel of the operating system to be upgraded.

2. The method of claim 1, wherein, The plurality of containers includes a first container and a second container; In response to the upgrade request, determining the container for the operating system to be upgraded from the multiple containers corresponding to the multiple operating systems includes: In response to the upgrade request, the root directory path is obtained, which is used to indicate the container currently in a running state, and the root directory path indicates the first container; Based on the root directory path indicating the first container, the second container is determined to be the container for the operating system to be upgraded.

3. The method of claim 1, wherein, The plurality of containers includes a first container; the step of determining the container for the operating system to be upgraded from the plurality of containers corresponding to the plurality of operating systems in response to the upgrade request includes: In response to the upgrade request, the root directory path is obtained, which is used to indicate the container currently in a running state, and the root directory path indicates the first container; Based on the root directory path indicating the first container, the first container is determined to be the container of the operating system to be upgraded.

4. The method of claim 1, wherein, The upgrade request includes a container identifier that indicates a second container among the plurality of containers; In response to the upgrade request, determining the container for the operating system to be upgraded from the multiple containers corresponding to the multiple operating systems includes: In response to the upgrade request, the second container is identified based on the container identifier, and the second container is determined to be the container of the operating system to be upgraded.

5. The method according to any one of claims 1-4, characterized in that, Under the condition of satisfying preset conditions, in response to the upgrade request, determining the container of the operating system to be upgraded from the multiple containers corresponding to the multiple operating systems includes: If the upgrade type indicated by the upgrade request is a container upgrade, in response to the upgrade request, the container of the operating system to be upgraded is determined from the plurality of containers; the container upgrade is used to indicate the upgrade of a single container of the operating system.

6. The method according to any one of claims 1-4, characterized in that, The method further includes: If the preset conditions are not met, in response to the upgrade request, the operating system to be upgraded is determined from the plurality of operating systems; The upgrade operation is performed on the bootloader, kernel, and container of the operating system to be upgraded.

7. The method according to claim 6, characterized in that, In the event that preset conditions are not met, in response to the upgrade request, determining the operating system to be upgraded from the plurality of operating systems includes: If the upgrade type indicated by the upgrade request is a non-container upgrade, the operating system to be upgraded is determined from the plurality of operating systems in response to the upgrade request.

8. The method according to any one of claims 1-4, characterized in that, Under the condition of satisfying preset conditions, in response to the upgrade request, determining the container of the operating system to be upgraded from the multiple containers corresponding to the multiple operating systems includes: If the version of the operating system to be upgraded is higher than or equal to the compatible version of the upgrade package of the operating system to be upgraded, in response to the upgrade request, the container of the operating system to be upgraded is determined from the multiple containers corresponding to the multiple operating systems.

9. A chip, characterized in that, include: A processor and a memory, wherein the processor is connected to the memory; The memory is used to store computer execution instructions, and the processor executes the computer execution instructions stored in the memory to cause the chip to implement the method as described in any one of claims 1-8.

10. A computing device, characterized in that, include: A power supply and a chip as described in claim 9, wherein the power supply is used to power the chip, and the chip is used to implement the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Distributed storage operating system upgrading method and device, equipment and medium

    CN115495131A

  • Multi-operating system upgrading method, device and system based on multi-core heterogeneous SOC

    CN115658160A