Server starting control method and device, storage medium and electronic equipment

By implementing the server startup control method in the startup firmware, and detecting the target startup information based on the storage device attributes and connector information, the problem of operating system startup failure caused by traditional BIOS is solved, and the success rate of server startup is improved.

CN119690529AActive Publication Date: 2025-03-25INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411755724.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-30
Publication Date
2025-03-25
Estimated Expiration
2044-11-30

Smart Images

  • Figure CN119690529A_ABST
    Figure CN119690529A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a server starting control method and device, a storage medium and electronic equipment, and the method comprises the steps: receiving a target starting request; responding to the target starting request, and detecting target starting information corresponding to the target storage equipment according to target equipment attributes of the target storage equipment and initial starting information corresponding to the target connector; under the condition that the target starting information is used for indicating that the operating system is allowed to be started through the target storage device, the operating system is started on the processor through the target storage device. Through the server starting method and device, the problem that the success rate of server starting is low is solved, and then the effect of improving the success rate of server starting is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and in particular, to a method and device for controlling startup of a server, a storage medium, and an electronic device. Background Art

[0002] In the related art, when starting the server's operating system, the traditional BIOS cannot directly determine the corresponding storage device from the boot item name, resulting in low accuracy in the operating system's boot item selection, which may cause the server's operating system to fail to start successfully.

[0003] For example, when two or more storage devices are deployed on a server, one storage device is used to support the operating system, and the other storage devices are used for data storage, if the operating system is mistakenly installed on the storage device used for data storage, or the operating system is stored in the storage device used for data storage, this may cause the operating system to start incorrectly, for example, when the operating system is installed, it is installed on the hard disk group used to store data, then when the operating system starts, it starts from the operating system on the hard disk group that stores data, and this operating system may be different from the operating system environment that the user originally planned to deploy, such as the operating system type, version, driver configuration, etc., which will affect the business operation, or even make it impossible to run.

[0004] In addition, if the data is stored on the disk or disk group where the operating system is installed, causing the stored data to conflict with the operating system data, or if the operating system data is deleted when the data is deleted, the operating system will not be able to start, and the upper-level business will not be able to proceed normally.

[0005] It is understandable that in the related art, there may be a problem that the boot item name generated by BIOS cannot accurately reflect the storage device information, resulting in low accuracy of the boot item selection of the operating system, which in turn causes the server startup failure. Summary of the invention

[0006] The embodiments of the present application provide a method and device for controlling the startup of a server, a storage medium, and an electronic device, so as to at least solve the problem of low success rate of server startup in the related art.

[0007] According to an embodiment of the present application, a server startup control method is provided, the server comprising: a processor and a 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 also used to connect to the storage device, the method being applied to the startup firmware, the method comprising: receiving a target startup request, wherein the target startup request is used to request to start an operating system of the processor through a connected target storage device, the processor being 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 according to a target device attribute of the target storage device and initial startup information corresponding to the target connector, wherein the initial startup information is used to indicate whether to allow the operating system to be started 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 when the target startup information is used to indicate that the operating system is allowed to be started through the target storage device, starting the operating system on the processor through the target storage device.

[0008] In an exemplary embodiment, the detecting the 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 includes: filtering the target connector from candidate connectors according to the target device type of the target storage device 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 according to the initial startup information.

[0009] In an exemplary embodiment, the filtering of the target connector from candidate connectors according to the target device type of the target storage device 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 a target bus identifier of the target storage device, detecting a target identifier range into which the target bus identifier falls, and acquiring the target connector corresponding to the target identifier range from identifier ranges and connectors having a corresponding relationship, 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 a target bus identifier of the target storage device, a target device identifier of the target storage device, and a target function identifier of the target storage device, acquiring the target connector corresponding to the target bus identifier, the target device identifier, and the target function identifier from connectors, bus identifiers, device identifiers, and function identifiers having a corresponding relationship, wherein, when the target device type includes the second device type, the target connector includes an adapter connected to the processor.

[0010] In an exemplary embodiment, determining the target startup information based on the initial startup information includes: when the initial startup information is used to indicate 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 is used to indicate that the operating system is not allowed to be started through the target storage device; when the initial startup information is used to indicate 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 is used to indicate that the operating system is allowed to be started through the target storage device.

[0011] In an exemplary embodiment, the target operation interface includes a reference connector and a startup setting item with a corresponding relationship, the startup setting item is used to set whether to allow the operating system to be started through the storage device connected to the reference connector, the reference connector includes the target connector, and before detecting the target startup information corresponding to the target storage device based on the target device properties of the target storage device and the initial startup information corresponding to the target connector, the method also includes: receiving 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, configuring the startup information of the target connector from the reference startup information to the initial startup information.

[0012] In an exemplary embodiment, the startup setting item includes a first setting item and a second setting item, the first 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, and the second setting item is used to adjust 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, and the receiving of the target configuration request triggered on the target operation interface includes: detecting a first trigger operation executed by the first setting item, and detecting a second trigger operation executed by the second setting item; after detecting that the first trigger operation is executed for the first setting item and detecting that the second setting item is not executed for the second trigger operation, In the case of a second trigger operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system; in the case of detecting that the first setting item has not been subjected to the first trigger operation, and detecting that the second setting item has been subjected to the second trigger operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is allowed to start the operating system.

