Operating system boot item management methods, devices, and servers

By scanning the hard drive through the BIOS and saving boot entries using the boot entry database and EEPROM, the problem of boot entries being lost after server restarts is solved, thereby improving the scalability and manageability of the operating system.

CN116225548BActive Publication Date: 2025-12-02INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310231607.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2025-12-02
Estimated Expiration
2043-03-10

AI Technical Summary

Technical Problem

In existing technologies, manually created startup items are lost after a server restart, leading to limitations in the use of the operating system.

Method used

The system path of the operating system is obtained by scanning the hard drive through the BIOS. The boot path of non-whitelisted operating systems is stored in the baseboard management controller using the boot item database. The corresponding boot item is automatically created after restarting. The information is saved and managed using electrically erasable programmable read-only memory (EEPROM).

Benefits of technology

After the server restarts, manually added startup items are automatically created and saved, improving the scalability and manageability of the operating system and supporting the needs of multiple operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225548B_ABST
    Figure CN116225548B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, and server for managing boot entries in an operating system. The method includes: after the server restarts, scanning the hard drive using the Basic Input / Output System (BIOS) to obtain the system paths corresponding to each operating system; if a first target system path does not match the system whitelist, retrieving a first boot path matching the first target system path from the boot entry database; and creating a boot entry corresponding to the first operating system based on a first boot file under the first boot path. The boot entry management method, apparatus, and server provided by this invention can support the needs of multiple operating systems through a whitelist, and also support manually adding boot entries for operating systems not on the whitelist. These manually added boot entries are permanently stored in the Boot Memory Management Database (BMC), and are retained in the BMC's boot entry database after a restart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server technology, and in particular to a method, apparatus and server for managing startup items in an operating system. Background Technology

[0002] The Basic Input Output System (BIOS), as the lowest-level and most direct hardware settings and control manager on the server motherboard, provides the server with more user-friendly functions. The BIOS is a set of programs embedded in a ROM chip on the motherboard. It stores the computer's most important basic input / output programs, system settings information, power-on self-test (POST) programs, and system boot programs. Its main function is to provide the computer with the lowest-level and most direct hardware settings and control.

[0003] Typically, the BIOS pre-creates a whitelist of operating systems (OS) for various control programs, checking if the corresponding control program's boot path is on the whitelist. When the system is on the whitelist, the BIOS can continue to access and control the system. When the system is not on the whitelist, a boot file is manually selected and added to the boot list. However, manually added boot entries are only valid for the current server runtime; once the server is shut down and restarted, the manually added boot entries disappear and need to be rebuilt, resulting in limitations on the OS supported by the server during use. Summary of the Invention

[0004] This invention provides a method, apparatus, and server for managing startup items in an operating system, to address the defect in the prior art where manually created startup items are lost after a server restart.

[0005] This invention provides a method for managing startup items in an operating system, comprising:

[0006] After the server restarts, the hard drive is scanned using the Basic Input / Output System to obtain the system paths corresponding to each operating system.

[0007] If it is determined that the first target system path does not match the system whitelist, the first startup path that matches the first target system path is obtained from the startup item database;

[0008] Based on the first boot file under the first boot path, create a boot entry corresponding to the first operating system;

[0009] Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store the boot paths corresponding to general operating systems that are pre-written in the server; the boot item database is used to store the boot paths corresponding to operating systems that do not belong to the system whitelist, and the boot item database is stored in the storage unit of the baseboard management controller.

[0010] According to the boot item management method of an operating system provided by the present invention, after obtaining the system path corresponding to each operating system, the method further includes:

[0011] If it is determined that the second target system path does not match the system whitelist, and the second target system path does not match the startup item database, a target startup item is created through the Basic Input / Output System;

[0012] Add the startup path corresponding to the target startup item to the startup item database;

[0013] After the server restarts, the second boot file corresponding to the second target system path is matched according to the updated boot item database, and a target boot item corresponding to the second operating system is automatically created.

[0014] Wherein, the second target system path is any one of all system paths, and the second operating system is the operating system corresponding to the second target system path.

[0015] According to the present invention, the boot item management method of an operating system is provided, wherein the storage unit is an electrically erasable programmable read-only memory in the baseboard management controller.

[0016] According to the present invention, an operating system boot item management method is provided, which establishes a communication connection with the electrically erasable programmable read-only memory through an intelligent platform management interface.

[0017] The boot item management method for an operating system provided by the present invention further includes:

