Startup control method and apparatus for server, storage medium, and electronic device
By recording and generating startup items that conform to the target network protocol on the server's baseboard management controller, the problem of low server startup control efficiency is solved, achieving the effects of fast startup and automatic adaptation to other devices.
Patent Information
- Application Number
- PCT/CN2025/098346
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-14
- Filing Date
- 2025-05-30
- Publication Date
- 2026-02-19
AI Technical Summary
Existing technologies have low efficiency in server boot control, requiring hardware modifications or customized BIOS versions to enable PXE boot, resulting in a waste of human and material resources.
The reference bus device that allows the operating system to be booted according to the target network protocol is recorded on the baseboard management controller of the server. The reference bus device is obtained by accessing the target storage location, the boot entry that conforms to the target network protocol is detected and generated, and the operating system is booted using these boot entries.
It improves the efficiency of server startup control, reduces the need for hardware modifications and customized BIOS, saves manpower and resources, and enables fast startup and automatic adaptation to other devices.
Smart Images

Figure CN2025098346_19022026_PF_FP_ABST
Abstract
Description
Server startup control method and device, storage medium and electronic device
[0001] Cross-reference to related applications
[0002] The present application claims priority from the Chinese patent application No. 202411116127.X filed on August 14, 2024, and entitled "Server startup control method and device, storage medium and electronic device", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0003] Embodiments of the present application relate to the field of computers, in particular to a server startup control method and device, a storage medium and an electronic device. BACKGROUND
[0004] PXE (Preboot Execution Environment) is a network boot technology that allows users to start a computer from a network without using local storage (such as a hard disk). PXE uses a special network protocol called Preboot Execution Protocol (PXE), which allows client machines to obtain the required boot files from the network. PXE supports multiple operating systems. Its main application scenarios include automatic installation of systems, system maintenance, system disaster recovery, system remote update, virtualization deployment, network boot, etc. It has obvious advantages in various application scenarios, including reducing installation time, saving maintenance costs, security, reliability, timely updating to improve update efficiency, reducing deployment time, improving deployment efficiency, improving system startup efficiency, etc. and is widely used on servers.
[0005] In related technologies, when a client specifies to start the operating system of a server through a network card PXE, it can only be done through hardware modification, customizing the BIOS version, or disabling the PXE function of other network cards, etc. Understandably, these methods are a serious waste of manpower and resources, and increase the difficulty of subsequent maintenance or version upgrades. SUMMARY
[0006] Embodiments of the present application provide a server startup control method and device, a storage medium and an electronic device to at least solve the problem of low server startup control efficiency in related technologies.
[0007] According to one embodiment of the present application, a method for controlling booting of a server is provided, which is applied to a booting system of the server, a reference bus device allowing the server to be booted according to a target network protocol is recorded on a target storage location in the server, the target storage location is set to allow the booting system to access when the server is not booted, and the method comprises: accessing the target storage location to obtain the reference bus device when a booting process of the server is controlled to run to a booting stage of an operating system; detecting a target bus device connected to the server from the reference bus device; generating a booting item corresponding to the target bus device according to the target network protocol when the target bus device is detected from the reference bus device; and booting the operating system using the booting item.
[0008] In one exemplary embodiment, the target storage location is deployed on a baseboard management controller of the server, and the accessing of the target storage location to obtain the reference bus device comprises: generating and initiating a target access request to the baseboard management controller, wherein the target access request is used to request to access the target storage location to obtain the reference bus device, and the baseboard management controller is set to read data stored on a storage location on the baseboard management controller in response to the received access request; and receiving the reference bus device returned by the baseboard management controller in response to the received target access request.
[0009] In one exemplary embodiment, the target storage location is deployed on a baseboard management controller of the server, and before the accessing of the target storage location to obtain the reference bus device, the method comprises: receiving a target adjustment request, wherein the target adjustment request is used to request to adjust the reference bus device recorded on the target storage location to a first candidate bus device; detecting an adjustment bus device between the reference bus device and the first candidate bus device in response to the target adjustment request; and adjusting the reference bus device recorded on the target storage location to the first candidate bus device according to the adjustment bus device.
[0010] In one exemplary embodiment, the adjusting of the reference bus device recorded on the target storage location to the first candidate bus device according to the adjustment bus device comprises: deleting the adjustment bus device from the reference bus device recorded on the target storage location to obtain the first candidate bus device; and / or recording the adjustment bus device in the reference bus device stored on the target storage location to obtain the first candidate bus device.
[0011] In one exemplary embodiment, the target storage location records first bus device information corresponding to the reference bus device, and the detecting of the target bus device connected to the server from the reference bus device comprises: searching for second bus device information of the target bus device from the first bus device information; and determining that the target bus device is detected from the reference bus device when the second bus device information is searched from the first bus device information.
[0012] In an exemplary embodiment, the searching the second bus device information of the target bus device from the first bus device information comprises: in the case that the first bus device information comprises N bus device information, wherein N is a positive integer greater than or equal to 1, searching the second bus device information from the N bus device information by performing the following steps: extracting an ith set of bus device attributes carried in an ith bus device information of the N bus device information, wherein the ith bus device information is the bus device information corresponding to an ith bus device of the N bus devices, the reference bus device comprises the N bus devices, and i is a positive integer less than or equal to N; and extracting target bus device attributes of the target bus device carried in the second bus device information; and comparing the ith set of bus device attributes with the target bus device attributes to obtain a first comparison result.
[0013] In an exemplary embodiment, after the comparing the ith set of bus device attributes with the target bus device attributes to obtain the first comparison result, the method further comprises: in the case that the first comparison result indicates that there is a bus device attribute in the ith set of bus device attributes that is inconsistent with the target bus device attributes, extracting an (i+1)th set of bus device attributes carried in an (i+1)th bus device information of the N bus device information, wherein the (i+1)th bus device information is the bus device information corresponding to an (i+1)th bus device of the N bus devices, and i+1 is a positive integer less than or equal to N; and comparing the (i+1)th set of bus device attributes with the target bus device attributes to obtain a second comparison result.
[0014] In an exemplary embodiment, the system is deployed with a generation component, and in the case that the target bus device is detected from the reference bus device, the generation component generates a start item corresponding to the target bus device and conforming to a target network protocol, which comprises: in the case that the reference bus device comprises M bus devices and the target bus device comprises P bus devices, the generation component generates P start items corresponding to the P bus devices and conforming to the target network protocol by performing the following steps, wherein the M bus devices comprise the P bus devices, M is a positive integer, and P is a positive integer less than or equal to M: controlling the generation component to generate the P start items corresponding to the P bus devices and conforming to the target network protocol to obtain the P start items, and controlling the generation component to generate a start item list; and controlling the generation component to store the P start items in the start item list.
[0015] In an exemplary embodiment, the method of starting the operating system using the start item comprises: in a case where the target bus device comprises P bus devices, and the start item comprises P start items corresponding to the P bus devices, wherein P is a positive integer less than or equal to M, the operating system is started using the P start items by performing the following steps: detecting a start order corresponding to the P start items; starting the operating system using a first start item in the start order among the P start items; in a case where the operating system fails to be started using the first start item, starting the operating system using a next start item in the start order after the first start item.
[0016] In an exemplary embodiment, after the operating system is started using the start item, the method further comprises: in a case where the reference bus device recorded on the target storage location is adjusted to a second candidate bus device, detecting a difference bus device between the second candidate bus device and the reference bus device, wherein the difference bus device is a bus device different between the second candidate bus device and the reference bus device; and deleting a start item corresponding to the difference bus device from the start item.
[0017] In an exemplary embodiment, the adjustment component is deployed in the starting system, and the deleting of the start item corresponding to the difference bus device from the start item comprises: in a case where the start item comprises P start items, and the difference bus device comprises R bus devices, wherein P is a positive integer less than or equal to M, and R is a positive integer, the R start items corresponding to the R bus devices are deleted from the P start items by performing the following steps: controlling the adjustment component to find the R start items corresponding to the R bus devices from the P start items; and controlling the adjustment component to delete the R start items.
[0018] According to another embodiment of the present application, a starting control apparatus of a server is provided, comprising: a starting system applied to the server, a reference bus device allowing an operating system of the server to be started according to a target network protocol is recorded on a target storage location in the server, the target storage location is set to be accessible by the starting system when the server is not started, and the apparatus comprises: an access module, configured to access the target storage location to obtain the reference bus device when a starting process of the server is controlled to run to a starting stage of the operating system; a first detection module, configured to detect a target bus device connected to the server from the reference bus device; a generation module, configured to generate a start item corresponding to the target bus device and conforming to the target network protocol when the target bus device is detected from the reference bus device; and a starting module, configured to start the operating system using the start item.
[0019] According to still another embodiment of the present application, a computer non-volatile readable storage medium is further provided, and the computer non-volatile readable storage medium stores a computer program, wherein the computer program is set to execute the steps in any of the above method embodiments when running.
[0020] According to yet another embodiment of the present application, an electronic device is also provided, comprising a memory and a processor, the memory storing a computer program, and the processor being configured to execute the computer program to perform the steps of any of the above method embodiments.
[0021] According to yet another embodiment of the present application, a computer program product is also provided, comprising a computer program, which, when executed by a processor, implements the steps of any of the above method embodiments.
[0022] According to the present application, the server records bus devices that allow the operating system of the server to be started according to the network protocol, and these bus devices allow the system to be started to access the server in the case where the server is not started. In the case where the operating system of the server is started, if the bus device connected to the server is found from the bus devices recorded in the server and allowing the operating system of the server to be started according to the network protocol, it can be indicated that the bus device currently connected to the server is allowed to start the operating system of the server according to the network protocol. In this case, the start item corresponding to the bus device is generated, and the operating system of the server is started according to the specified bus device according to the needs of the client. Therefore, the problem of low efficiency of the start control of the server can be solved, and the effect of improving the start control efficiency of the server is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0023] FIG. 1 is a hardware structure block diagram of a server device of a start control method of a server according to an embodiment of the present application;
[0024] FIG. 2 is a flowchart of a start control method of a server according to an embodiment of the present application;
[0025] FIG. 3 is a schematic diagram of a query bus device according to an embodiment of the present application;
[0026] FIG. 4 is a schematic diagram of adding a bus device according to an embodiment of the present application;
[0027] FIG. 5 is a schematic diagram of deleting a bus device according to an embodiment of the present application;
[0028] FIG. 6 is a schematic diagram of a start control method of a server according to an embodiment of the present application;
[0029] FIG. 7 is a structure block diagram of a start control device of a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] Hereinafter, the embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.
[0031] It should be noted that the terms "first", "second" and the like in the description and claims of the application and the above drawings are used to distinguish between similar objects, not necessarily in an ordinal or chronological sequence.
[0032] The method embodiments provided in the embodiments of the application can be executed in a server device or similar computing device. Taking the case of running on a server device, Fig. 1 is a hardware structure block diagram of a server device of a start control method of a server according to an embodiment of the application. As shown in Fig. 1, the server device can include one or more (only one is shown in Fig. 1) processors 102 (the processor 102 can 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 above-mentioned server device can further include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that the structure shown in Fig. 1 is only schematic, which does not limit the structure of the above-mentioned server device. For example, the server device can further include more or less components than those shown in Fig. 1, or have a different configuration from that shown in Fig. 1.
[0033] The memory 104 can be used to store computer programs, for example, software programs of application software and modules, such as the computer program corresponding to the start control method of the server in the embodiments of the application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the server device through 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 a combination thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific examples of the above-mentioned network can include a wireless network provided by a communication service provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC for short), 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 (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.
[0035] First, the terms involved in the embodiments of the application are explained as follows:
[0036] BIOS: Base Input / Output System, basic input / output system.
[0037] BMC: Baseboard Management Controller, baseboard management controller.
[0038] PXE: Preboot Execution Environment, pre-boot execution environment.
[0039] VID: Vendor ID, vendor ID (Identity document, identity document).
[0040] DID: Device ID, device ID.
[0041] SVID: Subsystem-Identification, secondary code for authorized manufactured devices.
[0042] SSID: Subsystem-Vendor Identification, system vendor identification code.
[0043] NVRAM: Non-Volatile Random Access Memory, non-volatile random access memory.
[0044] PXEID: Preboot EXecution Environment Identifier, pre-boot execution environment identifier.
[0045] A server startup control method is provided in the embodiment, which is applied to a server startup system. A reference bus device allowing the server to start an operating system according to a target network protocol is recorded on a target storage location in the server. The target storage location is set to allow the startup system to access when the server is not started. FIG. 2 is a flowchart of the server startup control method according to the embodiment of the present application. As shown in FIG. 2, the flow includes the following steps:
[0046] Step S202: When the startup process of the server is running to the startup stage of the operating system, the target storage location is accessed to obtain the reference bus device.
[0047] Step S204: The target bus device connected to the server is detected from the reference bus device.
[0048] Step S206: When the target bus device is detected from the reference bus device, a startup item conforming to the target network protocol corresponding to the target bus device is generated.
[0049] Step S208, using the start item to start the operating system.
[0050] By the embodiment of the present application, the server records the bus devices allowing starting the operating system of the server according to the network protocol, and these bus devices allow the start system to access in the case that the server is not started. In the case that the operating system of the server is started, if the bus device connected by the server is found from the bus devices recorded in the server and allowing starting the operating system of the server according to the network protocol, it can be indicated that the bus device currently connected by the server is allowed to start the operating system of the server according to the network protocol. In this case, the start item corresponding to the bus device is generated, and the operating system of the server is started according to the specified bus device according to the demand of the client. Therefore, the problem of low efficiency of the start control of the server can be solved, and the effect of improving the start control efficiency of the server is achieved.
[0051] In the technical solution provided in the above step S202, the start system can but is not limited to include the BIOS (Basic Input Output System, basic input output system) in the server, and the bus device can but is not limited to include the device conforming to the target bus device. As an example of the present application, the bus device can but is not limited to include the bus device conforming to the PCIE protocol, such as the PCIE (peripheral component interconnect express, high-speed serial computer expansion bus standard) network card and the like.
[0052] In the embodiment, the target network protocol can but is not limited to allow starting the operating system of the server through the network. As an example of the present application, the target network protocol can but is not limited to include the PXE protocol and the like, and the present application does not make any limitation in this regard.
[0053] In the embodiment, the reference bus device can but is not limited to include one or more bus devices, and the reference bus device can but is not limited to include the bus device set by the client according to the demand. It can be understood that the reference bus device recorded in the target storage location can be dynamically updated according to the demand of the client.
[0054] In an exemplary embodiment, the target storage location can be deployed on a baseboard management controller of the server, and the reference bus device can be accessed by the following manner, but not limited to: a target access request is generated and initiated to the baseboard management controller, wherein the target access request is used to request to access the target storage location of the reference bus device, and the baseboard management controller is configured to read the data stored in the storage location on the baseboard management controller in response to the received access request; and the reference bus device returned by the baseboard management controller in response to the received target access request is received.
[0055] In the embodiment, the target storage location can be deployed on a baseboard management controller (BMC) of the server, and the reference bus device can be obtained by the starting system accessing the data recorded in the target storage location in the BMC, but not limited to.
[0056] In the embodiment, the target storage location can include one or more storage sub-locations, and each storage sub-location can include a start offset address and an offset amount, for example, the storage sub-location can be used to store the device information of one bus device in the reference bus device, but not limited to.
[0057] FIG. 3 is a schematic diagram of querying a bus device according to an embodiment of the present application. As shown in FIG. 3, taking a bus device including a network card as an example, the following can be included, but not limited to:
[0058] 1. An IPMI (Intelligent Platform Management Interface) command of an OEM (Original Equipment Manufacturer) is added, which is used to query the stored PXE starting network card information, and can include a flag bit _PXEID_ and the device attribute of the bus device, for example, the actual DID, VID, SSID, SVID, etc. of the bus device.
[0059] 2. When the BMC receives the IPMI command of querying the PXE starting network card information, the information header is parsed and judged to be _PXEID_. If the information header is _PXEID_, step 3 is entered; otherwise, 01 is returned, indicating that the query information is invalid, and the process is ended.
[0060] 3. A structure is added, which is used to store the parsed information,
[0061] typedef struct{UINT16 Did;
[0062] UINT16 Vid;
[0063] UINT16 Ssid;
[0064] UINT16 Svid;
[0065] }RESERVE_DEVICE_PXEID_LIST.
[0066] And set the variable ReserveDeviceList (reserved device list) for storing the information of the network card (equivalent to the bus device information) which has reserved PXE boot.
[0067] 4. According to the requirement, the information of the network card which has reserved PXE boot is filled in ReserveDeviceList from the specified location of EEPROM (Electrically Erasable Programmable read only memory).
[0068] 5. After the ReserveDeviceList information is escaped, it is successfully returned according to the specified rule.
[0069] 6. End.
[0070] In one exemplary embodiment, the target storage location can be deployed on a baseboard management controller of a server, but is not limited to, by the following manner, before a reference bus device recorded on the target storage location is accessed: receiving a target adjustment request, wherein the target adjustment request is used to request to adjust the reference bus device recorded on the target storage location to a first candidate bus device; in response to the target adjustment request, detecting an adjustment bus device between the reference bus device and the first candidate bus device; and adjusting the reference bus device recorded on the target storage location to the first candidate bus device according to the adjustment bus device.
[0071] In this embodiment, the adjustment bus device can include, but is not limited to, the bus device that the customer wants to increase or decrease, and the adjustment bus device can include, but is not limited to, the bus device different between the reference bus device and the first candidate bus device, for example, the adjustment bus device can include, but is not limited to, the bus device that exists in the reference bus device and does not exist in the first candidate bus device, or the adjustment bus device can include, but is not limited to, the bus device that does not exist in the reference bus device and exists in the first candidate bus device.
[0072] In this embodiment, the adjustment bus device can also be directly carried in the target adjustment request, but is not limited to. It can be understood that the adjustment bus device can be directly deleted from the reference bus device, or the adjustment bus device can be recorded in the reference bus device.
[0073] In an exemplary embodiment, the reference bus device recorded on the target storage location can be adjusted to the first candidate bus device by, but not limited to, the following ways: deleting the adjustment bus device from the reference bus device recorded on the target storage location, to obtain the first candidate bus device; and / or, recording the adjustment bus device in the reference bus device stored on the target storage location, to obtain the first candidate bus device.
[0074] In the embodiment, the reference bus device recorded on the target storage location can be, but not limited to, dynamically changed, for example, the bus device can be added or reduced according to the user's needs. Figure 4 is a schematic diagram of adding a bus device according to an embodiment of the present application. As shown in Figure 4, taking a bus device including a network card as an example, but not limited to, the following can be included:
[0075] 1. The BMC adds an OEM's IPMI command, which is used to set the network card information of the specified network card PXE boot, and set the interface specification and the standard of the storage information, including the information identification bit _PXEID_ and the device attribute of the bus device, for example, the DID, VID, SSID, SVID of the bus device.
[0076] 2. When the BMC receives the IPMI command of adding the specified network card PXE, it parses and judges whether the information header is _PXEID_. If the information header is _PXEID_, go to step 3; otherwise, return 01, indicating that the added PXE boot network card information is invalid, and the execution ends.
[0077] 3. Add a structure body for storing the parsed information,
[0078] typedef struct{UINT16 Did;
[0079] UINT16 Vid;
[0080] UINT16 Ssid;
[0081] UINT16 Svid;
[0082] }RESERVE_DEVICE_PXEID;
[0083] and set the variable ReserveDevice (reserved device) to store the reserved PXE boot network card information.
[0084] 4. Parse the information of the ipmi command in order, each field is two BYTES (bytes), in turn DID, VID, SSID, SVID, and store the information in ReserveDevice.
[0085] 5. Read the specified network card PXE boot network card information already stored in the EEPROM (equivalent to the target storage location), judge the number of valid information storage N, if N <5 (or 10 or 15, etc., the present application does not limit this), jump to step 6; if N >= 5, return error information 02, indicating that the PXE boot network card information has reached the upper limit, if you need to write, please delete the invalid information first.
[0086] 6. Write the information in ReserveDevice to the next position of the current written data in EEPROM, for example, the N+1 position, and return information 00, indicating that the PXE boot network card information has been successfully stored in EEPROM.
[0087] 7. End.
[0088] Figure 5 is a schematic diagram of deleting a bus device according to an embodiment of the present application. As shown in Figure 5, the bus device may include, but is not limited to, a network card, which may include, but is not limited to, the following contents:
[0089] 1. Add an OEM IPMI command for deleting network card information that does not need PXE boot, including the flag bit _PXEID_, the actual DID, VID, SSID, and SVID of the device.
[0090] 2. After the BMC receives the IPMI command for deleting network card information that does not need PXE boot, parse and judge the information header to be _PXEID_. If the information header is _PXEID_, go to step 3; otherwise, return 01, indicating that the deletion information is invalid, and end.
[0091] 3. Add a structure body for storing the parsed information,
[0092] typedef struct{UINT16 Did;
[0093] UINT16 Vid;
[0094] UINT16 Ssid;
[0095] UINT16 Svid;
[0096] }RESERVE_DEVICE_DELETE;
[0097] and set the variable ReserveDeviceDelete for storing the deleted PXE boot network card information.
[0098] 4. Analyze the information of the IPMI command in order, each field is two BYTE, in turn DID, VID, SSID, SVID, and store the information in ReserveDeviceDelete.
[0099] 5. Add an array for storing the analyzed information,
[0100] typedef struct{UINT16 Did;
[0101] UINT16 Vid;
[0102] UINT16 Ssid;
[0103] UINT16 Svid;
[0104] }RESERVE_DEVICE_PXEID_LIST;
[0105] Set variable ReserveDeviceList for storing the information of the PXE started network card.
[0106] 6. Use the added IPMI command for querying the stored PXE started network card information, get the filtered device information from the specified position of EEPROM, analyze in turn and fill the analyzed information to ReserveDeviceList according to the specification.
[0107] 7. Poll the information in ReserveDeviceList, query whether there is information matched with ReserveDeviceDelete, if matched, jump to step 8; otherwise, return information 05, indicating that there is no information to be deleted.
[0108] 8. Delete the information of ReserveDeviceDelete in ReserveDeviceList.
[0109] 9. Erase the filling area of the filtered device information in EEPROM, and write the data in the latest ReserveDeviceList into EEPROM again and return 00, indicating that the information of the PXE started network card has been successfully deleted.
[0110] 10. End.
[0111] In the technical scheme provided in step S204, the target bus device can be, but is not limited to, a bus device currently connected to the server, and the target bus device connected to the server can be detected from the reference bus device in the following manner: the target bus device is found from the reference bus device in a polling manner.
[0112] In an exemplary embodiment, the target storage location records the first bus device information corresponding to the reference bus device, and the target bus device connected to the server can be detected from the reference bus device in the following manner, but not limited thereto: searching the second bus device information of the target bus device from the first bus device information; and determining that the target bus device is detected from the reference bus device if the second bus device information is found from the first bus device information.
[0113] In the embodiment, the bus device information can be stored in the target structure, and the target storage location can record the first bus device information corresponding to the reference bus device, but not limited thereto.
[0114] In the embodiment, the second bus device information of the target bus device can be searched from the first bus device information in a polling manner, but not limited thereto.
[0115] In an exemplary embodiment, the second bus device information of the target bus device can be searched from the first bus device information in the following manner, but not limited thereto: if the first bus device information includes N pieces of bus device information, where N is a positive integer greater than or equal to 1, the second bus device information of the target bus device is searched from the N pieces of bus device information by performing the following steps: extracting an ith set of bus device attributes carried in an ith piece of bus device information of the N pieces of bus device information, and extracting target bus device attributes of the target bus device carried in the second bus device information, where the ith piece of bus device information corresponds to an ith bus device of N bus devices, the reference bus device includes the N bus devices, and i is a positive integer less than or equal to N; and comparing the ith set of bus device attributes with the target bus device attributes to obtain a first comparison result.
[0116] In the embodiment, the ith set of bus device attributes can include one or more bus device attributes, and as an example, the bus device attributes can include a device identifier of the bus device, a device type of the bus device, and the like, and as an example, the device identifier of the bus device can include a DID, a VID, an SSID, an SVID, and the like, but not limited thereto.
[0117] In the embodiment, the ith set of bus device attributes can be determined to be consistent with the target bus device attributes in the following manner, but not limited thereto: if a third number of bus device attributes included in the ith set of bus device attributes is the same as a fourth number of bus device attributes included in the target bus device attributes, and each bus device attribute included in the ith set of bus device attributes is the same as a corresponding bus device attribute in the target bus device attributes.
[0118] In the embodiment, the determination that the i-th group of bus device attributes is inconsistent with the target bus device attributes can be but not limited to: in the case that the first quantity of bus device attributes included in the i-th group of bus device attributes is different from the second quantity of bus device attributes included in the target bus device attributes, and / or in the case that at least one of the bus device attributes included in the i-th group of bus device attributes is different from the bus device attributes in the target bus device attributes.
[0119] In an exemplary embodiment, the consistency of the i-th group of bus device attributes with the target bus device attributes can be but not limited to compared in the following manner: after obtaining the first comparison result, in the case that the first comparison result indicates that there is at least one bus device attribute in the i-th group of bus device attributes that is inconsistent with the target bus device attributes, the i+1-th group of bus device attributes carried in the i+1-th bus device information in the N bus device information is extracted, wherein the i+1-th bus device information is the bus device information corresponding to the i+1-th bus device in the N bus devices, and i+1 is a positive integer less than or equal to N; and the consistency of the i+1-th group of bus device attributes with the target bus device attributes is compared to obtain a second comparison result.
[0120] In the embodiment, the determination that the i+1-th group of bus device attributes is consistent with the target bus device attributes can be but not limited to: in the case that the first quantity of bus device attributes included in the i+1-th group of bus device attributes is the same as the second quantity of bus device attributes included in the target bus device attributes, and each of the bus device attributes included in the i+1-th group of bus device attributes is the same as the corresponding bus device attribute in the target bus device attributes.
[0121] In the embodiment, the determination that the i+1-th group of bus device attributes is consistent with the target bus device attributes can be but not limited to: in the case that the first quantity of bus device attributes included in the i+1-th group of bus device attributes is different from the second quantity of bus device attributes included in the target bus device attributes, and / or in the case that at least one of the bus device attributes in the i+1-th group of bus device attributes is different from the corresponding bus device attribute in the target bus device attributes.
[0122] In the technical solution provided in the step S206, in the case that the target bus device is detected from the reference bus devices, it can be indicated that the target bus device is a bus device that is allowed to start the operating system of the server according to the target network protocol, and in such a case, the start item corresponding to the target bus device and conforming to the target network protocol can be but not limited to generated.
[0123] In the embodiment, each of the reference bus devices can but not limited to have a corresponding start item.
[0124] In an exemplary embodiment, the generating component can be started in the system in the following manner, but is not limited thereto: in the case that a target bus device is detected from the reference bus device, the generating component generates the starting item corresponding to the target bus device according to the target network protocol; in the case that the reference bus device comprises M bus devices and the target bus device comprises P bus devices, the generating component generates the starting items corresponding to the P bus devices according to the target network protocol by performing the following steps, wherein the M bus devices comprise the P bus devices, M is a positive integer, and P is a positive integer less than or equal to M: the generating component generates the starting items corresponding to the P bus devices according to the target network protocol to obtain P starting items, and the generating component generates a starting item list; and the generating component stores the P starting items in the starting item list.
[0125] In the embodiment, the starting items corresponding to the bus devices recorded in the starting item list are dynamically changed, for example, in the case that the connected bus devices are changed or in the case that the bus devices comprised by the reference bus device are changed, the starting items corresponding to the bus devices recorded in the starting item list are also changed.
[0126] In the embodiment, the starting item list can be used for storing the starting items corresponding to the reference bus devices recorded in the reference bus device list, the starting items corresponding to the reference bus devices can be generated first, and in the case that a target bus device is detected from the reference bus device, the starting item corresponding to the target bus device can be directly searched from the generated starting items corresponding to the reference bus devices.
[0127] In the technical solution provided in step S208, the starting item corresponding to the target bus device can be used for starting the operating system of the server, in this way, the starting item required for starting the operating system of the server is obtained through the network, and the efficiency of starting the operating system of the server is improved.
[0128] Through the embodiments of the present application, the requirement of the customer that the PXE of the network card starts the operating system of the server is met, the purposes of saving time and using the function of the network card are achieved, the problem that in the related art, a customized version and a customized motherboard are required to achieve the purpose that the network card of the customer starts the server is solved, the manpower and resources are saved, the customer can quickly use, and the automatic adaptation problem of the specified starting of other classified devices is also solved through the function expansion of the embodiments of the present application.
[0129] In an exemplary embodiment, the starting item can be used to start the operating system in the following manner, but the disclosure is not limited thereto: when the target bus device includes P bus devices, the starting item includes P starting items corresponding to the P bus devices, and P is a positive integer less than or equal to M, the operating system is started by performing the following steps using the P starting items: detecting a starting order corresponding to the P starting items; starting the operating system using a first starting item in the starting order among the P starting items; and when the starting of the operating system using the first starting item fails, starting the operating system using a next starting item in the starting order after the first starting item.
[0130] In the embodiment, the starting order can include, but is not limited to, an order of starting the operating system of the server using the P starting items, and the starting of the operating system of the server using the P starting items can be attempted one by one in the starting order. It should be noted that the starting order can be set by a user according to a requirement, and the starting order is allowed to be dynamically changed.
[0131] In the embodiment, the starting item can be used to start the operating system in the following manner, but the disclosure is not limited thereto: when one bus device connected to the server is detected from the reference bus device, a starting item corresponding to the one bus device is generated, and the operating system is started using the starting item corresponding to the one bus device, wherein the target bus device includes the one bus device.
[0132] By the embodiments of the disclosure, when it is detected that the server is connected to a bus device included in the reference bus device, the operating system of the server is directly started using the starting item corresponding to the bus device, thereby reducing the number of starting items of the bus devices that need to be generated, reducing the time required for starting the operating system of the server, and improving the efficiency of starting the operating system of the server.
[0133] In an exemplary embodiment, after the starting item is used to start the operating system in the following manner, but the disclosure is not limited thereto: when the reference bus device recorded on the target storage location is adjusted to a second candidate bus device, a difference bus device between the second candidate bus device and the reference bus device is detected, wherein the difference bus device is a bus device different between the second candidate bus device and the reference bus device; and a starting item corresponding to the difference bus device is deleted from the starting item.
[0134] In the embodiment, the second candidate bus device can be different from the reference bus device, and the difference bus device can include a bus device not included in the second candidate bus device but included in the reference bus device; or the difference bus device can include a bus device included in the second candidate bus device but not included in the reference bus device.
[0135] In the embodiment, in the case that the difference bus device can but is not limited to include a bus device not included in the second candidate bus device and included in the reference bus device, the start item corresponding to the difference bus device can but is not limited to be deleted from the start item corresponding to the reference bus device.
[0136] In the embodiment, a generation component is deployed in the start system, and in the case that the difference bus device can but is not limited to include a bus device included in the second candidate bus device and not included in the reference bus device, the generation component can but is not limited to be controlled to generate the start item corresponding to the difference bus device.
[0137] In one exemplary embodiment, the adjustment component deployed in the start system can but is not limited to be started by deleting the start item corresponding to the difference bus device from the start item in the following manner: in the case that the start item includes P start items and the difference bus device includes R bus devices, the R start items corresponding to the R bus devices are deleted from the P start items by performing the following steps, wherein P is a positive integer less than or equal to M, and R is a positive integer: the adjustment component is controlled to find the R start items corresponding to the R bus devices from the P start items; and the adjustment component is controlled to delete the R start items.
[0138] In the embodiment, the adjustment component can but is not limited to be controlled to find the R start items corresponding to the R bus devices from the P start items in the following manner: the adjustment component is controlled to find the R start items corresponding to the R bus device identifiers from the start items with the corresponding bus device identifiers and start items.
[0139] In order to better understand the start control method of the server in the embodiments of the present application, the start control method of the server in the embodiments of the present application is explained and described below in combination with some embodiments of the present application, which can but is not limited to be applicable to the embodiments of the present application.
[0140] The function of adding the setup setting PXE start network card information at the BIOS end can but is not limited to include the following contents:
[0141] 1. A PXE priority processing list module is added under the setup.
[0142] 2. A setting function is added, the information of the PXE start network card is added under the setup, DID, VID, SSID, SVID are respectively input, and the Enter key is pressed to save to the NVRAM and send to the BMC through the information storage ipmi command.
[0143] 3, Add a delete function, which can delete the information of PXE boot network card under setup, respectively input DID, VID, SSID, SVID, and press Enter key to save NVRAM and send ipmi command to BMC through information deletion.
[0144] 4, Add a function to display the set list, which reads the set PXE priority processing list from BIOS NVRAM and displays it.
[0145] Figure 6 is a schematic diagram of a server startup control method according to an embodiment of the present application. As shown in Figure 6, a bus device including a network card can be used as an example for explanation and description, which can include the following but is not limited to:
[0146] 1, Server startup.
[0147] 2, In the POST process, the PXE boot network card information is queried through the ipmi command, and the network card information list maintained by the customer on the BMC side is obtained.
[0148] 3, If the information returns successfully, go to the next step; otherwise, retry the number +1, if retry = 3 (or 5 or 8, etc.) still unsuccessful, go to step 6.
[0149] 4, Analyze the information returned by ipmi, judge the first to the seventh byte, ASCII (American Standard Code for Information Interchange) analysis is valid, judge whether it meets the PXEID header, if yes, go to the next step; otherwise, go to step 6.
[0150] 5, Analyze all PXE boot network card information, including DID, VID, SSID, SVID, and update to BIOS NVRAM.
[0151] 6, Generate BootDeviceList (BootDeviceList) through FilterBootDeviceList (FilterBootDeviceList) module, which is used to store all generated boot items.
[0152] 7, Add PxeBootAdjust module, link PxeBootAdjust module ELINK to FilterBootDeviceList module, which is used for network card PXE boot item adjustment.
[0153] 8, Add an array to store the network card device information that needs to generate PXE boot item,
[0154] typedef struct{UINT16 Did;
[0155] UINT16 Vid;
[0156] UINT16 Ssid;
[0157] UINT16 Svid;
[0158] }RESERVE_DEVICE_PXEID_LIST; and set an array ReserveDeviceList[5] to store the network card information that needs to generate PXE boot items.
[0159] 9. Use the getVariable command to read the set PXE priority list from the BIOS NVRAM. If the read value is not NULL (invalid), proceed to the next step; if it is NULL, jump to step 14.
[0160] 10. Update the DID, VID, SSID, and SVID obtained from NVRAM to ReserveDeviceList in sequence.
[0161] 11. If ReserveDeviceList is NULL, proceed to step 14; otherwise, proceed to the next step.
[0162] 12. Poll all PCIe devices in sequence. If the network card is detected, obtain the network card's DID, VID, SSID, and SVID, and continue to the next step. If the polling ends, jump to step 14.
[0163] 13. Check if there is a complete match in ReserveDeviceList based on the device DID, VID, SSID, and SVID. If there is, proceed to step 12; otherwise, obtain the corresponding device information in BootDeviceList, delete the boot entry of the corresponding device using the DeleteBootDevice function, and continue to execute step 12.
[0164] 14. Based on the information in BootDeviceList, generate the startup items in the list sequentially.
[0165] 15. End.
[0166] Through the embodiment of the present application, an interface is reserved for a customer, and the customer can set the network card information required for PXE starting according to the own demand, so that the PXE starting time is accelerated, the PXE starting of the network card is met, the maintenance of the customized version and the customized motherboard is reduced, the manpower and material resources are saved, and the customer experience and product competitiveness are improved.
[0167] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as required, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the present application.
[0168] In the embodiment, a server starting control device is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.
[0169] Fig. 7 is a structural block diagram of a server starting control device according to an embodiment of the present application. As shown in Fig. 7, the device includes a starting system applied to a server, a target storage location in the server records a reference bus device allowing the server to start an operating system according to a target network protocol, and the target storage location is set to allow the starting system to access in the case where the server is not started. The device includes:
[0170] An access module 702 is configured to access the target storage location to obtain the reference bus device in the case where the starting process of the server is controlled to run to a starting stage of the operating system;
[0171] A first detection module 704 is configured to detect a target bus device connected to the server from the reference bus device;
[0172] A generation module 706 is configured to generate a starting item corresponding to the target bus device and conforming to the target network protocol in the case where the target bus device is detected from the reference bus device;
[0173] A starting module 708 is configured to start the operating system using the starting item.
[0174] By the above device, the server records the bus devices allowing the operating system of the server to be started according to the network protocol, and the bus devices allow the system to be started to access the server without being started, and if the bus device connected by the server is found from the bus devices recorded in the server and allowing the operating system of the server to be started according to the network protocol, it can be indicated that the bus device currently connected by the server is allowed to start the operating system of the server according to the network protocol, and in this case, the start item corresponding to the bus device is generated, the operating system of the server is started according to the specified bus device according to the needs of the customer, and therefore, the problem of low efficiency of the start control of the server can be solved, and the effect of improving the start control efficiency of the server is achieved.
[0175] In an exemplary embodiment, the access module comprises:
[0176] The generating unit is configured to generate and initiate a target access request to the baseboard management controller, wherein the target access request is configured to request to access the target storage location to obtain the reference bus device, and the baseboard management controller is configured to read the data stored in the storage location on the baseboard management controller in response to the received access request;
[0177] The receiving unit is configured to receive the reference bus device returned by the baseboard management controller in response to the received target access request.
[0178] In an exemplary embodiment, the target storage location is deployed on the baseboard management controller of the server, and the above device comprises:
[0179] The receiving module is configured to receive a target adjustment request before accessing the target storage location to obtain the reference bus device, wherein the target adjustment request is configured to request to adjust the reference bus device recorded in the target storage location to the first candidate bus device;
[0180] The second detection module is configured to detect the adjustment bus device between the reference bus device and the first candidate bus device in response to the target adjustment request.
[0181] The adjustment module is configured to adjust the reference bus device recorded in the target storage location to the first candidate bus device according to the adjustment bus device.
[0182] In an exemplary embodiment, the adjustment module comprises:
[0183] The deleting unit is configured to delete the adjustment bus device from the reference bus device recorded in the target storage location to obtain the first candidate bus device; and / or,
[0184] a recording unit, configured to record the adjustment bus device in the reference bus device stored in the target storage location, to obtain a first candidate bus device.
[0185] In an exemplary embodiment, the first detecting module comprises:
[0186] a searching unit, configured to search the second bus device information of the target bus device from the first bus device information;
[0187] a determining unit, configured to determine that the target bus device is detected from the reference bus device in a case that the second bus device information is searched from the first bus device information.
[0188] In an exemplary embodiment, the searching unit is configured to:
[0189] In a case that the first bus device information comprises N pieces of bus device information, wherein N is a positive integer greater than or equal to 1, the searching unit is configured to search the second bus device information from the N pieces of bus device information by performing the following steps:
[0190] extracting an ith set of bus device attributes carried in ith bus device information of the N pieces of bus device information, and extracting target bus device attributes of the target bus device carried in the second bus device information, wherein the ith bus device information is bus device information corresponding to an ith bus device of the N bus devices, the reference bus device comprises the N bus devices, and i is a positive integer less than or equal to N;
[0191] comparing whether the ith set of bus device attributes is consistent with the target bus device attributes, to obtain a first comparison result.
[0192] In an exemplary embodiment, the apparatus further comprises:
[0193] a extracting module, configured to, after the comparison of whether the ith set of bus device attributes is consistent with the target bus device attributes obtains the first comparison result, extract an (i+1)th set of bus device attributes carried in (i+1)th bus device information of the N pieces of bus device information in a case that the first comparison result indicates that there is bus device attribute inconsistent with the target bus device attributes in the ith set of bus device attributes, wherein the (i+1)th bus device information is bus device information corresponding to an (i+1)th bus device of the N bus devices, and i+1 is a positive integer less than or equal to N;
[0194] a comparing module, configured to compare whether the (i+1)th set of bus device attributes is consistent with the target bus device attributes, to obtain a second comparison result.
[0195] In an exemplary embodiment, the generating module is configured to:
[0196] In a case where the reference bus device comprises M bus devices, and the target bus device comprises P bus devices, and the M bus devices comprise the P bus devices, and M is a positive integer, and P is a positive integer less than or equal to M, the P bus devices correspond to P start items conforming to the target network protocol are generated by performing the following steps:
[0197] The control generating component generates the P start items conforming to the target network protocol corresponding to the P bus devices, obtains the P start items, and controls the generating component to generate a start item list;
[0198] The control generating component stores the P start items into the start item list.
[0199] In an exemplary embodiment, a start module is configured to:
[0200] In a case where the target bus device comprises P bus devices, and the start items comprise the P start items corresponding to the P bus devices, and P is a positive integer less than or equal to M, the operating system is started using the P start items by performing the following steps:
[0201] The starting order corresponding to the P start items is detected;
[0202] The operating system is started using a first start item in the starting order in the P start items;
[0203] In a case where the operating system fails to be started using the first start item, the operating system is started using a next start item in the starting order after the first start item.
[0204] In an exemplary embodiment, the apparatus further comprises:
[0205] A third detection module is configured to, after the operating system is started using the start item, in a case where the reference bus device is adjusted to a second candidate bus device recorded on the target storage location, detect a difference bus device between the second candidate bus device and the reference bus device, wherein the difference bus device is a bus device different between the second candidate bus device and the reference bus device;
[0206] A deletion module is configured to delete a start item corresponding to the difference bus device from the start item.
[0207] In an exemplary embodiment, the deletion module is configured to:
[0208] In a case where the start item comprises P start items, and the difference bus device comprises R bus devices, and P is a positive integer less than or equal to M, and R is a positive integer, the R start items corresponding to the R bus devices are deleted from the P start items by performing the following steps:
[0209] The control adjustment component finds R boot items corresponding to the R bus devices from the P boot items.
[0210] The control adjustment component deletes the R boot items.
[0211] It should be noted that the above modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above modules are located in the same processor; or the above modules are located in different processors in any combination.
[0212] Embodiments of the present application also provide a computer nonvolatile readable storage medium, which stores a computer program, and the computer program is configured to execute the steps in any of the above method embodiments when running.
[0213] In an exemplary embodiment, the above computer nonvolatile readable storage medium can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0214] Embodiments of the present application also provide an electronic device, which includes a memory storing a computer program and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
[0215] In an exemplary embodiment, the above electronic device can further include a transmission device connected to the processor and an input / output device connected to the processor.
[0216] Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the above method embodiments.
[0217] Embodiments of the present application also provide another computer program product, which includes a computer nonvolatile readable storage medium storing a computer program, and the computer program is executed by a processor to implement the steps in any of the above method embodiments.
[0218] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a computer nonvolatile readable storage medium; a processor of a computer device reads the computer instructions from the computer nonvolatile readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the method embodiments.
[0219] The specific examples in the embodiment can refer to the examples described in the above embodiments and exemplary embodiments, and the embodiment will not be described herein again.
[0220] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, which can be realized by program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different order, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0221] The above is only the preferred embodiment of the present application, and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling booting of a server, the method comprising: applying a booting system to the server, wherein a target storage location in the server records a reference bus device that allows the server to boot an operating system according to a target network protocol, and the target storage location is configured to allow the booting system to access when the server is not booted; accessing the target storage location to obtain the reference bus device when a booting process of the server is controlled to run to a booting stage of the operating system; detecting a target bus device connected to the server from the reference bus device; generating a boot item corresponding to the target bus device according to the target network protocol when the target bus device is detected from the reference bus device; and booting the operating system using the boot item.
2. The method of claim 1, wherein the target storage location is deployed on a baseboard management controller of the server, and the accessing the target storage location to obtain the reference bus device comprises: generating and initiating a target access request to the baseboard management controller, wherein the target access request is configured to request to access the target storage location to obtain the reference bus device, and the baseboard management controller is configured to read data stored in a storage location on the baseboard management controller in response to the received access request; and receiving the reference bus device returned by the baseboard management controller in response to the received target access request.
3. The method of claim 1, wherein the target storage location is deployed on a baseboard management controller of the server, and the method further comprises, before the accessing the target storage location to obtain the reference bus device: receiving a target adjustment request, wherein the target adjustment request is configured to request to adjust the reference bus device recorded in the target storage location to a first candidate bus device; detecting an adjustment bus device between the reference bus device and the first candidate bus device in response to the target adjustment request; and adjusting the reference bus device recorded in the target storage location to the first candidate bus device according to the adjustment bus device.
4. The method of claim 3, wherein the adjusting the reference bus device recorded in the target storage location to the first candidate bus device according to the adjustment bus device comprises: deleting the adjustment bus device from the reference bus device recorded in the target storage location to obtain the first candidate bus device; and / or recording the adjustment bus device in the reference bus device recorded in the target storage location to obtain the first candidate bus device.
5. The method of claim 1, wherein the target storage location records first bus device information corresponding to the reference bus device, and the detecting the target bus device connected to the server from the reference bus device comprises: finding second bus device information of the target bus device from the first bus device information; in a case where the second bus device information is found from the first bus device information, determining that the target bus device is detected from the reference bus device.
6. The method of claim 5, wherein the finding the second bus device information of the target bus device from the first bus device information comprises, in a case where the first bus device information comprises N pieces of bus device information, finding the second bus device information from the N pieces of bus device information by performing the following steps, where N is a positive integer greater than or equal to 1: extracting an i-th set of bus device attributes carried in i-th bus device information of the N pieces of bus device information, and extracting target bus device attributes of the target bus device carried in the second bus device information, where the i-th bus device information is bus device information corresponding to an i-th bus device of N bus devices, the reference bus device comprises the N bus devices, and i is a positive integer less than or equal to N; comparing whether the i-th set of bus device attributes and the target bus device attributes are consistent, to obtain a first comparison result.
7. The method of claim 6, wherein after the comparing whether the i-th set of bus device attributes and the target bus device attributes are consistent, to obtain the first comparison result, the method further comprises: in a case where the first comparison result is configured to indicate that there is a bus device attribute in the i-th set of bus device attributes that is inconsistent with the target bus device attributes, extracting an i+1-th set of bus device attributes carried in i+1-th bus device information of the N pieces of bus device information, where the i+1-th bus device information is bus device information corresponding to an i+1-th bus device of the N bus devices, i+1 is a positive integer less than or equal to N; and comparing whether the i+1-th set of bus device attributes and the target bus device attributes are consistent, to obtain a second comparison result.
8. The method of claim 1, wherein the starting system has a generation component deployed therein, and the generating, in a case where the target bus device is detected from the reference bus device, a starting item corresponding to the target bus device and conforming to the target network protocol comprises: in a case where the reference bus device comprises M bus devices and the target bus device comprises P bus devices, generating, by performing the following steps, starting items corresponding to the P bus devices and conforming to the target network protocol, where the M bus devices comprise the P bus devices, M is a positive integer, and P is a positive integer less than or equal to M: controlling the generation component to generate the starting items corresponding to the P bus devices and conforming to the target network protocol, to obtain P starting items, and controlling the generation component to generate a starting item list; and controlling the generation component to store the P starting items into the starting item list.
9. The method of claim 1, wherein The starting the operating system by using the starting item comprises: in a case where the target bus device comprises P bus devices, and the starting item comprises P starting items corresponding to the P bus devices, wherein P is a positive integer less than or equal to M, starting the operating system by using the P starting items, comprising: detecting a starting order corresponding to the P starting items; starting the operating system by using a first starting item in the starting order among the P starting items; and in a case where starting the operating system by using the first starting item fails, starting the operating system by using a next starting item in the starting order after the first starting item.
10. The method of claim 1, wherein, after the starting the operating system by using the starting item, the method further comprises: in a case where the reference bus device recorded on the target storage location is adjusted to a second candidate bus device, detecting a difference bus device between the second candidate bus device and the reference bus device, wherein the difference bus device is a bus device different between the second candidate bus device and the reference bus device; and deleting a starting item corresponding to the difference bus device from the starting item.
11. The method of claim 10, wherein, the starting system is deployed with an adjustment component, and the deleting the starting item corresponding to the difference bus device from the starting item comprises: in a case where the starting item comprises P starting items, and the difference bus device comprises R bus devices, deleting R starting items corresponding to the R bus devices from the P starting items, wherein P is a positive integer less than or equal to M, and R is a positive integer, comprising: controlling the adjustment component to find the R starting items corresponding to the R bus devices from the P starting items; and controlling the adjustment component to delete the R starting items.
12. The method of claim 1, wherein, the detecting the target bus device connected by the server from the reference bus device comprises: finding the target bus device from the reference bus device in a polling manner.
13. The method of claim 6, wherein, the comparing whether the i-th group of bus device attributes and the target bus device attributes are consistent comprises: in a case where a third number of bus device attributes included in the i-th group of bus device attributes is same as a fourth number of bus device attributes included in the target bus device attributes, and each bus device attribute included in the i-th group of bus device attributes is same as a corresponding bus device attribute in the target bus device attributes, determining that the i-th group of bus device attributes and the target bus device attributes are consistent.
14. The method of claim 6, wherein, the comparing whether the i-th group of bus device attributes and the target bus device attributes are consistent further comprises: In a case where the third number of bus device attributes included in the i-th group of bus device attributes is different from the fourth number of bus device attributes included in the target bus device attributes, and / or in a case where at least one of the bus device attributes included in the i-th group of bus device attributes is different from the bus device attributes in the target bus device attributes, it is determined that the i-th group of bus device attributes is inconsistent with the target bus device attributes.
15. The method of claim 6, wherein, The bus device attributes include a device identifier of the bus device and a device type of the bus device.
16. The method of claim 10, wherein, The startup system is deployed with a generation component, and the method further includes: In a case where the difference bus device is included in the second candidate bus device and is not included in the reference bus device, the generation component is controlled to generate a startup item corresponding to the difference bus device.
17. An apparatus for controlling startup of a server, applied to a startup system of a server, wherein a target storage location in the server records a reference bus device allowing an operating system of the server to be started according to a target network protocol, the target storage location is configured to allow the startup system to access in a case where the server is not started, and the apparatus includes: an accessing module configured to access the target storage location to obtain the reference bus device in a case where a startup process of the server is controlled to run to a startup stage of the operating system; a first detecting module configured to detect a target bus device connected to the server from the reference bus device; a generating module configured to generate a startup item corresponding to the target bus device and conforming to the target network protocol in a case where the target bus device is detected from the reference bus device; a starting module configured to start the operating system using the startup item.
18. A computer non-volatile readable storage medium, wherein the computer non-volatile readable storage medium stores a computer program, and the computer program is executed by a processor to implement steps of the method in any one of claims 1 to 16.
19. An electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement steps of the method in any one of claims 1 to 16.
20. A computer program product, including a computer program, wherein the computer program is executed by a processor to implement steps of the method in any one of claims 1 to 16.
Citation Information
Patent Citations
Server system and operation system starting method and starting management node of server system
CN103516800A
Starting item management method and device of operating system and server
CN116225548A
Hot plug control method and device for server bus equipment and electronic equipment
CN118394697A
Server starting control method and device, storage medium and electronic equipment
CN118642763A
Remote deployment of operating systems
US20200133686A1