Methods, devices, equipment and media for controlling the boot sequence of network interface cards (NICs)

By checking the verification variables and BIOS option status after BIOS startup, the network card boot order is adjusted, which solves the problem of network card out-of-order boot in ARM architecture servers, ensuring that the order is consistent every time it starts up, thus improving user experience and productivity.

CN116360871BActive Publication Date: 2026-07-17INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2023-03-30
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

In ARM architecture servers, the network card boot order is prone to being out of order, and due to the limitations of the BIOS firmware architecture, it cannot be reordered, resulting in wasted human resources and low production line efficiency.

Method used

After the BIOS boots up, the system uses a check variable to determine if it is greater than a preset value, thus verifying the matching of the network card access information with the preset information. It then adjusts the boot order priority and enable status of BIOS options, adjusts the network card boot order according to user input commands, and saves the reordered order.

Benefits of technology

It ensures that the network interface card group maintains a consistent order each time it starts up, avoiding out-of-order situations, improving the user experience and meeting the actual needs of the data center.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116360871B_ABST
    Figure CN116360871B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and medium for controlling the boot order of network interface cards (NICs), relating to the field of server applications. The method includes: starting the Basic Input / Output System (BIOS); determining the access information of all current NICs when a verification variable is greater than or equal to a preset value; determining the enabled state of a fixed boot order priority in the BIOS options when the access information does not match the preset information; and adjusting the NIC boot order according to a first input instruction when the enabled state is disabled. The verification variable has a preset attribute that the BIOS automatically clears to zero without retaining configuration updates. This invention ensures that the order within the NIC group remains consistent each time it boots, avoiding out-of-order situations caused by various reasons during NIC sorting, thus avoiding impact on the actual usage needs of customer data centers and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of server applications, and in particular to a method, apparatus, device, and medium for controlling the boot sequence of network interface cards (NICs). Background Technology

[0002] Currently, the most critical aspect of data center deployment is the Preboot Execution Environment (PXE) boot function of the network interface card (NIC). Some data centers use Internet Protocol Version 4 (IPv4) boot environments, while others use Internet Protocol Version 6 (IPv6) boot environments. This necessitates that some customers prioritize IPv4 or IPv6 boot to meet their data center requirements. However, due to the limitations of its firmware architecture, the firmware of Advanced RISC Machines (ARM) servers stores the NIC boot order in the first 4MB of the Basic Input Output System (BIOS). Even without retaining configuration updates, it is impossible to delete and reorder the boot order, resulting in wasted human resources and low production line efficiency. Summary of the Invention

[0003] This invention provides a method, apparatus, device, and medium for controlling the boot order of network cards, in order to solve the technical defects of the prior art that cannot solve the problem of disordered boot order of network cards in ARM architecture, and provides a technical solution for reordering network cards by triggering a check variable.

[0004] In a first aspect, the present invention provides a method for controlling the boot order of a network interface card (NIC), comprising:

[0005] The BIOS (Basic Input / Output System) is started, and if the verification variable is greater than or equal to the preset value, the access information of all network cards is determined.

[0006] If the access information does not match the preset information, determine the enabled state of the fixed boot order priority in the BIOS options;

[0007] When the enabled state is disabled, the network card startup order is adjusted according to the first input command;

[0008] The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

[0009] According to the network card boot order control method provided by the present invention, after booting the target server's Basic Input / Output System (BIOS), the method further includes:

[0010] If the verification variable is less than the preset value, the preset network card startup order is invoked to reorder all current network cards.

[0011] Save the reordered network card boot order and start the operating system (OS);

[0012] The preset value is determined by the maximum number of restarts after a BIOS verification fails.

[0013] According to the network interface card (NIC) startup order control method provided by the present invention, after determining the access information of all current NICs, it further includes:

[0014] If the access information matches the preset information, the preset network card startup order is invoked to reorder all current network cards.

[0015] Save the reordered network card boot order and start the operating system (OS).

[0016] The network card boot order control method provided by the present invention, after determining the enabled state of the fixed boot order priority in the BIOS options, further includes:

[0017] When the enabled state is enabled, the preset network card startup order is invoked to reorder all current network cards;

[0018] Save the reordered network card boot order and start the operating system (OS).

[0019] The network card boot order control method provided by the present invention further includes, after booting the Basic Input / Output System BIOS:

[0020] In the case of enumerating the PCI standard for peripheral component interconnection, identify the unique identifier corresponding to each network card;

[0021] Sort the unique identifiers corresponding to each network card in ascending order to obtain the preset network card boot order;

[0022] The unique identifier includes the PCI device's segment number (Segment), bus number (Bus), device number (Dev), and function number (Fun).

[0023] The network card boot order control method provided by the present invention further includes, before determining the enabled state of the fixed boot order priority in the BIOS options:

[0024] Receive the second input command;

[0025] The second input command is used to instruct the user to disable the fixed boot order priority in the BIOS options.

[0026] Alternatively, it can be used to indicate whether the disabled state of the fixed boot order priority in the BIOS options is enabled.

[0027] The network card boot order control method provided by the present invention, after adjusting the network card boot order according to the first input instruction, further includes:

[0028] Save the reordered network card boot order and start the operating system (OS).

[0029] Secondly, a device for controlling the boot order of a network interface card (NIC) is provided, comprising:

[0030] First determining unit: used to start the basic input / output system BIOS, and determine the access information of all network cards when the verification variable is greater than or equal to the preset value;

[0031] The second determining unit is used to determine the enabled state of the fixed boot order priority in the BIOS options when the access information does not match the preset information.

[0032] Adjustment unit: used to adjust the network card startup order according to the first input command when the enabled state is disabled;

[0033] The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

[0034] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for controlling the network card boot order.

[0035] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the network card startup sequence control method as described above.

[0036] This invention provides a method, apparatus, device, and medium for controlling the boot order of network cards. After the BIOS is started, the invention utilizes the characteristic that the boot count variable is cleared when the BIOS does not retain configuration updates to determine whether the verification variable is greater than or equal to a preset value. In the current boot state, it sequentially determines whether a new network card is added and whether the fixed boot order priority in the BIOS options is enabled. This invention enables adjustments to the network card boot order based on the actual needs of the user. This invention ensures that the order within the network card group remains consistent each time it starts, avoiding disordered network card sorting due to various reasons, and preventing impact on the actual usage needs of the customer's data center, thereby improving the user experience. Attached Figure Description

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

[0038] Figure 1 This is one of the flowcharts illustrating the method for controlling the network card startup order provided by the present invention;

[0039] Figure 2 This is the second flowchart illustrating the method for controlling the network card startup sequence provided by the present invention;

[0040] Figure 3 This is the third flowchart illustrating the method for controlling the network card startup order provided by this invention;

[0041] Figure 4 This is the fourth flowchart illustrating the method for controlling the network card startup sequence provided by this invention;

[0042] Figure 5 This is the fifth flowchart illustrating the method for controlling the network card startup order provided by the present invention;

[0043] Figure 6 This is the sixth flowchart illustrating the method for controlling the network card startup sequence provided by this invention;

[0044] Figure 7 This is a schematic diagram of the control device for the network card boot sequence provided by the present invention;

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

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

[0047] Network functionality is a fundamental and essential feature in any server architecture. It involves basic functions such as remote network connection, remote management, data communication, and data processing. If the network card boot order is out of order during motherboard production testing, the same problem will occur during the production of complete machines on the production line and cannot be fixed. In this case, manual modification is required. Out-of-order network card boot order can occur in motherboard manufacturers, production lines, and data centers, resulting in wasted human resources and low production line efficiency, which affects work efficiency.

[0048] To address the aforementioned technical problems, this invention provides a method, apparatus, device, and medium for controlling the boot sequence of a network interface card (NIC). Figure 1 This is one of the flowcharts illustrating the network card boot order control method provided by the present invention. The present invention provides a network card boot order control method, comprising:

[0049] Step 101: Start the Basic Input / Output System BIOS. If the verification variable is greater than or equal to the preset value, determine the access information of all network cards.

[0050] Step 102: If the access information does not match the preset information, determine the enabled state of the fixed boot order priority in the BIOS options;

[0051] Step 103: When the enabled state is disabled, adjust the network card startup order according to the first input command;

[0052] The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

[0053] In step 101, after the Basic Input / Output System (BIOS) is started, it does not directly perform a group reordering. Instead, a preset judgment procedure is used. This procedure has three judgment steps with corresponding priorities. For example, in the highest priority step, a verification variable is first judged. This verification variable has a preset attribute that the BIOS automatically clears to zero if it does not retain configuration updates. Those skilled in the art understand that in ARM architecture servers, the integrity of the configuration is verified through initial verification. If the verification fails, the BIOS will restart, and the restart count will increase. For example, if the verification fails on the first BIOS restart, the verification variable will become 1. The preset value can optionally be 3. If the verification still fails after the BIOS restarts three times, it is considered that the BIOS has not been updated, and the preset judgment procedure needs to be triggered to control the network card boot order. If the verification succeeds, it is considered that the BIOS has been updated without retaining the configuration. At this time, based on the preset attribute that the verification variable automatically clears to zero if it does not retain the configuration updates, the verification variable will become 0, and the preset judgment procedure does not need to be triggered.

[0054] In some embodiments, if the BIOS restarts twice during the verification process and the verification is successful, the verification variable will become 2, which is less than the preset value of 3. At this time, it is considered that the BIOS has been updated without retaining the configuration, and there is no need to trigger the preset judgment procedure.

[0055] In an optional embodiment, if the verification variable is greater than or equal to 3, the access information of all current network cards is determined. The access information of all current network cards includes the basic attributes of each network card, including network card type, network card name, or number of network cards.

[0056] In step 102, if the access information does not match the preset information, the enabled state of the fixed boot order priority in the BIOS options is determined. If the access information is a network card type, it is determined whether the type of each network card at this time matches the preset network card type. If they do not match, it is considered that a new network card has been added. If the access information is a network card name, it is determined whether the name of each network card at this time matches the preset network card name. If they do not match, it is considered that a new network card has been added. If the access information is the number of network cards, it is determined whether the number of all network cards at this time matches the number of network cards recorded last time. If they do not match, it is considered that a new network card has been added.

[0057] In the preset judgment program, the present invention first performs the highest priority verification process, and then performs the second priority matching process of the access information of all current network cards. Thus, the network card startup sorting takes into account the situation where the network card does not retain configuration updates and whether there are newly added network cards. For the final priority, it also needs to take into account whether there is a user modification requirement for the network card. In this step, the enabled state of the fixed startup order priority in the BIOS option is also considered.

[0058] The Fixed Boot Order Control is an option in the BIOS. By determining the enabled state of the Fixed Boot Order Control, the user's actual needs can be obtained, that is, whether the user needs to control the network card boot order by manually adjusting the network card boot order. The enabled state of the Fixed Boot Order Control includes two states: enabled and disabled.

[0059] In step 103, when the enabled state is disabled, the network card startup order is adjusted according to the first input instruction. The first input instruction is input information from the user to customize the startup order of all current network cards, which can instruct and adjust the network card startup order once or multiple times according to the user's needs. For example, in the ARM server architecture, there are a first network card, a second network card, and a third network card arranged from left to right. Adjusting the network card startup order based on the first input instruction changes the startup order in the ARM server architecture to a third network card, a second network card, and a first network card arranged from left to right.

[0060] Optionally, before determining the enabled state of the fixed boot order priority in the BIOS options, the following is also included:

[0061] Receive the second input command;

[0062] The second input command is used to instruct the user to disable the fixed boot order priority in the BIOS options.

[0063] Alternatively, it can be used to indicate whether the disabled state of the fixed boot order priority in the BIOS options is enabled.