[0018] The intelligent platform management interface sends a deletion command to the electrically erasable programmable read-only memory (EROM), so that the EROM can delete the stored content in the startup item database according to the deletion command.

[0019] According to the boot item management method of the present invention, before scanning the hard disk through the basic input / output system to obtain the system paths corresponding to each operating system after the server restarts, the method further includes:

[0020] Traverse the sub-paths under the system path corresponding to the general operating system to obtain the priority of the startup files under each sub-path;

[0021] If it is determined that there are two or more identical startup files under the target subpath, the order of the startup items corresponding to the target startup file in the system whitelist is determined according to the target startup file;

[0022] Wherein, the target startup file is the startup file with the highest priority in the target sub-path; the target sub-path is one or more of all sub-paths.

[0023] The present invention also provides a startup item management device for an operating system, comprising:

[0024] The system scanning module is used to scan the hard drive through the basic input / output system after the server restarts to obtain the system paths corresponding to each operating system.

[0025] The first startup item matching module is used to obtain a first startup path that matches the first target system path from the startup item database when it is determined that the first target system path does not match the system whitelist.

[0026] The first boot entry creation module is used to create a boot entry corresponding to the first operating system based on the first boot file under the first boot path;

[0027] Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store boot paths corresponding to general operating systems that are pre-written in the server; the boot item database is used to store boot paths corresponding to operating systems that are not in the system whitelist, and the boot item database is stored in the storage unit of the baseboard management controller. The present invention also provides a server, including at least a basic input / output system and a baseboard management controller, wherein the basic input / output system is used to implement the boot item management method of the operating system as described in any of the above embodiments when executing the program;

[0028] The baseboard management controller is used to store and manage the startup item database.

[0029] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements a startup item management method as described in any of the above-described operating systems.

[0030] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a startup item management method of any of the operating systems described above.

[0031] The operating system boot item management method, apparatus, and server provided by this invention are based on scanning the hard drive for the system paths corresponding to each operating system via BIOS after each reboot. If any system path does not match the system whitelist built into BIOS but matches the boot item database stored in the Boot Memory Management Console (BMC), the system automatically reads the first boot path of the corresponding operating system from the boot item database and recreates the corresponding boot item using the first boot file stored under the first boot path. This allows the server to support multiple operating systems via a whitelist while also supporting manual addition of boot items for operating systems not on the whitelist. These boot items are permanently stored in the BMC, ensuring that manually added boot items are retained in the BMC's boot item database even after a BIOS update, thus improving the scalability and manageability of the operating system's boot items. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0033] Figure 1 This is one of the flowcharts illustrating the boot item management method for the operating system provided by the present invention;

[0034] Figure 2 This is the second flowchart illustrating the boot item management method for the operating system provided by this invention;

[0035] Figure 3 This is a schematic diagram of the structure of the boot item management device for the operating system provided by the present invention;

[0036] Figure 4 This is a schematic diagram of the server structure provided by the present invention;

[0037] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0039] The terms "first," "second," etc., used in this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more.

[0040] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to include the plural forms.

[0041] The terms “comprising” and “including” indicate the presence of the described feature, whole, step, operation, element and / or component, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0042] Figure 1 This is one of the flowcharts illustrating the boot item management method for the operating system provided by this invention. For example... Figure 1 As shown, the operating system startup item management method provided in this embodiment of the invention includes: Step 101: After the server restarts, the hard disk is scanned through the basic input / output system to obtain the system path corresponding to each operating system.

[0043] The first target system path is any one of all system paths.

[0044] It should be noted that the execution subject of the operating system startup item management method provided in this embodiment of the invention is the operating system startup item management device set in the server.

[0045] The application scenario of the operating system boot item management method provided in this application embodiment is that after the server starts working, it can support the needs of multiple general operating systems (OS) through whitelist, and also support manual addition. After restarting and refreshing the Basic Input Output System (BIOS), the manually added boot items will not be lost.

[0046] Specifically, in step 101, when the boot management device of the operating system determines that the server is currently in the process of restarting, it scans the hard drive path through the BIOS and outputs the storage path of each operating system connected to the hard drive in the server as the system path.

[0047] The system path includes all nested child node paths under the root node path of the corresponding operating system.

[0048] Step 102: If it is determined that the first target system path does not match the system whitelist, obtain the first startup path that matches the first target system path from the startup item database.

