Server startup control methods and devices, storage media and electronic devices
By detecting and configuring the boot information of the target storage device, the problem of the BIOS being unable to accurately identify the storage device was solved, thereby improving the success rate of server boot.
Patent Information
- Application Number
- CN202411755724.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-30
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-11-30
AI Technical Summary
Traditional BIOS cannot accurately identify storage devices, leading to inaccurate selection of boot options by the operating system, which may cause server startup failures.
By receiving the target boot request, the system detects and configures the target boot information based on the device attributes of the target storage device and the initial boot information of the connector, ensuring that the operating system is only booted through the storage device if permitted.
This improves the server startup success rate, avoids the risk of booting the operating system from a faulty storage device, and enhances the server's operational stability.
Smart Images

Figure CN119690529B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a server startup control method and apparatus, storage medium and electronic device. Background Technology
[0002] In related technologies, traditional BIOS cannot directly determine the corresponding storage device from the boot item name when booting a server's operating system. This results in low accuracy in selecting the boot item for the operating system, which may cause the server's operating system to fail to boot.
[0003] For example, when a server deploys two or more storage devices, with one device supporting the operating system and the others for data storage, if the operating system is incorrectly installed on the storage device used for data storage, or if the operating system is stored within the data storage device, this could cause the operating system to boot incorrectly. For instance, if the operating system is installed on the hard drive group used for data storage, it will boot from the operating system on that data storage hard drive group. This operating system might be different from the user's original planned operating system environment, such as the type, version, or driver configuration, thus impacting business operations or even preventing the system from running at all.
[0004] Additionally, if data is stored on the disk or disk group where the operating system is installed, causing a conflict between the stored data and the operating system data, or if the operating system data is deleted when deleting data, it will cause the operating system to fail to boot, and the upper-layer business will be unable to operate normally.
[0005] It is understandable that in related technologies, there may be issues where the boot entry name generated by the BIOS cannot accurately reflect the storage device information, resulting in low accuracy in the operating system's boot entry selection and consequently causing server boot failure. Summary of the Invention
[0006] This application provides a server startup control method and apparatus, storage medium and electronic device to at least solve the problem of low server startup success rate in related technologies.
[0007] According to one embodiment of this application, a server startup control method is provided. The server includes a processor and startup firmware, the startup firmware being connected to the processor. The processor is configured to connect to a connector, the connector being configured to connect to a storage device, and the startup firmware being further configured to connect to the storage device. The method is applied to the startup firmware and includes: receiving a target startup request, wherein the target startup request requests to start the operating system of the processor through a connected target storage device, and the processor is connected to the target storage device through a target connector; responding to the target startup request, detecting target startup information corresponding to the target storage device based on target device attributes of the target storage device and initial startup information corresponding to the target connector, wherein the initial startup information indicates whether starting the operating system through a candidate storage device connected to the target connector is allowed, and the initial startup information is configured on a target operating interface provided by the startup firmware; and, if the target startup information indicates that starting the operating system through the target storage device is allowed, starting the operating system on the processor through the target storage device.
[0008] In one exemplary embodiment, detecting the target boot information corresponding to the target storage device based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector includes: filtering the target connector from candidate connectors based on the target device type and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; and determining the target boot information based on the initial boot information.
[0009] In one exemplary embodiment, the step of filtering the target connector from candidate connectors based on the target device type and the target identifier of the target storage device includes: when the target device type includes a first device type and the target identifier includes the target bus identifier of the target storage device, detecting the target identifier range to which the target bus identifier falls, and obtaining the target connector corresponding to the target identifier range from a list of corresponding identifier ranges and connectors, wherein, when the target device type includes the first device type, the target connector includes a target port on the server; when the target device type includes a second device type and the target identifier includes the target bus identifier, the target device identifier, and the target function identifier of the target storage device, obtaining the target connector corresponding to the target bus identifier, the target device identifier, and the target function identifier from a list of corresponding connectors, bus identifiers, device identifiers, and function identifiers, wherein, when the target device type includes the second device type, the target connector includes an adapter connected to the processor.
[0010] In one exemplary embodiment, determining the target startup information based on the initial startup information includes: if the initial startup information indicates that the operating system is not allowed to be started through the candidate storage device connected to the target connector, determining that the target startup information indicates that the operating system is not allowed to be started through the target storage device; and if the initial startup information indicates that the operating system is allowed to be started through the candidate storage device connected to the target connector, determining that the target startup information indicates that the operating system is allowed to be started through the target storage device.
[0011] In one exemplary embodiment, the target operating interface includes a corresponding reference connector and a boot setting item. The boot setting item is used to set whether to allow the operating system to be booted through the storage device connected to the reference connector. The reference connector includes the target connector. Before detecting the target boot information corresponding to the target storage device based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector, the method further includes: receiving a target configuration request triggered on the target operating interface, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information; and responding to the target configuration request, configuring the boot information of the target connector from the reference boot information to the initial boot information.
[0012] In one exemplary embodiment, the boot settings include a first setting and a second setting. The first setting adjusts the boot information of the reference connector to indicate that the operating system is not allowed to boot through the storage device connected to the reference connector. The second setting adjusts the boot information of the reference connector to indicate that the operating system is allowed to boot through the storage device connected to the reference connector. Receiving a target configuration request triggered on the target operating interface includes: detecting a first trigger operation executed by the first setting and detecting a second trigger operation executed by the second setting; upon detecting that the first setting has executed the first trigger operation and the second setting has not executed the second trigger operation... In the case of the second triggering operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system; if it is detected that the first setting item has not been executed by the first triggering operation and the second setting item has been executed by the second triggering operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is allowed to boot the operating system.
[0013] In an exemplary embodiment, the target operating interface includes a corresponding reference connector and a function setting item. The function setting item is used to set the connection parameters of the reference connector. The startup setting item includes a third setting item, which is in the function setting item and is used to adjust the startup information of the reference connector to indicate that the operating system is not allowed to be started through the storage device connected to the reference connector. Receiving a target configuration request triggered on the target operating interface includes: detecting a third trigger operation performed by the third setting item; and determining that the target configuration request has been received if the third setting item has performed the third trigger operation. The target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, which indicates that the operating system is not allowed to be started through the candidate storage device connected to the target connector.
[0014] According to another embodiment of this application, a server startup control device is provided. The server includes: a processor and startup firmware, the startup firmware being connected to the processor, the processor being used to connect to a connector, the connector being used to connect to a storage device, the startup firmware being further used to connect to the storage device, the device being applied to the startup firmware, the device including: a first receiving module, used to receive a target startup request, wherein the target startup request is used to request to start the operating system of the processor through a connected target storage device, the processor being connected to the target storage device through a target connector; a detection module, used to respond to the target startup request and detect target startup information corresponding to the target storage device according to the target device attributes of the target storage device and the initial startup information corresponding to the target connector, wherein the initial startup information is used to indicate whether to allow the startup of the operating system through a candidate storage device connected to the target connector, the initial startup information being configured on a target operation interface provided by the startup firmware; and a startup module, used to start the operating system on the processor through the target storage device when the target startup information indicates that the startup of the operating system through the target storage device is allowed.
[0015] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, and the computer program is configured to perform the steps in any of the above method embodiments when it is run.
[0016] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0017] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0018] This application allows users to configure the boot information corresponding to the connector on the target operating interface, enabling them to configure whether to allow the operating system to boot from the storage device connected to the connector according to their needs. The boot firmware detects the boot information corresponding to the storage device based on the device attributes of the storage device and the boot information corresponding to the connector, ensuring that the operating system can only boot from the processor through the storage device if the boot information indicates that the operating system can boot from the storage device connected to the connector. This avoids booting the operating system from the wrong storage device, thus solving the problem of low server boot success rate and improving the server boot success rate. Attached Figure Description
[0019] Figure 1 This is a hardware structure block diagram of a server device for a server startup control method according to an embodiment of this application;
[0020] Figure 2 This is a flowchart of a server startup control method according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram of the link structure of an NVME disk according to an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the link structure of a SATA disk according to an embodiment of this application;
[0023] Figure 5 This is a schematic diagram of the link structure of a USB storage device according to an embodiment of this application;
[0024] Figure 6 This is a schematic diagram of the functional functions supported in EFI_PCI_IO_PROTOCOL according to the embodiments of this application;
[0025] Figure 7 This is a schematic diagram of the GetLocation function supported in EFI_PCI_IO_PROTOCOL according to an embodiment of this application;
[0026] Figure 8 This is a schematic diagram of a target operating interface for connecting a CPU to a storage device via a port, according to an embodiment of this application.
[0027] Figure 9 This is a schematic diagram of a target user interface for connecting a CPU to a storage device via a controller, according to an embodiment of this application.
[0028] Figure 10 This is a schematic diagram of an optional startup item creation permission process according to an embodiment of this application;
[0029] Figure 11 This is a structural block diagram of a server startup control device according to an embodiment of this application. Detailed Implementation
[0030] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0032] The terminology used in the embodiments of this application is explained as follows:
[0033] BIOS: Base Input / Output System. The BIOS is the most basic software code in a computer hardware system. The BIOS program is embedded in the SPI chip on the computer motherboard. Its main functions are power-on self-test, CPU and memory initialization, detection of input / output devices and bootable devices, and ultimately, booting the operating system.
[0034] Computer products such as servers, desktops, laptops, and industrial PCs ultimately need to boot into an operating system to work and operate the computer. This inevitably requires two functions: installing the operating system and booting the operating system. There are multiple ways to install the operating system, such as through a CD-ROM drive or PXE. After the operating system is installed, each bootable device, including CD-ROM drives, PXE network cards, and various hard drives with pre-installed operating systems (there may be multiple ones), will be processed by the BIOS as bootable items. Users can choose which boot item to use as needed. For example, selecting the CD-ROM drive means installing the operating system from the CD-ROM drive, selecting PXE means installing the operating system from PXE, and selecting an already installed operating system means booting into the operating system.
[0035] Specifically regarding PXE, every port on every network card on the machine can support PXE functionality through the card's driver. The BIOS generates a PXE boot entry and can individually control the PXE function on / off of each port.
[0036] Furthermore, the BIOS will summarize all bootable devices, including optical drives, PXE drives, and operating systems already installed on various hard drives, and display them in the BIOS Setup interface. This allows users to adjust the boot order (priority) of each boot device and toggle boot device on / off settings. At the same time, the BIOS will implement a shortcut key function to configure all boot devices during the boot process, providing prompts during the boot process on which function key to press to activate the boot device settings function. When the function key is pressed, such as F11 or later, a window will pop up displaying all bootable devices, and the user can choose which device to boot from.
[0037] In addition, the BIOS allows users to activate the PXE function by pressing the F12 function key during the boot process (booting from the PXE boot option); furthermore, the BIOS can also generate a window consisting entirely of PXE boot options, similar to the F11 function, for the user to choose from.
[0038] PCH: Platform Controller Hub.
[0039] UEFI: Unified Extensible Firmware Interface, is a personal computer system specification used to define the software interface between the operating system and the system firmware.
[0040] PXE stands for preboot execution environment. It operates in a client / server network mode, allowing workstations to download images from a remote server over a network and thus boot the operating system. During the boot process, the terminal requests a DHCP (Dynamic Host Configuration Protocol) server to assign an IP (Internet Protocol) address. It then uses TFTP (Trivial File Transfer Protocol) or MTFTP (Multicast Trivial File Transfer Protocol) to download a boot package into its local memory for execution. This boot package completes the basic software setup for the terminal (client), thereby booting the terminal operating system pre-installed on the server. PXE can boot multiple operating systems.
[0041] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a server startup control method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0042] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the server startup control method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0043] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0044] This embodiment provides a server startup control method. Figure 2 This is a flowchart of a server startup control method according to an embodiment of this application, such as... Figure 2 As shown, the server includes: a processor and boot firmware, the boot firmware being connected to the processor, the processor being used to connect to a connector, the connector being used to connect to a storage device, the boot firmware also being used to connect to the storage device, and the method being applied to the boot firmware, the process including the following steps:
[0045] Step S202: Receive a target boot request, wherein the target boot request is used to request the processor's operating system to be booted through the connected target storage device, and the processor is connected to the target storage device through a target connector;
[0046] Step S204: In response to the target boot request, detect the target boot information corresponding to the target storage device according to the target device attributes of the target storage device and the initial boot information corresponding to the target connector. The initial boot information is used to indicate whether the operating system is allowed to be booted through the candidate storage device connected to the target connector. The initial boot information is configured on the target operation interface provided by the boot firmware.
[0047] Step S206: If the target boot information indicates that the operating system is allowed to be booted through the target storage device, the operating system is booted on the processor through the target storage device.
[0048] Through the above steps, users can configure the boot information corresponding to the connector on the target operation interface. This allows users to configure whether to allow the operating system to boot from the storage device connected to the connector according to their needs. The boot firmware detects the boot information corresponding to the storage device based on the device attributes of the storage device and the boot information corresponding to the connector. It ensures that the operating system can only boot from the processor through the storage device if the boot information indicates that the operating system can boot from the storage device connected to the connector. This avoids booting the operating system from the wrong storage device. Therefore, it can solve the problem of low server boot success rate and improve the server boot success rate.
[0049] In the technical solution provided in step S202 above, the boot firmware may include, but is not limited to, a program embedded in the server's storage space. This program may include, but is not limited to, the operating system used to boot the processor. For example, the boot firmware may include, but is not limited to, the BIOS.
[0050] Optionally, in this embodiment, the processor may, but is not limited to, be used to interact with the storage device within the server via a connector. For example, the data interaction may, but is not limited to, include read operations and write operations, and the processor may, but is not limited to, include a CPU.
[0051] Optionally, in this embodiment, the connector may be used, but is not limited to, to connect the processor and the storage device, providing a physical connection and data transmission channel between the processor and the storage device. The connector may include, but is not limited to, the controller connected to the PCH or IOH (Input / Output Controller Hub) or adapter chip, or a port on the server directly connected to the CPU, such as a PCIe (Peripheral Component Interconnect Express) port, a SATA (Serial Advanced Technology Attachment) port, etc.
[0052] Optionally, in this embodiment, the storage device may be used, but is not limited to, for storing operating systems, applications, and data. The storage device may include, but is not limited to, NVME (Non-Volatile Memory Express), M.2, U.2, E3.S, SATA, SAS (Serial Attached SCSI), SSD (Solid State Drive), USB (Universal Serial Bus) hard drives, etc.
[0053] Optionally, in this embodiment, the underlying data transmission protocol, or hardware interface specification of the storage device, may include, but is not limited to, PCI (Peripheral Component Interconnect), PCIe, SATA, USB, etc.
[0054] Figure 3 This is a schematic diagram of the link structure of an NVME disk according to an embodiment of this application, as shown below. Figure 3 As shown, for NVMe drives and external RAID (Redundant Array of Independent Disks) cards used to expand hard drives, the underlying protocol is PCI / PCIe. The link structure of an NVMe drive may include, but is not limited to, directly connecting the NVMe drive to the CPU's PEPort (PCIe port), without the intermediate PCH. With the development of computer technology, the PCH is no longer used.
[0055] Figure 4 This is a schematic diagram of the SATA disk link structure according to an embodiment of this application, such as... Figure 4 As shown, one PCH / IOH / adapter chip connects to multiple SATA Controllers, and each SATA Controller is then connected to a SATA disk. A SATA Controller can be used, but is not limited to, to connect one or more SATA disks.
[0056] Figure 5 This is a schematic diagram of the link structure of a USB storage device according to an embodiment of this application, such as... Figure 5 As shown, one PCH / IOH / adapter chip connects to multiple USB Controllers, and each USB Controller is then connected to a USB storage device. A USB Controller can be used, but is not limited to, to connect one or more USB storage devices.
[0057] It should be noted that, due to the existence of various types of adapters, in Figure 3 , Figure 4 and Figure 5 In this process, there may be intermediate adapters, such as a USB controller that connects to a USB storage device via an expansion device.
[0058] In the technical solution provided in step S204 above, the boot information may, but is not limited to, indicate whether the operating system is allowed to be booted from the storage device connected to the connector, or whether the operating system is not allowed to be booted from the storage device connected to the connector.
[0059] In one exemplary embodiment, the target boot information corresponding to the target storage device can be detected, but is not limited to, in the following manner, based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector: filtering the target connector from candidate connectors based on the target device type and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; and determining the target boot information based on the initial boot information.
[0060] Optionally, in this embodiment, different storage devices may, but are not limited to, correspond to different identifiers, and different storage devices may, but are not limited to, belong to the same device type, or different storage devices may, but are not limited to, belong to different device types. As an optional example, the device type may, but is not limited to, be determined based on the underlying data transfer protocol of the storage device.
[0061] Optionally, in this embodiment, the target device attributes may include, but are not limited to, device attributes of the target storage device in multiple dimensions. It is understood that the target device attributes may include, but are not limited to, one or more device attributes.
[0062] A device's DevicePath may, but is not limited to, include one or more DevicePathNodes with different attributes. These DevicePathNodes describe various attributes of the device from different perspectives. It can be understood that one node corresponds to an attribute of the storage device in one dimension, and there are six main types of DevicePathNodes:
[0063] (1) Hardware Device Path: The hardware device path defines how a device connects to the system's resource domains. Simply put, resource domains are the system's shared memory, memory-mapped I / O, and I / O space. Hardware device paths are further divided into subtypes such as PCI device path and controller device path.
[0064] The PCIDevicePath allows you to obtain the device's Function and DeviceNumber attributes.
[0065] (2) ACPI (Advanced Configuration and Power Interface) Device Path: This device path describes devices that are not enumerated in an industry-standard manner. These devices must be described in the ACPI namespace using ACPIAML (ACPI Machine Language). This device path is connected to the ACPI namespace. From the device's ACPIDevicePath data, matching _HID_UID_CID (HardwareID, UniqueID, CompatibleID, etc.) yields its PCIRootBusnumber. Adding the device's Function and DeviceNumber from the hardware device path uniquely identifies the specific device, as the combination of Bus, Device, and FunctionNumber for a PCIe device is unique and corresponds one-to-one with each device.
[0066] (3) MessagingDevicePath: A messaging device path is a device path used to describe device connections outside the system resource domain. This device path can describe physical message information, such as SCSI ID, or abstract information, such as network protocol IP address. There are various subtypes under MessagingDevicePath, which are refined to the devices related to the embodiments of this application, such as USBDevicePath, SataDevicePath, MAC (Media Access Control) addressDevicePath, etc.
[0067] (4) Media Device Path: This type of device path describes a portion of the media abstracted by the boot service. For example, the media device path can define which partition on the hard drive is being used. The media device path is further divided into subtypes such as hard drive media device path and file path media device path.
[0068] (5) BIOS Boot Specification Device Path: This device path is used to point to the booting of older operating systems. It is based on BIOS Boot Specification version 1.01.
[0069] (6) EndofHardwareDevicePath: Depending on the subtype, this device path node is used to indicate the end of a device path instance or device path structure.
[0070] Under the UEFI specification, a specific DevicePath for a device is composed of nodes of different types of DevicePaths mentioned above. These nodes are called DevicePathNodes. For example, the complete DevicePath of a USB device is: PciRoot(0x0) / PCI(0x14,0) / USB(0,0), where the " / " separates the different DevicePathNodes. They correspond to different types of DevicePaths for this device, which are the attribute data of this device from the perspective of these types.
[0071] Similarly, the DevicePath for SATA and PCIe NVMe hard drives is also the same. For example, the DevicePath for an NVMe drive is: PciRoot(0) / PCI(0x1C,0) / PCI(0,0) / NVME(1,C3-70-00-0002-0D-08-00). These DevicePath attributes are assigned values during the device initialization phase and form a DevicePath data list.
[0072] With the support of the DevicePath protocol mentioned above, the attributes of PCIeBus, Device, and FunctionNumber of the device can be obtained. Then, through the algorithm supported by the PCI / PCIe specification, the Bus, Device, and FunctionNumber attribute values of each PCIeDevice and each level of Bridge in the entire PCIe chain from the terminal device to the top RootPort can be traced.
[0073] It should be noted that the DevicePathProtocol method mentioned above is not the only way to obtain the BusDeviceFunctionNumber of the device and its PCIePort or Controller. Other methods for obtaining the BusDeviceFunctionNumber of the device and its PCIePort or Controller are also applicable. For example, the GetLocation function supported in the UEFI specification EFI_PCI_IO_PROTOCOL (Enhanced Firmware Interface PCI I / O PROTOCOL) can also obtain the BusDeviceFunctionNumber of the PCIe device.
[0074] Figure 6 This is a schematic diagram of the functional functions supported in EFI_PCI_IO_PROTOCOL according to the embodiments of this application, such as... Figure 6 As shown, the EFI_PCI_IO protocol provides drivers for accessing the basic memory, I / O, PCI configuration, and DMA (Direct Memory Access Interface) interfaces of their PCI controllers. The EFI_PCI_IO protocol provides drivers including the GetLocation function.
[0075] Figure 7 This is a schematic diagram of the GetLocation function supported in EFI_PCI_IO_PROTOCOL according to an embodiment of this application, as shown below. Figure 7 As shown, the GetLocation function can retrieve the current PCI bus identifier, device identifier, and function identifier of this PCI controller.
[0076] In one exemplary embodiment, the target connector can be selected from candidate connectors based on the target device type and the target identifier of the target storage device in the following manner, but not limited to: when the target device type includes a first device type and the target identifier includes the target bus identifier of the target storage device, detecting the target identifier range to which the target bus identifier falls, and obtaining the target connector corresponding to the target identifier range from the identifier ranges and connectors with corresponding relationships, wherein, when the target device type includes the first device type, the target connector includes the target port on the server; when the target device type includes a second device type and the target identifier includes the target bus identifier, the target device identifier, and the target function identifier of the target storage device, obtaining the target connector corresponding to the target bus identifier, the target device identifier, and the target function identifier from the connectors, bus identifiers, device identifiers, and function identifiers with corresponding relationships, wherein, when the target device type includes the second device type, the target connector includes an adapter connected to the processor.
[0077] Optionally, in this embodiment, the storage device of the first device type may include, but is not limited to, storage devices whose connectors can be identified solely by their bus identifiers, such as NVMe hard drives. For NVMe hard drives, the bus identifier in the obtained device attributes can be used to trace which CPU and which PCIePort it is connected to. This is because the BusNumber supported by each PCIePort is configurable or a fixed range of values; falling within this range indicates which PCIePort the hard drive is connected to. Optionally, in this embodiment, when the connector includes ports on a server, the range of bus identifiers corresponding to the ports may be, but is not limited to, different. For example, the BusNumber range for port 1 is 1 to 10, and the BusNumber range for port 2 is 11 to 20.
[0078] Optionally, in this embodiment, the storage device of the second device type may include, but is not limited to, storage devices whose corresponding connectors are determined by bus identifier (BusNumber), device identifier (DeviceNumber), and function identifier (FunctionNumber), such as SATA hard drives and USB hard drives. For SATA hard drives and USB hard drives, it can be traced back to which controller it is connected to, because each controller is a logical PCIe device with corresponding BusNumber, DeviceNumber, and FunctionNumber attributes, and these attributes are fixed.
[0079] By combining the device type and identification information of the target storage device, the system accurately selects the target connector from a series of candidate connectors. This process ensures that the system can accurately locate the connector corresponding to the storage device, thus improving the accuracy of connector identification for the storage device.
[0080] Optionally, in this embodiment, the processor may be used, but is not limited to, to connect to a storage device via a target port. For example, the processor may be used, but is not limited to, to connect to an NVMe hard drive via a port.
[0081] Optionally, in this embodiment, it is possible, but not limited to, first selecting connectors corresponding to the target bus identifier and the target device identifier from the candidate connectors, and then selecting the target connectors corresponding to the target function identifier from these connectors; or, first selecting connectors corresponding to the target device identifier and the target function identifier from the candidate connectors, and then selecting the target connectors corresponding to the target bus identifier from these connectors; or, selecting the target connectors corresponding to the target bus identifier, the target device identifier, and the target function identifier from the candidate connectors.
[0082] Optionally, in this embodiment, the adapter may include, but is not limited to, an adapter chip and a controller connected to the adapter chip. The controller may be connected to, but is not limited to, a storage device. It is understood that the processor is connected to the adapter chip, and the controller connected to the adapter chip is connected to the storage device.
[0083] It should be noted that the above method of obtaining the correspondence between a device and its corresponding PCIe Port or Controller through the PCIe chain is not necessarily the only method. If there are other methods to achieve this correspondence, they are also applicable to this solution.
[0084] In one exemplary embodiment, the target boot information may be determined based on the initial boot information in the following ways, but not limited to: if the initial boot information indicates that the operating system is not allowed to be booted through the candidate storage device connected to the target connector, the target boot information is determined to indicate that the operating system is not allowed to be booted through the target storage device; if the initial boot information indicates that the operating system is allowed to be booted through the candidate storage device connected to the target connector, the target boot information is determined to indicate that the operating system is allowed to be booted through the target storage device.
[0085] Optionally, in this embodiment, if the initial boot information indicates that the operating system is not allowed to be booted from any storage device connected to the target connector, then booting the operating system from any storage device connected to the target connector may be prohibited.
[0086] Optionally, in this embodiment, if the initial boot information is used to indicate that the operating system can be booted from any storage device connected to the target connector, but not limited to this, the operating system can be booted from any storage device connected to the target connector.
[0087] In this way, the system can accurately control whether to allow the operating system to boot from a storage device connected to a controller under a certain port or adapter chip, based on the settings configured by the user in the BIOS setup interface. This also prevents the operating system from booting from the wrong storage device if the user incorrectly specifies it, thus improving the stability of the server operation.
[0088] In one exemplary embodiment, the target operating interface includes a corresponding reference connector and a boot setting item. The boot setting item is used to set whether to allow the operating system to be booted through the storage device connected to the reference connector. The reference connector includes the target connector. Before detecting the target boot information corresponding to the target storage device based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector, the target configuration request triggered on the target operating interface is received, but not limited to, in the following manner: the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information; and in response to the target configuration request, the boot information of the target connector is configured from the reference boot information to the initial boot information.
[0089] Optionally, in this embodiment, a connector may be used, but is not limited to, to connect one or more storage devices, and a connector may correspond to one boot setting item, that is, there is a one-to-one correspondence between the connector and the boot setting item.
[0090] Optionally, in this embodiment, the reference startup information may be, but is not limited to, empty. For example, the current user has not set startup information for the target connector, or the reference startup information is not empty. For example, the current user has already set startup information for the target connector.
[0091] Optionally, in this embodiment, the reference startup information and the initial startup information may be the same, but not limited to, or the reference startup information and the initial startup information may be different.
[0092] In one exemplary embodiment, the boot settings include a first setting and a second setting. The first setting adjusts the boot information of the reference connector to indicate that the operating system is not allowed to boot from the storage device connected to the reference connector. The second setting adjusts the boot information of the reference connector to indicate that the operating system is allowed to boot from the storage device connected to the reference connector. It may, but is not limited to, receiving a target configuration request triggered on the target operating interface in the following ways: detecting a first trigger operation performed by the first setting and detecting a second trigger operation performed by the second setting; upon detecting that the first setting has performed the first trigger operation and detecting that the second setting has not... When the second triggering operation is executed, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system; when it is detected that the first setting item has not been executed by the first triggering operation and the second setting item has been executed by the second triggering operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is allowed to boot the operating system.
[0093] Users can configure the connector's startup information on the target user interface, but are not limited to this. Figure 8 This is a schematic diagram of a target user interface for connecting a CPU to a storage device via a port, according to an embodiment of this application. Figure 8As shown, the reference connector may include ports on a server, through which the processor connects to the storage device. Taking three ports on the server as an example, the boot settings include a first setting and a second setting. Each port has a corresponding first setting and a second setting. The first setting may be indicated by NO (no), indicating that the operating system is not allowed to be booted from the storage device connected to the port. The second setting may be indicated by YES (yes), indicating that the operating system is allowed to be booted from the storage device connected to the port.
[0094] After performing a first trigger operation on the first setting item in boot setting item 1 corresponding to port 1, the boot information of port 1 can be configured, but is not limited to, to indicate that port 1 is not allowed to boot the operating system through the connected storage device; after performing a second trigger operation on the second setting item in boot setting item 2 corresponding to port 2, the boot information of port 2 can be configured, but is not limited to, to indicate that port 2 is allowed to boot the operating system through the connected storage device; after performing a first trigger operation on the first setting item in boot setting item 3 corresponding to port 3, the boot information of port 3 can be configured, but is not limited to, to indicate that port 3 is allowed to boot the operating system through the connected storage device.
[0095] In this way, users can set the startup settings for multiple connectors at once on the target operation interface, thereby configuring the startup information of multiple connectors in parallel and improving the efficiency of connector startup information configuration.
[0096] In one exemplary embodiment, the target operating interface includes a corresponding reference connector and a function setting item. The function setting item is used to set the connection parameters of the reference connector. The startup setting item includes a third setting item, which is in the function setting item. The third setting item is used to adjust the startup information of the reference connector to indicate that the operating system is not allowed to be started through the storage device connected to the reference connector. The target configuration request triggered on the target operating interface may be received in the following ways, but is not limited to: detecting a third trigger operation performed by the third setting item; and determining that the target configuration request has been received when the third setting item has performed the third trigger operation. The target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, which indicates that the operating system is not allowed to be started through the candidate storage device connected to the target connector.
[0097] Optionally, in this embodiment, a third setting item can be added to the existing function switch items of the connector to configure the startup information of the connector. Figure 9This is a schematic diagram of a target user interface for connecting a CPU to a storage device via a controller, according to an embodiment of this application. Figure 9 As shown, the reference connector may include, but is not limited to, the controller under the adapter chip. The processor connects to the storage device through the controller under the adapter chip. Taking the controller under the adapter chip as an example, there are three controllers. Each controller has a corresponding function setting item. The third setting item is set in the function setting item. The third setting item may include, but is not limited to, an Enable item and a Disable item. The Enable item is used to indicate that the operating system is allowed to be started through the storage device connected to the controller, and the Disable item is used to indicate that the operating system is not allowed to be started through the storage device connected to the controller. When the third trigger operation is performed on the third setting item 1 under the function setting item 1 corresponding to controller 1, that is, when the Disable item is selected, the startup information of controller 1 can be configured to indicate that the operating system is not allowed to be started through the storage device connected to controller 1. When the third trigger operation is performed on the third setting item 2 under the function setting item 2 corresponding to controller 2, the startup information of controller 2 can be configured to indicate that the operating system is not allowed to be started through the storage device connected to controller 2. When the third trigger operation is performed on the third setting item 3 under the function setting item 3 corresponding to controller 3, that is, when the Enable item is selected, the startup information of controller 3 can be configured to indicate that the operating system is allowed to be started through the storage device connected to controller 3.
[0098] In this way, a third setting item is added to the existing function settings of the connector, which reduces the computer resources required to add the third setting item and improves the utilization efficiency of computer resources. Furthermore, users can configure the startup information of multiple connectors in parallel by setting the third setting item for multiple connectors at the same time on the target operation interface, which improves the efficiency of configuring the startup information of connectors.
[0099] Optionally, in this embodiment, taking as an example the storage device includes a PCIe hard drive, the reference connector includes a port on the server, and the processor connects to the storage device through the port, a new function item can be implemented for each CPU (Central Processing Unit) PCIePort in the BIOS Setup interface (equivalent to the target operation interface) menu. For example, it can be named BootOptionPermission, providing two settings: Yes (equivalent to the second setting) and No (equivalent to the first setting). When set to Yes, the device under that port is allowed to create a boot entry; when set to No, the device under that port is not allowed to create a boot entry. Alternatively, a sub-setting item DisableBootFunction can be added to the PCIePort function switch items. When this sub-setting item is selected, the device under that port is not allowed to create a boot entry, which is used to control whether the hard drive connected to this PCIePort, including the hard drive connected to the RAID card adapter connected to this PCIePort, can form an OS boot entry.
[0100] For example, when creating the OS (Operating System) boot entry BootOption, the above method is used to trace back to the CPU PCIePort where the device is located, and obtain the newly created BootOptionPermission or PCIePORT function switch settings under that Port. When BootOptionPermission is set to Yes, or PCIePORT function switch is set to Enable, the boot entry is created normally from the device under that Port. When BootOptionPermission is set to No, or PCIePORT function switch is set to DisableBootFunction, the creation of the boot entry is skipped, that is, no boot entry is generated.
[0101] Similar approaches can be taken for USB or SATA drives. For example, using a reference connector, including the controller under the adapter chip, where the processor connects to the storage device via the controller under the adapter chip, a new function item, BootOptionPermission, can be implemented in the configuration menu of each controller, providing Yes and No settings. Alternatively, a setting item, DisableBootFunction, can be added to the controller's switch function items. When the supporting chips for USB and SATA ports can configure the on / off settings for each port, DisableBootFunction can also be implemented in the switch items for each USB or SATA port. Then, after mapping each device to its corresponding controller, when BootOptionPermission is set to Yes, or the function switch item for Controller / USBPort / SataPort is set to Enable, a boot entry is normally created from the device under that port. When BootOptionPermission is set to No, or the function switch item for Controller / USBPort / SataPort is set to DisableBootFunction, the creation of the boot entry is skipped, meaning no boot entry is generated.
[0102] It should be noted that BootOptionPermission and DisableBootFunction are not the only names for the settings; other names that clearly indicate their functions can also be used to name the settings.
[0103] In the technical solution provided in step S206 above, when the target boot information is used to indicate that the operating system is not allowed to be booted through the target storage device, the operating system can be booted on the processor without the target storage device, but is not limited to, and alarm information is generated. The alarm information can be used, but is not limited to, to indicate that the operating system is not allowed to be booted on the processor through the target storage device.
[0104] Optionally, in this embodiment, after generating alarm information, the method further includes: jumping to the target operation interface and displaying the startup settings corresponding to the target connector on the target operation interface; prompting the user on the target operation interface whether to make adjustments in response to the trigger operation executed by the startup settings; and configuring the startup information of the target connector.
[0105] Through the embodiments of this application, when a user wants to boot the operating system from an incorrect storage device, the system directly jumps to the connector's configuration interface, thus avoiding the user repeatedly calling the configuration interface, saving the time required to access the configuration interface, and improving the configuration efficiency of the connector's configuration information.
[0106] It should be noted that the technical solutions of this application embodiment can be used, but are not limited to, in the case of UEFI boot mode. For Legacy boot mode, there can be, but are not limited to, other ways to obtain the correspondence between the device and the PCIe Port or Controller through the PCIe chain. For example, a self-developed function can be used to collect various attributes of the bootable device, including the device's BusDeviceFunctionNumber, and then obtain the correspondence between the device and the PCIe Port or Controller through the PCIe chain, etc.
[0107] Optionally, in this embodiment, the technical solution of this application embodiment can also be used to enable or disable PXE for a network card connected to a CPU PCIePort. For example, the storage device in the technical solution of this application embodiment can be replaced with a network card device, and other processes are similar. Alternatively, it can also be used in similar scenarios and requirements of other firmware, software, and OS.
[0108] Figure 10 This is a schematic diagram of an optional startup item creation permission process according to an embodiment of this application, such as... Figure 10 As shown, the BIOS (equivalent to boot firmware) first configures the boot information for each connector according to user needs. For example, the user can select whether to allow the creation of a bootable operating system from a storage device connected to that connector through the target operating system interface. Then, if the user wants a specific storage device to boot the operating system, the BIOS identifies the PCIe port (equivalent to a connector) or controller (equivalent to a connector) to which the storage device is connected by reading the storage device's DevicePath information. The BIOS further queries the boot information of the PCIe port or controller to which the storage device is connected. If set to allow, the BIOS will normally create an OS boot entry for that storage device; if set to disable, or if Disable Boot Function (equivalent to a third setting) is selected in the function selection settings, the BIOS will skip the creation of the boot entry for that device, preventing the operating system from booting from an unauthorized storage device.
[0109] The technical solution of this application solves the problem of accidental startup of the user's operating system, expands and enhances the existing boot function of the BIOS, covers more user scenarios, and improves product performance. When a user does not want to boot from a certain hard drive device (equivalent to a storage device) or a group of hard drive devices, they only need to set the corresponding BootOptionPermission (equivalent to a boot setting item) to No (equivalent to the first setting item), or set the PCIePort / Controller / Sata, USBPort switch function item (equivalent to the third setting item) to DisableBootFunction. This satisfies the need not to boot from that device without affecting other functions of that device, improves the efficiency of operating system boot selection, and enhances customer satisfaction.
[0110] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, 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 is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0111] This embodiment also provides a server startup control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0112] Figure 11 This is a structural block diagram of a server startup control device according to an embodiment of this application, such as... Figure 11 As shown, the server includes: a processor and boot firmware, the boot firmware being connected to the processor, the processor being used to connect to a connector, the connector being used to connect to a storage device, the boot firmware also being used to connect to the storage device, and a device applied to the boot firmware, the device comprising:
[0113] The first receiving module 1102 is used to receive a target boot request, wherein the target boot request is used to request the processor's operating system to be booted through a connected target storage device, and the processor is connected to the target storage device through a target connector;
[0114] The detection module 1104 is used to respond to the target boot request and detect the target boot information corresponding to the target storage device according to the target device attributes of the target storage device and the initial boot information corresponding to the target connector. The initial boot information is used to indicate whether the operating system is allowed to be booted through the candidate storage device connected to the target connector. The initial boot information is configured on the target operation interface provided by the boot firmware.
[0115] The boot module 1106 is configured to boot the operating system on the processor via the target storage device when the target boot information indicates that the operating system can be booted via the target storage device.
[0116] With the above-mentioned device, users can configure the boot information corresponding to the connector on the target operating interface. This allows users to configure whether to allow the operating system to boot from the storage device connected to the connector according to their needs. The boot firmware detects the boot information corresponding to the storage device based on the device attributes of the storage device and the boot information corresponding to the connector. It ensures that the operating system can only boot from the processor through the storage device if the boot information indicates that the operating system can boot from the storage device connected to the connector. This avoids booting the operating system from the wrong storage device. Therefore, it can solve the problem of low server boot success rate and improve the server boot success rate.
[0117] In one exemplary embodiment, the detection module includes:
[0118] A filtering unit is configured to filter the target connector from candidate connectors based on the target device type and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier;
[0119] The first determining unit is used to determine the target startup information based on the initial startup information.
[0120] In one exemplary embodiment, the screening unit is configured to:
[0121] When the target device type includes a first device type and the target identifier includes the target bus identifier of the target storage device, the target identifier range to which the target bus identifier falls is detected, and the target connector corresponding to the target identifier range is obtained from the identifier range and connector with corresponding relationship. Wherein, when the target device type includes the first device type, the target connector includes the target port on the server.
[0122] When the target device type includes a second device type and the target identifier includes a target bus identifier, a target device identifier, and a target function identifier of the target storage device, the target connector corresponding to the target bus identifier, the target device identifier, and the target function identifier is obtained from the connector, bus identifier, device identifier, and function identifier that have a corresponding relationship. Wherein, when the target device type includes the second device type, the target connector includes an adapter connected to the processor.
[0123] In one exemplary embodiment, the first determining unit is configured to:
[0124] If the initial boot information indicates that the operating system is not allowed to be booted through the candidate storage device connected to the target connector, then the target boot information is determined to indicate that the operating system is not allowed to be booted through the target storage device.
[0125] If the initial boot information indicates that the operating system is allowed to be booted through the candidate storage device connected to the target connector, then the target boot information is determined to indicate that the operating system is allowed to be booted through the target storage device.
[0126] In one exemplary embodiment, the target operating interface includes a corresponding reference connector and a boot setting item. The boot setting item is used to set whether to allow the operating system to be booted through the storage device connected to the reference connector. The reference connector includes the target connector. The above-described device further includes:
[0127] The second receiving module is configured to receive a target configuration request triggered on the target operation interface before detecting the target startup information corresponding to the target storage device based on the target device attributes of the target storage device and the initial startup information corresponding to the target connector. The target configuration request is used to request that the startup information of the target connector be configured as the initial startup information.
[0128] A configuration module is used to respond to the target configuration request and configure the startup information of the target connector from the reference startup information to the initial startup information.
[0129] In one exemplary embodiment, the boot settings include a first setting and a second setting. The first setting is used to adjust the boot information of the reference connector to indicate that the operating system is not allowed to be booted through the storage device connected to the reference connector. The second setting is used to adjust the boot information of the reference connector to indicate that the operating system is allowed to be booted through the storage device connected to the reference connector. The second receiving module includes:
[0130] The first detection unit is used to detect the first trigger operation executed by the first setting item, and to detect the second trigger operation executed by the second setting item;
[0131] The second determining unit is configured to determine that the target configuration request has been received when the first setting item has been triggered by the first triggering operation and the second setting item has not been triggered by the second triggering operation. The target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system.
[0132] The third determining unit is configured to determine that the target configuration request has been received when it is detected that the first setting item has not been executed by the first triggering operation and the second setting item has been executed by the second triggering operation. The target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is allowed to boot the operating system.
[0133] In an exemplary embodiment, the target operating interface includes a corresponding reference connector and a function setting item. The function setting item is used to set the connection parameters of the reference connector. The startup setting item includes a third setting item within the function setting item. The third setting item is used to adjust the startup information of the reference connector to indicate that the operating system is not allowed to be started through the storage device connected to the reference connector. The second receiving module further includes:
[0134] The second detection unit is used to detect the third trigger operation performed by the third setting item;
[0135] The fourth determining unit is configured to determine, when the third setting item has performed the third triggering operation, that the target configuration request has been received, wherein the target configuration request is configured to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is configured to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system.
[0136] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0137] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.
[0138] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0139] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0140] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0141] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0142] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0143] Embodiments of this application also provide a computer program that includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in any of the above method embodiments.
[0144] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0145] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0146] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A server startup control method, characterized in that, The servers include: A processor and boot firmware, the boot firmware being connected to the processor, the processor being configured to connect to a connector, the connector being configured to connect to a storage device, the boot firmware also being configured to connect to the storage device, the method being applied to the boot firmware, the method comprising: Receive a target boot request, wherein the target boot request is used to request the processor's operating system to be booted through a connected target storage device, and the processor is connected to the target storage device through a target connector; In response to the target boot request, based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector, the target boot information corresponding to the target storage device is detected. The initial boot information is used to indicate whether the operating system is allowed to boot from the candidate storage device connected to the target connector. The initial boot information is configured on the target operation interface provided by the boot firmware. If the target boot information indicates permission to boot the operating system via the target storage device, the operating system is booted on the processor via the target storage device. The step of detecting the target startup information corresponding to the target storage device based on the target device attributes of the target storage device and the initial startup information corresponding to the target connector includes: filtering the target connector from candidate connectors based on the target device type and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; and determining the target startup information based on the initial startup information.
2. The method according to claim 1, characterized in that, The step of filtering the target connector from the candidate connectors based on the target device type and the target identifier of the target storage device includes: When the target device type includes a first device type and the target identifier includes the target bus identifier of the target storage device, the target identifier range to which the target bus identifier falls is detected, and the target connector corresponding to the target identifier range is obtained from the identifier range and connector with corresponding relationship. Wherein, when the target device type includes the first device type, the target connector includes the target port on the server. When the target device type includes a second device type and the target identifier includes a target bus identifier, a target device identifier, and a target function identifier of the target storage device, the target connector corresponding to the target bus identifier, the target device identifier, and the target function identifier is obtained from the connector, bus identifier, device identifier, and function identifier that have a corresponding relationship. Wherein, when the target device type includes the second device type, the target connector includes an adapter connected to the processor.
3. The method according to claim 1, characterized in that, Determining the target startup information based on the initial startup information includes: If the initial boot information indicates that the operating system is not allowed to be booted through the candidate storage device connected to the target connector, then the target boot information is determined to indicate that the operating system is not allowed to be booted through the target storage device. If the initial boot information indicates that the operating system is allowed to be booted through the candidate storage device connected to the target connector, then the target boot information is determined to indicate that the operating system is allowed to be booted through the target storage device.
4. The method according to claim 1, characterized in that, The target operating interface includes a corresponding reference connector and a boot setting item. The boot setting item is used to set whether to allow the operating system to boot through the storage device connected to the reference connector. The reference connector includes the target connector. Before detecting the target boot information corresponding to the target storage device based on the target device attributes of the target storage device and the initial boot information corresponding to the target connector, the method further includes: Receive a target configuration request triggered on the target operation interface, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information; In response to the target configuration request, the startup information of the target connector is configured from the reference startup information to the initial startup information.
5. The method according to claim 4, characterized in that, The startup settings include a first setting and a second setting. The first setting adjusts the startup information of the reference connector to indicate that the operating system is not allowed to be started through the storage device connected to the reference connector. The second setting adjusts the startup information of the reference connector to indicate that the operating system is allowed to be started through the storage device connected to the reference connector. Receiving the target configuration request triggered on the target operation interface includes: Detect the first trigger operation executed by the first setting item, and detect the second trigger operation executed by the second setting item; If the first setting item is detected to have been triggered by the first triggering operation and the second setting item is not triggered by the second triggering operation, it is determined that the target configuration request has been received. The target configuration request is used to request that the boot information of the target connector be configured as the initial boot information. The initial boot information is used to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system. If it is detected that the first setting item has not been executed by the first triggering operation and the second setting item has been executed by the second triggering operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is allowed to boot the operating system.
6. The method according to claim 4, characterized in that, The target operation interface includes a corresponding reference connector and function setting items. The function setting items are used to set the connection parameters of the reference connector. The startup setting items include a third setting item, which is included in the function setting items. The third setting item is used to adjust the startup information of the reference connector to indicate that the operating system is not allowed to be started through the storage device connected to the reference connector. Receiving the target configuration request triggered on the target operation interface includes: Detect the third trigger operation executed by the third setting item; When the third setting item is executed with the third triggering operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the boot information of the target connector be configured as the initial boot information, and the initial boot information is used to indicate that the candidate storage device connected through the target connector is not allowed to boot the operating system.
7. A server startup control device, characterized in that, The server includes: a processor and boot firmware, the boot firmware being connected to the processor, the processor being configured to connect to a connector, the connector being configured to connect to a storage device, the boot firmware also being configured to connect to the storage device, and a device applied to the boot firmware, the device comprising: The first receiving module is configured to receive a target boot request, wherein the target boot request is configured to request the processor's operating system to be booted through a connected target storage device, and the processor is connected to the target storage device through a target connector; The detection module is used to respond to the target boot request and detect the target boot information corresponding to the target storage device according to the target device attributes of the target storage device and the initial boot information corresponding to the target connector. The initial boot information is used to indicate whether the operating system is allowed to be booted through the candidate storage device connected to the target connector. The initial boot information is configured on the target operation interface provided by the boot firmware. A boot module is configured to boot the operating system on the processor via the target storage device when the target boot information indicates that the operating system can be booted via the target storage device; The detection module includes: a filtering unit, configured to filter the target connector from candidate connectors based on the target device type and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; and a first determining unit, configured to determine the target startup information based on the initial startup information.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 6.
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 steps of the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Start control method, system and device of server mainboard
CN115827069A
Server starting method, device and system, storage medium and electronic equipment
CN117687703A