[0013] In an exemplary embodiment, the target operation interface includes the reference connector and function setting items having a corresponding relationship, the function setting items are used to set connection parameters of the reference connector, the startup setting items include a third setting item, and the third setting item 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, and the receiving of the target configuration request triggered on the target operation interface includes: detecting a third trigger operation performed by the third setting item; and determining that the target configuration request is received when the third setting item is subjected to the third trigger operation, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate 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 the present application, a startup control device for a server is provided. The server includes: a processor and a startup firmware, the startup firmware is connected to the processor, the processor is used to connect to a connector, the connector is used to connect to a storage device, the startup firmware is also used to connect to the storage device, the device is applied to the startup firmware, the device includes: 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 the connected target storage device, and the processor is connected to the target storage device through a target connector; a detection module, used to respond to the target startup request, and detect the target startup information corresponding to the target storage device according to the target device attribute 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 the operating system is allowed to be started through the candidate storage device connected to the target connector, and the initial startup information is configured on the target operation interface provided by the startup firmware; a startup module, used to start the operating system on the processor through the target storage device when the target startup information is used to indicate that the operating system is allowed to be started through the target storage device.

[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0016] According to another embodiment of the present application, an electronic device is 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 execute the steps in any one of the above method embodiments.

[0017] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0018] Through this application, the user can configure the startup information corresponding to the connector on the target operation interface, and realize the configuration of whether to allow the operating system to be started from the storage device connected to the connector according to user needs. The startup firmware detects the startup information corresponding to the storage device according to the device properties of the storage device and the startup information corresponding to the connector, ensuring that the operating system can be started on the processor through the storage device only when the startup information indicates that the operating system is allowed to be started through the storage device connected to the connector, thereby avoiding starting the operating system through the wrong storage device. Therefore, the problem of low success rate of server startup can be solved, thereby achieving the effect of improving the success rate of server startup. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a hardware structure block diagram of a server device of a server startup control method according to an embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for starting up a server according to an embodiment of the present application;

[0021] Figure 3 It is a schematic diagram of the link structure of the NVME disk according to an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of a link structure of a SATA disk according to an embodiment of the present application;

[0023] Figure 5 is a schematic diagram of a link structure of a USB storage device according to an embodiment of the present application;

[0024] Figure 6 is a schematic diagram of the functional functions supported in EFI_PCI_IO_PROTOCOL according to an embodiment of the present application;

[0025] Figure 7 is a schematic diagram of the GetLocation function supported in EFI_PCI_IO_PROTOCOL according to an embodiment of the present application;

[0026] Figure 8 is a schematic diagram of a target operation interface in which a CPU is connected to a storage device through a port according to an optional embodiment of the present application;

[0027] Fig. 9 is a schematic diagram of a target operation interface in which an optional CPU is connected to a storage device via a controller according to an embodiment of the present application;

[0028] Fig.10 is a schematic diagram of an optional startup item creation permission process according to an embodiment of the present application;

[0029] Fig.11 It is a structural block diagram of a startup control device of a server according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0032] First, the terms involved in the embodiments of the present application are explained as follows:

[0033] BIOS: Base Input / Output System, Basic Input / Output System, BIOS (Basic Input / Output System) is the most basic software code on the computer hardware system. The BIOS program is embedded in the SPI chip of the computer motherboard. Its main functions are power-on self-test, CPU and memory initialization, detection of input and output devices and bootable devices, and finally booting the operating system.

[0034] Servers, desktops, notebooks, industrial computers and other computer products must eventually boot into the operating system to work and operate the computer. This inevitably requires two functions, one is to install the operating system, and the other is to boot the operating system. There are many ways to install the operating system, such as through the optical drive, through PXE, etc. After the operating system is installed, each bootable device, including the optical drive, network card PXE, and the operating systems already installed in various hard disks (there may be multiple), will be processed by BIOS into bootable items. Users can choose which boot item to boot from according to their needs. For example, selecting the optical drive means installing the operating system from the optical drive, selecting PXE means installing the operating system from PXE, and selecting the installed operating system means booting into the operating system.

[0035] Specifically for PXE, each port of each network card on the machine can support the PXE function through the support of the card driver, and a PXE boot item is generated by BIOS, and the switch of the PXE function of each port can be controlled separately.

[0036] Furthermore, BIOS will summarize all bootable items, including optical drives, PXE, and operating systems already installed on various hard disks, and display them in the BIOS Setup interface for users to adjust the boot order (priority) of each boot item and set the boot item switches; at the same time, BIOS will implement the shortcut key function for configuring all boot items during the boot process, and give a prompt during the boot process, indicating which function key to press to start the boot item setting function. When the function key is pressed, such as but not limited to F11, a window will pop up showing all bootable items, and users can choose which boot item to boot from.

[0037] In addition, BIOS implements the design of starting the PXE function by pressing the function key F12 during the startup process (starting from the PXE startup item); in addition, BIOS can also generate a window composed entirely of PXE startup items for customers to choose, similar to the F11 function.

[0038] PCH: Platform Controller Hub, platform controller center.

[0039] UEFI: Unified Extensible Firmware Interface, is a personal computer system specification that defines the software interface between the operating system and the system firmware.

[0040] PXE: preboot execute environment, works in Client / Server network mode, supports workstations to download images from remote servers through the network, and thus supports booting the operating system through the network. During the startup process, the terminal requires the DHCP (Dynamic Host Configuration Protocol) server to allocate an IP (Internet Protocol) address, and then uses TFTP (Trivial file transfer protocol) or MTFTP (Multicasttrivial file transfer protocol) protocol to download a startup software package to the local memory for execution. This startup software package completes the basic software settings of the terminal (client), thereby booting the terminal operating system pre-installed in the server. PXE can boot a variety of operating systems.

