Classification Method for Operating System Startup Items, Computer Program Product, and Server

By comparing and classifying the startup file paths and names of the operating system in the server, the system-level failure risk caused by choosing an unauthenticated operating system is solved, achieving higher server security and stability.

CN120066598BActive Publication Date: 2025-08-05INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510546524.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-05
Estimated Expiration
2045-04-28

AI Technical Summary

Technical Problem

In the prior art, when the server selects an unauthenticated operating system startup item, it is easy to increase the risk of system-level failure.

Method used

By obtaining the startup file path and name of the operating system, comparing it with the certified operating system, creating and classifying startup items, making sure that you are choosing a certified or unauthenticated operating system.

Benefits of technology

Reduces the risk of server system-level failure caused by wrong selection of unauthenticated operating system startup items, and improves the security and stability of the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066598B_ABST
    Figure CN120066598B_ABST
Patent Text Reader

Abstract

The present application discloses a classification method for operating system startup items, a computer program product, and a server, relating to the technical field of servers, including: obtaining the path and name of the startup file of a first operating system; comparing the name and path of the startup file of the first operating system with the name and path of the startup files of the operating systems that have been authenticated by the server to determine the comparison result; and further classifying the startup item corresponding to the first operating system according to the comparison result to determine whether the startup item corresponding to the first operating system is the startup item corresponding to the operating system that has been authenticated by the server or the startup item corresponding to the operating system that has not been authenticated by the server, realizing the classification of the startup items corresponding to the operating systems, which helps to reduce the risk of server system-level failures that may be caused by wrongly selecting the startup items corresponding to the unauthenticated operating systems and improves the security of the server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of servers, and in particular, to a classification method for operating system startup items, a computer program product, and a server. Background Art

[0002] A server is composed of components such as a central processing unit, a hard disk, and a network card. After the server is assembled as a whole, an operating system needs to be installed to ensure its normal operation. When the server starts up, the Basic Input Output System (BIOS) will first initialize the hardware, including setting the register values of the central processing unit and peripherals. After the initialization is completed, the BIOS will select to enter the operating system, the BIOS setup interface, or other functional modules according to the preset startup sequence. By default, the server enters the operating system through a boot loader.

[0003] The startup items corresponding to the operating systems that the BIOS can select include two categories: the startup items corresponding to the operating systems certified by the server, and the startup items corresponding to the operating systems not certified by the server. Users may choose to install an uncertified operating system for specific needs (such as running a custom operating system). However, compared with the certified operating systems, the uncertified operating systems are more likely to have compatibility or stability problems. When the server enters the operating system, if the startup items are not distinguished and directly selected to enter the corresponding operating system, it will increase the risk of system-level failures of the server. Summary of the Invention

[0004] This application provides a classification method for operating system startup items, a computer program product, and a server, so as to at least solve the problem in the related art that when the server enters the operating system, directly selecting the startup item and entering the corresponding operating system will increase the risk of system-level failures of the server.

[0005] This application provides a classification method for operating system startup items, including:

[0006] In the case where the server has installed the first operating system and is restarted, obtain the path and name of the startup file of the first operating system, and the first operating system is installed on the startup device of the server;

[0007] Compare the name and path of the startup file of the first operating system with the name and path of the startup files of the operating systems certified by the server to determine the comparison result;

[0008] Create a startup item corresponding to the first operating system according to the startup file of the first operating system under the path of the startup file of the first operating system;

[0009] Classify the startup items corresponding to the first operating system according to the comparison result, and determine the classification result of the startup items corresponding to the first operating system. The classification result includes: startup items corresponding to the operating system authenticated by the server or startup items corresponding to the operating system not authenticated by the server.

[0010] This application also provides a computer program product, including:

[0011] An acquisition unit, configured to acquire the path and name of the startup file of the first operating system when the server has installed the first operating system and restarts. The first operating system is installed on the startup device of the server;

[0012] A comparison unit, configured to compare the name and path of the startup file of the first operating system with the name and path of the startup file of the operating system authenticated by the server, and determine the comparison result;

[0013] A creation unit, configured to create a startup item corresponding to the first operating system according to the startup file of the first operating system under the path of the startup file of the first operating system;

[0014] A classification unit, configured to classify the startup item corresponding to the first operating system according to the comparison result, and determine the classification result of the startup item corresponding to the first operating system. The classification result includes: startup items corresponding to the operating system authenticated by the server or startup items corresponding to the operating system not authenticated by the server.

[0015] This application also provides a server, including: a memory for storing a computer program; a processor for implementing the steps of any of the above-mentioned classification methods of operating system startup items when executing the computer program.

[0016] This application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned classification methods of operating system startup items are implemented.

[0017] Through the classification method of operating system startup items provided by this application, the name and path of the startup file of the operating system are compared with the name and path of the startup file of the operating system authenticated by the server to determine the comparison result, and further classify the startup item corresponding to the operating system according to the comparison result to determine that the startup item corresponding to the operating system is the startup item corresponding to the operating system authenticated by the server or the startup item corresponding to the operating system not authenticated by the server, realizing the classification of the startup item corresponding to the operating system. When it is necessary to install an operating system not authenticated by the server, classify the startup item of the operating system before selecting the startup item and entering the corresponding operation, which helps to reduce the risk of server system-level failures that may be caused by misselecting the startup item corresponding to the unauthenticated operating system, and improves the security of the server. Brief Description of the Drawings