[0049] The system whitelist stores boot paths corresponding to general operating systems that are pre-written into the server. The boot item database stores boot paths that are not included in the system whitelist, and the boot item database is stored in the storage unit of the baseboard management controller.

[0050] It should be noted that the system whitelist is a mapping relationship between the general operating system corresponding to the basic hardware necessary to constitute the server, and the startup item information of the general operating system, such as the startup item name, startup file, and the child node path (i.e., startup path) of the startup file in the corresponding system path.

[0051] The system whitelist is pre-compiled based on the server's hardware configuration and is hard-coded into a fixed storage space under the server's BIOS, so the system whitelist will not be invalidated by the server's power on or off.

[0052] In this embodiment of the invention, the presentation of the system whitelist is not specifically limited.

[0053] For example, a system whitelist can be represented as a collection of multiple mapping tables. Each root node path of a general operating system in the collection corresponds to a mapping table, which contains the boot files in all child node paths (i.e., boot paths) under that general operating system, as well as the corresponding boot entry names.

[0054] The boot file can be an Extensible Firmware Interface (EFI) file with the EFI file extension. An EFI file is a bootloader executable file that exists on a computer system based on the Unified Extensible Firmware Interface and contains data about how the boot process proceeds.

[0055] The startup item name can be determined based on the name of the program loaded corresponding to the EFI file.

[0056] The startup database consists of the mapping relationship between the independent operating system corresponding to the hardware selected on the basis of the server's basic hardware configuration, and the startup information of the independent operating system, such as the startup name, startup file, and the child node path (i.e., startup path) of the startup file in the corresponding system path.

[0057] The startup item database can be added or removed according to changes in the server's hardware configuration and stored in the storage unit of the baseboard management controller under the server. The contents stored in the storage unit will not be invalidated due to the server's power on and off.

[0058] In this embodiment of the invention, the presentation of the startup item database is not specifically limited.

[0059] For example, the boot entry database can be represented similarly to the system whitelist, or it can be a collection of multiple mapping tables. Each root node path of an independent operating system in the collection corresponds to a mapping table, which contains all EFI files under that general operating system, the boot path of the EFI files, and the corresponding boot entry name.

[0060] Specifically, in step 102, the operating system's boot item management device compares each first target system path in the system paths corresponding to all operating systems with the system whitelist built into the BIOS and the boot item database in the BMC storage unit:

[0061] If the first target system path does not match the system whitelist but matches the startup item database, it means that the first operating system corresponding to the first target system path is not the server's general operating system, and the startup item of that operating system was configured in the BMC before this restart. Then, using the mapping relationship between the system path of the corresponding independent operating system stored in the startup item database and the startup item information of that independent operating system, the startup file corresponding to the first target system path and the first startup path of that startup file under its own system path are retrieved.

[0062] If the first target system path matches the system whitelist but does not match the startup item database, it means that the first operating system corresponding to the first target system path is the server's general operating system. Then, using the mapping table of corresponding general operating systems stored in the system whitelist, the startup item corresponding to the first target system path is retrieved, and that startup item is directly enabled.

[0063] If the first target system path does not match the system whitelist or the boot entry database, it means that the first operating system corresponding to the first target system path is not the server's general operating system and was not configured in the BMC before this reboot. In this case, the corresponding operating system boot entry will be manually created through the BIOS after this reboot.

[0064] Step 103: Based on the first boot file under the first boot path, create a boot entry corresponding to the first operating system.

[0065] Wherein, the first operating system is the operating system corresponding to the first target system path.

[0066] Specifically, in step 103, the operating system's boot item management device retrieves the first boot path recorded in the storage unit of the BMC through corresponding instructions, and uses the first boot file stored under that path to recreate the boot item corresponding to the first operating system, and displays it in the BIOS Boot Option interface, so that non-whitelisted boot items can be successfully and normally created in the BIOS Setup interface.

[0067] Unlike existing methods for handling non-whitelisted startup items, this invention stores information related to non-whitelisted startup items in a startup item database within a fixed storage unit in the BMC. Consequently, this storage unit will not lose previously created non-whitelisted startup items after a BIOS refresh.

[0068] This invention is based on scanning the hard drive for the system paths corresponding to each operating system via BIOS after each reboot. If any system path does not match the BIOS's built-in system whitelist but matches the boot entry database stored in the Boot Memory Management Console (BMC), the system automatically reads the first boot path of the corresponding operating system from the database and recreates the corresponding boot entry using the first boot file stored under that first boot path. This allows the server to support multiple operating systems via a whitelist while also supporting manual addition of boot entries for operating systems not on the whitelist. These manually added boot entries are permanently stored in the BMC, ensuring that even after a BIOS update, the boot entry database in the BMC retains them, thus improving the scalability and manageability of the operating system's boot entries.

