Classification method for starting items of operating system, computer program product and server

By classifying the operating system startup items on the server, the problem of directly selecting the operating system to increase the risk of server failure is solved, and the effect of improving server security is achieved.

CN120066598AActive Publication Date: 2025-05-30INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

When the server enters the operating system, if the startup items are not distinguished and directly selects and enters the corresponding operating system, it will increase the risk of system-level failure of the server.

Method used

By implementing the classification method of the operating system startup item on the server, the path and name of the startup file of the first operating system are obtained, and compared with the name and path of the startup file of the server's authenticated operating system, the startup item corresponding to the first operating system is classified according to the comparison results, and it is determined that it is the startup item corresponding to the operating system certified by the server or the startup item corresponding to the operating system unauthenticated by the server.

Benefits of technology

By classifying the operating system startup items, the risk of server system-level failures that may be caused by wrong selection of startup items corresponding to unauthenticated operating systems is reduced, and the security of the server is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066598A_ABST
    Figure CN120066598A_ABST
Patent Text Reader

Abstract

The invention discloses an operating system startup item classification method, a computer program product and a server, and relates to the technical field of servers, the method comprises the following steps: obtaining a path and a name of a startup file of a first operating system; comparing the name and the path of the starting file of the first operating system with the name and the path of the starting file of the operating system authenticated by the server, and determining a comparison result; the starting items corresponding to the first operating system are further classified according to the comparison result, and whether the starting items corresponding to the first operating system are the starting items corresponding to the operating system authenticated by the server or the starting items corresponding to the operating system unauthenticated by the server is determined, so that the classification of the starting items corresponding to the operating systems is realized; the system-level fault risk of the server possibly caused by mistakenly selecting the starting item corresponding to the unauthenticated operating system can be reduced, and the safety of the server is improved.
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 InputOutput 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: 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; 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; 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; 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: the startup items corresponding to the operating system authenticated by the server or the startup items corresponding to the operating system not authenticated by the server.

[0006] This application also provides a computer program product, including: 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 restarted. The first operating system is installed on the startup device of the server; 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 to determine the comparison result; 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; A classification unit, configured to 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: the startup items corresponding to the operating system authenticated by the server or the startup items corresponding to the operating system not authenticated by the server.

[0007] 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 operating system startup item classification methods when executing the computer program.

[0008] 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 operating system startup item classification methods are implemented.

[0009] Through the operating system startup item classification method 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 items corresponding to the operating system according to the comparison result to determine that the startup items corresponding to the operating system are the startup items corresponding to the operating system authenticated by the server or the startup items corresponding to the operating system not authenticated by the server, realizing the classification of the startup items corresponding to the operating system. When it is necessary to install an operating system not authenticated by the server, classify the startup items 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 items corresponding to the unauthenticated operating system, and improves the security of the server. Description of the Drawings

[0010] To more clearly illustrate the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0011] Figure 1 One of the flow diagrams of the classification method for operating system startup items provided by some embodiments of the present application; Figure 2 Another flow diagram of the classification method for operating system startup items provided by some embodiments of the present application; Figure 3 One of the swimlane diagrams of the classification method for operating system startup items provided by some embodiments of the present application; Figure 4 Another swimlane diagram of the classification method for operating system startup items provided by some embodiments of the present application; Figure 5 Schematic diagram of a computer program product provided by some embodiments of the present application; Figure 6 Connection diagram of a server provided by some embodiments of the present application.

[0012] Explanation of reference numerals: 500: Computer program product; 501: Acquisition unit; 502: Comparison unit; 503: Creation unit; 504: Classification unit. Detailed implementation manners

[0013] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying 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 efforts belong to the protection scope of the present application.

[0014] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation 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 expressly listed, or further includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0015] To enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0016] Embodiments of the present application provide a classification method for operating system startup items. The method will be described in detail in combination with the execution process of the classification method for operating system startup items.

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

[0018] 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, where the first operating system is installed on the startup device of the server.

[0019] In some embodiments, obtaining the path and name of the startup file of the first operating system includes: 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.

[0020] 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 recognize and access the storage device. The BIOS searches for a boot loader (also called a bootstrap program) on the recognizable storage device and loads the found boot loader into the memory of the server. The boot loader reads and parses 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.

[0021] 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.

[0022] When the basic input / output system of the server is in the drive execution environment, obtaining the path and name of the startup file of the first operating system is a specific implementation 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 server has installed the first operating system and is restarted.

[0023] 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 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 bootloader through different media methods, and then boot 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.

[0024] Step 120: 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.

[0025] The operating system 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 situation where the set does not include an operating system, that is, there is no operating system authenticated by the server).