[0018] To more clearly illustrate the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 One of the flow diagrams of the classification method for operating system startup items provided in some embodiments of the present application;

[0020] Figure 2 Another flow diagram of the classification method for operating system startup items provided in some embodiments of the present application;

[0021] Figure 3 One of the swimlane diagrams of the classification method for operating system startup items provided in some embodiments of the present application;

[0022] Figure 4 Another swimlane diagram of the classification method for operating system startup items provided in some embodiments of the present application;

[0023] Figure 5 Schematic diagram of a computer program product provided in some embodiments of the present application;

[0024] Figure 6 Connection diagram of a server provided in some embodiments of the present application.

[0025] Explanation of Reference Numerals:

[0026] 500: Computer program product; 501: Acquisition unit; 502: Comparison unit;

[0027] 503: Creation unit; 504: Classification unit. Detailed Embodiments

[0028] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort fall within the protection scope of the present application.

[0029] It should be noted that in the description of this application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0030] In order to enable those skilled in the art of this technical field to better understand the solution of this application, the following further describes this application in detail with reference to the accompanying drawings and specific embodiments.

[0031] The embodiments of this application provide a classification method for operating system startup items. The method is described in detail in combination with the execution process of the classification method for operating system startup items.

[0032] Specifically, Figure 1 This is one of the flow diagrams of the classification method for operating system startup items provided by some embodiments of this application. As Figure 1 shown, the classification method for operating system startup items includes: step 110, step 120, step 130 and step 140.

[0033] Step 110: When the server has installed the first operating system and is restarted, obtain the path and name of the startup file of the first operating system, and the first operating system is installed on the startup device of the server.

[0034] In some embodiments, obtaining the path and name of the startup file of the first operating system includes:

[0035] When the Basic Input Output System (BIOS) of the server is in the driver execution environment stage, obtain the path and name of the startup file of the first operating system.

[0036] Optionally, during the startup (restart) process of the server, the basic input output system performs hardware initialization, and after the initialization is completed, it enters the Driver Execution Environment (DXE) stage. In the DXE stage, the BIOS is mainly used to load necessary driver programs, including driver programs for storage devices such as hard disks or solid state drives, so that the BIOS can identify and access the storage devices. The BIOS searches for a boot loader (also called a boot program) on the recognizable storage device and loads the found boot loader into the memory of the server. The boot loader reads and analyzes the configuration file, and determines the path and name of the startup file of the first operating system according to the information in the configuration file.

[0037] The startup file can be an Extensible Firmware Interface (EFI) file with an EFI file extension, which is an executable file of the boot loader and contains data on how the startup process proceeds.

[0038] In the case where the basic input / output system of the server is in a driver execution environment, obtaining the path and name of the startup file of the first operating system is a specific implementation manner for obtaining the path and name of the startup file of the first operating system. This application does not specifically limit how to obtain the path and name of the startup file of the first operating system when the first operating system has been installed on the server and the server is restarted.

[0039] The startup device of the server can be a hard disk - type startup device (such as a hard disk or a solid - state drive in the above - mentioned embodiments), a network card - type startup device, an optical drive - type startup device, a universal serial bus - type startup device, etc. Different startup devices enable the server to load the boot loader through different media methods, thereby booting the operating system. This application does not limit the specific type of the startup device of the server. In some embodiments, the server may also have multiple startup devices.

[0040] Step 120: Compare the name and path of the startup file of the first operating system with the name and path of the startup files of the operating systems authenticated by the server, and determine the comparison result.

[0041] The operating systems authenticated by the server can be considered as a set of operating systems, which includes at least one operating system (there may also be a case where the set does not include any operating system, that is, there is no operating system authenticated by the server).

[0042] In some embodiments, the process of comparing the name and path of the startup file of the first operating system with the name and path of the startup files of the operating systems authenticated by the server is as follows:

[0043] Traverse the paths of the startup files of each operating system in the operating systems authenticated by the server, and check whether there is a path in the paths of the startup files of the operating systems authenticated by the server that is the same as the path of the startup file of the first operating system. If there is, then further compare whether the name of the startup file corresponding to this path is the same as the name of the startup file of the first operating system. When both the path and the name are the same, it is considered that the startup file of the first operating system matches the startup file of a certain operating system in the operating systems authenticated by the server, and it can also be considered that the first operating system is an operating system authenticated by the server.

[0044] Step 130: Create a startup item corresponding to the first operating system based on the startup file of the first operating system in the path of the startup file.

[0045] The startup item corresponding to the first operating system can be understood as the startup option set for the first operating system. The startup item includes information required to start the first operating system, such as the path of the startup file of the first operating system, the name of the startup file of the first operating system, and startup parameters, etc. This startup item needs to be displayed in the Boot Option (startup selection) interface of the BIOS so that this startup item can be selected to ensure that the server can normally start the first operating system from this startup item.

[0046] This application does not limit the specific implementation process of creating the startup item corresponding to the first operating system.

[0047] Step 140: Classify the startup item corresponding to the first operating system according to the comparison result, and determine the classification result of the startup item corresponding to the first operating system. The classification result includes: the startup item corresponding to the operating system authenticated by the server or the startup item corresponding to the operating system not authenticated by the server.