[0069] Based on any of the above embodiments, after obtaining the system paths corresponding to each operating system, the method further includes: if it is determined that the second target system path does not match the system whitelist and the second target system path does not match the startup item database, a target startup item is created through the Basic Input / Output System.

[0070] The second target system path is any one of all system paths.

[0071] Specifically, after step 101, the operating system's boot item management device compares each second target system path in the system paths corresponding to all operating systems with the system whitelist built into the BIOS and the boot item database in the BMC storage unit:

[0072] If the second target system path does not match the system whitelist and boot entry database, it means that the second operating system corresponding to the second target system path is not the server's general operating system and was not configured in the BMC before this reboot. In this case, the target boot entry for the corresponding second operating system will be manually created through the BIOS after this reboot.

[0073] The embodiments of the present invention do not limit the specific implementation process of manually creating target startup items.

[0074] For example, when manually creating a target boot entry, you need to manually name the target boot entry and select the boot file under the boot path of the target boot entry to be created. For example, the boot file of a customer's customized operating system is OS.efi. Then, the storage paths of OS and OS.efi are assigned to the gBootData variable under the BIOS through the BIOS, thereby completing the creation of the target boot entry.

[0075] Add the startup path corresponding to the target startup item to the startup item database.

[0076] Specifically, the operating system's boot item management device encapsulates the boot item name, boot file, and boot path of the target boot item in a control instruction, and assigns the boot item information corresponding to the target boot item to the BMC's boot item database through the instruction.

[0077] After the server restarts, the system matches the second boot file corresponding to the second target system path with the updated boot item database and automatically creates a target boot item corresponding to the second operating system.

[0078] The second operating system is the operating system corresponding to the second target system path.

[0079] Specifically, when the operating system's boot management device determines that the server is ready for the next restart based on its running status, it reads the relevant information of the target boot entry stored in the BMC's boot entry database, retrieves the second boot file from the corresponding storage path, and matches whether the second target system path on the hard drive is the same as the storage path where the second boot file is located. If they are the same, the target boot entry is recreated and displayed under BIOS Boot Options.

[0080] This invention is based on scanning the hard drive for the system paths corresponding to each operating system via BIOS after each reboot. If any system path does not match either the BIOS's built-in system whitelist or the boot entry database stored in the Boot Module Control (BMC), a target boot entry is created. The boot entry information corresponding to the target boot entry is then permanently stored in the BMC's boot entry database. This allows for automatic reading of the corresponding operating system's second boot file and re-creation of the corresponding boot entry upon the next reboot. This approach enables server use to support multiple operating systems via a whitelist, while also allowing manual addition of boot entries for operating systems not on the whitelist. These manually added boot entries are permanently stored in the BMC, ensuring that even after a BIOS update, the boot entry database in the BMC retains them, thus improving the scalability and manageability of the operating system's boot entries.

[0081] Based on any of the above embodiments, the storage unit is an electrically erasable programmable read-only memory in the substrate management controller.

[0082] Specifically, the boot management device of the operating system monitors and controls the entire creation process and logs it every time a boot item is manually created. Since electrically erasable programmable read-only memory (EEPROM) has the characteristic that it will not be lost when power is off, the boot item database is stored in the EEPROM in the BMC, which is also responsible for maintaining the boot item database.

[0083] This invention utilizes an EEPROM in the BMC (Boot Memory Management System) that retains its information even when power is lost to store information related to each boot entry manually created by the user, and integrates this information into a boot entry database for updating and maintenance. Upon system restart, the system reads the boot entry information stored in the BMC EEPROM database and scans the hard drive for a corresponding boot path. If a path is found, the corresponding boot entry is created, improving the scalability and manageability of the operating system's boot entries.

[0084] Based on any of the above embodiments, a communication connection is established with the electrically erasable programmable read-only memory through an intelligent platform management interface.

[0085] Specifically, the operating system's boot entry management device communicates with the EEPROM through the Intelligent Platform Management Interface (IPMI), and encapsulates instructions into IPMI instructions using the protocol corresponding to this interface. The IPMI instructions are then used to update and read the boot entry database under the EEPROM, where:

[0086] When a system path does not match the system whitelist, a boot entry can be manually created and then saved to the boot entry database in the BMC's EEPROM using the IPMI command.

[0087] It can also automatically read the boot entry database in the EEPROM after the server restarts. It will read the boot path in the BMC EEPROM through IPMI instructions and match it with the path scanned on the hard disk. If they match, it will create the corresponding boot entry.

[0088] This invention establishes a communication connection with the EEPROM in the BMC through an intelligent platform management interface, enabling the addition and querying of boot items in the database. This allows for remote control of the BMC via IPMI commands to obtain various system information without needing to monitor system status, thus improving convenience.

[0089] Based on any of the above embodiments, the method further includes: sending a deletion command to the electrically erasable programmable read-only memory through the intelligent platform management interface, so that the electrically erasable programmable read-only memory can delete the stored content in the startup item database according to the deletion command.

[0090] Specifically, the operating system's boot item management device can also encapsulate the relevant information of the non-whitelisted boot items to be deleted in an IPMI instruction for indicating deletion, and send the deletion instruction to the EEPROM, according to actual needs.

[0091] The EEPROM receives and responds to a deletion command, removing the relevant information of the non-whitelisted startup item to be deleted from the startup item database as indicated in the command.

[0092] This invention communicates with the EEPROM in the BMC via an intelligent platform management interface to delete boot items from the database. It also enables dynamic maintenance of the boot item database by remotely instructing the EEPROM via IPMI commands.

[0093] Based on any of the above embodiments, before scanning the hard disk through the basic input / output system to obtain the system path corresponding to each operating system after the server restarts, the method further includes: traversing the sub-paths under the system path corresponding to the general operating system and obtaining the priority of the startup files under each sub-path.

[0094] Specifically, before step 101, the operating system's startup item management device traverses and accesses the subpaths of each executable program under the system path corresponding to each general-purpose operating system and reads the startup files existing under the corresponding subpaths, thereby determining the priority of the startup files corresponding to various executable programs in the general-purpose operating system.

[0095] If it is determined that there are two or more identical startup files under the target subpath, the order of the startup items corresponding to the target startup file in the system whitelist is determined according to the target startup file.

[0096] The target startup file is the highest priority startup file in the target sub-path. The target sub-path can be one or more of the sub-paths.

[0097] It should be noted that the target startup file refers to the highest priority EFI file among multiple executable programs located in the same target subpath.

[0098] Specifically, the operating system's boot management mechanism further evaluates the boot files in each subpath:

[0099] If two or more identical startup files exist under any target subpath, it means that there are startup files corresponding to different compatible versions of the same executable program. In this case, only the target startup file with the highest priority under the target subpath is used to create the startup entry for the corresponding executable program. The order of the startup entry in the system whitelist is determined by this startup entry. The whitelist order will not be disturbed by creating startup entries with lower priority startup files in the same path.

[0100] If only one startup file exists under any target subpath, then the startup file is used directly to create the startup entry for the corresponding executable program, and the startup entry determines its order in the system whitelist.

[0101] For example, Figure 2 This is the second flowchart illustrating the boot item management method for the operating system provided by this invention. For example... Figure 2 The following diagram illustrates the complete implementation process of an operating system's boot item management method:

[0102] (1) Create a system whitelist and automatically create OS boot entries in the system whitelist.

[0103] For example, common systems like Red Hat and Windows create system whitelists based on their boot file paths, such as EFI\redhat\grubx64.efi. If shim.efi, shimx64.efi, grub.efi, and grubx64.efi are located in the same path (two or more identical files under the Red Hat path), then boot entries are created according to the priority order: shimx64.efi > shim.efi > grubx64.efi > grub.efi. That is, for grubx64.efi and grub.efi, since their corresponding executable programs are the same, only grubx64.efi needs to be used to create a boot entry corresponding to the grub function in the whitelist, based on the priority order of shim.efi, shimx64.efi, grub.efi, and grubx64.efi.

[0104] (2) Supports manually adding OS boot entries that are not whitelisted.

[0105] For operating systems not on the whitelist, you can create a boot entry for that OS through BIOS options. When creating a boot entry manually, you need to name the entry and select the boot file in the desired path.

[0106] (3) Store the non-whitelisted boot paths and boot items into the BMC EEPROM.

[0107] By iterating through all the boot options in the BIOS, it checks if the filepath is in the defined system whitelist. If not, it saves the boot option to the BMC's EEPROM using the IPMI command.