[0026] 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 file of the operating system authenticated by the server is as follows: Traverse the paths of the startup files of each operating system in the operating system authenticated by the server, and check whether there is a path in the paths of the startup files of the operating system authenticated by the server that is the same as the path of the startup file of the first operating system. If so, then 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 system authenticated by the server, and it can also be considered that the first operating system is the operating system authenticated by the server.

[0027] Step 130: 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.

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

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

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

[0031] Optionally, there are also other forms of expression for the classification result of the boot 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.

[0032] It can be understood that the boot item corresponding to the first operating system, as the boot option of the first operating system, classifying the boot 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 positioning can be performed when the server has a system-level failure.

[0033] In some embodiments, the classification method of the operating system boot item further includes: In the case where the classification result of the boot item corresponding to the first operating system is the boot item corresponding to the operating system not authenticated by the server, use the name of the boot file of the first operating system as the name of the boot item corresponding to the first operating system.

[0034] The classification result of the boot item corresponding to the first operating system is the boot 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 boot file of the first operating system as the name of the boot item corresponding to the first operating system.

[0035] It can be understood that since the unauthenticated 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 unauthenticated operating system of the server as the name of the startup item corresponding to this operating system can effectively avoid name conflicts with the authenticated operating systems of existing servers, help improve the recognizability of the startup item corresponding to each operating system, and avoid problems such as incorrect selection of the startup item caused by duplicate or incorrect names of the startup items.

[0036] 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 unauthenticated 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 authenticated operating systems of existing servers and help improve the recognizability of the startup item corresponding to each operating system.

[0037] 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 authenticated 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 authenticated operating system of the server or the startup item corresponding to the unauthenticated operating system of the server, realizing the classification of the startup item of the first operating system. When it is necessary to install an unauthenticated operating system on 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 incorrectly selecting the startup item corresponding to the unauthenticated operating system and improves the security of the server.

[0038] 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: Writing the name and path of the startup file of the authenticated operating system of the server into the basic input / output system of the server, and the authenticated operating system of the server includes at least one operating system.

[0039] It can be understood that writing the name and path of the startup file of the authenticated 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 authenticated 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.

[0040] 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: 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.

[0041] 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.

[0042] 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 outage, 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.

[0043] 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.

[0044] 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.

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

[0046] 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 startup file of the server's authenticated operating system to determine the comparison result includes: 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; 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.

[0047] 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 dual comparison of the name and path of the startup file of the first operating system is performed. To a certain extent, this 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.

[0048] In the embodiments 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 dual 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.

[0049] 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: When 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 server-authenticated operating system; When the comparison result is inconsistent, determining that the classification result of the startup item corresponding to the first operating system is the startup item corresponding to the unauthenticated operating system on the server.

[0050] 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 in 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.

[0051] 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 in 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.

[0052] In the embodiment 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 also 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.

[0053] 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: 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.

[0054] It can be understood that the startup device originally installed the first operating system. Therefore, 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.

[0055] The classification results of the boot items corresponding to the first operating system include the boot items corresponding to the operating systems authenticated by the server and the boot items corresponding to the operating systems not authenticated by the server; When the classification result of the boot item corresponding to the first operating system is the boot 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 boot file of the first operating system, and the deletion operation will be normally executed; When the classification result of the boot item corresponding to the first operating system is the boot 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 boot 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.

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

[0057] In some embodiments of the present application, when the second operating system is to be installed on the boot device, according to the classification result of the boot item corresponding to the first operating system, the processing of the name and path of the boot file of the first operating system includes: When the classification result of the boot item corresponding to the first operating system is the boot item corresponding to the operating system not authenticated by the server, store the name and path of the boot file of the first operating system.

[0058] 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 problems 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 problem occurs on the server subsequently, the stored content can be used for fault reproduction or location, which helps to quickly identify the cause of the server failure.

[0059] 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.

[0060] In some embodiments, storing the name and path of the startup file of the first operating system includes: 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.

[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 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 power outage and restart of the server. Therefore, the name and path of the startup files of all operating systems not authenticated by the server installed on the server should be stored in the NVRAM of the BIOS.

[0062] 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, the non-volatile random access memory has the characteristic of non-volatility, and the data will not be lost even after a power outage, thus realizing the storage of the name and path of the startup files of the operating systems not authenticated by the server installed on the server.

[0063] 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.

[0064] 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: 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.

[0065] 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.

[0066] 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.

[0067] In some embodiments of the present application, the method further includes: installing the first operating system on the startup device of the server; Installing the first operating system on the startup device of the server includes one of the following: Installing the first operating system on the startup device through the Pre-Boot Execution Environment, Installing the first operating system on the startup device through a Compact Disc Read-Only Memory / Digital Versatile Disc Read-Only Memory, Installing the first operating system on the startup device through a Universal Serial Bus flash drive.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] For example, Figure 2 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.

[0072] 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.