[0041] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a server startup control method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0042] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the startup control method of the server in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0043] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0044] In this embodiment, a method for starting up a server is provided. Figure 2 is a flow chart of a method for starting up a server according to an embodiment of the present application, such as Figure 2 As shown, the server includes: a processor and a boot firmware, the boot firmware is connected to the processor, the processor is used to connect to a connector, the connector is used to connect to a storage device, the boot firmware is also used to connect to the storage device, the method is applied to the boot firmware, and the process includes the following steps:

[0045] Step S202, receiving a target startup request, wherein the target startup request is used to request to start the operating system of the processor through the connected target storage device, and the processor is connected to the target storage device through a target connector;

[0046] Step S204, responding to the target startup request, detecting the target startup information corresponding to the target storage device according to the target device attribute 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 operating system to be started through the candidate storage device connected to the target connector, and the initial startup information is configured on the target operation interface provided by the startup firmware;

[0047] Step S206: when the target startup information indicates that the operating system is allowed to be started through the target storage device, start the operating system on the processor through the target storage device.

[0048] Through the above steps, the user can configure the startup information corresponding to the connector on the target operation interface, and configure whether to allow the operating system to be started from the storage device connected to the connector according to user needs. The startup firmware detects the startup information corresponding to the storage device according to the device properties of the storage device and the startup information corresponding to the connector, ensuring that the operating system can be started on the processor through the storage device only when the startup information indicates that the operating system is allowed to be started through the storage device connected to the connector, thereby avoiding starting the operating system through the wrong storage device. Therefore, the problem of low server startup success rate can be solved, thereby achieving the effect of improving the server startup success rate.

[0049] In the technical solution provided in the above step S202, the startup firmware may include but is not limited to a program solidified in the storage space of the server, and the program may be but is not limited to an operating system for starting the processor. For example, the startup firmware may include but is not limited to BIOS.

[0050] Optionally, in this embodiment, the processor may be but is not limited to being used to perform data interaction with a storage device in the server through a connector. For example, the data interaction may be but is not limited to including read operations and write operations, and the processor may be but is not limited to including a CPU.

[0051] Optionally, in this embodiment, the connector can be used, but 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 can be, but not limited to, a controller connected to a PCH or IOH (Input / Output Controller Hub) or an adapter chip, or a port on a server directly connected to a CPU, such as a PCIe (Peripheral Component Interconnect Express) port, a SATA (Serial advanced technology attachment) port, and the like.

[0052] Optionally, in this embodiment, the storage device can be but is not limited to being used to store operating systems, applications and data, and the storage device can be but is not limited to including NVME (Non-Volatile Memory Express, non-volatile memory host controller interface specification), M.2, U.2, E3.S, SATA, SAS (Serial Attached SCSI (Small Computer System Interface, small computer system interface), serial attached SCSI), SSD (Solid State Drive), USB (Universal Serial Bus) hard disk, etc.

[0053] Optionally, in this embodiment, the underlying data transmission protocol of the storage device, or the hardware interface specification, may include but is not limited to PCI (Peripheral Component Interconnect), or PCIe, or SATA, USB, etc.

[0054] Figure 3 is a schematic diagram of the link structure of the NVME disk according to an embodiment of the present application, such as Figure 3 As shown in the figure, for NVME disks, external Raid (Redundant Array of Independent Disks) cards are used to expand the hard disk. The underlying layer uses the PCI / PCIe protocol. The link structure of the NVME disk can include but is not limited to the NVMe disk directly connected to the PEPort (PCIe port) port of the CPU without the existence of the intermediate PCH. With the development of computer technology, PCH is no longer used.

[0055] Figure 4 is a schematic diagram of a link structure of a SATA disk according to an embodiment of the present application, such as Figure 4 As shown, a PCH / IOH / adapter chip is connected to multiple SATA controllers, and each SATA controller is 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 is a schematic diagram of a link structure of a USB storage device according to an embodiment of the present application, such as Figure 5As shown, one PCH / IOH / adapter chip is connected to multiple USB Controllers, and each USB Controller is connected to a USB storage device. One 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 switching equipment, Figure 3 , Figure 4 and Figure 5 There may be an intermediate transfer device, for example, a USB controller is connected to a USB storage device through an expansion device.

[0058] In the technical solution provided in the above step S204, the startup information may be, but is not limited to, used to indicate that the storage device connected to the connector is allowed to start the operating system, or that the storage device connected to the connector is not allowed to start the operating system.

[0059] In an exemplary embodiment, the target startup information corresponding to the target storage device can be detected based on the target device attributes of the target storage device and the initial startup information corresponding to the target connector in the following manner, but is not limited to: the target connector is screened from candidate connectors based on the target device type of the target storage device and the target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; and the target startup information is determined based on the initial startup information.

[0060] Optionally, in this embodiment, different storage devices may correspond to different identifiers, but are not limited to, different storage devices may belong to the same device type, or different storage devices may belong to different device types. As an optional example, the device type may be determined based on the underlying data transmission protocol of the storage device, but is not limited to.