[0048] Optionally, there are also other forms of expression for the classification result of the startup item corresponding to the first operating system. For example, FW is used to indicate that the server is authenticated, and No-FW is used to indicate that the server is not authenticated.

[0049] It can be understood that the startup item corresponding to the first operating system is the startup option of the first operating system. Classifying the startup item corresponding to the first operating system can also be considered as classifying the first operating system. If the first operating system is an operating system not authenticated by the server, relevant information of the first operating system can be recorded so that fault reproduction and location can be performed when the server has a system-level failure.

[0050] In some embodiments, the classification method of the operating system startup item further includes:

[0051] In the case where the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, use the name of the startup file of the first operating system as the name of the startup item corresponding to the first operating system.

[0052] The classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, that is, the first operating system is an operating system not authenticated by the server. In this case, directly use the name of the startup file of the first operating system as the name of the startup item corresponding to the first operating system.

[0053] It can be understood that since the uncertified operating system of such a server usually does not have a preset name in the server, and its corresponding startup item usually does not have a preset name either, directly using the startup file name of the uncertified operating system of the server as the name of the startup item corresponding to this operating system can effectively avoid name conflicts with the certified operating systems of existing servers, help improve the recognizability of the startup item corresponding to each operating system, and avoid problems such as misselecting the startup item due to duplicate or incorrect startup item names.

[0054] In the embodiment of the present application, when the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the uncertified operating system of the server, using the name of the startup file of the first operating system as the name of the startup item corresponding to the first operating system can effectively avoid name conflicts with the certified operating systems of existing servers and help improve the recognizability of the startup item corresponding to each operating system.

[0055] In the embodiment of the present application, when the server has installed the first operating system and is restarted, the path and name of the startup file of the first operating system are obtained, compared with the name and path of the startup file of the certified operating system of the server, the comparison result is determined, and the startup item corresponding to the first operating system is classified according to the comparison result to determine whether it is the startup item corresponding to the certified operating system of the server or the startup item corresponding to the uncertified operating system of the server, realizing the classification of the startup item of the first operating system. When it is necessary to install an uncertified operating system of the server, classifying the startup item of the operating system before selecting the startup item and entering the corresponding operation helps reduce the risk of server system-level failures that may be caused by misselecting the startup item corresponding to the uncertified operating system and improves the security of the server.

[0056] In some embodiments of the present application, before obtaining the path and name of the startup file of the first operating system when the server has installed the first operating system and is restarted, the method further includes:

[0057] Writing the name and path of the startup file of the certified operating system of the server into the basic input / output system of the server, and the certified operating system of the server includes at least one operating system.

[0058] It can be understood that writing the name and path of the startup file of the certified operating system of the server into the basic input / output system of the server before obtaining the path and name of the startup file of the first operating system enables direct comparison with the name and path of the startup file of the certified operating system of the server after obtaining the path and name of the startup file of the first operating system, effectively improving the comparison efficiency.

[0059] In some embodiments, writing the name and path of the startup file of the server's authenticated operating system to the server's basic input / output system includes:

[0060] Writing the name and path of the startup file of the server's authenticated operating system to the non-volatile random access memory of the basic input / output system.

[0061] The non-volatile random access memory (Non-Volatile Random Access Memory, NVRAM) has the characteristic of non-volatility, and the data will not be lost even after power failure.

[0062] During the process of installing the operating system on the server, the server needs to be restarted. Therefore, writing the name and path of the server's authenticated startup file to the NVRAM of the BIOS ensures that the name and path of the server's authenticated startup file will not be lost due to the server's restart and power failure, achieving effective storage of the name and path of the server's authenticated startup file in the scenario of installing the operating system on the server.

[0063] Writing the name and path of the server's authenticated operating system's startup file to the NVRAM of the BIOS also avoids the need to rewrite the name and path of the server's authenticated startup file every time a new operating system is installed on the server. After obtaining the path and name of the startup file of the first operating system, it can be directly compared with the name and path of the server's authenticated startup file stored in the NVRAM.

[0064] Writing the name and path of the server's authenticated operating system's startup file to the non-volatile random access memory of the basic input / output system improves the storage effect of the name and path of the server's authenticated startup file in the scenario of installing the operating system on the server.

[0065] In the embodiments of the present application, when the server has installed the first operating system and is restarted, before obtaining the path and name of the startup file of the first operating system, the name and path of the server's authenticated operating system's startup file are written to the server's basic input / output system, enabling direct comparison after obtaining the path and name of the startup file of the first operating system, improving the comparison efficiency, and thus improving the classification efficiency of the operating system startup items.

[0066] In some embodiments of the present application, comparing the name and path of the startup file of the first operating system with the name and path of the server's authenticated operating system's startup file to determine the comparison result includes:

[0067] When the path of the startup file of the operating system in the server-authenticated operating system is the same as the path of the startup file of the first operating system, and the name of the startup file of the operating system is the same as the name of the startup file of the first operating system, it is determined that the comparison result is consistent.

[0068] When the path of the startup file of the operating system in the server-authenticated operating system is not the same as the path of the startup file of the first operating system, and / or when the name of the startup file of the operating system in the server-authenticated operating system is not the same as the name of the startup file of the first operating system, it is determined that the comparison result is inconsistent.