[0073] Step 202: Install the first operating system on the boot device of the server; Installing the first operating system on the boot device of the server includes one of the following: Install the first operating system on the boot device through the Preboot Execution Environment, Install the first operating system on the boot device through a Compact Disc-Read Only Memory / Digital Versatile Disc-Read Only Memory, Install the first operating system on the boot device through a Universal Serial Bus Flash Drive.

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

[0075] 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 authenticated by the server.

[0076] 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 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 authenticated by the server.

[0077] Step 206, when it is determined that the name and path of the startup file of the first operating system are not the same as those of the startup file of the operating system 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.

[0078] 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.

[0079] 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.

[0080] 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 authenticated by the server, delete the name and path of the startup file of the first operating system.

[0081] And, Figure 3 This is one of the swim lane diagrams of the classification method of the operating system startup item provided by some embodiments of this application. As Figure 3 shown, the process of the classification method of the operating system startup item may further include: The basic input / output system writes the name and path of the startup file of the operating system authenticated by the server into the non-volatile random access memory of the basic input / output system; The server powers on and boots up; 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; After the operating system installation is completed, the server restarts; When the basic input / output system is in the driver execution environment stage, the basic input / output system obtains the path and name of the startup file of the current operating system; 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; The Basic Input / Output System determines whether the name and path of the startup file of the current operating system are consistent with the name and path of the startup file of the operating system authenticated by the server; If the name and path of the startup file of the current operating system are consistent with the name and path 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; If the name and path of the startup file of the current operating system are inconsistent with the name and path 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; The Basic Input / Output System completes the classification of the operating system and continues to start and enter the operating system; In the case where a new operating system needs to be installed on the server, the server restarts.

[0082] And, Figure 4 This is the second swimlane diagram of the classification method for operating system startup items provided by some embodiments of the present application. As Figure 4 shown, the process of the classification method for operating system startup items may further include: The server restarts; When the Basic Input / Output System is in the driver execution environment stage, the Basic Input / Output System obtains the path and name of the startup file of the current operating system; 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; The Basic Input / Output System determines whether the name and path of the startup file of the current operating system are consistent with the name and path of the startup file of the operating system authenticated by the server; If the name and path of the startup file of the current operating system are consistent with the name and path 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; If the name and path of the startup file of the current operating system are inconsistent with the name and path 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; The Basic Input / Output System determines whether the classification results of the boot items corresponding to the current operating system and the classification results of the boot items corresponding to the previously installed operating system are both for the boot items of the operating systems authenticated by the server; When the classification results of the boot items corresponding to the current operating system and the classification results of the boot items corresponding to the previously installed operating system are both for the boot items of the operating systems authenticated by the server, the Basic Input / Output System deletes the name and path of the boot file of the previously installed operating system and saves the name and path of the boot file of the currently installed operating system; When there is a boot item corresponding to an operating system not authenticated by the server in the classification results of the boot items corresponding to the current operating system and the classification results of the boot items corresponding to the previously installed operating system, the Basic Input / Output System determines whether the classification result of the boot item corresponding to the previously installed operating system is for the boot item of the operating system authenticated by the server; When the classification result of the boot item corresponding to the previously installed operating system is for the boot item of the operating system authenticated by the server, the Basic Input / Output System deletes the name and path of the boot file of the previously installed operating system and saves the name and path of the boot file of the currently installed operating system; When the classification result of the boot item corresponding to the previously installed operating system is for the boot item of the operating system not authenticated by the server, the Basic Input / Output System saves the name and path of the boot file of the previously installed operating system; The Basic Input / Output System completes the operating system classification and continues to boot into the operating system.

[0083] 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.

[0084] 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: An acquisition unit 501, configured to acquire the path and name of the boot 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 boot device of the server; A comparison unit 502, configured to compare the name and path of the boot file of the first operating system with the name and path of the boot file of the operating system authenticated by the server to determine the comparison result; A creation unit 503 is used 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. A classification unit 504 is used 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.

[0085] Optionally, the computer program product 500 further includes a first processing unit, and the first processing unit is used to: 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.

[0086] Optionally, the comparison unit 502 is used to: 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; When there is no 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 / or when there is no operating system startup file name in the operating systems authenticated by the server that is the same as the name of the first operating system startup file, determine that the comparison result is inconsistent.

[0087] Optionally, the classification unit 504 is used to: When the comparison result is consistent, determine 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, 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.

[0088] Optionally, the computer program product 500 further includes a second processing unit, and the second processing unit is used to: 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.

[0089] Optionally, when the 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 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.

[0090] Optionally, 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, including: 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, delete the name and path of the startup file of the first operating system.

[0091] Optionally, the computer program product 500 further includes a third processing unit, and the third processing unit is configured to: 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, 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.

[0092] Optionally, writing 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 includes: Write the name and path of the startup file of the operating system authenticated by the server into the non-volatile random access memory of the basic input / output system.