[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 understandable that the target device attributes may include, but are not limited to, one or more device attributes.

[0062] The Device Path of a device may include, but is not limited to, one or more Device Path Nodes with different attributes. These Device Path Nodes describe the attributes of various types of devices from different perspectives. It can be understood that a node corresponds to the attributes of a storage device in one dimension. There are mainly 6 types of Device Path Nodes:

[0063] (1) Hardware Device Path: The hardware device path defines how the device is connected to the system's resource domain. Simply put, the resource domain is the system's shared memory, memory-mapped I / O, and I / O space. The hardware device path is divided into subtypes such as PCI device path and controller device path.

[0064] Through PCIDevice Path, you can get the device's Function (function) and Device Number (device identification) properties.

[0065] (2) ACPI (Advanced Configuration and Power Interface) device path: This device path is used to describe devices that are not enumerated in an industry standard manner. These devices must be described in the ACPI namespace using ACPI AML (ACPI Machine Language). This device path is connected to the ACPI namespace. From the device's ACPI device path data, by matching _HID_UID_CID (Hardware ID (Identification), Hardware Identifier, Unique ID, Compatible ID), etc., its PCI Root Bus number can be obtained. Adding the device's Function and Device Number in the hardware device path, the specific device can be uniquely located, because the combination of the Bus, Device, and Function Number of a PCIe device is unique and does not correspond to each device one-to-one.

[0066] (3) Messaging Device Path: 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 a network protocol IP address. There are various subtypes under the messaging device path, which are refined to devices not related to the embodiments of the present application, such as USB Device Path, SATA Device Path, MAC (Media Access Control) address Device Path, etc.

[0067] (4) Media Device Path: This device path is used to describe a portion of the media abstracted by the boot service. For example, the media device path can define which partition on the hard disk is being used. The media device path is further divided into hard disk media device paths and file path media device paths.

[0068] (5) BIOS Boot Specification Device Path: This device path is used to point to boot legacy operating systems and is based on BIOS Boot Specification version 1.01.

[0069] (6) End of Hardware Device Path: Depending on the subtype, this device path node is used to indicate the end of a device path instance or a device path structure.

[0070] Under the UEFI specification, the Device Path of a device is composed of nodes of the above-mentioned different types of Device Paths. These nodes are Device Path Nodes. For example, the complete Device Path of a USB device is: PciRoot (0x0) / PCI (0x14, 0) / USB (0, 0), where " / " separates different Device Path Nodes, which correspond to different Device Path types of the device, that is, the attribute data of the device from the perspective of these types.

[0071] The same is true for the Device Path of SATA and PCIe NVME hard disk devices, for example, the Device Path of NVME disk: PciRoot(0) / PCI(0x1C, 0) / PCI(0, 0) / NVME(1, C3-70-00-0002-0D-08-00). These Device Path attributes are assigned values ​​during the initialization phase of the device and form a Device Path data list.

[0072] With the support of the above-mentioned Device Path protocol, the properties of the device's PCIe Bus, Device, and Function Number can be obtained. Then, through the algorithm supported by the PCI / PCIe specification, the Bus, Device, and Function Number property values ​​of each PCIe Device and each level of Bridge in the entire PCIe chain from the terminal device to the top-level Root Port can be traced back.

[0073] It should be noted that the above-mentioned Device Path Protocol method is not the only method to obtain the Bus Device Function Number of the device and PCIe Port or Controller. Other methods that can obtain the Bus Device Function Number of the device and PCIe Port 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 Bus DeviceFunction Number of the PCIe device.

[0074] Figure 6 Schematic diagram of the functions supported in EFI_PCI_IO_PROTOCOL according to an embodiment of the present application, such as Figure 6 As shown, the EFI_PCI_IO protocol provides the driver with a basic memory, IO, PCI configuration and DMA (Direct Memory Access Interface) interface for accessing its PCI controller, wherein the EFI_PCI_IO protocol provides the driver with a GetLocation function.

[0075] Figure 7 is a schematic diagram of the GetLocation function supported in EFI_PCI_IO_PROTOCOL according to an embodiment of the present application, such as Figure 7 As shown, the GetLocation function can realize the function of retrieving the current PCI bus ID, device ID and function ID of this PCI controller.

[0076] In an exemplary embodiment, the target connector can be screened from candidate connectors according to the target device type of the target storage device 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 a target bus identifier of the target storage device, detecting a target identifier range into which the target bus identifier falls, and acquiring the target connector corresponding to the target identifier range from identifier ranges and connectors having a corresponding relationship, 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 a target bus identifier of the target storage device, a target device identifier of the target storage device, and a target function identifier of the target storage device, acquiring the target bus identifier, the target device identifier, and the target connector corresponding to the target function identifier from connectors, bus identifiers, device identifiers, and function identifiers having a corresponding relationship, 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, a storage device whose connector corresponding to the storage device can be determined only by a bus identifier, such as an NVME hard disk. For an NVME hard disk, it can be traced back to which PCIe Port of which CPU it is connected to based on the bus identifier in the acquired device attributes, because the Bus Number supported by each PCIe Port is a configurable or fixed value range, and if it falls within this value range, it can be known which PCIe Port the hard disk device is connected to. Optionally, in this embodiment, in the case where the connector includes a port on a server, the identification range of the bus identifier corresponding to the port may be, but is not limited to, different, for example, the Bus number of port 1 ranges from 1 to 10, and the Bus number of port 2 ranges from 11 to 20.

[0078] Optionally, in this embodiment, the storage device of the second device type may include, but is not limited to, a storage device whose connector corresponding to the storage device is determined by a bus identifier (Bus Number), a device identifier (Device Number) and a function identifier (Function Number), such as a SATA hard disk and a USB hard disk. For a SATA hard disk and a USB hard disk, it can be traced back to which controller it is connected to, because each controller is a logical PCIe device, has corresponding BusNumber, DeviceNumber, Function Number attributes, and is fixed.

[0079] By combining the device type and identification information of the target storage device, the target connector is accurately screened out from a series of candidate connectors. This process ensures that the system can accurately locate the connector corresponding to the storage device and improves the accuracy of identifying the connector corresponding to the storage device.

[0080] Optionally, in this embodiment, the processor may be, but is not limited to, used to connect a storage device through a target port. For example, the processor may be, but is not limited to, used to connect an NVME hard disk through a port.

[0081] Optionally, in this embodiment, it is possible but not limited to first filtering out connectors corresponding to the target bus identifier and the target device identifier from the candidate connectors, and then filtering out the target connectors corresponding to the target function identifier from these connectors; or, first filtering out connectors corresponding to the target device identifier and the target function identifier from the candidate connectors, and then filtering out the target connectors corresponding to the target bus identifier from these connectors; or, filtering out 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, and the controller may be but is not limited to being connected to a storage device. It can be 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 the device and the 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 an exemplary embodiment, the target startup information can be determined based on the initial startup information in the following manner, but is not limited to: in a case where the initial startup information is used to indicate that the operating system is not allowed to be started through the candidate storage device connected to the target connector, the target startup information is determined to indicate that the operating system is not allowed to be started through the target storage device; in a case where the initial startup information is used to indicate that the operating system is allowed to be started through the candidate storage device connected to the target connector, the target startup information is determined to indicate that the operating system is allowed to be started through the target storage device.

[0085] Optionally, in this embodiment, when the initial startup information is used to indicate that the operating system is not allowed to be started through the candidate storage device connected to the target connector, but is not limited to, the operating system is not allowed to be started through any storage device connected to the target connector.

[0086] Optionally, in this embodiment, when the initial startup information is used to indicate that the operating system is allowed to be started through the candidate storage device connected to the target connector, but is not limited to, any storage device connected to the target connector is allowed to start the operating system.

[0087] In this way, it is possible to accurately control whether to allow the operating system to be started from a storage device connected to a certain port or controller under the adapter chip based on the content configured by the user on the Set up interface of the BIOS. In the event that the user incorrectly specifies the storage device used to start the operating system, it can also avoid starting the operating system from the wrong storage device, thereby improving the stability of server operation.

[0088] In an exemplary embodiment, the target operation interface includes a reference connector and a startup setting item with a corresponding relationship, the startup setting item is used to set whether to allow the operating system to be started through the storage device connected to the reference connector, the reference connector includes the target connector, and can be but not limited to the following methods 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: receiving 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, configuring the startup information of the target connector from the reference startup information to the initial startup information.

[0089] Optionally, in this embodiment, a connector may be but is not limited to being used to connect one or more storage devices, and a connector may be but is not limited to corresponding to one startup setting item, that is, there is a one-to-one correspondence between the connector and the startup setting item.

[0090] Optionally, in this embodiment, the reference startup information may be but is not limited to being 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 set startup information for the target connector.

[0091] Optionally, in this embodiment, the reference startup information and the initial startup information may be, but are not limited to, the same, or the reference startup information and the initial startup information are different.

[0092] In an exemplary embodiment, the startup setting item includes a first setting item and a second setting item, the first 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, and the second setting item is used to adjust 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. The target configuration request triggered on the target operation interface can be received in the following manner, but is not limited to: detecting a first trigger operation executed by the first setting item, and detecting a second trigger operation executed by the second setting item; after detecting that the first trigger operation is executed on the first setting item and detecting that the second setting item is not executed, When the second trigger operation is executed, it is determined that the target configuration request is received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system; when it is detected that the first setting item has not been subjected to the first trigger operation, and it is detected that the second setting item has been subjected to the second trigger operation, it is determined that the target configuration request is received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is allowed to start the operating system.

[0093] Users can, but are not limited to, configure the connector startup information on the target operation interface. Figure 8 is a schematic diagram of a target operation interface in which a CPU is connected to a storage device through a port according to an optional embodiment of the present application, such as Figure 8As shown, it can be but not limited to taking the reference connector including a port on the server, the processor being connected to the storage device through the port, and the port on the server including 3 ports as an example, the startup setting item includes a first setting item and a second setting item, and each port has a corresponding first setting item and a second setting item, wherein the first setting item can be but not limited to being represented by NO (no), used to indicate that the operating system is not allowed to be started through the storage device connected to the port, and the second setting item can be but not limited to being represented by YES (yes), used to indicate that the operating system is allowed to be started through the storage device connected to the port.

[0094] After performing a first trigger operation on the first setting item in the startup setting item 1 corresponding to port 1, the startup information of port 1 can be configured, but not limited to, to indicate that port 1 is not allowed to start the operating system through the connected storage device; after performing a second trigger operation on the second setting item in the startup setting item 2 corresponding to port 2, the startup information of port 2 can be configured, but not limited to, to indicate that port 2 is allowed to start the operating system through the connected storage device; after performing a first trigger operation on the first setting item in the startup setting item 3 corresponding to port 3, the startup information of port 3 can be configured, but not limited to, to indicate that port 3 is allowed to start the operating system through the connected storage device.

[0095] In this way, the user can set the startup setting items corresponding to multiple connectors at one time on the target operation interface, thereby configuring the startup information of multiple connectors in parallel, thereby improving the configuration efficiency of the startup information of the connectors.

[0096] In an exemplary embodiment, the target operation interface includes the reference connector and function setting items having a corresponding relationship, the function setting items are used to set the connection parameters of the reference connector, the startup setting items include a third setting item, and the third setting item 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, and the target configuration request triggered on the target operation interface can be received in the following manner, but is not limited to: detecting a third trigger operation performed by the third setting item; in the case where the third setting item is subjected to the third trigger operation, determining that the target configuration request is received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected to the target connector is not allowed to start the operating system.

[0097] Optionally, in this embodiment, a third setting item may be added to the existing function switch items of the connector to configure the startup information of the connector, but is not limited to the configuration. Fig. 9is a schematic diagram of a target operation interface in which an optional CPU is connected to a storage device through a controller according to an embodiment of the present application, such as Fig. 9 As shown, it can be but not limited to taking the reference connector including a controller under the adapter chip, the processor being connected to the storage device through the controller under the adapter chip, and the controller under the adapter chip including three controllers as an example, each controller has a corresponding function setting item, wherein the third setting item is set in the function setting item, and the third setting item can be but not limited to including 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. A 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 but is not limited to being configured to indicate that the operating system is not allowed to be started through the storage device connected to controller 1; a third trigger operation is performed on the third setting item 2 under the function setting item 2 corresponding to controller 2, that is, the startup information of controller 2 can be but is not limited to being configured to indicate that the operating system is not allowed to be started through the storage device connected to controller 2; a trigger operation is performed on the third setting item 3 under the function setting item 3 corresponding to controller 3, that is, when Enable is selected, the startup information of controller 3 can be but is not limited to being 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 new third setting item is added to the existing function setting items of the connector, which reduces the computer resources required for the new third setting item and improves the utilization efficiency of computer resources. In addition, the user can, but is not limited to, configure the startup information of multiple connectors in parallel by setting the third setting items corresponding to multiple connectors at one time on the target operation interface, thereby improving the efficiency of configuring the startup information of the connector.

[0099] Optionally, in this embodiment, it is possible but not limited to take the case where the storage device includes a PCIe hard disk device, the reference connector includes a port on the server, and the processor is connected to the storage device through the port as an example, and a new function item can be implemented for each CPU (Central Processing Unit) PCIe Port in the BIOS Setup interface (equivalent to the target operation interface) menu, for example, it is named Boot Option Permission (boot option permission, equivalent to the boot setting item), and two setting items of Yes (equivalent to the second setting item) and No (equivalent to the first setting item) are provided. When set to Yes, the device under the port is allowed to create a boot item; when set to No, the device under the port is not allowed to create a boot item. Alternatively, add a sub-setting item Disable BootFunction (disable the boot function, equivalent to the third setting item) in the function switch item of the PCIe PORT. When this sub-setting item is selected, the device under the Port is not allowed to create a boot item. It is used to control whether the hard disk connected to this PCIe Port, including the hard disk connected to the Raid card adapter under this PCIe Port, can form an OS boot item.

[0100] For example, when creating the OS (Operating System) startup item Boot Option, the above method is used to trace back to the CPU PCIe Port where the device is located, and obtain the newly created Boot Option Permission under the Port, or the setting of the function switch item of the PCIe PORT. When the Boot Option Permission is set to Yes, or the function switch item of the PCIe PORT is set to Enable, the startup item is created normally from the device under the Port. When the Boot Option Permission is set to No, or the function switch item of the PCIe PORT is set to Disable Boot Function, the creation of the startup item is skipped, that is, the startup item is not generated.

[0101] For USB or Sata disk, similarly, it can be but not limited to taking the reference connector including the controller under the adapter chip, and the processor through the controller under the adapter chip without storage device connection as an example, in the configuration menu of each Controller, a new function item Boot Option Permission is implemented, and two setting items of Yes and No are provided, or in the Controller switch function item, a setting item Disable Boot Function is added. When the support chip of USB and Sata Port can perform switch settings for each Port, Disable Boot Function can also be implemented in the switch item of each USB or Sata Port. Then, after corresponding to the Controller where each device is located, when Boot Option Permission is set to Yes, or the function switch item of Controller / USB Port / Sata Port is set to Enable, the startup item is normally created from the device under the Port. When Boot Option Permission is set to No, or the function switch item of Controller / USB Port / Sata Port is set to Disable Boot Function, the creation of the startup item is skipped, that is, the startup item is not generated.

[0102] It should be noted that Boot Option Permission and Disable Boot Function are not the only names for setting items. You can also use other names that can clearly indicate the function to name the setting items.

[0103] In the technical solution provided in the above step S206, when the target startup information is used to indicate that the operating system is not allowed to be started through the target storage device, it is possible but not limited to not starting the operating system on the processor through the target storage device, and generating an alarm message, wherein the alarm message may be used but not limited to prompt that the operating system is not allowed to be started on the processor through the target storage device.

[0104] Optionally, in this embodiment, after generating the alarm information, the method also includes: jumping to the target operation interface, and displaying the startup setting item 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 of the startup setting item being executed; configuring the startup information of the target connector.

[0105] Through the embodiments of the present application, when a user wants to start the operating system through an incorrect storage device, the system can avoid the user from repeatedly calling the configuration interface by directly jumping to the configuration interface of the connector, thereby saving the time required to call up the configuration interface and improving the configuration efficiency of the connector's configuration information.

[0106] It should be noted that the technical solution of the embodiment of the present application can be but is not limited to being used in the UEFI boot mode. For the Legacy boot mode, there can be but are not limited to other ways of obtaining the correspondence between the device and the PCIe Port or Controller through the PCIe chain, for example, independently developing functions to collect various properties of the bootable device, including the Bus Device Function Number of the device, and then obtaining 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 the embodiment of the present application can also implement the switch setting of whether the network card connected to a CPU PCIePort allows PXE. For example, the storage device in the technical solution of the embodiment of the present application can be replaced with a network card device. Other processing is similar, or it can also be used in similar scenarios and required solutions of other firmware, software, and OS.

[0108] Fig.10 is a schematic diagram of an optional startup item creation permission process according to an embodiment of the present application, such as Fig.10 As shown, the BIOS (equivalent to the boot firmware) first configures the boot information of each connector according to user needs. For example, the user can choose whether to allow the creation of an option to boot the operating system from the storage device under the connector through the target operation interface. Subsequently, when the user wants a certain storage device to boot the operating system, the PCIE Port (equivalent to the connector) or Controller (equivalent to the connector) to which the storage device is connected is identified by reading the DevicePath information of the storage device. The BIOS further queries the boot information of the PCIE Port or Controller to which the storage device is connected. If it is set to allow, the BIOS will normally create the OS boot item on the storage device; if it is set to prohibit, or Disable Boot Function (equivalent to the third setting item) is selected in the function selection item setting, the BIOS will skip the creation of the boot item for the device to prevent the storage device from booting the operating system without permission.

[0109] Through the technical solution of the embodiment of the present application, the problem of incorrect startup of the user's operating system is solved, the existing BIOS boot operating system function is expanded and enhanced, more user usage scenarios are covered, and product performance is improved. When the user does not want to start the OS startup item on a certain hard disk device (equivalent to a storage device) or a group of hard disk devices, just set the corresponding Boot Option Permission (equivalent to the startup setting item) to No (equivalent to the first setting item), or set the PCIe Port / Controller / Sata, USB Port switch function item (equivalent to the third setting item) to Disable Boot Function. This not only meets the demand of not starting from the device, but also does not affect other functions of the device, improves the efficiency of the operating system startup item selection, and improves customer satisfaction.

[0110] 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 a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0111] In this embodiment, a startup control device for a server is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0112] Fig.11 is a structural block diagram of a startup control device of a server according to an embodiment of the present application, such as Fig.11 As shown, the server includes: a processor and a boot firmware, the boot firmware is connected to the processor, the processor is used to connect to a connector, the connector is used to connect to a storage device, the boot firmware is also used to connect to the storage device, the device is applied to the boot firmware, and the device includes:

[0113] A first receiving module 1102 is 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 the connected target storage device, and the processor is connected to the target storage device through a target connector; a detection module 1104 is used to respond to the target startup request, and detect the target startup information corresponding to the target storage device according to the target device attribute 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 operating system to be started through the candidate storage device connected to the target connector, and the initial startup information is configured on the target operation interface provided by the startup firmware;

[0114] The startup module 1106 is configured to start the operating system on the processor through the target storage device when the target startup information indicates that starting the operating system through the target storage device is allowed.

[0115] Through the above-mentioned device, the user can configure the startup information corresponding to the connector on the target operation interface, and realize the configuration of whether to allow the operating system to be started from the storage device connected to the connector according to user needs. The startup firmware detects the startup information corresponding to the storage device according to the device properties of the storage device and the startup information corresponding to the connector, ensuring that the operating system can be started on the processor through the storage device only when the startup information indicates that the operating system is allowed to be started through the storage device connected to the connector, thereby avoiding starting the operating system through the wrong storage device. Therefore, the problem of low success rate of server startup can be solved, thereby achieving the effect of improving the success rate of server startup.

[0116] In an exemplary embodiment, the detection module includes:

[0117] A screening unit, configured to screen the target connector from candidate connectors according to a target device type of the target storage device and a target identifier of the target storage device, wherein the target device attribute includes the target device type and the target identifier;