[0069] When the path of the startup file of the operating system in the server-authenticated operating system is the same as the path of the startup file of the first operating system, and the name of the startup file of the operating system is the same as the name of the startup file of the first operating system, it is determined that the comparison result is consistent. In other words, a double comparison of the name and path of the startup file of the first operating system is performed. This to a certain extent avoids an unauthenticated operating system on the server from disguising itself as a server-authenticated operating system by tampering with the name or path of the startup file (only tampering with one of them), improving the reliability of the comparison result.

[0070] In an embodiment of the present application, when the path of the startup file of the operating system in the server-authenticated operating system is the same as the path of the startup file of the first operating system, and the name of the startup file of the operating system is the same as the name of the startup file of the first operating system, it is determined that the comparison result is consistent. If the path of the startup file is inconsistent, the name of the startup file is inconsistent, or both the path and name of the startup file are inconsistent, the comparison result is inconsistent. Through the double comparison of the path and name of the startup file, the reliability of the comparison result is improved. According to the comparison result, the classification result of the startup item of the first operating system can be further determined, and the reliability of the classification result is also improved.

[0071] In some embodiments of the present application, classifying the startup item corresponding to the first operating system according to the comparison result to determine the classification result of the startup item corresponding to the first operating system includes:

[0072] When the comparison result is consistent, it is determined that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-authenticated operating system;

[0073] When the comparison result is inconsistent, it is determined that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-unauthenticated operating system.

[0074] It can be understood that when the comparison results are the same, that is, the name and path of the startup file of the first operating system are the same as those of the startup file of the operating system authenticated by the server, in this case, it can be considered that the startup file of the first operating system is the startup file of the operating system authenticated by the server. And according to the startup file of the first operating system under the path of the startup file of the first operating system, a startup item corresponding to the first operating system is created. Therefore, it can also be further considered that the startup item of the first operating system is the startup item of the operating system authenticated by the server, that is, the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server.

[0075] When the comparison results are different, that is, the name and path of the startup file of the first operating system are different from those of the startup file of the operating system authenticated by the server, in this case, it can be considered that the startup file of the first operating system is the startup file of the operating system not authenticated by the server. And according to the startup file of the first operating system under the path of the startup file of the first operating system, a startup item corresponding to the first operating system is created. Therefore, it can also be further considered that the startup item of the first operating system is the startup item of the operating system not authenticated by the server, that is, the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server.

[0076] In the embodiments of the present application, the classification result of the startup item corresponding to the operating system is determined according to the comparison result between the name and path of the startup file of the first operating system and the name and path of the startup file of the operating system authenticated by the server. The comparison result is determined according to two parameters, namely the name and path of the startup file, which has high reliability. This further improves the reliability of the classification result. The reliable classification of the startup item corresponding to the operating system helps to reduce the risk of server system-level failures that may be caused by mistakenly selecting the startup item corresponding to the unauthenticated operating system, and improves the security of the server.

[0077] In some embodiments of the present application, after classifying the startup item corresponding to the first operating system according to the comparison result and determining the classification result of the startup item corresponding to the first operating system, the method further includes:

[0078] When the second operating system is to be installed on the startup device, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system.

[0079] It can be understood that the startup device originally installed the first operating system, so installing the second operating system on this startup device will overwrite the original first operating system, that is, delete the original first operating system. Before installing the second operating system, it is necessary to process the name and path of the startup file of the first operating system.

[0080] The classification results of the startup items corresponding to the first operating system include the startup items corresponding to the operating systems authenticated by the server and the startup items corresponding to the operating systems not authenticated by the server;

[0081] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server, it can be considered that the first operating system is the operating system authenticated by the server. And the operating system authenticated by the server has high stability and compatibility, and is not likely to have faults such as component compatibility or card dropout. Therefore, in this case, usually no additional processing is required for the name and path of the startup file of the first operating system, and the deletion operation will be normally executed;

[0082] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, it can be considered that the first operating system is the operating system not authenticated by the server. The operating system not authenticated by the server is more likely to have compatibility problems or cause system-level faults in the server than the operating system authenticated by the server. Therefore, in this case, usually the relevant information of the first operating system needs to be stored or recorded. For example, the name and path of the startup file of the first operating system are stored. When the server has system-level faults or compatibility problems in the future, the faults can be reproduced or located according to the stored content.

[0083] In the embodiment of the present application, when the second operating system is installed on the startup device, it will overwrite the original first operating system. Before installation, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system. In the case of server faults caused by the operating system, the name and path of the startup file of the first operating system can be used for fault reproduction or location, which helps to quickly solve the server faults.

[0084] In some embodiments of the present application, when the second operating system is to be installed on the startup device, according to the classification result of the startup item corresponding to the first operating system, the processing of the name and path of the startup file of the first operating system includes:

[0085] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, store the name and path of the startup file of the first operating system.

[0086] As in the foregoing embodiments, when the classification result of the startup item corresponding to the first operating system is the startup item corresponding to an operating system not authenticated by the server, it can be considered that the first operating system is an operating system not authenticated by the server. An operating system not authenticated by the server is more likely to have compatibility issues or cause system-level failures on the server. Therefore, in this case, it is necessary to store the name and path of the startup file of the first operating system. When a system-level failure or compatibility issue occurs on the server subsequently, the cause of the server failure can be reproduced or located based on the stored content, which helps to more quickly identify the cause of the server failure.

