System, method, device, medium and product for introducing operating system startup items
By automatically matching and creating operating system startup items in the BIOS, the problem of low efficiency in introducing a new operating system in the existing technology is solved, and the effects of simplifying installation and improving accuracy are achieved.
Patent Information
- Application Number
- CN202511006127.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-22
AI Technical Summary
The efficiency of introducing a new operating system in the existing technology is low. Users need to manually update the BIOS version or manually enter startup item information in the BIOS Setup, which makes the operation complicated and inefficient.
By obtaining the target operating system information in the hard disk from the basic input and output system and matching it with the operating system information stored in the controller or BIOS, the startup item is automatically created, simplifying the installation and configuration process of the operating system.
It improves the efficiency of introducing new operating systems, reduces the possibility of manual input errors by users, ensures the accuracy of installation, and saves development time for server manufacturers and maintenance costs for users.
Smart Images

Figure CN120508327B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of operating system technology, and in particular to systems, methods, devices, media, and products for introducing operating system startup items. Background Art
[0002] The BIOS (Basic Input / Output System) is a crucial interface program between computer hardware and the operating system. It is stored on a dedicated chip (usually a flash memory chip) on the computer's motherboard. It is primarily responsible for initializing the hardware, booting the operating system, and passing hardware information to the operating system. The BIOS's built-in list of supported operating systems contains multiple members, each representing a supported operating system. Each member contains the following information: the name of the operating system's boot item, and the name and path of the operating system's boot loader. By default, this list includes boot item information for some mainstream operating systems. However, if a user develops a custom operating system, such as one customized based on an open source version, or if a mainstream operating system is updated, the BIOS may not support creating boot items for these operating systems, preventing the system from booting into the operating system.
[0003] In the related art, one method is that the user needs to feedback the name and path of the boot loader of the new operating system to the server manufacturer, and the server manufacturer adds the name and path of the boot loader of the new operating system to the BIOS and releases a new version. Finally, the user updates the BIOS version to solve the new operating system support problem. However, this method has a complicated process and requires the user to reintroduce the BIOS version, wasting the user's time for upgrading and self-testing. Another method is that the user needs to enter the BIOS Setup, find a specific option, manually enter the startup item name, the name and path of the Boot Loader, and save the settings. Although there is no need to wait for the manufacturer to update the BIOS version, each operation requires the user to manually complete a series of steps. Therefore, the above methods all have the problem of needing to re-verify or reconfigure the BIOS after the BIOS version is updated. The user needs to repeat the operation, resulting in low efficiency in introducing the new operating system.
[0004] Therefore, how to improve the efficiency of introducing new operating systems is an urgent problem that needs to be solved. Summary of the Invention
[0005] The present application provides a system, method, device, medium and product for introducing operating system startup items, so as to at least solve the problem of low efficiency in introducing new operating systems in related technologies.
[0006] The present application provides a system for introducing an operating system startup item, the system comprising: a basic input / output system, a hard disk, and a controller; the basic input / output system is configured to:
[0007] Responding to an operating system installation instruction input by a user, obtaining target operating system information stored in the hard disk;
[0008] determining whether the target operating system information matches any operating system information stored in the controller;
[0009] If the target operating system information matches the first operating system information stored in the controller, creating a startup item for the target operating system based on the first operating system information;
[0010] If the target operating system information does not match any of the operating system information stored in the controller, determining whether the target operating system information matches any of the operating system information stored in the basic input and output system;
[0011] If the target operating system information matches the second operating system information stored in the basic input and output system, a startup item is created for the target operating system based on the second operating system information.
[0012] The present application also provides a method for introducing an operating system startup item, which is applied to a system for introducing an operating system startup item, the system comprising: a basic input and output system, a hard disk, and a controller; the method comprising:
[0013] The basic input and output system obtains the target operating system information stored in the hard disk in response to the operating system installation instruction input by the user;
[0014] The basic input and output system determines whether the target operating system information matches any operating system information stored in the controller;
[0015] If the target operating system information matches the first operating system information stored in the controller, the basic input and output system creates a startup item for the target operating system based on the first operating system information;
[0016] If the target operating system information does not match any of the operating system information stored in the controller, the basic input and output system determines whether the target operating system information matches any of the operating system information stored in the basic input and output system;
[0017] If the target operating system information matches the second operating system information stored in the basic input and output system, the basic input and output system creates a startup item for the target operating system based on the second operating system information.
[0018] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing any of the steps of the above-mentioned method of introducing an operating system startup item when executing the computer program.
[0019] The present 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 methods for introducing operating system startup items are implemented.
[0020] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods for introducing operating system startup items when the computer program is executed by a processor.
[0021] Through this application, at least one operating system information is obtained from the controller, and it is determined whether the current target operating system information matches the at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if it fails to match, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, thereby further improving the accuracy of the operating system installation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 A schematic diagram of the structure of a system for introducing operating system startup items provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a method for introducing operating system startup items provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0027] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0028] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0029] Explanation of terms:
[0030] BIOS: Basic Input / Output System is an important interface program between computer hardware and operating system. It is stored in a dedicated chip (usually a flash memory chip) on the computer motherboard.
[0031] BMC (Baseboard Management Controller) is a critical component in servers and some high-end computer systems that monitors and manages hardware status. It enables system administrators to remotely manage and monitor servers, including booting computers, reinstalling operating systems, and mounting ISO images. Even if the server operating system fails to boot or malfunctions, the BMC remains operational.
[0032] IPMI: Intelligent Platform Management Interface, an industrial standard for managing peripheral devices in server systems. It can monitor the physical health of servers, such as temperature, voltage, fans, power supplies, etc., to achieve unified management of servers from different manufacturers. BMC usually uses the IPMI protocol for communication. IPMI is a standardized hardware management interface that allows administrators to remotely manage servers over the network. The IPMI protocol defines a series of commands and message formats for implementing hardware monitoring, remote control, and other functions. For example, the SetSystem Boot Options command can be used to set boot options.
[0033] BIOS Setup is a configuration interface accessed by pressing a specific key. It is used to adjust and optimize the computer's hardware parameters and startup options. BIOS options include, but are not limited to, boot order, security settings, date and time settings, processor speed adjustment, and hard drive partitioning. These options allow users to fine-tune and adjust the computer's hardware configuration and startup process. Boot Order: In the BIOS, users can set the computer's boot order, choosing to boot from the hard drive, optical drive, or USB device. This is useful for installing an operating system or performing system maintenance. Security: These include options such as password protection to ensure only authorized users can access the computer. Date and Time: Set the computer's date and time, which is crucial for applications that require precise time, such as online meetings. Processor Speed: Users can adjust the processor speed to optimize performance. Hard Drive Partition: In the BIOS, users can partition the hard drive, creating new partitions or resizing existing partitions. After completing the BIOS setup, users must save and exit. This is typically done by pressing the F10 key or selecting "Save and Exit."
[0034] EEPROM: Electrically Erasable Programmable Read-Only Memory, is a non-volatile memory that allows users to erase and rewrite the memory while the electronic device is running without removing the chip.
[0035] With the rapid development of servers, demands on all aspects of servers are becoming increasingly stringent. Major manufacturers are striving to create versatile servers to meet diverse customer needs. Product development requires greater attention to security design. The BIOS (Basic Input / Output System) is a crucial interface program between computer hardware and the operating system, serving as a bridge between the two. Stored on a dedicated chip (usually flash memory) on the computer motherboard, it is primarily responsible for initializing the hardware, booting the operating system, and transmitting hardware information to the operating system. The BIOS's built-in list of supported operating systems contains multiple members, each representing a supported operating system. Each member contains the following information: the name of the operating system boot item, and the name and path of the operating system's boot loader. The operating system list includes boot item information for some mainstream operating systems by default. However, if a user develops a custom operating system, such as one based on an open source version, or if a mainstream operating system is updated, the BIOS may not support creating boot items for these operating systems, preventing the system from booting into the operating system.
[0036] In the related art, the methods for introducing a new operating system include: one way is that the user needs to feedback the name and path of the boot loader of the new operating system to the server manufacturer, and the server manufacturer adds the name and path of the boot loader of the new operating system to the BIOS and releases a new version. Finally, the user updates the BIOS version to solve the new operating system support problem. However, this method has a complicated process and requires the user to reintroduce the BIOS version, wasting the user's time for upgrading and self-testing. Another way is that the user needs to enter the BIOS Setup, find a specific option, manually enter the startup item name, the name and path of the BootLoader, and save the settings. Although there is no need to wait for the manufacturer to update the BIOS version, each operation requires the user to manually complete a series of steps. Therefore, the above methods all have the problem of needing to re-verify or reconfigure the BIOS after the BIOS version is updated. The user needs to repeat the operation, resulting in low efficiency in introducing the operating system.
[0037] Therefore, how to improve the efficiency of introducing operating systems is an urgent problem that needs to be solved.
[0038] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the method of introducing the operating system startup item depends, the specific application environment architecture or the specific hardware architecture is described here.
[0039] The embodiment of the present application provides a system for introducing operating system startup items, referring to Figure 1As shown, the system includes: a basic input / output system 11, a hard disk 12, and a controller 13. The controller 13 may include, but is not limited to, various BMC chips. The basic input / output system 11 is configured to: in response to an operating system installation instruction input by a user, obtain target operating system information stored in the hard disk 12; determine whether the target operating system information matches any operating system information stored in the controller 13; if the target operating system information matches the first operating system information stored in the controller 13, create a startup item for the target operating system based on the first operating system information; if the target operating system information does not match any operating system information stored in the controller 13, determine whether the target operating system information matches any operating system information stored in the basic input / output system 11; if the target operating system information matches the second operating system information stored in the basic input / output system 11, create a startup item for the target operating system based on the second operating system information. At least one operating system information is obtained from the controller. By determining whether the current target operating system information matches at least one operating system information stored in the controller, if it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller. If no match is found, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the operating system installation and configuration process is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, further improving the accuracy of operating system installation. In addition, through this method, users can safely introduce a new operating system without any additional operations, saving development time and costs for server manufacturers and server maintenance costs for users.
[0040] An embodiment of the present application provides a method for introducing an operating system startup item, which is applied to a system for introducing an operating system startup item. The method is described in detail in conjunction with the execution flow of the method for introducing an operating system startup item.
[0041] Reference Figure 2 As shown, the method for introducing an operating system startup item provided by an embodiment of the present invention includes the following steps:
[0042] S21. In response to an operating system installation instruction input by a user, obtain target operating system information stored in the hard disk.
[0043] Specifically, during the server startup process, a user enters operating system installation instructions through a graphical user interface (GUI), command line interface (CLI), or remote management tool. The basic input / output system responds to the operating system installation instructions and retrieves the target operating system information stored on the hard disk. This target operating system information includes the target operating system's startup item name, the name of the boot loader, and the boot loader path.
[0044] S22: Determine whether the target operating system information matches any operating system information stored in the controller.
[0045] Specifically, the BIOS determines whether the target operating system information matches any operating system information stored in the BMC. If so, the BIOS executes the following step S23; if not, the BIOS executes the following step S24.
[0046] In some embodiments, the above step S22 (determining whether the target operating system information matches any operating system information stored in the controller) can be implemented as follows:
[0047] Obtaining a checksum of the target operating system information;
[0048] The checksum of the target operating system information is compared with the checksum of the third operating system information stored in the controller to determine whether the target operating system information matches the third operating system information stored in the controller.
[0049] The third operating system information is any operating information stored in the controller.
[0050] Specifically, the startup item name, the name of the boot loader, and the path of the boot loader of the target operating system are verified and calculated through a preset verification algorithm to obtain the checksum of the target operating system information, and the checksum of the target operating system information is compared with the checksum of the third operating system information stored in the controller to determine whether the target operating system information matches the third operating system information stored in the controller.
[0051] S23: If the target operating system information matches the first operating system information stored in the controller, create a startup item for the target operating system based on the first operating system information.
[0052] Specifically, if the target operating system information matches the first operating system information stored in the controller, a startup item is created for the target operating system based on the first operating system information.
[0053] It can be understood that since the operating system information stored in the BMC can be persisted, first, at least one operating system information is obtained from the controller, and it is determined whether the current target operating system information matches the at least one operating system information stored in the controller. If the target operating system information matches the first operating system information stored in the controller, a startup item is created for the target operating system based on the first operating system information, without the need to obtain the operating system information of the target operating system from the BIOS.
[0054] S24: If the target operating system information does not match any of the operating system information stored in the controller, determine whether the target operating system information matches any of the operating system information stored in the basic input and output system.
[0055] Specifically, if the target operating system information does not match any of the operating system information stored in the controller, it is determined whether the target operating system information matches any of the operating system information stored in the basic input and output system.
[0056] It is understandable that when the target operating system information does not match any operating system information stored in the controller, at least one operating system information can be obtained from the default operating system list of the BIOS to determine whether the target operating system information matches any operating system information stored in the basic input and output system.
[0057] S25: If the target operating system information matches the second operating system information stored in the basic input and output system, create a startup item for the target operating system based on the second operating system information.
[0058] Specifically, if the target operating system information matches the second operating system information stored in the basic input and output system, a startup item is created for the target operating system based on the second operating system information.
[0059] The method for introducing an operating system startup item provided by the embodiment of the present disclosure obtains at least one operating system information from a controller, and determines whether the current target operating system information matches at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if it fails to match, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, further improving the accuracy of the operating system installation. In addition, through this method, users can safely introduce a new operating system without adding any additional operations, saving development time costs for server manufacturers and server maintenance costs for users.
[0060] In some embodiments, the above step S24 (determining whether the target operating system information matches any operating system information stored in the basic input and output system) can also be implemented as follows:
[0061] (1) If the target operating system information does not match any of the operating system information stored in the basic input and output system, constructing target startup item information in a preset data format based on the target operating system information;
[0062] (2) Creating a startup item for the target operating system based on the target startup item information.
[0063] Specifically, if the target operating system information does not match any of the operating system information stored in the basic input / output system, the BIOS constructs a target startup item information in a preset data format based on the target operating system information, and creates a startup item for the target operating system according to the target startup item information.
[0064] In the disclosed embodiments, when the BIOS does not contain operating system information identical to the target operating system information, a new boot item is constructed based on the target operating system information. This allows the BIOS to be more compatible with the new or customized operating system, ensuring that it can be correctly booted. Creating a boot item using the automatically constructed boot item information ensures that the newly installed operating system can successfully boot. When the operating system needs to be upgraded or maintained, the boot item information can be conveniently created or updated, simplifying the upgrade and maintenance process.
[0065] In some embodiments, after executing the above step (1) of constructing the target startup item information in a preset data format based on the target operating system information, the following steps may also be executed:
[0066] The controller receives the target boot item information sent by the basic input and output system, and stores the target boot item information in a target storage unit of the controller.
[0067] The target storage unit may be an EEPROM. In a server, the EEPROM may be used as a local storage of the BMC to store key hardware and startup information.
[0068] Specifically, after constructing the target startup item information in a preset data format based on the target operating system information, the controller receives the target startup item information sent by the basic input and output system and stores the target startup item information in the target storage unit of the controller. By saving the startup item information in the EEPROM of the BMC, the administrator can remotely access the server through the IPMI interface and obtain the startup item information, thereby realizing remote management and troubleshooting. For example, the administrator can view the current startup configuration of the server at a remote location or modify the startup item settings. If the server has a startup problem, the BMC can use the startup item information saved in the EEPROM to help the administrator quickly locate the problem and restore the system.
[0069] For example, when a user uses a server to install a new operating system, the operating system will call the BIOS Runtime interface service to create a new operating system startup item during the installation process. The BIOS Runtime interface refers to the interface in which the BIOS remains running and provides services after the operating system is started. The BIOS Runtime interface provides a system reset function, allowing the operating system to restart or shut down the system when needed. After the operating system is installed, the user will be prompted to restart. During the restart process, the BIOS detects the startup items of all operating systems, mainly matching them with the list of operating systems supported by the built-in BIOS. If the match is successful, it means that the startup item is an operating system supported by the BIOS. If the match is unsuccessful, it means that the current startup item is not an operating system supported by the BIOS. The BIOS extracts the startup item name, the name and path of the boot loader Boot Loader from the startup item, packages the information and sends it to the BMC using the IPMI command. After receiving the instruction, the baseboard management controller BMC saves the startup item information to the EEPROM.
[0070] In the disclosed embodiment, target boot item information is sent from the Basic Input / Output System (BIOS) to the controller, where it is stored in the controller's non-volatile storage unit. This ensures data persistence, even after a system power outage. Furthermore, the controller can provide security mechanisms, such as access control and data encryption, to protect the boot item information from unauthorized access or tampering.
[0071] In some embodiments, before executing the above step (2) of creating a startup item for the target operating system according to the target startup item information, the following steps may also be executed:
[0072] The basic input and output system sends a target startup item information acquisition command to the controller;
[0073] The basic input and output system receives the target startup item information sent by the controller.
[0074] Specifically, before creating a startup item for the target operating system according to the target startup item information, the basic input and output system BIOS sends a target startup item information acquisition command to the controller BMC, and receives the target startup item information sent by the controller.
[0075] In some embodiments, the above step (1) constructing the target startup item information in a preset data format based on the target operating system information can be implemented as follows:
[0076] Calculating a checksum according to the startup item name, the name of the boot loader, and the path of the boot loader;
[0077] Target startup item information is constructed according to the startup item name, the name of the boot loader, the path of the boot loader, and the checksum.
[0078] Specifically, a checksum is calculated based on the startup item name, the boot loader name, and the boot loader path of the target operating system, and the target startup item information is constructed based on the startup item name, the boot loader name, the boot loader path, and the checksum.
[0079] The method for introducing an operating system startup item provided by an embodiment of the present disclosure obtains at least one operating system information from a controller, and determines whether the current target operating system information matches at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if no match is found, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, thereby further improving the accuracy of the operating system installation.
[0080] In some embodiments, before executing the above step S22 (determining whether the target operating system information matches any operating system information stored in the controller), the following steps may also be executed:
[0081] Determine whether the first operating system information list is empty;
[0082] If the first operating system information list is not empty, verifying at least one operating system information in the first operating system information list;
[0083] If the first operating system information list is empty, it is determined that the target operating system information does not match any of the operating system information stored in the controller.
[0084] Specifically, before determining whether the target operating system information matches any operating system information stored in the controller, first determine whether the first operating system information list is empty. If the first operating system information list is not empty, verify at least one operating system information in the first operating system information list; if the first operating system information list is empty, determine that the target operating system information does not match any operating system information stored in the controller.
[0085] In the disclosed embodiments, by first checking whether the list is empty, unnecessary verification operations can be avoided on an empty list, thereby improving processing efficiency. If the first operating system information list is empty, the target operating system information is directly determined to be mismatched, avoiding invalid matching operations on an empty list. Verifying the operating system information list ensures data integrity and correctness, preventing matching failures due to data errors.
[0086] In some embodiments, the above step (verifying at least one operating system information in the first operating system information list) can be implemented as follows:
[0087] If each piece of operating system information in the first operating system information list passes verification, determining whether the target operating system information matches any piece of operating system information in the first operating system information list;
[0088] If each piece of operating system information in the first operating system information list fails to pass the verification, obtaining the first operating system information list again from the controller, and determining again whether each piece of operating system information in the first operating system information list passes the verification;
[0089] If the operating system information in the first operating system information list still fails to pass the verification, it is determined that the target operating system information does not match any of the operating system information in the first operating system information list.
[0090] Specifically, if all the operating system information in the first operating system information list passes the verification, it is determined whether the target operating system information matches any operating system information in the first operating system information list; if all the operating system information in the first operating system information list fails to pass the verification, the first operating system information list is obtained from the controller again, and it is determined again whether all the operating system information in the first operating system information list passes the verification; if the operating system information in the first operating system information list still fails to pass the verification, it is determined that the target operating system information does not match any of the operating system information in the first operating system information list.
[0091] In the disclosed embodiments, a verification mechanism ensures the accuracy of operating system information, preventing startup failures or other issues caused by incorrect information. If the initially acquired information fails verification, it is re-acquired and re-verified. This dual verification mechanism prevents the use of tampered or unsafe operating system information, thereby improving system security.
[0092] The method for introducing an operating system startup item provided by the embodiment of the present disclosure obtains at least one operating system information from a controller, and determines whether the current target operating system information matches at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if it fails to match, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, further improving the accuracy of the operating system installation. In addition, through this method, users can safely introduce a new operating system without adding any additional operations, saving development time costs for server manufacturers and server maintenance costs for users.
[0093] In some embodiments, if each operating system information in the first operating system information list fails verification, corresponding log information is recorded.
[0094] Specifically, if all the operating system information in the first operating system information list fails to pass the verification, the corresponding log information is recorded; or, if the operating system information in the first operating system information list still fails to pass the verification, the corresponding log information is recorded, that is, each time all the operating system information in the first operating system information list fails to pass the verification, the corresponding log information can be recorded.
[0095] In the disclosed embodiment, when operating system information fails to pass verification, logging can provide administrators with detailed error information, helping to quickly locate the cause of the problem, thereby accelerating the troubleshooting process.
[0096] In some embodiments, determining whether obtaining the first operating system information list from the controller is supported according to a preset flag bit;
[0097] If the preset flag bit is a first value, it is determined that obtaining the first operating system information list from the controller is supported;
[0098] If the preset flag bit is a second value, it is determined that obtaining the first operating system information list from the controller is not supported.
[0099] The first value and the second value can be set according to the actual application scenario. For example, the first value can be set to "1" and the second value can be set to "0".
[0100] Specifically, the value of the preset flag bit is used to determine whether it supports obtaining the first operating system information list from the controller. If the preset flag bit is the first value, it is determined that it supports obtaining the first operating system information list from the controller; if the preset flag bit is the second value, it is determined that it does not support obtaining the first operating system information list from the controller.
[0101] For example, assuming the first value can be set to "1" and the second value can be set to "0," if the preset flag is "1," it indicates that the first operating system information list can be obtained from the controller; if the preset flag is "0," it indicates that the first operating system information list cannot be obtained from the controller. This mechanism is primarily for security reasons. When the flag is set to "1," only the startup item list in the build data is used to create a startup item. Only the user's new operating system can be started, preventing the server from being installed with other insecure operating systems.
[0102] In the disclosed embodiments, by presetting flags, system configuration management can be simplified, allowing administrators to quickly enable or disable specific features as needed. System administrators or users can set flags based on actual needs, flexibly controlling whether to obtain the operating system information list from the controller to accommodate different usage scenarios. For example, in some cases, obtaining the information list from the controller may introduce instability factors, such as data corruption or incompatible operating system information. By setting flags, these potential problems can be avoided, improving system stability.
[0103] In some embodiments, in response to a startup item information adding instruction, the target operating system information is sent to the controller.
[0104] Specifically, the controller centrally receives and processes operating system information from various sources, facilitating unified management and configuration of startup items across the entire system. Dynamically adding new operating system information allows the system to adapt to changing needs, such as installing a new operating system or updating an existing one.
[0105] In the disclosed embodiments, when the system needs to be expanded, such as by adding new hardware or supporting a new operating system, this can be easily accomplished by adding startup information. Sending target operating system information to the controller in response to the startup information addition instruction improves the system's automated management, enhancing flexibility and scalability while ensuring data consistency and system security.
[0106] In some embodiments, in response to a boot item information deletion instruction, the target operating system information is deleted from the controller.
[0107] Specifically, for users with multiple operating systems or multiple boot options, deleting unneeded boot items can reduce user confusion when selecting boot options. Deleting boot item information from the controller can free up storage space, especially in environments with limited storage resources.
[0108] Exemplarily, boot item information in the BMC EEPROM is added and deleted through out-of-band IPMI commands, which facilitates users to add new operating system information and delete certain operating system information according to usage scenarios.
[0109] In some embodiments, before executing the step (determining whether the target operating system information matches any operating system information stored in the controller), the basic input and output system may further execute the following steps:
[0110] A first information acquisition command is sent to the controller.
[0111] The first information acquisition command is used to instruct acquisition of at least one operating system information in the controller.
[0112] The at least one operating system information sent by the controller is received.
[0113] Accordingly, the controller performs the following steps: receiving a first information acquisition command sent by the controller;
[0114] In response to the first information acquisition command sent by the basic input and output system, at least one operating system information is sent to the basic input and output system.
[0115] Specifically, before determining whether the target operating system information matches any operating system information stored in the controller, the basic input / output system sends a first information acquisition command to the controller, where the first information acquisition command is used to instruct the controller to acquire at least one piece of operating system information stored in the controller. The controller receives the first information acquisition command sent by the controller and, in response to the first information acquisition command sent by the basic input / output system, sends the at least one piece of operating system information to the basic input / output system. Furthermore, the basic input / output system receives the at least one piece of operating system information sent by the controller.
[0116] Real-time OS information acquisition improves the accuracy of the subsequent matching process, ensuring that the comparison between the target OS information and the information stored in the controller is accurate. For users, automated OS information acquisition and matching means less manual intervention and a smoother installation experience.
[0117] The method for introducing an operating system startup item provided by the embodiment of the present disclosure obtains at least one operating system information from a controller, and determines whether the current target operating system information matches at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if it fails to match, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, further improving the accuracy of the operating system installation. In addition, through this method, users can safely introduce a new operating system without adding any additional operations, saving development time costs for server manufacturers and server maintenance costs for users.
[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0119] Figure 1 A schematic diagram of the structure of an operating system provided by the present disclosure is shown as follows: Figure 1 As shown, the system includes: a basic input and output system 11, a hard disk 12 and a controller 13; the basic input and output system 11 is configured as follows:
[0120] Responding to an operating system installation instruction input by a user, obtaining target operating system information stored in the hard disk;
[0121] determining whether the target operating system information matches any operating system information stored in the controller;
[0122] If the target operating system information matches the first operating system information stored in the controller, creating a startup item for the target operating system based on the first operating system information;
[0123] If the target operating system information does not match any of the operating system information stored in the controller, determining whether the target operating system information matches any of the operating system information stored in the basic input and output system;
[0124] If the target operating system information matches the second operating system information stored in the basic input and output system, a startup item is created for the target operating system based on the second operating system information.
[0125] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0126] If the target operating system information does not match any of the operating system information stored in the basic input and output system, constructing target startup item information in a preset data format based on the target operating system information;
[0127] Create a startup item for the target operating system according to the target startup item information.
[0128] As an optional implementation of the embodiment of the present disclosure, the controller is configured to:
[0129] receiving target startup item information sent by the basic input and output system;
[0130] The target startup item information is stored in a target storage unit of the controller.
[0131] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0132] Sending a target startup item information acquisition command to the controller;
[0133] Receive target startup item information sent by the controller.
[0134] As an optional implementation of the embodiment of the present disclosure, the target operating system information includes: a startup item name, a boot loader name, and a boot loader path. The basic input and output system is specifically configured as follows:
[0135] Calculating a checksum according to the startup item name, the name of the boot loader, and the path of the boot loader;
[0136] Target startup item information is constructed according to the startup item name, the name of the boot loader, the path of the boot loader, and the checksum.
[0137] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is specifically configured as follows:
[0138] Obtaining a checksum of the target operating system information;
[0139] Compare the checksum of the target operating system information with the checksum of the third operating system information stored in the controller to determine whether the target operating system information matches the third operating system information stored in the controller; the third operating system information is any operating information stored in the controller.
[0140] As an optional implementation of the embodiment of the present disclosure, the at least one operating system information is stored in a first operating system list, and the basic input and output system is further configured as follows:
[0141] Determine whether the first operating system information list is empty;
[0142] If the first operating system information list is not empty, verifying at least one operating system information in the first operating system information list;
[0143] If the first operating system information list is empty, it is determined that the target operating system information does not match any of the operating system information stored in the controller.
[0144] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0145] If each piece of operating system information in the first operating system information list passes verification, determining whether the target operating system information matches any piece of operating system information in the first operating system information list;
[0146] If each piece of operating system information in the first operating system information list fails to pass the verification, obtaining the first operating system information list again from the controller, and determining again whether each piece of operating system information in the first operating system information list passes the verification;
[0147] If the operating system information in the first operating system information list still fails to pass the verification, it is determined that the target operating system information does not match any of the operating system information in the first operating system information list.
[0148] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0149] If each piece of operating system information in the first operating system information list fails to pass the verification, the corresponding log information is recorded.
[0150] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0151] Determining whether obtaining the first operating system information list from the controller is supported according to a preset flag bit;
[0152] If the preset flag bit is a first value, it is determined that obtaining the first operating system information list from the controller is supported;
[0153] If the preset flag bit is a second value, it is determined that obtaining the first operating system information list from the controller is not supported.
[0154] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0155] In response to the startup item information adding instruction, the target operating system information is sent to the controller.
[0156] As an optional implementation of the embodiment of the present disclosure, the basic input and output system is further configured as follows:
[0157] Sending a first information acquisition command to the controller; the first information acquisition command is used to instruct to obtain at least one operating system information in the controller;
[0158] The at least one operating system information sent by the controller is received.
[0159] As an optional implementation of the embodiment of the present disclosure, the controller is configured to:
[0160] receiving a first information acquisition command sent by the controller;
[0161] In response to the first information acquisition command sent by the basic input and output system, at least one operating system information is sent to the basic input and output system.
[0162] For descriptions of features in the embodiments corresponding to the system for introducing operating system startup items, reference may be made to the relevant descriptions of the embodiments corresponding to the method for introducing operating system startup items, which will not be detailed here.
[0163] The system for introducing operating system startup items provided by the embodiment of the present disclosure obtains at least one operating system information from a controller, and determines whether the current target operating system information matches at least one operating system information stored in the controller. If it matches the first operating system information stored in the controller, a startup item is created based on the first operating system information stored in the controller; if it fails to match, the operating system information corresponding to the target operating system is further obtained from the BIOS. By automatically matching and creating startup items, the installation and configuration process of the operating system is simplified, the efficiency of introducing a new operating system is improved, and the possibility of manual input errors by the user is reduced, further improving the accuracy of the operating system installation. In addition, through this method, users can safely introduce a new operating system without adding any additional operations, saving development time costs for server manufacturers and server maintenance costs for users.
[0164] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the method for introducing an operating system startup item.
[0165] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned embodiments of the method for introducing an operating system startup item when running.
[0166] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0167] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned method embodiments for introducing an operating system startup item are implemented.
[0168] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned method embodiments for introducing operating system startup items.
[0169] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0170] The above is a detailed introduction to the method, apparatus, device and medium for introducing an operating system startup item provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A system for introducing operating system startup items, characterized in that: The system includes: a basic input and output system, a hard disk, and a controller; the basic input and output system is configured to: Responding to an operating system installation instruction input by a user, obtaining target operating system information stored in the hard disk; determining whether the target operating system information matches any operating system information stored in the controller; If the target operating system information matches the first operating system information stored in the controller, creating a startup item for the target operating system based on the first operating system information; If the target operating system information does not match any of the operating system information stored in the controller, determining whether the target operating system information matches any of the operating system information stored in the basic input and output system; If the target operating system information matches the second operating system information stored in the basic input and output system, a startup item is created for the target operating system based on the second operating system information.
2. The system for introducing operating system startup items according to claim 1, characterized in that: The basic input and output system is further configured to: If the target operating system information does not match any of the operating system information stored in the basic input and output system, constructing target startup item information in a preset data format based on the target operating system information; Create a startup item for the target operating system according to the target startup item information.
3. The system for introducing operating system startup items according to claim 2, characterized in that: The controller is configured to: receiving target startup item information sent by the basic input and output system; The target startup item information is stored in a target storage unit of the controller.
4. The system for introducing operating system startup items according to claim 3, characterized in that: The basic input and output system is further configured to: Sending a target startup item information acquisition command to the controller; Receive target startup item information sent by the controller.
5. The system for introducing operating system startup items according to claim 2, characterized in that: The target operating system information includes: a startup item name, a boot loader name, and a boot loader path. The basic input and output system is specifically configured as follows: Calculating a checksum according to the startup item name, the name of the boot loader, and the path of the boot loader; Target startup item information is constructed according to the startup item name, the name of the boot loader, the path of the boot loader, and the checksum.
6. The system for introducing operating system startup items according to claim 1, characterized in that: The basic input and output system is specifically configured as follows: Obtaining a checksum of the target operating system information; Compare the checksum of the target operating system information with the checksum of the third operating system information stored in the controller to determine whether the target operating system information matches the third operating system information stored in the controller; the third operating system information is any operating information stored in the controller.
7. The system for introducing operating system startup items according to claim 1, characterized in that: The basic input and output system is further configured to: Determine whether the first operating system information list is empty; If the first operating system information list is not empty, verifying at least one operating system information in the first operating system information list; If the first operating system information list is empty, it is determined that the target operating system information does not match any of the operating system information stored in the controller.
8. The system for introducing operating system startup items according to claim 7, characterized in that: The basic input and output system is further configured to: If each piece of operating system information in the first operating system information list passes verification, determining whether the target operating system information matches any piece of operating system information in the first operating system information list; If each piece of operating system information in the first operating system information list fails to pass the verification, obtaining the first operating system information list again from the controller, and determining again whether each piece of operating system information in the first operating system information list passes the verification; If the operating system information in the first operating system information list still fails to pass the verification, it is determined that the target operating system information does not match any of the operating system information in the first operating system information list.
9. The system for introducing operating system startup items according to claim 8, characterized in that: The basic input and output system is further configured to: If each piece of operating system information in the first operating system information list fails to pass the verification, the corresponding log information is recorded.
10. The system for introducing operating system startup items according to claim 7, characterized in that: The basic input and output system is further configured to: Determining whether obtaining the first operating system information list from the controller is supported according to a preset flag bit; If the preset flag bit is a first value, it is determined that obtaining the first operating system information list from the controller is supported; If the preset flag bit is a second value, it is determined that obtaining the first operating system information list from the controller is not supported.
11. The system for introducing operating system startup items according to claim 7, characterized in that: The basic input and output system is further configured to: In response to the startup item information adding instruction, the target operating system information is sent to the controller.
12. The system for introducing operating system startup items according to claim 1, characterized in that: The basic input and output system is further configured to: Sending a first information acquisition command to the controller; the first information acquisition command is used to instruct to obtain at least one operating system information in the controller; The at least one operating system information sent by the controller is received.
13. The system for introducing operating system startup items according to claim 12, characterized in that: The controller is configured to: receiving a first information acquisition command sent by the controller; In response to the first information acquisition command sent by the basic input and output system, at least one operating system information is sent to the basic input and output system.
14. A method for introducing an operating system startup item, characterized in that: The system for introducing an operating system startup item according to claim 1 includes: a basic input / output system, a hard disk, and a controller; and the method includes: The basic input and output system obtains the target operating system information stored in the hard disk in response to the operating system installation instruction input by the user; The basic input and output system determines whether the target operating system information matches any operating system information stored in the controller; If the target operating system information matches the first operating system information stored in the controller, the basic input and output system creates a startup item for the target operating system based on the first operating system information; If the target operating system information does not match any of the operating system information stored in the controller, the basic input and output system determines whether the target operating system information matches any of the operating system information stored in the basic input and output system; If the target operating system information matches the second operating system information stored in the basic input and output system, the basic input and output system creates a startup item for the target operating system based on the second operating system information.
15. The method according to claim 14, characterized in that The determining whether the target operating system information matches any operating system information stored in the basic input and output system further includes: If the target operating system information does not match any of the operating system information stored in the basic input and output system, the basic input and output system constructs target startup item information in a preset data format based on the target operating system information; The basic input / output system creates a startup item for the target operating system according to the target startup item information.
16. The method according to claim 15, characterized in that After the basic input / output system constructs target startup item information in a preset data format based on the target operating system information, the method further includes: The controller receives the target boot item information sent by the basic input and output system, and stores the target boot item information in a target storage unit of the controller.
17. The method according to claim 15, characterized in that Before the basic input / output system creates a startup item for the target operating system according to the target startup item information, the method further includes: The basic input and output system sends a target startup item information acquisition command to the controller; The basic input and output system receives the target startup item information sent by the controller.
18. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for introducing an operating system startup item as claimed in any one of claims 14 to 17 when executing the computer program.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for introducing an operating system startup item according to any one of claims 14 to 17 are implemented.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for introducing an operating system startup item as claimed in any one of claims 14 to 17 are implemented.
Citation Information
Patent Citations
A logic device and method for configuring a BIOS boot entry
CN109240754A
Method and device for creating starting item based on white list and readable storage medium
CN114546502A