[0118] The first determining unit is configured to determine the target startup information according to the initial startup information.

[0119] In an exemplary embodiment, the screening unit is used to:

[0120] In the case where the target device type includes the first device type and the target identifier includes the target bus identifier of the target storage device, detecting the target identifier range into which the target bus identifier falls, and acquiring the target connector corresponding to the target identifier range from the identifier range and the connector having a corresponding relationship, wherein, in the case where the target device type includes the first device type, the target connector includes the target port on the server;

[0121] In a case where the target device type includes a second device type, and the target identifier includes a target bus identifier of the target storage device, a target device identifier of the target storage device, 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 connectors, bus identifiers, device identifiers, and function identifiers having corresponding relationships, wherein, in a case where the target device type includes the second device type, the target connector includes an adapter connected to the processor.

[0122] In an exemplary embodiment, the first determining unit is configured to:

[0123] In a case where the initial startup information is used to indicate 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 is used to indicate that the operating system is not allowed to be started through the target storage device;

[0124] In a case where the initial startup information is used to indicate that the operating system is allowed to be started through the candidate storage device connected to the target connector, it is determined that the target startup information is used to indicate that the operating system is allowed to be started through the target storage device.

[0125] In an exemplary embodiment, the target operation interface includes a reference connector and a startup setting item having a corresponding relationship, the startup setting item is used to set whether to allow the operating system to be started through a storage device connected to the reference connector, the reference connector includes the target connector, and the above-mentioned device further includes:

[0126] A second receiving module is used to receive a target configuration request triggered on the target operation interface before detecting the target startup information corresponding to the target storage device according to the target device attribute of the target storage device and the initial startup information corresponding to the target connector, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information;

[0127] The 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.

[0128] In an exemplary embodiment, the startup setting item includes a first setting item and a second setting item, the first 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, and the second setting item is used to adjust 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, and the second receiving module includes:

[0129] a first detection unit, configured to detect a first trigger operation performed by the first setting item, and to detect a second trigger operation performed by the second setting item;

[0130] A second determining unit is configured to determine that the target configuration request is received when it is detected that the first setting item is subjected to the first trigger operation and when it is detected that the second setting item is not subjected to the second trigger operation, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system;

[0131] A third determination unit is used to determine that the target configuration request has been received when it is detected that the first setting item has not been triggered by the first trigger operation and when it is detected that the second setting item has been triggered by the second trigger operation, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that a candidate storage device connected through the target connector is allowed to start the operating system.

[0132] In an exemplary embodiment, the target operation interface includes the reference connector and a function setting item having a corresponding relationship, the function setting item is used to set the connection parameters of the reference connector, the startup setting item includes a third setting item, and the third setting item is in the function setting item, and 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, and the second receiving module further includes:

[0133] A second detection unit, used to detect a third trigger operation performed by the third setting item;