[0087] When the current operating system (the second operating system) is to be installed, first determine the classification result of the startup item corresponding to the previous operating system (the first operating system). If the classification result of the startup item corresponding to the previous operating system is the startup item corresponding to an operating system not authenticated by the server, then store the name and path of the startup file of the previous operating system.

[0088] In some embodiments, storing the name and path of the startup file of the first operating system includes:

[0089] Write the name and path of the startup file of the first operating system into the non-volatile random access memory of the basic input / output system.

[0090] The non-volatile random access memory (Non-Volatile Random Access Memory, NVRAM) has the characteristic of non-volatility, and the data will not be lost even after a power outage. During the process of installing an operating system on the server, the server will be restarted. Therefore, by writing the name and path of the startup file of the first operating system into the NVRAM of the BIOS, the name and path of the startup file of the first operating system will not be lost due to the restart and power outage of the server. Therefore, the name and path of the startup files of all operating systems not authenticated by the server that have been installed on the server should be stored in the NVRAM of the BIOS.

[0091] In the embodiments of the present application, by writing the name and path of the startup file of the first operating system into the non-volatile random access memory of the basic input / output system, and the non-volatile random access memory has the characteristic of non-volatility, and the data will not be lost even after a power outage, the storage of the name and path of the startup files of the operating systems not authenticated by the server that have been installed on the server is achieved.

[0092] In the embodiment of the present application, when the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, the name and path of the startup file of the first operating system are stored. In the case of a server failure caused by the operating system, the failure can be reproduced or the problem can be located according to the name and path of the startup file of the unauthenticated operating system, which helps to quickly solve the server failure.

[0093] In some embodiments of the present application, when the second operating system is to be installed on the startup device, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system, including:

[0094] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server, the name and path of the startup file of the first operating system are deleted.

[0095] As in the foregoing embodiment, when the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server, it can be considered that the first operating system is the operating system authenticated by the server, and the operating system authenticated by the server has high stability and compatibility and is not likely to have faults such as component compatibility or card dropout. Therefore, in this case, the name and path of the startup file of the first operating system can be deleted to avoid continuously occupying the storage space of the server or the BIOS.

[0096] In the embodiment of the present application, when the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server, the name and path of the startup file of the first operating system are deleted, reducing the occupation of the storage space of the server or the BIOS.

[0097] In some embodiments of the present application, the method further includes: installing the first operating system on the startup device of the server;

[0098] Installing the first operating system on the startup device of the server includes one of the following:

[0099] Installing the first operating system on the startup device through the Pre-Boot Execution Environment,

[0100] Installing the first operating system on the startup device through a Compact Disc Read Only Memory / Digital Versatile Disc Read Only Memory,

[0101] Installing the first operating system on the startup device through a Universal Serial Bus flash drive.

[0102] In the embodiments of the present application, the first operating system can be installed on the boot device through the Preboot Execution Environment (PXE), or through a Compact Disc-Read Only Memory (CD-ROM) / Digital Versatile Disc-Read Only Memory (DVD-ROM), or through a Universal Serial Bus Flash Drive (USB flash drive) on the boot device.

[0103] The method of installing the operating system on the boot device of the server depends on the actual application scenario and can also be an installation method other than the embodiments of the present application.

[0104] In the embodiments of the present application, the first operating system can be installed on the boot device through the Preboot Execution Environment, a Compact Disc-Read Only Memory / Digital Versatile Disc-Read Only Memory, or a Universal Serial Bus Flash Drive, specifically depending on the actual application scenario, which improves the applicability of the classification method for operating system boot items.

[0105] For example, Figure 2 This is the second flowchart of the classification method for operating system boot items provided by some embodiments of the present application. As Figure 2 shown, the method includes: Step 201, Step 202, Step 203, Step 204, Step 205, Step 206, Step 207, Step 208, and Step 209.

[0106] Step 201: Write the name and path of the boot file of the authenticated operating system of the server into the non-volatile random access memory of the basic input / output system.

[0107] Step 202: Install the first operating system on the boot device of the server;

[0108] Installing the first operating system on the boot device of the server includes one of the following:

[0109] Install the first operating system on the boot device through the Preboot Execution Environment,

[0110] Install the first operating system on the boot device through a Compact Disc-Read Only Memory / Digital Versatile Disc-Read Only Memory,

[0111] Install the first operating system on the boot device through a Universal Serial Bus Flash Drive.

[0112] Step 203: When the server has installed the first operating system and restarted, and the basic input / output system of the server is in the driver execution environment phase, obtain the path and name of the startup file of the first operating system.

[0113] Step 204: Determine whether the name and path of the startup file of the first operating system are the same as those of the startup file of the operating system already authenticated by the server.

[0114] Step 205: When it is determined that the name and path of the startup file of the first operating system are the same as those of the startup file of the operating system already authenticated by the server, determine that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system already authenticated by the server.

[0115] Step 206: When it is determined that the name and path of the startup file of the first operating system are different from those of the startup file of the operating system already authenticated by the server, determine that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server.

[0116] Step 207: When the second operating system is to be installed on the startup device, process the name and path of the startup file of the first operating system according to the classification result of the startup item corresponding to the first operating system.