[0064] In this invention, the enabling state of the fixed boot order priority in the BIOS option can be switched before determining the enabling state of the fixed boot order priority in the BIOS option. Specifically, the production requirements can be determined based on the batch servers currently executing production on the production line, and then it can be determined whether it is necessary to switch the enabling state of the fixed boot order priority in the BIOS option.

[0065] Optionally, after adjusting the network card boot order according to the first input command, the method further includes:

[0066] Save the reordered network card boot order and start the operating system (OS).

[0067] After adjusting the network card boot order according to the first input command, the user has adjusted the boot order of all network cards according to actual needs. After the adjustment is completed, the corresponding configuration of the reordered network card boot order is saved, and then the operating system (OS) is restarted. In an optional embodiment, during the restart of the operating system (OS), the process returns to step 101, that is, the basic input / output system (BIOS) is started and the verification variables are judged. At this time, since the network card boot order has been changed, the operating system will be started normally according to the changed network card boot order.

[0068] This invention solves the technical problem of network card boot order being prone to disorder in ARM architecture servers, and the root cause being difficult to identify and reproduce. It also addresses the issue that the ARM architecture, due to its BIOS image architecture, cannot clear the network card boot order when disorder occurs. Those skilled in the art will understand that this invention, in addition to the reasons mentioned above, also considers the order of newly added network card boots, especially for non-standard PCI network cards, such as HCA cards or IB cards, which have network card functionality but are not true network cards. Specifically, for non-standard PCI network cards, their network card drivers need to be switched to the IB card driver or the network card driver. If not switched to the network card driver, only IPv4 network boot functionality is available, leading to a new problem: when an HCA card is connected and only has IPv4 network boot functionality, replacing it with a standard network card with the same chip in the same PCI slot will support both IPv4 and IPv6, resulting in disordered network card boot order.

[0069] Based on the aforementioned technical issues, this invention statistically analyzes the number of boots after BIOS configuration updates without retaining the boot count, and determines whether to trigger the network boot order reordering function based on the boot count. Furthermore, this invention also considers that adding a new network card should trigger the network boot order reordering function. If none of the above checks are met, a third priority check is performed, thus adding support for manually modifying the boot order based on user needs in special circumstances. This manual adjustment maintains the effectiveness and reliability of the boot order. Optionally, this invention introduces an option to support dynamic network card sorting through the above three conditions with different priority levels.

[0070] This invention provides a method, apparatus, device, and medium for controlling the boot order of network cards. After the BIOS is started, the invention utilizes the characteristic that the boot count variable is cleared when the BIOS does not retain configuration updates to determine whether the verification variable is greater than or equal to a preset value. In the current boot state, it sequentially determines whether a new network card is added and whether the fixed boot order priority in the BIOS options is enabled. This invention enables adjustments to the network card boot order based on the actual needs of the user. This invention ensures that the order within the network card group remains consistent each time it starts, avoiding disordered network card sorting due to various reasons, and preventing impact on the actual usage needs of the customer's data center, thereby improving the user experience.

[0071] Figure 2 This is a second flowchart illustrating the network card boot sequence control method provided by the present invention. After booting the target server's Basic Input / Output System (BIOS), it further includes:

[0072] Step 201: If the verification variable is less than the preset value, call the preset network card startup order and reorder all current network cards;

[0073] Step 202: Save the reordered network card boot order and start the operating system (OS);

[0074] The preset value is determined by the maximum number of restarts after a BIOS verification fails.

[0075] In step 201, the preset value can optionally be 3, which is determined by the maximum number of restarts after a BIOS verification failure. That is, when the verification variable is less than the preset value, there are actually three states: the first is that the BIOS verification passes directly, and the verification variable is 0; the second is that the BIOS verification fails, the BIOS restarts, and the verification succeeds after another attempt, and the verification variable is 1; the third is that the BIOS verification fails, the BIOS restarts, the BIOS verification fails again, the BIOS restarts again, and the verification succeeds after another attempt, and the verification variable is 2.