[0108] (4) After restarting, read the boot path in the BMC EEPROM and match it with the path scanned in the hard disk. If they match, create the corresponding boot entry.

[0109] After restarting, the IPMI command reads the boot entry information stored in the BMC's EEPROM and checks if the boot path on the hard drive matches its FilePath. If they match, the boot entry is recreated and displayed in the BIOS Boot Options. At this point, both whitelisted and non-whitelisted boot entries can be successfully created in the BIOS Setup.

[0110] This invention creates startup items based on the priority of two or more identical startup files existing in a path during the system whitelist creation process. Furthermore, if a higher-priority startup file is present, a lower-priority startup file in the same path will not be created. This allows the startup items in the system whitelist to correspond to the running order of various server hardware components, improving operational efficiency.

[0111] Figure 3 This is a schematic diagram of the startup item management device for the operating system provided by the present invention. Based on any of the above embodiments, such as... Figure 3 As shown, the device includes a system scanning module 310, a first startup item matching module 320, and a first startup item creation module 330, wherein:

[0112] The system scanning module 310 is used to scan the hard disk through the basic input / output system after the server restarts to obtain the system paths corresponding to each operating system.

[0113] The first startup item matching module 320 is used to obtain a first startup path that matches the first target system path from the startup item database when it is determined that the first target system path does not match the system whitelist.

[0114] The first boot entry creation module 330 is used to create a boot entry corresponding to the first operating system based on the first boot file under the first boot path.

[0115] Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store boot paths corresponding to general operating systems that are pre-written in the server; the boot item database is used to store boot paths corresponding to operating systems that are not in the system whitelist, and the boot item database is stored in the storage unit of the baseboard management controller. Specifically, the system scanning module 310, the first boot item matching module 320, and the first boot item creation module 330 are electrically connected in sequence.

[0116] When the system scanning module 310 determines that the server is currently in the process of restarting based on its operating status, it scans the hard drive paths through the BIOS and outputs the storage paths of the operating systems of each connected hard drive in the server as the system paths.

[0117] The first boot item matching module 320 compares each first target system path in the system paths corresponding to all operating systems with the system whitelist built into BIOS and the boot item database in the BMC storage unit:

[0118] If the first target system path does not match the system whitelist but matches the startup item database, it means that the first operating system corresponding to the first target system path is not the server's general operating system, and the startup item of that operating system was configured in the BMC before this restart. Then, using the mapping relationship between the system path of the corresponding independent operating system stored in the startup item database and the startup item information of that independent operating system, the startup file corresponding to the first target system path and the first startup path of that startup file under its own system path are retrieved.

[0119] The first boot entry creation module 330 retrieves the first boot path recorded in the storage unit of the BMC through the corresponding instruction, and uses the first boot file stored in the path to recreate the boot entry corresponding to the first operating system, and displays it in the Boot Option interface of the BIOS, so that non-whitelisted boot entries can be successfully and normally created in the BIOS Setup interface.

[0120] Optionally, the device further includes a second startup item matching module, a startup item adding module, and a second startup item creation module, wherein:

[0121] The second startup item matching module is used to create a target startup item through the basic input / output system when it is determined that the second target system path does not match the system whitelist and the second target system path does not match the startup item database.

[0122] The startup item adding module is used to add the startup path corresponding to the target startup item to the startup item database.

[0123] The second boot entry creation module is used to automatically create a target boot entry corresponding to the second operating system by matching the second boot file corresponding to the second target system path according to the updated boot entry database after the server restarts.

[0124] Wherein, the second target system path is any one of all system paths, and the second operating system is the operating system corresponding to the second target system path.

[0125] Optionally, the storage unit is an electrically erasable programmable read-only memory in the substrate management controller.

[0126] Optionally, a communication connection can be established with the electrically erasable programmable read-only memory via an intelligent platform management interface.

[0127] Optionally, the device further includes a startup item deletion module, wherein:

[0128] The startup item deletion module is used to send a deletion command to the electrically erasable programmable read-only memory (EROM) through the intelligent platform management interface, so that the EROM can delete the stored content in the startup item database according to the deletion command.

[0129] Optionally, the device also includes a general operating system scanning module and a whitelist creation module, wherein:

[0130] The general operating system scanning module is used to traverse the sub-paths under the system path corresponding to the general operating system and obtain the priority of the startup files under each sub-path.