[0117] Step 208: When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system not authenticated by the server, store the name and path of the startup file of the first operating system.

[0118] Step 209: When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system already authenticated by the server, delete the name and path of the startup file of the first operating system.

[0119] And, Figure 3 is one of the swimlane diagrams of the classification method of operating system startup items provided by some embodiments of this application. As Figure 3 shown, the process of the classification method of operating system startup items may further include:

[0120] The basic input / output system writes the name and path of the startup file of the operating system already authenticated by the server into the non-volatile random access memory of the basic input / output system;

[0121] The server powers on and boots up;

[0122] Install an operating system on the server, including one of the following: install the operating system through the Pre-Boot Execution Environment, install the operating system through a Compact Disc Read Only Memory / Digital Versatile Disc Read Only Memory, install the operating system through a Universal Serial Bus flash drive;

[0123] After completing the installation of the operating system, restart the server;

[0124] When the Basic Input / Output System is in the driver execution environment phase, the Basic Input / Output System obtains the path and name of the startup file of the current operating system;

[0125] The Basic Input / Output System obtains the name and path of the startup file of the authenticated operating system in the non-volatile random access memory;

[0126] The Basic Input / Output System determines whether the name and path of the startup file of the current operating system are the same as the name and path of the startup file of the authenticated operating system of the server;

[0127] If the name and path of the startup file of the current operating system are the same as the name and path of the startup file of the authenticated operating system of the server, the Basic Input / Output System determines that the classification result of the startup item corresponding to the current operating system is the startup item corresponding to the authenticated operating system of the server;

[0128] If the name and path of the startup file of the current operating system are not the same as the name and path of the startup file of the authenticated operating system of the server, the Basic Input / Output System determines that the classification result of the startup item corresponding to the current operating system is the startup item corresponding to the unauthenticated operating system of the server;

[0129] The Basic Input / Output System completes the classification of the operating system and continues to start and enter the operating system;

[0130] When the server needs to install a new operating system, restart the server.

[0131] And, Figure 4 This is the second swimlane diagram of the classification method for operating system startup items provided by some embodiments of this application. As Figure 4 shown, the process of the classification method for operating system startup items may further include:

[0132] Restart the server;

[0133] When the Basic Input / Output System is in the driver execution environment phase, the Basic Input / Output System obtains the path and name of the startup file of the current operating system;

[0134] The Basic Input / Output System obtains the name and path of the startup file of the authenticated operating system in the non-volatile random access memory;

[0135] The Basic Input / Output System determines whether the name and path of the startup file of the current operating system are the same as those of the startup file of the operating system authenticated by the server.

[0136] If the name and path of the startup file of the current operating system are the same as those of the startup file of the operating system authenticated by the server, the Basic Input / Output System determines that the classification result of the startup item corresponding to the current operating system is the startup item corresponding to the operating system authenticated by the server.

[0137] If the name and path of the startup file of the current operating system are different from those of the startup file of the operating system authenticated by the server, the Basic Input / Output System determines that the classification result of the startup item corresponding to the current operating system is the startup item corresponding to the operating system not authenticated by the server.

[0138] The Basic Input / Output System determines whether the classification results of the startup items corresponding to the current operating system and the startup items corresponding to the previously installed operating system are both the startup items corresponding to the operating system authenticated by the server.

[0139] When the classification results of the startup items corresponding to the current operating system and the startup items corresponding to the previously installed operating system are both the startup items corresponding to the operating system authenticated by the server, the Basic Input / Output System deletes the name and path of the startup file of the previously installed operating system and saves the name and path of the startup file of the currently installed operating system.

[0140] When there is a startup item corresponding to the operating system not authenticated by the server among the classification results of the startup items corresponding to the current operating system and the startup items corresponding to the previously installed operating system, the Basic Input / Output System determines whether the classification result of the startup item corresponding to the previously installed operating system is the startup item corresponding to the operating system authenticated by the server.

[0141] When the classification result of the startup item corresponding to the previously installed operating system is the startup item corresponding to the operating system authenticated by the server, the Basic Input / Output System deletes the name and path of the startup file of the previously installed operating system and saves the name and path of the startup file of the currently installed operating system.

[0142] When the classification result of the startup item corresponding to the previously installed operating system is the startup item corresponding to the operating system not authenticated by the server, the Basic Input / Output System saves the name and path of the startup file of the previously installed operating system.

[0143] The Basic Input / Output System completes the classification of the operating system and continues to start and enter the operating system.

[0144] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0145] Figure 5 It is a schematic diagram of a computer program product provided by some embodiments of the present application. As Figure 5 shown, the present application also provides a computer program product 500, including:

[0146] An acquisition unit 501, configured to obtain the path and name of the startup file of the first operating system when the server has installed the first operating system and restarted, and the first operating system is installed on the startup device of the server;

[0147] A comparison unit 502, configured to compare the name and path of the startup file of the first operating system with the name and path of the startup file of the operating system authenticated by the server, and determine the comparison result;

[0148] A creation unit 503, configured to create a startup item corresponding to the first operating system according to the startup file of the first operating system under the path of the startup file of the first operating system;

[0149] A classification unit 504, configured to classify the startup item corresponding to the first operating system according to the comparison result, and determine the classification result of the startup item corresponding to the first operating system. The classification result includes: the startup item corresponding to the operating system authenticated by the server or the startup item corresponding to the operating system not authenticated by the server.