[0076] If the BIOS verification of the server configuration file is successful, the system will not restart. At this point, the BIOS is considered to have retained the configuration update and can call the preset network card boot order. There is no need to perform operations such as whether network cards have been added, the fixed boot order priority in the BIOS options, or whether the network card boot order needs to be manually adjusted according to user needs. The system will directly reorder all network cards according to the preset network card boot order.

[0077] In step 202, after reordering all network cards, in order to ensure that the network card startup order adjustment takes effect, the reordered network card startup order needs to be saved. Based on the saved reordered network card startup order, the operating system (OS) is started to ensure that the network card startup order remains consistent at any stage and at any time, thus meeting the actual business needs of the customer's data center.

[0078] Figure 3 This is the third flowchart of the network card startup order control method provided by the present invention. After determining the access information of all current network cards, it also includes:

[0079] Step 301: If the access information matches the preset information, call the preset network card startup order to reorder all current network cards;

[0080] Step 302: Save the reordered network card boot order and start the operating system (OS).

[0081] In step 301, this step involves starting the Basic Input / Output System (BIOS) and, if the verification variable is greater than or equal to a preset value, determining the access information of all network cards. Specifically, after determining the access information of all network cards, this step represents the implementation plan for situations where the access information matches the preset information, relative to the implementation plan for situations where the access information does not match the preset information. The preset value can optionally be 3 or 4, and is determined by the maximum number of restarts after a BIOS verification failure. If the preset value is 4, meaning the verification variable is less than 4, it actually includes four different states. The verification states are as follows: First, the BIOS verification passes directly, and the verification variable is 0. Second, the BIOS verification fails, the BIOS is restarted, and the verification succeeds on the second attempt, and the verification variable is 1. Third, the BIOS verification fails, the BIOS is restarted, the BIOS verification fails again, the BIOS is restarted again, and the verification succeeds on the third attempt, and the verification variable is 2. Fourth, the BIOS verification fails, the BIOS is restarted, the BIOS verification fails again, the BIOS is restarted again, the verification fails on the fourth attempt, the BIOS is restarted again, and the verification succeeds on the fifth attempt, and the verification variable is 3.

[0082] In step 302, the preset network card startup order is invoked to reorder all current network cards. To ensure that the network card startup order adjustment takes effect, the reordered network card startup order needs to be saved. Based on the saved reordered network card startup order, the operating system (OS) is started to meet the actual business needs of the customer's data center.

[0083] Figure 4This is the fourth flowchart of the network card boot order control method provided by the present invention. After determining the enabled state of the fixed boot order priority in the BIOS options, it also includes:

[0084] Step 401: When the enabled state is enabled, call the preset network card startup order to reorder all current network cards;

[0085] Step 402: Save the reordered network card boot order and start the operating system (OS).

[0086] In step 401, the BIOS is started. If the verification variable is greater than or equal to a preset value, the access information of all network cards is determined. If the access information does not match the preset information, the enabled state of the fixed boot order priority in the BIOS options is determined. If the enabled state is disabled, it is assumed that the user needs to adjust the network card boot order by default. At this time, the network card boot order can be adjusted according to the first input command. If the enabled state is enabled, the preset network card boot order is invoked to reorder all network cards. Step 401 can refer to the aforementioned steps 201 or 301. Optionally, the reordering function within the IPv6 / IPv4 group is executed. The IPv6 / IPv4 groups are sorted in ascending order according to the unique PCI identifier. This will not be elaborated here.

[0087] In step 402, after step 401 is completed, the preset network card startup order is reordered. In order to ensure that the network card startup order adjustment takes effect, the reordered network card startup order needs to be saved. Based on the saved reordered network card startup order, the operating system (OS) is started to meet the actual business needs of the customer's data center.

[0088] Figure 5 This is the fifth flowchart of the network card boot sequence control method provided by the present invention. After booting the Basic Input / Output System (BIOS), it also includes:

[0089] Step 501: In the case of enumerating the PCI standard for peripheral component interconnection, identify the unique identifier corresponding to each network card;

[0090] Step 502: Sort the unique identifiers corresponding to each network card in ascending order to obtain the preset network card startup order;