[0131] The whitelist creation module is used to determine the order of the startup items corresponding to the target startup file in the system whitelist when it is determined that there are two or more identical startup files under the target subpath.

[0132] The target startup file is the highest priority startup file in the target sub-path. The target sub-path can be one or more of the sub-paths.

[0133] The operating system startup item management device provided in this embodiment of the invention is used to execute the startup item management method of the operating system described above. Its implementation method is consistent with the implementation method of the operating system startup item management method provided by this invention, and can achieve the same beneficial effects, which will not be repeated here.

[0134] This invention is based on scanning the hard drive for the system paths corresponding to each operating system via BIOS after each reboot. If any system path does not match the BIOS's built-in system whitelist but matches the boot entry database stored in the Boot Memory Management Console (BMC), the system automatically reads the first boot path of the corresponding operating system from the database and recreates the corresponding boot entry using the first boot file stored under that first boot path. This allows the server to support multiple operating systems via a whitelist while also supporting manual addition of boot entries for operating systems not on the whitelist. These manually added boot entries are permanently stored in the BMC, ensuring that even after a BIOS update, the boot entry database in the BMC retains them, thus improving the scalability and manageability of the operating system's boot entries.

[0135] Figure 4 This is a schematic diagram of the server provided by the present invention. Based on any of the above embodiments, such as… Figure 4 As shown, the server includes at least a basic input / output system 410 and a baseboard management controller 420. The basic input / output system 410 is used to implement the operating system's startup item management method when executing the program.

[0136] The baseboard management controller 420 is used to store and manage the startup item database.

[0137] Specifically, the server can provide the computer with the lowest level and most direct hardware settings and control through the basic input / output system 410, and the hardware can be monitored and controlled by the baseboard management controller 420, as well as log recording.

[0138] By establishing a whitelist for the operating system, the Basic Input / Output System 410 checks whether a boot path is in the whitelist and creates the corresponding boot entry. When a system is not in the whitelist, a boot entry file is manually selected and added to the boot entry database. Simultaneously, to ensure that the system can continue to access non-whitelisted systems after refreshing the Basic Input / Output System 410, boot paths not in the whitelist are also stored in the boot entry database, and the boot entry database is stored in the EEPROM of the Baseboard Management Controller 420. After a system reboot, the system reads the information stored in the Baseboard Management Controller 420's EEPROM and scans the hard drive for a corresponding boot path; if found, the corresponding boot entry is created.

[0139] It is understood that the server provided in this embodiment of the invention includes, but is not limited to, the method for managing the startup items of the operating system on the Intel Whitley and EagleStream platforms, and this solution can also be used on other platforms.

[0140] This invention is based on scanning the hard drive for the system paths corresponding to each operating system via BIOS after each reboot. If any system path does not match the BIOS's built-in system whitelist but matches the boot entry database stored in the Boot Memory Management Console (BMC), the system automatically reads the first boot path of the corresponding operating system from the database and recreates the corresponding boot entry using the first boot file stored under that first boot path. This allows the server to support multiple operating systems via a whitelist while also supporting manual addition of boot entries for operating systems not on the whitelist. These manually added boot entries are permanently stored in the BMC, ensuring that even after a BIOS update, the boot entry database in the BMC retains them, thus improving the scalability and manageability of the operating system's boot entries.

[0141] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute a boot item management method for the operating system. This method includes: after the server restarts, scanning the hard disk through the basic input / output system to obtain the system paths corresponding to each operating system; if it is determined that a first target system path does not match the system whitelist, obtaining a first boot path matching the first target system path from the boot item database; creating a boot item corresponding to a first operating system based on a first boot file under the first boot path; wherein the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store boot paths corresponding to general operating systems pre-written in the server; the boot item database is used to store boot paths corresponding to operating systems not belonging to the system whitelist, and the boot item database is stored in the storage unit of the baseboard management controller.

[0142] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0143] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the operating system startup item management method provided by the above methods. The method includes: after the server restarts, scanning the hard disk through the basic input / output system to obtain the system paths corresponding to each operating system; if it is determined that a first target system path does not match the system whitelist, obtaining a first startup path that matches the first target system path from the startup item database; creating a startup item corresponding to a first operating system based on a first startup file under the first startup path; wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store startup paths corresponding to general operating systems that are pre-written in the server; the startup item database is used to store startup paths corresponding to operating systems that do not belong to the system whitelist, and the startup item database is stored in the storage unit of the baseboard management controller.