[0150] Optionally, the computer program product 500 further includes a first processing unit, and the first processing unit is configured to:

[0151] Write the name and path of the startup file of the operating system authenticated by the server into the basic input / output system of the server. The operating system authenticated by the server includes at least one operating system.

[0152] Optionally, the comparison unit 502 is configured to:

[0153] When there is an operating system startup file path in the operating systems authenticated by the server that is the same as the startup file path of the first operating system, and the name of the operating system startup file is the same as the name of the first operating system startup file, determine that the comparison result is consistent;

[0154] When the path of the startup file of the operating system in the server-authenticated operating system is the same as the path of the startup file of the first operating system, and / or when the name of the startup file of the operating system in the server-authenticated operating system is the same as the name of the startup file of the first operating system, it is determined that the comparison result is inconsistent.

[0155] Optionally, the classification unit 504 is used for:

[0156] When the comparison result is consistent, it is determined that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-authenticated operating system;

[0157] When the comparison result is inconsistent, it is determined that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-unauthenticated operating system.

[0158] Optionally, the computer program product 500 further includes a second processing unit, and the second processing unit is used for:

[0159] When the second operating system is to be installed on the startup device, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system.

[0160] Optionally, when the second operating system is to be installed on the startup device, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system, including:

[0161] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-unauthenticated operating system, the name and path of the startup file of the first operating system are stored.

[0162] Optionally, when the second operating system is to be installed on the startup device, the name and path of the startup file of the first operating system are processed according to the classification result of the startup item corresponding to the first operating system, including:

[0163] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-authenticated operating system, the name and path of the startup file of the first operating system are deleted.

[0164] Optionally, the computer program product 500 further includes a third processing unit, and the third processing unit is used for:

[0165] When the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the server-unauthenticated operating system, the name of the startup file of the first operating system is used as the name of the startup item corresponding to the first operating system.

[0166] Optionally, write the name and path of the startup file of the server-authenticated operating system to the server's basic input / output system, including:

[0167] Write the name and path of the startup file of the server-authenticated operating system to the non-volatile random access memory of the basic input / output system.

[0168] Optionally, store the name and path of the startup file of the first operating system, including:

[0169] Write the name and path of the startup file of the first operating system to the non-volatile random access memory of the basic input / output system.

[0170] Optionally, the computer program product 500 further includes a third processing unit for:

[0171] Install the first operating system on the startup device of the server;

[0172] Install the first operating system on the startup device of the server, including one of the following:

[0173] Install the first operating system on the startup device through the pre-boot execution environment,

[0174] Install the first operating system on the startup device through a compact disc read-only memory / digital versatile disc read-only memory,

[0175] Install the first operating system on the startup device through a universal serial bus flash drive.

[0176] For the description of the features in the embodiments corresponding to the computer program product, reference can be made to the relevant description of the embodiments corresponding to the classification method of the operating system startup items, which will not be elaborated here one by one.

[0177] The embodiments of the present application further provide a server, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the embodiments of the above classification method of operating system startup items.

[0178] Figure 6 It is a connection schematic diagram of the server provided by some embodiments of the present application. As Figure 6 shown, the server includes:

[0179] Baseboard Management Controller (BMC), Basic Input Output System (BIOS), Central Processing Unit (CPU) 0, Central Processing Unit (CPU) 1 (that is, this server has a dual-CPU architecture).

[0180] The BMC and the BIOS are connected based on the Intelligent Platform Management Interface (IPMI).

[0181] The BMC and CPU0 are connected based on the Low Pin Count Interface (LPC) or the Peripheral Component Interconnect (PCI).

[0182] The BIOS and CPU0 are connected based on the LPC, PCI, or Quad Serial Peripheral Interface (QSPI).

[0183] CPU0 and CPU1 are connected based on the Cache Coherent Interconnect for Accelerators (CCIX), Ultra Path Interconnect (UPI), or General Memory Interconnect (GMI).

[0184] CPU0 provides a PCI interface. Figure 6 Among them, the two PCI interfaces provided by CPU0 are respectively connected to a Non-Volatile Memory Express (NVMe) hard disk and a network card; CPU1 provides a PCI interface and a Universal Serial Bus (USB) interface. Figure 6The two PCI interfaces provided by CPU1 are respectively connected to a Compact Disc-Read Only Memory (CD-ROM) and a Redundant Array of Independent Disks (RAID) card, and the USB interface provided by CPU1 is connected to a Universal Serial Bus Flash Drive (USB Flash Drive, simply referred to as a USB flash drive or U disk).

[0185] As Figure 6 shown, the server can classify the startup items corresponding to the operating system based on any of the above embodiments of the classification method for operating system startup items.

[0186] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps in any of the above embodiments of the classification method for operating system startup items when running.

[0187] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: U disk, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store computer programs.

[0188] An embodiment of the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the classification method for operating system startup items.

[0189] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any of the above embodiments of the classification method for operating system startup items.

[0190] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0191] The above has introduced in detail a classification method for operating system startup items, a computer program product, and a server provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can still be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.

Claims