[0091] The unique identifier includes the PCI device's segment number (Segment), bus number (Bus), device number (Dev), and function number (Fun).

[0092] In step 501, after the system is reset, powered on, or restarted, the PCIe bus is first scanned to enumerate all devices connected to the bus. In the case of enumerating the PCIe peripheral interconnect standard, a unique identifier is identified for each network card. This unique identifier includes the PCI device's segment number, bus number, device number, and function number.

[0093] In step 502, the unique identifiers corresponding to each network card are sorted in ascending order to obtain the preset network card startup order. At this point, the determination of the preset network card startup order is completed.

[0094] This invention, having determined the preset network card boot order, will primarily be used in the following three situations:

[0095] In the first scenario, after starting the target server's Basic Input / Output System (BIOS), a verification variable is obtained. If the verification variable is less than a preset value, the preset network card boot order is called to reorder all current network cards, the reordered network card boot order is saved, and the operating system (OS) is started.

[0096] In the second scenario, the BIOS is started. If the verification variable is greater than or equal to the preset value, the access information of all network cards is determined. That is, after determining the access information of all network cards, if the access information matches the preset information, the preset network card boot order is called to reorder all network cards. The reordered network card boot order is saved, and the operating system OS is started.

[0097] The third scenario involves starting the Basic Input / Output System (BIOS). If the verification variable is greater than or equal to a preset value, the system determines the access information of all network cards. If the access information does not match the preset information, the system determines the enabled state of the fixed boot order priority in the BIOS options. If the enabled state is enabled, the system calls the preset network card boot order, reorders all network cards, saves the reordered network card boot order, and starts the operating system (OS).

[0098] To address the limitations of BIOS firmware architecture in ARM architecture, the functionalities of switching HCA cards to IB cards or standard network cards, the need to modify network card boot order according to user requirements, and the challenges of motherboard manufacturing, system delivery to data centers, all these require consideration of various factors affecting network card boot order. Furthermore, maintaining consistent boot order across different environments is also crucial. Therefore, this invention leverages the characteristic that the boot count variable is reset to zero when the BIOS does not retain configuration updates and the characteristic of adding a new network card to trigger a reordering function for network cards. This ensures that the boot order remains consistent at any stage and at any time. Simultaneously, it satisfies the requirement to adjust the network card boot order even when the fixed boot order priority setting in the BIOS options is disabled. This invention determines the network card boot order based on whether it is the first boot after an update, whether a network card has been added, and whether the BIOS options are enabled. It then confirms that the network card boot order is sorted in ascending order according to the PCI device segment number (Segment), bus number (Bus), device number (Dev), and function number (Fun) within the group to meet actual customer needs.

[0099] Figure 6 This is the sixth flowchart of the network card boot order control method provided by the present invention. After the BIOS starts, it is determined whether the number of BIOS boots is less than 3. If so, the group reordering function is executed. The IPv6 / IPv4 groups are sorted according to the unique identifier and then the system starts normally and enters the operating system.

[0100] If the BIOS boot count is greater than 3, check if any new network cards have been added. If so, perform a group reordering function, sorting the IPv6 / IPv4 groups according to their unique identifiers, and booting into the operating system normally. If not, check if the fixed boot order priority is enabled.

[0101] If the fixed startup order priority is enabled, the group reordering function is executed, and the IPv6 / IPv4 groups are sorted according to the unique identifier, and the system starts normally and enters the operating system. If the fixed startup order priority is disabled, the network card startup order is adjusted according to the first input command, the changes are kept and the system is restarted. During the restart process, the operating system restarts.

[0102] Specifically, because the verification variables in the ARM architecture are automatically cleared to 0 when the configuration is not retained, upon the first boot after the update, the verification variables are read to see if they are less than a fixed value of 3. If they are greater than 3, it is determined that the BIOS has not been updated; if they are less than 3, it is considered that the BIOS has been updated without retaining the configuration. When the BIOS starts, it checks the network cards during PCI enumeration to see if any new network cards have been added. If so, the network card reordering function is triggered; otherwise, it is not triggered. If the fixed boot order priority in the BIOS options is enabled by default, the network card reordering function is triggered; if the setting is disabled, it is not triggered. When the fixed boot order priority in the BIOS options is disabled, the network card boot order can be arbitrarily ordered according to actual needs. After setting, save and restart. Do not enable this setting after modification, otherwise the reordering function will still be triggered.