[0144] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a startup item management method for the operating system provided by the above methods. This method includes: after a server restart, scanning the hard disk via a basic input / output system to obtain system paths corresponding to each operating system; if a first target system path does not match a system whitelist, obtaining a first startup path matching the first target system path from the startup item database; and creating a startup item corresponding to a first operating system based on a first startup file under the first startup path. Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; the system whitelist is used to store startup paths corresponding to general operating systems pre-written in the server; the startup item database is used to store startup paths corresponding to operating systems not belonging to the system whitelist, and the startup item database is stored in the storage unit of the baseboard management controller.

[0145] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for managing startup items in an operating system, characterized in that, include: After the server restarts, the hard drive is scanned using the Basic Input / Output System to obtain the system paths corresponding to each operating system. If it is determined that the first target system path does not match the system whitelist, the first startup path that matches the first target system path is obtained from the startup item database; Based on the first boot file under the first boot path, create a boot entry corresponding to the first operating system; Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; The system whitelist is used to store the boot paths corresponding to general operating systems that are pre-written in the server; the boot item database is used to store the boot paths corresponding to operating systems that are not in the system whitelist. The boot item database is stored in the storage unit of the baseboard management controller. The boot item database is represented in the form of a set of mapping tables, and the root node path of each independent operating system in the set corresponds to a mapping table.

2. The operating system boot item management method according to claim 1, characterized in that, After obtaining the system paths corresponding to each operating system, the process also includes: If it is determined that the second target system path does not match the system whitelist, and the second target system path does not match the startup item database, a target startup item is created through the Basic Input / Output System; Add the startup path corresponding to the target startup item to the startup item database; After the server restarts, the second boot file corresponding to the second target system path is matched according to the updated boot item database, and a target boot item corresponding to the second operating system is automatically created. Wherein, the second target system path is any one of all system paths, and the second operating system is the operating system corresponding to the second target system path.

3. The boot item management method for an operating system according to claim 1 or 2, characterized in that, The storage unit is an electrically erasable programmable read-only memory in the substrate management controller.

4. The operating system boot item management method according to claim 3, characterized in that, The system communicates with the electrically erasable programmable read-only memory via an intelligent platform management interface.

5. The operating system boot item management method according to claim 4, characterized in that, Also includes: The intelligent platform management interface sends a deletion command to the electrically erasable programmable read-only memory (EROM), so that the EROM can delete the stored content in the startup item database according to the deletion command.

6. The operating system boot item management method according to claim 1, characterized in that, Before scanning the hard drive via the Basic Input / Output System (BIOS) after the server restarts to obtain the system paths corresponding to each operating system, the following steps are also included: Traverse the sub-paths under the system path corresponding to the general operating system to obtain the priority of the startup files under each sub-path; If it is determined that there are two or more identical startup files under the target subpath, the order of the startup items corresponding to the target startup file in the system whitelist is determined according to the target startup file; Wherein, the target startup file is the startup file with the highest priority in the target sub-path; the target sub-path is one or more of all sub-paths.

7. A startup item management device for an operating system, characterized in that, include: The system scanning module is used to scan the hard drive through the basic input / output system after the server restarts to obtain the system paths corresponding to each operating system. The first startup item matching module is used to obtain a first startup path that matches the first target system path from the startup item database when it is determined that the first target system path does not match the system whitelist. The first boot entry creation module is used to create a boot entry corresponding to the first operating system based on the first boot file under the first boot path; Wherein, the first target system path is any one of all system paths; the first operating system is the operating system corresponding to the first target system path; The system whitelist is used to store the boot paths corresponding to general operating systems that are pre-written in the server; the boot item database is used to store the boot paths corresponding to operating systems that are not in the system whitelist. The boot item database is stored in the storage unit of the baseboard management controller. The boot item database is represented in the form of a set of mapping tables, and the root node path of each independent operating system in the set corresponds to a mapping table.

8. A server, comprising at least a basic input / output system and a baseboard management controller, characterized in that, The basic input / output system is used to load and execute computer programs, which, when executed, implement the startup item management method of the operating system as described in any one of claims 1 to 6; The baseboard management controller is used to store and manage the startup item database.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the startup item management method of the operating system as described in any one of claims 1 to 6.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the startup item management method of the operating system as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • OS (operating system) Startup creating method, device and apparatus and readable storage medium

    CN108319470A

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

    CN114546502A