1. A method for classifying operating system startup items, characterized in that: include: When a server has installed a first operating system and restarted, obtaining a path and name of a startup file of the first operating system, where the first operating system is installed on a startup device of the server; Comparing the name and path of the startup file of the first operating system with the name and path of the startup file of the operating system authenticated by the server, and determining a comparison result; Creating a startup item corresponding to the first operating system according to the startup file of the first operating system in the path of the startup file of the first operating system; Classifying the startup items corresponding to the first operating system according to the comparison result, and determining a classification result of the startup items corresponding to the first operating system, the classification result including: startup items corresponding to the operating system authenticated by the server or startup items corresponding to the operating system not authenticated by the server; In a case where a second operating system is to be installed on the boot device, processing the name and path of the boot file of the first operating system according to the classification result of the boot item corresponding to the first operating system; When a second operating system is to be installed on the startup device, processing the name and path of the startup file of the first operating system according to the classification result of the startup item corresponding to the first operating system includes: When the classification result of the startup item corresponding to the first operating system is a startup item corresponding to an operating system not authenticated by the server, the name and path of the startup file of the first operating system are stored.

2. The method for classifying operating system startup items according to claim 1, wherein: In the case where the server has installed the first operating system and restarted, before obtaining the path and name of the startup file of the first operating system, the method further includes: The name and path of the startup file of the operating system authenticated by the server are written into the basic input and output system of the server, where the operating system authenticated by the server includes at least one operating system.

3. The method for classifying operating system startup items according to claim 2, wherein: The comparing the name and path of the startup file of the first operating system with the name and path of the startup file of the operating system authenticated by the server to determine the comparison result includes: If the path of the startup file of the operating system in the authenticated operating system of the server is consistent with the path of the startup file of the first operating system, and the name of the startup file of the operating system is consistent with the name of the startup file of the first operating system, determining that the comparison result is consistent; If the path of the startup file of the operating system that does not exist in the operating system that has been authenticated by the server is consistent with the path of the startup file of the first operating system, and / or if the name of the startup file of the operating system that does not exist in the operating system that has been authenticated by the server is consistent with the name of the startup file of the first operating system, the comparison result is determined to be inconsistent.

4. The method for classifying operating system startup items according to claim 3, wherein: The classifying the startup items corresponding to the first operating system according to the comparison result to determine the classification result of the startup items corresponding to the first operating system includes: If the comparison result is consistent, determining that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server; When the comparison result is inconsistent, it is determined that the classification result of the startup item corresponding to the first operating system is a startup item corresponding to an operating system that is not authenticated by the server.

5. The method for classifying operating system startup items according to claim 1, wherein: The step of processing the name and path of the startup file of the first operating system according to the classification result of the startup item corresponding to the first operating system when the second operating system is to be installed on the startup device further includes: If the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the operating system authenticated by the server, the name and path of the startup file of the first operating system are deleted.

6. The method for classifying operating system startup items according to claim 1, wherein: The method further comprises: If the classification result of the startup item corresponding to the first operating system is a startup item corresponding to an operating system not authenticated by the server, the name of the startup file of the first operating system is used as the name of the startup item corresponding to the first operating system.

7. The method for classifying operating system startup items according to claim 2, wherein: Writing the name and path of the startup file of the operating system authenticated by the server into the basic input and output system of the server includes: The name and path of the startup file of the operating system authenticated by the server are written into the non-volatile random access memory of the basic input and output system.

8. The method for classifying operating system startup items according to claim 1, wherein: The name and path of the startup file storing the first operating system include: The name and path of the startup file of the first operating system are written into the non-volatile random access memory of the basic input and output system of the server.

9. The method for classifying operating system startup items according to claim 1, wherein: The method further includes: installing the first operating system on a boot device of the server; The step of installing the first operating system on the boot device of the server includes one of the following: Installing the first operating system on the boot device through the pre-boot execution environment, installing the first operating system on the boot device via a Compact Disc-ROM / DVD-ROM, The first operating system is installed on the boot device via a universal serial bus flash drive.

10. A computer program product, characterized in that include: an acquiring unit, configured to, when a server has installed a first operating system and is restarted, acquire a path and a name of a startup file of the first operating system, the first operating system being installed on a startup device of the server; a comparing unit, configured to compare the name and path of the startup file of the first operating system with the name and path of the startup file of the operating system authenticated by the server, and determine a comparison result; a creating unit, configured to create a startup item corresponding to the first operating system according to the startup file of the first operating system in the path of the startup file of the first operating system; a classification unit, configured to classify the startup items corresponding to the first operating system according to the comparison result, and determine a classification result of the startup items corresponding to the first operating system, the classification result including: a startup item corresponding to an operating system authenticated by the server or a startup item corresponding to an operating system not authenticated by the server; a processing unit, configured to process the name and path of a startup file of the first operating system according to the classification result of the startup item corresponding to the first operating system when a second operating system is to be installed on the startup device; When a second operating system is to be installed on the startup device, processing the name and path of the startup file of the first operating system according to the classification result of the startup item corresponding to the first operating system includes: When the classification result of the startup item corresponding to the first operating system is a startup item corresponding to an operating system not authenticated by the server, the name and path of the startup file of the first operating system are stored.

11. A server, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for classifying operating system startup items according to any one of claims 1 to 9 when executing the computer program.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for classifying operating system startup items according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Starting item management method and device of operating system and server

    CN116225548A