[0103] Even when the fixed boot order priority in the BIOS options is disabled, the reordering function can still be performed after the verification variable is less than a fixed value. In this invention, the priority of reading the BIOS boot count is higher than the priority of adding a network card, and the priority of adding a network card is higher than the priority of determining whether the fixed boot order priority in the BIOS options is enabled. Only when none of the above steps are met can the network card boot order be manually adjusted according to the user's actual needs.

[0104] Figure 7 This is a schematic diagram of the network card startup sequence control device provided by the present invention. The present invention provides a network card startup sequence control device, including a first determining unit 1: used to start the basic input / output system BIOS, and determine the access information of all network cards when the verification variable is greater than or equal to a preset value. The working principle of the first determining unit 1 can be referred to the aforementioned step 101, and will not be repeated here.

[0105] The network card boot order control device further includes a second determining unit 2: used to determine the enabled state of the fixed boot order priority in the BIOS option when the access information does not match the preset information. The working principle of the second determining unit 2 can be referred to the aforementioned step 102, and will not be repeated here.

[0106] The network card startup sequence control device further includes an adjustment unit 3: used to adjust the network card startup sequence according to the first input command when the enabled state is disabled. The working principle of the second determination unit 3 can be referred to the aforementioned step 103, and will not be repeated here.

[0107] The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

[0108] This invention statistically analyzes the number of times the BIOS does not retain configuration updates. The first high-priority condition is that the boot process cannot perform a restart operation. If this condition is not met, it checks if a new network card is connected; if so, it performs a network card reordering function. This is the second high-priority condition. If neither of these two high-priority conditions is met, it checks the fixed boot order priority setting in the BIOS options. If the setting is enabled, it performs a reordering function; if it is disabled, it performs a manual modification function. This invention is applicable to server products with ARM architecture-restricted BIOS firmware architecture. By using three different priority conditions to sort network card functions, the boot order within the IPv6 or IPv4 group of network cards remains fixed each time, meeting the actual business needs of customer data centers.

[0109] This invention is highly reproducible and scalable. By adding three conditions—a BIOS update condition, whether a network card has been added, and BIOS option settings—it reorders the network card functions within the IPv6 / IPv4 group during the boot process. This ensures a consistent order within the network card group each time the system boots, preventing out-of-order issues caused by various reasons that could affect the actual usage needs of customer data centers. This invention is widely applicable to server products where the non-volatile random access memory (NVRAM) area of ​​the ARM architecture BIOS firmware cannot be cleared. Using the method and apparatus provided by this invention, the boot order of the network cards can be reordered each time, which helps reduce data center operation and maintenance costs, improves the timeliness of network PXE system installation, and facilitates the deployment of multi-network card ARM architecture servers by Internet users after large-scale procurement.

[0110] This invention provides a method, apparatus, device, and medium for controlling the boot order of network cards. After the BIOS is started, the invention utilizes the characteristic that the boot count variable is cleared when the BIOS does not retain configuration updates to determine whether the verification variable is greater than or equal to a preset value. In the current boot state, it sequentially determines whether a new network card is added and whether the fixed boot order priority in the BIOS options is enabled. This invention enables adjustments to the network card boot order based on the actual needs of the user. This invention ensures that the order within the network card group remains consistent each time it starts, avoiding disordered network card sorting due to various reasons, and preventing impact on the actual usage needs of the customer's data center, thereby improving the user experience.