[0093] Optionally, storing the name and path of the startup file of the first operating system includes: 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.

[0094] Optionally, the computer program product 500 further includes a third processing unit, and the third processing unit is configured to: Install the first operating system on the startup device of the server; Installing the first operating system on the startup device of the server includes one of the following: Install the first operating system on the startup device through the pre-boot execution environment, Install the first operating system on the startup device through a compact disc read-only memory / digital versatile disc read-only memory, Install the first operating system on the startup device through a universal serial bus flash drive.

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

[0096] An embodiment of the present application further provides a server, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any of the above-described embodiment of the classification method for operating system startup items.

[0097] 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: Baseboard Management Controller (BMC), Basic Input Output System (BIOS), Central Processing Unit (CPU) 0, and Central Processing Unit (CPU) 1 (that is, this server has a dual-CPU architecture).

[0098] The BMC and the BIOS are connected based on the Intelligent Platform Management Interface (IPMI); The BMC and CPU0 are connected based on the Low Pin Count Interface (LPC) or Peripheral Component Interconnect (PCI); The BIOS and CPU0 are connected based on LPC, PCI, or Quad Serial Peripheral Interface (QSPI); CPU0 and CPU1 are connected based on Cache Coherent Interconnect for Accelerators (CCIX), Ultra Path Interconnect (UPI), or General Memory Interconnect (GMI).

[0099] 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 6Two PCI interfaces provided by the CPU1 are respectively connected to a Compact Disc-Read Only Memory (CD-ROM) and a Redundant Array of Independent Disks (RAID) card, and a USB interface provided by the CPU1 is connected to a Universal Serial Bus Flash Drive (USB Flash Drive, simply referred to as a USB flash drive or U disk).

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

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

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

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

[0104] 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 the embodiments of any of the above classification methods for operating system startup items.

[0105] 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 composition 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. 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 to exceed the scope of the present application.

[0106] The above has introduced in detail a classification method, a computer program product, and a server for operating system startup items 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 in this technical field, 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 the server has installed a first operating system and restarted, obtaining a path and a name of a startup file of the first operating system, wherein the first operating system is installed on a startup device of the server; 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; Creating 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; The startup items corresponding to the first operating system are classified according to the comparison result to determine the classification result of the startup items corresponding to the first operating system, wherein the classification result includes: the startup items corresponding to the operating system authenticated by the server or the startup items corresponding to the operating system not authenticated by the server.

2. The method for classifying operating system startup items according to claim 1, characterized in that: 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, and 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, characterized in that: 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; The comparison result is determined to be inconsistent 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.

4. The method for classifying operating system startup items according to claim 3, characterized in that: 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 4, characterized in that: After classifying the startup items corresponding to the first operating system according to the comparison result and determining the classification result of the startup items corresponding to the first operating system, the method further includes: In the case where a 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.

6. The method for classifying operating system startup items according to claim 5, characterized in that: 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 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.

7. The method for classifying operating system startup items according to claim 5, characterized in that: 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 includes: 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.

8. The method for classifying operating system startup items according to claim 1, characterized in that: The method further comprises: 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 of the startup file of the first operating system is used as the name of the startup item corresponding to the first operating system.

9. The method for classifying operating system startup items according to claim 2, characterized in that: The step of 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 comprises: 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.

10. The method for classifying operating system startup items according to claim 6, characterized in that: 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.

11. The method for classifying operating system startup items according to claim 1, characterized in that: The method further comprises: 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-Read Only Memory / DVD-ROM, The first operating system is installed on the boot device via a universal serial bus flash drive.

12. A computer program product, characterized in that include: an acquisition unit, configured to acquire, when the server has installed a first operating system and restarted, a path and a name of a startup file of the first operating system, wherein the first operating system is 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 under the path of the startup file of the first operating system; A classification unit is used to classify the startup items corresponding to the first operating system according to the comparison result, and determine the classification results of the startup items corresponding to the first operating system, wherein the classification results include: the startup items corresponding to the operating system authenticated by the server or the startup items corresponding to the operating system not authenticated by the server.

13. The computer program product according to claim 12, characterized in that Also includes: The processing unit is used to 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 when the second operating system is to be installed on the startup device.

14. 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 as claimed in any one of claims 1 to 11 when executing the computer program.

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

Citation Information

Patent Citations

  • Method and device for creating starting item based on white list and readable storage medium

    CN114546502A

  • Multi-operating system installation method and electronic equipment

    CN114579150A

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

    CN116225548A

  • Starting path white list updating method and device, electronic equipment and storage medium

    CN117688551A

  • System and method for secure operating system boot

    US20080104381A1

Cited By

  • Operation system installation method, electronic equipment, storage medium and program product

    CN120386538A