[0134] A fourth determination unit is used to determine, when the third setting item has been subjected to the third trigger operation, that the target configuration request has been received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system.

[0135] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0136] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

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

[0138] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0139] In an 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.

[0140] 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 in any one of the above method embodiments are implemented.

[0141] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0142] An embodiment of the present application also provides a computer program, which 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 the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0143] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0144] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0145] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for controlling the startup of a server, characterized in that: The server includes: A processor and a boot firmware, wherein the boot firmware is connected to the processor, the processor is used to be connected to a connector, the connector is used to be connected to a storage device, the boot firmware is also used to be connected to the storage device, the method is applied to the boot firmware, and the method includes: receiving a target startup request, wherein the target startup request is used to request to start the operating system of the processor through the connected target storage device, and the processor is connected to the target storage device through a target connector; In response to the target startup request, according to the target device attribute of the target storage device and the initial startup information corresponding to the target connector, the target startup information corresponding to the target storage device is detected, wherein the initial startup information is used to indicate whether to allow the operating system to be started through the candidate storage device connected to the target connector, and the initial startup information is configured on the target operation interface provided by the startup firmware; In a case where the target boot information is used to indicate 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.

2. The method according to claim 1, characterized in that The detecting the target startup information corresponding to the target storage device according to the target device attribute of the target storage device and the initial startup information corresponding to the target connector includes: Filtering the target connector from candidate connectors according to a target device type of a target storage device and a target identifier of the target storage device, wherein the target device attributes include the target device type and the target identifier; The target startup information is determined according to the initial startup information.

3. The method according to claim 2, characterized in that The step of screening the target connector from candidate connectors according to the target device type of the target storage device and the target identifier of the target storage device includes: In the case where the target device type includes the first device type and the target identifier includes the target bus identifier of the target storage device, detecting the target identifier range into which the target bus identifier falls, and acquiring the target connector corresponding to the target identifier range from the identifier range and the connector having a corresponding relationship, wherein, in the case where the target device type includes the first device type, the target connector includes the target port on the server; In a case where the target device type includes a second device type, and the target identifier includes a target bus identifier of the target storage device, a target device identifier of the target storage device, 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 connectors, bus identifiers, device identifiers, and function identifiers having corresponding relationships, wherein, in a case where the target device type includes the second device type, the target connector includes an adapter connected to the processor.

4. The method according to claim 2, characterized in that: The step of determining the target startup information according to the initial startup information includes: In a case where the initial startup information is used to indicate 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 is used to indicate that the operating system is not allowed to be started through the target storage device; In a case where the initial startup information is used to indicate that the operating system is allowed to be started through the candidate storage device connected to the target connector, it is determined that the target startup information is used to indicate that the operating system is allowed to be started through the target storage device.

5. The method according to claim 1, characterized in that The target operation interface includes a reference connector and a startup setting item having a corresponding relationship, the startup setting item is used to set whether to allow the operating system to be started through the storage device connected to the reference connector, the reference connector includes the target connector, and before detecting the target startup information corresponding to the target storage device according to the target device attribute of the target storage device and the initial startup information corresponding to the target connector, the method further includes: receiving 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.

6. The method according to claim 5, characterized in that The startup setting item includes a first setting item and a second setting item, the first 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, and the second setting item is used to adjust 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, and the receiving of the target configuration request triggered on the target operation interface includes: detecting a first triggering operation performed by the first setting item, and detecting a second triggering operation performed by the second setting item; In the case where it is detected that the first setting item is subjected to the first trigger operation and it is detected that the second setting item is not subjected to the second trigger operation, it is determined that the target configuration request is received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system; When it is detected that the first setting item has not been triggered by the first trigger operation and when it is detected that the second setting item has been triggered by the second trigger operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is allowed to start the operating system.

7. The method according to claim 5, characterized in that The target operation interface includes the reference connector and function setting items having a corresponding relationship, the function setting items are used to set connection parameters of the reference connector, the startup setting items include a third setting item, and the third setting item is in the function setting items, and 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, and the receiving of the target configuration request triggered on the target operation interface includes: detecting a third triggering operation performed by the third setting item; In the case where the third setting item has been subjected to the third trigger operation, it is determined that the target configuration request has been received, wherein the target configuration request is used to request that the startup information of the target connector be configured as the initial startup information, and the initial startup information is used to indicate that the candidate storage device connected through the target connector is not allowed to start the operating system.

8. A server startup control device, characterized in that: The server includes: a processor and a boot firmware, the boot firmware is connected to the processor, the processor is used to connect to a connector, the connector is used to connect to a storage device, the boot firmware is also used to connect to the storage device, the device is applied to the boot firmware, and the device includes: A first receiving module, configured to receive a target startup request, wherein the target startup request is used to request to start the operating system of the processor through the connected target storage device, and the processor is connected to the target storage device through a target connector; a detection module, configured to respond to the target startup request and detect target startup information corresponding to the target storage device according to the target device attribute 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 operating system to be started through the candidate storage device connected to the target connector, and the initial startup information is configured on a target operation interface provided by the startup firmware; A startup module is used to start the operating system on the processor through the target storage device when the target startup information is used to indicate that the operating system is allowed to be started through the target storage device.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. 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, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Start control method, system and device of server mainboard

    CN115827069A

  • Method and device for starting server

    CN117648695A

  • Server starting method, device and system, storage medium and electronic equipment

    CN117687703A

  • Method and device for starting operating system

    CN117742801A

  • Storage device information detection method and device, storage medium and electronic device

    CN118331820A

Cited By

  • Starting control method, system and device for starting equipment of server

    CN121349548A

  • Method for distinguishing serial port hard disks of input / output hub and electronic equipment

    CN121455857A