[0111] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. For example... Figure 8As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a method for controlling the network card boot order. This method includes: starting the Basic Input / Output System (BIOS); determining the access information of all network cards if a verification variable is greater than or equal to a preset value; determining the enabling state of a fixed boot order priority in the BIOS options if the access information does not match the preset information; and adjusting the network card boot order according to a first input instruction if the enabling state is disabled. The verification variable has a preset attribute that the BIOS automatically clears it without retaining configuration updates.

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

[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a network card boot order control method provided by the above methods. The method includes: starting the Basic Input / Output System (BIOS); determining the access information of all current network cards when a verification variable is greater than or equal to a preset value; determining the enabling state of a fixed boot order priority in the BIOS options when the access information does not match the preset information; and adjusting the network card boot order according to a first input instruction when the enabling state is disabled. The verification variable has a preset attribute that the BIOS automatically clears it without retaining configuration updates.

[0114] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for controlling the network card boot order provided by the above methods. The method includes: starting the Basic Input / Output System (BIOS); determining the access information of all current network cards when a verification variable is greater than or equal to a preset value; determining the enabling state of a fixed boot order priority in the BIOS options when the access information does not match the preset information; and adjusting the network card boot order according to a first input instruction when the enabling state is disabled. The verification variable has a preset attribute that the BIOS automatically clears it without retaining configuration updates.

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

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

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

Claims

1. A method for controlling the boot order of a network interface card (NIC), characterized in that, include: The BIOS (Basic Input / Output System) is started, and if the verification variable is greater than or equal to the preset value, the access information of all network cards is determined. If the access information does not match the preset information, determine the enabled state of the fixed boot order priority in the BIOS options; When the enabled state is disabled, the network card startup order is adjusted according to the first input command; The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

2. The method for controlling the network card boot sequence according to claim 1, characterized in that, After booting the target server's Basic Input / Output System (BIOS), the following is also included: If the verification variable is less than the preset value, the preset network card startup order is invoked to reorder all current network cards. Save the reordered network card boot order and start the operating system (OS); The preset value is determined by the maximum number of restarts after a BIOS verification failure.

3. The method for controlling the network card boot order according to claim 1, characterized in that, After determining the access information of all current network cards, the following is also included: If the access information matches the preset information, the preset network card startup order is invoked to reorder all current network cards. Save the reordered network card boot order and start the operating system (OS).

4. The method for controlling the network card boot order according to claim 1, characterized in that, After determining the enabled state of the fixed boot order priority in the BIOS options, the following is also included: When the enabled state is enabled, the preset network card startup order is invoked to reorder all current network cards; Save the reordered network card boot order and start the operating system (OS).

5. The method for controlling the network card boot sequence according to any one of claims 2-4, characterized in that, After booting the Basic Input / Output System (BIOS), the following is also included: In the case of enumerating the PCI standard for peripheral component interconnection, identify the unique identifier corresponding to each network card; Sort the unique identifiers corresponding to each network card in ascending order to obtain the preset network card boot order; The unique identifier includes the PCI device's segment number (Segment), bus number (Bus), device number (Dev), and function number (Fun).

6. The method for controlling the network card boot order according to claim 1, characterized in that, Before determining the enabled state of the fixed boot order priority in the BIOS options, the following is also included: Receive the second input command; The second input command is used to instruct the user to disable the fixed boot order priority in the BIOS options. Alternatively, it can be used to indicate whether the disabled state of the fixed boot order priority in the BIOS options is enabled.

7. The method for controlling the network card boot order according to claim 1, characterized in that, After adjusting the network card boot order according to the first input command, the process also includes: Save the reordered network card boot order and start the operating system (OS).

8. A device for controlling the boot sequence of a network card, characterized in that, include: First determining unit: used to start the basic input / output system BIOS, and determine the access information of all network cards when the verification variable is greater than or equal to the preset value; The second determining unit is used to determine the enabled state of the fixed boot order priority in the BIOS options when the access information does not match the preset information. Adjustment unit: used to adjust the network card startup order according to the first input command when the enabled state is disabled; The verification variable has a default attribute that the BIOS will automatically clear to zero without retaining configuration updates.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method for controlling the network card boot order as described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for controlling the network card startup order as described in any one of claims 1-7.