Server startup method, apparatus and system, and non-volatile readable storage medium and electronic device

By detecting and editing the storage segments of the storage space before the server starts, ensuring that the boot handler uses sufficient storage space, the problem of inefficient server startup is solved and more efficient server startup is achieved.

WO2025161378A1PCT designated stage Publication Date: 2025-08-07INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/116072
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-31
Filing Date
2024-08-30
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

In the prior art, the problem of low server startup efficiency is mainly due to insufficient storage capacity of the storage space, resulting in file storage conflicts in the boot processor, and the server cannot be booted normally.

Method used

Before the server is started, the initialization module detects the storage segment in the storage space whose storage capacity is less than the system file and edits it into the target storage segment that is not allowed to be allocated to the boot handler to store the system files, ensuring that the boot handler can only use storage segments that are greater than or equal to the storage capacity of the system file.

Benefits of technology

Resolves file storage conflicts of boot handlers and improves server startup efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116072_07082025_PF_FP_ABST
    Figure CN2024116072_07082025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a server startup method, apparatus and system, and a non-volatile readable storage medium and an electronic device. An initialization module, a boot loader and a storage space are deployed on a server, wherein the initialization module is configured to initialize server hardware of the server when the server is started up, and the boot loader is used for storing a system file in the storage space and using the system file to load an operating system for the server. The method is applied to the initialization module, and comprises: when a server is started up and before the server runs a boot loader, detecting a reference storage segment in a storage space, wherein the reference storage segment is a storage segment, the storage capacity of which is smaller than the file size of a system file, in the storage space; and editing the reference storage segment as a target storage segment that is not allowed to be allocated to the boot loader for storage of the system file. The present application solves the problem of low server startup efficiency, thereby achieving the effect of improving the server startup efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Server startup method, device, system, non-volatile readable storage medium, and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on January 31, 2024, with application number 202410134600.0 and application name “Server startup method, device, system, storage medium and electronic device”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The embodiments of the present application relate to the field of computers, and in particular to a server startup method, device, system, non-volatile readable storage medium, and electronic device. Background Art

[0004] At present, a boot handler is generally used to load the corresponding operating system for the server. In related technologies, the boot handler stores the system files in the server's storage space and loads the operating system for the server through the system files. However, in the actual working process, the size of the system files that need to be stored is larger than the storage capacity of the storage space requested by the boot handler, which will cause a "trampling" conflict in file storage in the storage space, thereby causing the boot handler to crash and fail to boot the server normally, reducing the efficiency of server startup.

[0005] In view of the problems in related technologies such as low efficiency of server startup, no effective solutions have been proposed yet.

[0006] Summary of the Invention

[0007] Embodiments of the present application provide a server startup method, apparatus, system, non-volatile readable storage medium, and electronic device to at least solve the problem of low server startup efficiency in related technologies.

[0008] According to a first aspect, a method for starting a server is provided. An initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize server hardware of the server when the server is started. The boot processing program is configured to store system files in the storage space and use the system files to load an operating system for the server. The method is applied to the initialization module and includes:

[0009] When the server is started, before the server runs a boot processing program, detecting a reference storage segment in the storage space, wherein the reference storage segment is a storage segment in the storage space whose storage capacity is smaller than the file size of the system file;

[0010] The reference memory segment is edited to be a target memory segment that is not allowed to be allocated to the boot handler to store system files, wherein after the reference memory segment is edited to be the target memory segment, the boot handler is allowed to run.

[0011] In an exemplary embodiment, editing a reference storage segment to a target storage segment that is not allowed to be allocated to a boot handler storage system file includes: querying a second space attribute of the reference storage segment, wherein the second space attribute is used to indicate a usage of the reference storage segment; configuring the second space attribute to be unavailable to obtain a target storage segment, wherein a storage segment whose space attribute is configured to be unavailable is not allowed to be allocated to a boot handler storage system file.

[0012] In an exemplary embodiment, editing a reference storage segment to a target storage segment that is not allowed to be allocated to a boot handler to store system files includes: querying the space type of the reference storage segment, wherein the space type is used to indicate the service type of the storage service provided by the storage segment; configuring the space type to the target type to obtain the target storage segment, wherein the boot handler is only allowed to use the storage segment with the reference type of space type.

[0013] In an exemplary embodiment, the space type is configured as a target type to obtain a target storage segment, including: configuring the space type as a running service type to obtain a target storage segment, wherein the target type is the running service type, and the storage segment whose space type is configured as the running service type is not used to provide storage services for the stage of loading the operating system, and the reference type includes a boot service type, and the storage segment whose space type is configured as the boot service type is used to provide storage services for the stage of loading the operating system.

[0014] In an exemplary embodiment, a reference storage segment is edited to be a target storage segment that is not allowed to be allocated to a boot handler for storing system files, including: adjusting the storage position of data stored in a storage space so that the storage segments in the storage space that do not store data do not include a storage segment whose capacity is smaller than the file size of the system file and larger than the file size of the target system file, and the boot handler is used to apply to the storage space for a storage segment for storing the system file based on the file size of the target system file.

[0015] In an exemplary embodiment, adjusting the storage location of data stored in a storage space includes: extracting target data from a storage segment in the storage space that has a capacity smaller than a file size of a target system file and stores data; and using the target data to divide a reference storage segment into multiple storage segments as target storage segments, wherein the capacity of each storage segment in the multiple storage segments is smaller than the file size of the target system file.

[0016] In an exemplary embodiment, after editing the reference storage segment to be a target storage segment that is not allowed to be allocated to the boot handler for storing system files, the method further includes: starting the boot handler; and applying to the storage space through the boot handler for a storage segment whose capacity is greater than the file size of the system file and meets the target capacity redundancy condition to store the system file.

[0017] In an exemplary embodiment, a storage segment having a capacity greater than the file size of the system file is requested from a storage space by a boot handler to store the system file, including: obtaining the system file from a remote server by the boot handler, wherein the remote server is configured to provide the system file to the boot handler; detecting the file size of the system file by the boot handler; requesting a storage segment having a capacity greater than the file size of the system file from the storage space by the boot handler; and storing the system file in the storage segment allocated by the storage space in response to the request of the boot handler by the boot handler.

[0018] In an exemplary embodiment, detecting a reference storage segment in a storage space includes: screening candidate storage segments that are allowed to be allocated to a boot handler to store system files from the storage segments divided by the storage space; and screening reference storage segments whose capacity is smaller than the file size of the system files from the candidate storage segments.

[0019] In an exemplary embodiment, candidate storage segments that are allowed to be allocated to a boot handler storage system file are screened from storage segments divided by a storage space, including: detecting a first space attribute of the storage segments divided in the storage space, wherein the first space attribute is used to indicate usage of the storage segments divided in the storage space; and determining a storage segment whose first space attribute is available as a candidate storage segment.

[0020] In an exemplary embodiment, a reference storage segment having a capacity smaller than the file size of a system file is filtered from candidate storage segments, including: filtering a storage segment having a capacity smaller than the file size of the system file from the candidate storage segments as an alternative storage segment; filtering a storage segment having a capacity larger than the file size of a target system file in the system file from the alternative storage segments as a reference storage segment, wherein a boot processing program is used to apply to a storage space for a storage segment for storing the system file according to the file size of the target system file.

[0021] In an exemplary embodiment, before detecting the reference storage segment in the storage space, the method further includes: querying the file size of the system file from a remote server, wherein the remote server is configured to provide the system file to the boot handler, and the boot handler is used to obtain the system file from the remote server at startup and store it in the allocated storage segment in the storage space.

[0022] In an exemplary embodiment, querying the file size of a system file from a remote server includes one of the following: sending a first query request to the remote server, wherein the first query request is used to request the file size of the system file; sending a second query request to the remote server, wherein the second query request is used to request the file size of the system file and the file size of a target system file, and a boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

[0023] According to a second aspect, a server startup device is provided. An initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is configured to store system files in the storage space and use the system files to load an operating system for the server. The device is applied to the initialization module and includes:

[0024] a detection module configured to detect a reference storage segment in the storage space before the server runs a boot processing program when the server is started, wherein the reference storage segment is a storage segment in the storage space having a storage capacity smaller than a file size of the system file;

[0025] The editing module is configured to edit the reference storage segment into a target storage segment that is not allowed to be allocated to the boot processing program to store system files, wherein after the reference storage segment is edited into the target storage segment, the boot processing program is allowed to run.

[0026] According to a third aspect, a server startup system is provided, including: an initialization module and a boot processing program, wherein a storage space is also deployed on the server, the initialization module is configured to initialize the server hardware of the server when the server is started, and the boot processing program is used to store system files in the storage space and use the system files to load an operating system for the server, the initialization module is configured to execute the steps of the initialization module in any of the above-mentioned method embodiments at runtime; the boot processing program is configured to execute the steps of the boot processing program in any of the above-mentioned method embodiments at runtime.

[0027] According to a fourth aspect, a non-volatile readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0028] According to a fifth aspect, an electronic device is also provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0029] Through the present application, when the server is started and the boot handler has not yet been run, the initialization module is used to detect the storage segment in the storage space whose storage capacity is smaller than the file size of the system file, and the storage segment whose storage capacity is smaller than the file size of the system file is edited as a target storage segment that is not allowed to be allocated to the boot handler to store the system file, so that when the boot handler needs to store the system file, only the storage segment whose storage capacity is greater than or equal to the file size of the system file can be used. Moreover, since the initialization module for initializing the server hardware of the server is deployed on the server, the "trampling" conflict of the file storage caused by the boot handler can be resolved in the process of initializing the server hardware of the server, and then the boot handler can be run, thereby solving the problem of low efficiency of server startup and achieving the effect of improving the efficiency of server startup. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a hardware structure block diagram of a server device of a server startup method according to an embodiment of the present application;

[0031] FIG2 is a schematic diagram of a method for starting a server according to an embodiment of the present application;

[0032] 3 is a schematic diagram of a method for adjusting the storage location of data stored in a storage space according to an embodiment of the present application;

[0033] FIG4 is a flowchart of a working process of an initialization module according to an embodiment of the present application;

[0034] FIG5 is a flowchart of a working process of a boot processing program according to an embodiment of the present application;

[0035] FIG6 is a timing diagram of the working process of BIOS and PXE according to an embodiment of the present application;

[0036] 7 is a structural block diagram of a server startup device according to an embodiment of the present application;

[0037] FIG8 is a schematic diagram of a server startup system according to an embodiment of the present application;

[0038] FIG9 is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

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

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

[0041] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking operation on a server device as an example, FIG1 is a hardware structure block diagram of a server device of a method for starting a server in an embodiment of the present application. As shown in FIG1 , the server device may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the above-mentioned server device may also include a transmission device 106 configured to have a communication function and an input and output device 108. It will be understood by those skilled in the art that the structure shown in FIG1 is only for illustration, and it does not limit the structure of the above-mentioned server device. For example, the server device may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .

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

[0043] The transmission device 106 is configured to receive or transmit data via a network. Optional examples of the aforementioned network may include a wireless network provided by a communication provider of the server device. In one embodiment, the transmission device 106 may include a network interface controller (NIC) that can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module that is configured to communicate with the Internet wirelessly.

[0044] In this embodiment, a method for starting a server is provided. FIG2 is a schematic diagram of the method for starting a server according to an embodiment of the present application. As shown in FIG2 , an initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is used to store system files in the storage space and use the system files to load an operating system for the server. The method is applied to the initialization module. The method for starting a server includes the following steps:

[0045] Step S202: When the server is started, before the server runs the boot processing program, detecting a reference storage segment in the storage space, wherein the reference storage segment is a storage segment in the storage space having a storage capacity smaller than a file size of the system file;

[0046] Step S204 : Edit the reference storage segment to a target storage segment that is not allowed to be allocated to the boot processing program to store system files. After the reference storage segment is edited to the target storage segment, the boot processing program is allowed to run.

[0047] Through the above steps, when the server is started and the boot processing program has not yet been run, the initialization module is used to detect the storage segment in the storage space whose storage capacity is smaller than the file size of the system file, and the storage segment whose storage capacity is smaller than the file size of the system file is edited to a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, so that when the boot processing program needs to store the system file, only the storage segment whose storage capacity is greater than or equal to the file size of the system file can be used. Moreover, since the initialization module deployed on the server and set to initialize the server hardware of the server is used, in the process of initializing the server hardware of the server, the "trampling" conflict of file storage caused by the boot processing program can be resolved, and then the boot processing program can be run, thereby solving the problem of low efficiency of server startup and achieving the effect of improving the efficiency of server startup.

[0048] Optionally, in this embodiment, software or hardware modules with the function of initializing server hardware can be used as the above-mentioned initialization module, but are not limited to it, such as: BIOS (Basic Input Output System), UEFI (Unified Extensible Firmware Interface), server remote management controller, etc.

[0049] Optionally, in this embodiment, the server may, but is not limited to, run a boot handler during the startup process to load the operating system through the boot handler. The boot handler may, but is not limited to, include: EtherBoot (an open source BIOS-based network boot program), NetBoot (network boot), PXE (Preboot Execute Environment), iPXE (an extended version of PXE), etc.

[0050] Optionally, in this embodiment, the boot handler may, but is not limited to, obtain one or more system files from a remote or external device, and use the system files to load an operating system for the server. For the system files obtained by the boot handler, the boot handler may, but is not limited to, storing one or more system files in the storage space of the server according to usage. The above-mentioned system files may, but are not limited to, include: initrd (initial root file system) files, vmlinuz (Linux kernel) files, PXE background configuration, PXE configuration files, network driver files, etc.

[0051] That is to say, taking the boot processing program as an example of obtaining the initrd file, vmlinuz file, PXE background configuration, PXE configuration file and network driver file, the boot processing program can select the initrd file, vmlinuz file and PXE background configuration to be stored in the server's storage space based on the usage of the system files, or it can also store all the obtained system files in the server's storage space.

[0052] Optionally, in this embodiment, during server startup, the server may load an operating system from, but is not limited to, a local storage device. The local storage device may include, but is not limited to, a hard disk, a solid-state drive, an optical disk, etc. If the server does not find a loadable operating system, it may use the boot process to load the operating system. Alternatively, the server may be configured to directly use the boot process to load the operating system during startup.

[0053] In the technical solution provided in the above step S202, it can be but not limited to setting that when the server is started, the boot processing program is not woken up, and the storage segment with storage capacity smaller than the file size of the system file in the storage space is first detected.

[0054] Optionally, in this embodiment, the initialization module may read, but is not limited to, pre-stored file sizes of one or more system files to be stored in the storage space. Methods of pre-storage may include, but are not limited to, recording in the storage space, burning to a hard disk, etc. Alternatively, the initialization module may obtain the file sizes of one or more system files to be stored in the storage space by interacting with the boot processing program.

[0055] Optionally, in this embodiment, a reference storage segment with a storage capacity smaller than the file size of the system file is determined from the storage space based on the file size of the system file. For example, when the system file includes a system file A with a file size of A and a system file B with a file size of B, a reference storage segment with a storage capacity smaller than the file size of the system file (A+B) is determined from the storage space, etc.

[0056] In an exemplary embodiment, the reference storage segments in the storage space may be detected in the following manner, but is not limited to: candidate storage segments that are allowed to be allocated to the boot handler to store system files are screened from the storage segments divided by the storage space; and reference storage segments whose capacity is smaller than the file size of the system files are screened from the candidate storage segments.

[0057] Optionally, in this embodiment, the storage space may store data in the form of, but not limited to, storage segments. Each storage segment may include, but not limited to, multiple attributes, such as storage location, access permission, storage type, and whether it is in an available state. Storage segments divided into the storage space may be screened for, but not limited to, those whose attributes match those of system files and can be used to store system files, as candidate storage segments allowed to be allocated to the boot handler for storing system files.

[0058] Optionally, in this embodiment, each storage segment divided by the storage space has its corresponding storage capacity, and the initialization module selects a storage segment with a capacity smaller than the file size of the system file from the candidate storage segments as a reference storage segment based on the file size of the system file.

[0059] In an exemplary embodiment, candidate storage segments that are allowed to be allocated to the boot handler storage system files can be screened from the storage segments divided in the storage space in the following manner, but is not limited to: detecting a first space attribute of the storage segments divided in the storage space, wherein the first space attribute is used to indicate the usage of the storage segments divided in the storage space; and determining a storage segment whose first space attribute is available as a candidate storage segment.

[0060] Optionally, in this embodiment, the first space attribute of each storage segment may be detected, but is not limited to the above. If the first space attribute indicates that the current storage segment is available, the corresponding storage segment may be determined as a candidate storage segment. Alternatively, if the first space attribute indicates that the current storage segment is in an unavailable state, such as a fault or occupied state, the current storage segment may be ignored.

[0061] In an exemplary embodiment, the following method can be used, but is not limited to, to filter a reference storage segment whose capacity is smaller than the file size of the system file from the candidate storage segments: filter a storage segment whose capacity is smaller than the file size of the system file from the candidate storage segments as an alternative storage segment; filter a storage segment whose capacity is larger than the file size of the target system file in the system file from the alternative storage segments as a reference storage segment, wherein the boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

[0062] Optionally, in this embodiment, the target system file may be, but is not limited to, one or more system files such as an initrd file, a vmlinuz file, a PXE background configuration, a PXE configuration file, and a network driver file.

[0063] Optionally, in this embodiment, the boot processing program may, but is not limited to, use a storage segment storage system file requested from the storage space according to the file size of the target system file, and the system file may, but is not limited to, be multiple system files including the target system file.

[0064] Optionally, in this embodiment, a storage segment whose capacity is smaller than the file size of the system file is screened out from the candidate storage segments as an alternative storage segment, and then a storage segment whose capacity is larger than the file size of the target system file in the system file is screened out from the alternative storage segments as a reference storage segment, thereby obtaining a reference storage segment whose storage capacity can be used to store the target system file but cannot satisfy the needs of the complete system file.

[0065] In an exemplary embodiment, before detecting the reference storage segment in the storage space, the boot handler may, but is not limited to, operate in the following manner: query the file size of the system file from a remote server, wherein the remote server is configured to provide the system file to the boot handler, and the boot handler is configured to obtain the system file from the remote server at startup and store it in the allocated storage segment in the storage space.

[0066] Optionally, in this embodiment, the boot processing program may, but is not limited to, obtain system files from a remote server and store the system files in the storage space during the server startup process.

[0067] Optionally, in this embodiment, the remote server may be, but is not limited to, configured to store system files required by the boot processing program and file information of the system files. The above file information may include, but is not limited to, file size, file type, etc. of the system files.

[0068] In an exemplary embodiment, the file size of a system file can be queried from a remote server in one of the following ways, but is not limited to: sending a first query request to the remote server, wherein the first query request is used to request the file size of the system file; sending a second query request to the remote server, wherein the second query request is used to request the file size of the system file and the file size of the target system file, and the boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

[0069] Optionally, in this embodiment, a first query request may be sent to the remote server, and the file size information of the system file returned by the remote server in response to the first query request may be received. Alternatively, a second query request may be sent to the remote server, and the file size information of the system file and the target system file returned by the remote server in response to the second query request may be received.

[0070] In the technical solution provided in the above step S204, the properties of the reference storage segment can be modified, but not limited to, to disallow allocation to the boot processing program for storing system files to obtain the target storage segment, such as modifying the storage location, access rights, storage type, etc. of the reference storage segment.

[0071] In an exemplary embodiment, the reference storage segment can be edited to a target storage segment that is not allowed to be allocated to the boot handler storage system files in the following manner, but is not limited to: querying the second space attribute of the reference storage segment, wherein the second space attribute is used to indicate the usage of the reference storage segment; configuring the second space attribute to be unavailable to obtain the target storage segment, wherein the storage segment whose space attribute is configured to be unavailable is not allowed to be allocated to the boot handler storage system files.

[0072] Optionally, in this embodiment, the second space attribute is used to indicate the usage of the reference storage segment, which may include but is not limited to: usable, unusable, etc.

[0073] Optionally, in this embodiment, it is possible but not limited to detecting the usage of the reference storage segment to obtain the second space attribute, and modifying the second space attribute of the reference storage segment to be unusable, thereby obtaining a target storage segment with the second space attribute being unusable, so that the target storage segment is not allowed to be allocated to the boot handler storage system file.

[0074] Optionally, in this embodiment, by configuring the second space attribute of the reference storage segment to be unavailable, when the boot handler applies for storage space from the server according to the file size of the target system file during the process of configuring the operating system, the storage segment with a capacity smaller than the file size of the system file and the storage segment with a capacity larger than the file size of the target system file in the system file will not be allocated to the boot handler because the second space attribute is in an unavailable state, thereby ensuring that the boot handler can apply for storage space with sufficient storage capacity without modifying the boot handler.

[0075] In an exemplary embodiment, the reference storage segment can be edited into a target storage segment that is not allowed to be allocated to the boot handler storage system files in the following manner, but is not limited to: querying the space type of the reference storage segment, where the space type is used to indicate the service type of the storage service provided by the storage segment; configuring the space type to the target type to obtain the target storage segment, where the boot handler is only allowed to use the storage segment with the reference type of space type.

[0076] Optionally, in this embodiment, the space type of the storage segment is used to indicate the service type of the storage service provided by the storage segment, which may include but is not limited to: Driver Health Protocol, Configuration Protocol, Cryptographic Protocol, Runtime Service type, Boot Service type, etc.

[0077] Optionally, in this embodiment, the space type of the reference storage segment can be set to, but is not limited to, a space type that is different from the space type that the boot handler is allowed to use. For example, taking the case where the boot handler is only allowed to use a storage segment with a space type of boot service type, the space type of the reference storage segment is set to a driver health protocol, configuration, encryption protocol, or running service type that is different from the space type that the boot handler is allowed to use.

[0078] In an exemplary embodiment, the space type can be configured as a target type in the following manner, but is not limited to: configuring the space type as a running service type to obtain a target storage segment, wherein the target type is the running service type, and the storage segment whose space type is configured as the running service type is not used to provide storage services for the stage of loading the operating system, and the reference type includes the boot service type, and the storage segment whose space type is configured as the boot service type is used to provide storage services for the stage of loading the operating system.

[0079] Optionally, in this embodiment, during the process of loading the operating system, the boot handler may, but is not limited to, use the boot service type storage segment to store system files. Therefore, the space type of the reference storage segment is configured to a running service type that is different from the boot service type, so that the target storage segment of the running service type cannot provide storage services for the boot handler during the process of loading the operating system.

[0080] Optionally, in this embodiment, by configuring the space type of the reference storage segment to a space type that the boot handler cannot apply for use, it is achieved that when the boot handler applies for storage space from the server, the storage segment with a capacity smaller than the file size of the system file and the storage segment with a capacity larger than the file size of the target system file in the system file will not be allocated to the boot handler for use due to the mismatch of space types, thereby achieving the ability of the boot handler to apply for storage space with sufficient storage capacity without modifying the boot handler.

[0081] In an exemplary embodiment, the reference storage segment can be edited to a target storage segment that is not allowed to be allocated to the boot handler for storing system files in the following manner, but is not limited to: the storage position of the data stored in the storage space is adjusted so that the storage segments in the storage space that do not store data do not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file, and the boot handler is used to apply to the storage space for a storage segment for storing the system file based on the file size of the target system file.

[0082] Optionally, in this embodiment, data can be written to, but is not limited to, a storage segment having a capacity smaller than the file size of the system file and a storage segment having a capacity larger than the file size of the target system file in the system file, so that the storage segments in the storage space that do not store data do not include storage segments having a capacity smaller than the file size of the system file and larger than the file size of the target system file. The above-mentioned written data can include, but is not limited to: data in the storage segment that stores data, pre-stored data for performing write operations, etc.

[0083] Optionally, in this embodiment, the storage segments storing data may be adjusted, but is not limited to: for example, data in the storage segments storing data may be transferred to the storage segments not storing data, so that the storage segments not storing data in the storage space do not include storage segments with a capacity smaller than the file size of the system file and larger than the file size of the target system file. Alternatively, data in the storage segments storing data may be copied to the storage segments not storing data, so that the storage segments not storing data in the storage space do not include storage segments with a capacity smaller than the file size of the system file and larger than the file size of the target system file.

[0084] In an exemplary embodiment, the storage location of the data stored in the storage space can be adjusted in the following manner, but is not limited to: extracting the target data from a storage segment in the storage space that has a capacity smaller than the file size of the target system file and stores the data; using the target data to divide the reference storage segment into multiple storage segments as target storage segments, wherein the capacity of each storage segment in the multiple storage segments is smaller than the file size of the target system file.

[0085] Optionally, in this embodiment, a portion of data from a storage segment that has a smaller capacity than the target system file and stores data may be extracted as the target data, but is not limited to the extraction. Alternatively, all data from a storage segment that has a smaller capacity than the target system file and stores data may be extracted as the target data.

[0086] Optionally, in this embodiment, the difference between the storage capacity of the reference storage segment and the file size of the target system file can be determined, but is not limited to, and target data with a data volume greater than or equal to the above difference is written into the reference storage segment to obtain a target storage segment, so that the storage capacity of the target storage segment is smaller than the file size of the target system file.

[0087] Optionally, in this embodiment, by writing target data into the reference storage segment, the reference storage segment is divided into multiple storage segments as target storage segments, so that when the boot handler applies for storage space from the server, there is no storage segment in the storage space whose capacity is smaller than the file size of the system file, and for storage segments whose capacity is larger than the file size of the target system file in the system file, the boot handler can only apply for storage segments larger than the file size of the system file, so that the boot handler can apply for storage space with sufficient storage capacity without modifying the boot handler.

[0088] In an exemplary embodiment, an example of a method for adjusting the storage location of data stored in a storage space is provided. FIG3 is a schematic diagram of a method for adjusting the storage location of data stored in a storage space according to an embodiment of the present application. As shown in FIG3 , a storage space includes storage segments A, B, C, and D that have stored data, and storage segments 1 and 2 that do not store data, wherein the reference storage segments include storage segment 1, and the storage capacity of storage segment 2 is greater than the file size of the system file. For example, the data in storage segment B can be migrated to storage segment 1, but is not limited to, so that storage segment 1 is divided into storage segment 4 and storage segment 5 whose capacity is smaller than the file size of the target system file, so that the storage space does not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file.

[0089] In an exemplary embodiment, an example of the working process of an initialization module is provided. FIG4 is a flow chart of the working process of an initialization module according to an embodiment of the present application. As shown in FIG4 , taking the initialization module as an example, the BIOS can work in the following manner, but is not limited to:

[0090] Step S402: The BIOS obtains the file size of the system file that the boot processing program needs to store in the storage space. The boot processing program applies for a storage segment from the storage space of the server based on the file size of the target system file. The file size of the system file is greater than or equal to the target system file.

[0091] Step S404: The BIOS selects a reference storage segment from the server's storage space that is allowed to be allocated to the boot processing program to store the system file. The reference storage segment is a storage segment whose storage capacity is larger than the file size of the target system file and smaller than the file size of the system file.

[0092] Step S406: The BIOS edits the reference memory segment to a target memory segment that is not allowed to be allocated to the boot processing program to store system files by one of the following methods or a combination of multiple methods:

[0093] Method 1: Configure the second space attribute of the reference storage segment to be unavailable;

[0094] Method 2: Configure the reference memory segment's space type to a space type that the boot handler is not allowed to use;

[0095] Method 3: Adjust the storage location of the data stored in the storage space so that the storage segments that do not store data in the storage space do not include the storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file;

[0096] Step S408: When the editing is completed, the BIOS starts the boot processing program.

[0097] In an exemplary embodiment, after the reference storage segment is edited to be a target storage segment that is not allowed to be allocated to the boot handler for storing system files, the boot handler may operate in, but is not limited to, the following manner: starting the boot handler; and requesting, through the boot handler, from the storage space a storage segment whose capacity is greater than the file size of the system file to store the system file.

[0098] Optionally, in this embodiment, after the reference storage segment is edited to be a target storage segment that is not allowed to be allocated to the boot handler for storing system files, the boot handler can be started through, but is not limited to, the initialization module. In the process of configuring the operating system for the server, the boot handler can apply for a storage segment with a corresponding capacity based on the file size of the target system file. Since the storage segment with a capacity smaller than the file size of the system file and larger than the file size of the target system file in the storage space cannot be allocated to the boot handler through configuration, the boot handler can only obtain a storage segment with a capacity larger than the file size of the system file to store the system file.

[0099] In an exemplary embodiment, the following method can be used, but is not limited to, to request a storage segment with a capacity greater than the file size of the system file from the storage space through a boot handler to store the system file: obtain the system file from a remote server through the boot handler, wherein the remote server is configured to provide the system file to the boot handler; detect the file size of the system file through the boot handler; request a storage segment with a capacity greater than the file size of the system file and meeting a target capacity redundancy condition from the storage space through the boot handler; and store the system file in the storage segment allocated by the storage space in response to the request of the boot handler through the boot handler.

[0100] Optionally, in this embodiment, in the process of obtaining the system files including the target system files from the remote server, the boot handler may, but is not limited to, obtain the file size of the system files including the target system files, and apply for a storage segment from the storage space based on the target system files. Since the storage segments in the storage space with a capacity smaller than the file size of the system files and larger than the file size of the target system files cannot be allocated to the boot handler through configuration, the boot handler can only obtain the storage segments with a capacity larger than the file size of the system files to store the system files.

[0101] Optionally, in this embodiment, the boot handler can, but is not limited to, give priority to applying for a storage segment with a larger storage capacity based on the storage capacity of the storage segment. For example, taking the maximum storage capacity as 500 and the actual storage capacity required by the boot handler as 100, the boot handler first applies for a storage segment with a storage capacity of 500. If it cannot be obtained, it then applies for a storage segment with a storage capacity of 250 until the storage segment is obtained. Or, if the storage capacity applied for is smaller than the file size of the target system file, the application fails. The storage capacity of the storage segment obtained in this way is larger, exceeding the actual needs, ensuring that the system files can be fully stored.

[0102] Optionally, in this embodiment, the storage space consumed by formats such as alignment operations can be offset by, but is not limited to, increasing the above-mentioned target capacity redundancy conditions. If the number of files or data to be loaded increases, the sum of the file sizes of the system files and the storage capacity of the target capacity redundancy conditions can be calculated according to actual conditions as the size of the storage space applied for by the boot handler, so as to avoid file and data memory usage conflicts when the boot handler uses the applied storage space.

[0103] In an exemplary embodiment, an example of the working process of a boot processing program is provided. FIG5 is a flowchart of the working process of a boot processing program according to an embodiment of the present application. As shown in FIG5 , taking the boot processing program as PXE, the system files including the initrd file, the vmlinuz file, and the PXE background configuration, and the target system file as the initrd file as an example, PXE can work in, but is not limited to, the following manner:

[0104] Step S502: receiving and responding to the wake-up request of the initialization module;

[0105] Step S504: Obtain the initrd file, vmlinuz file and PXE background configuration from the remote server;

[0106] Step S506: Detect the file size of the initrd file;

[0107] Step S506: Apply to the storage space for a storage segment that has a capacity greater than the file size of the initrd file and meets the target capacity redundancy condition;

[0108] Step S508: storing the initrd file, vmlinuz file and PXE background configuration in sequence in the storage segment allocated by the storage space, wherein the storage capacity of the storage segment allocated by the storage space is greater than the sum of the file sizes of the initrd file, vmlinuz file and PXE background configuration.

[0109] In an exemplary embodiment, an example of the working process of BIOS and PXE is provided. FIG6 is a timing diagram of the working process of BIOS and PXE according to an embodiment of the present application. As shown in FIG6 , taking the initialization module as BIOS, the boot processing program as PXE, the system files including the initrd file, the vmlinuz file and the PXE background configuration, and the target system file as the initrd file as an example, the BIOS and PXE can work in, but are not limited to, the following manner:

[0110] The BIOS starts and requests file information of the initrd file, vmlinuz file, and PXE background configuration, receives the file information of the initrd file, vmlinuz file, and PXE background configuration, and obtains the file size of the system file; the BIOS edits the server's storage space according to the file size of the system file to obtain a target storage segment; and the BIOS wakes up PXE.

[0111] PXE starts in response to the BIOS wake-up request. It applies for a storage segment based on the size of the initrd file and uses the allocated storage segment to store the initrd file, the vmlinuz file, and the PXE background configuration.

[0112] The storage space receives the PXE request and checks whether it can be allocated to the PXE in descending order of storage capacity. It allocates storage space to the PXE that has a storage capacity greater than the sum of the sizes of the initrd file, the vmlinuz file, and the PXE background configuration files.

[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0114] This embodiment also provides a server startup device for implementing the above-mentioned embodiments and optional implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0115] FIG7 is a structural block diagram of a server startup device according to an embodiment of the present application. As shown in FIG7 , an initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is configured to store system files in the storage space and use the system files to load an operating system for the server. The device is applied to the initialization module, and the device includes:

[0116] a detection module 72 configured to detect a reference storage segment in the storage space when the server is started and before the server runs a boot processing program, wherein the reference storage segment is a storage segment in the storage space having a storage capacity smaller than a file size of the system file;

[0117] The editing module 74 is configured to edit the reference storage segment into a target storage segment that is not allowed to be allocated to the boot processing program to store system files, wherein after the reference storage segment is edited into the target storage segment, the boot processing program is allowed to run.

[0118] By means of the above-mentioned device, when the server is started and the boot processing program has not yet been run, the initialization module is used to detect the storage segment in the storage space whose storage capacity is smaller than the file size of the system file, and the storage segment whose storage capacity is smaller than the file size of the system file is edited as a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, so that when the boot processing program needs to store the system file, only the storage segment whose storage capacity is greater than or equal to the file size of the system file can be used. Moreover, since the initialization module for initializing the server hardware of the server is deployed on the server, the file storage "trampling" conflict that occurs in the boot processing program can be resolved in the process of initializing the server hardware of the server, and then the boot processing program can be run, thereby solving the problem of low efficiency of server startup and achieving the effect of improving the efficiency of server startup.

[0119] In an exemplary embodiment, the editing module includes:

[0120] a first query unit configured to query a second space attribute of the reference storage segment, wherein the second space attribute is used to indicate a usage status of the reference storage segment;

[0121] The first configuration unit is configured to configure the second space attribute to be unavailable to obtain a target storage segment, wherein the storage segment with the space attribute configured to be unavailable is not allowed to be allocated to the boot processing program to store system files.

[0122] In an exemplary embodiment, the editing module includes:

[0123] a second query unit configured to query a space type of the reference storage segment, wherein the space type is used to indicate a service type of a storage service provided by the storage segment;

[0124] The second configuration unit is configured to configure the space type to a target type to obtain a target storage segment, wherein the boot processing program is only allowed to use the storage segment whose space type is a reference type.

[0125] In an exemplary embodiment, the second configuration unit is further configured to: configure the space type as a running service type to obtain a target storage segment, wherein the target type is a running service type, and the storage segment whose space type is configured as the running service type is not used to provide storage services for the stage of loading the operating system, and the reference type includes a boot service type, and the storage segment whose space type is configured as the boot service type is used to provide storage services for the stage of loading the operating system.

[0126] In an exemplary embodiment, the editing module includes:

[0127] The adjustment unit is configured to adjust the storage position of the data stored in the storage space so that the storage segments in the storage space that do not store data do not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file. The boot processing program is used to apply to the storage space for the storage segment for storing the system file according to the file size of the target system file.

[0128] In an exemplary embodiment, the adjustment unit is further configured to: extract target data from a storage segment in the storage space that has a capacity smaller than the file size of the target system file and stores data; and use the target data to divide the reference storage segment into multiple storage segments as target storage segments, wherein the capacity of each storage segment in the multiple storage segments is smaller than the file size of the target system file.

[0129] In an exemplary embodiment, the apparatus further comprises:

[0130] The startup module is set to start the boot handler;

[0131] The application module is configured to apply to the storage space for a storage segment having a capacity greater than a file size of the system file through a boot processing program to store the system file.

[0132] In an exemplary embodiment, the application module includes:

[0133] an acquiring unit, configured to acquire the system file from the remote server via the boot processing program, wherein the remote server is configured to provide the system file to the boot processing program;

[0134] a detection unit configured to detect a file size of a system file through a boot processing program;

[0135] An application unit is configured to apply to the storage space through a boot processing program for a storage segment having a capacity greater than a file size of the system file and meeting a target capacity redundancy condition;

[0136] The storage unit is configured to store the system file in a storage segment allocated by the boot processing program in response to a request of the boot processing program.

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

[0138] a first screening unit configured to screen candidate storage segments allowed to be allocated to the boot processing program for storing system files from the storage segments divided by the storage space;

[0139] The second screening unit is configured to screen a reference storage segment having a capacity smaller than a file size of the system file from the candidate storage segments.

[0140] In an exemplary embodiment, the first screening unit is further configured to: detect a first space attribute of a storage segment divided in the storage space, wherein the first space attribute is used to indicate the usage of the storage segment divided in the storage space; and determine a storage segment whose first space attribute is available as a candidate storage segment.

[0141] In an exemplary embodiment, the first screening unit is further configured to: screen a storage segment whose capacity is smaller than the file size of the system file from the candidate storage segments as an alternative storage segment; and screen a storage segment whose capacity is larger than the file size of the target system file in the system file from the alternative storage segments as a reference storage segment, wherein the boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

[0142] In an exemplary embodiment, the apparatus further comprises:

[0143] The query module is configured to query the file size of the system file from the remote server, wherein the remote server is configured to provide the system file to the boot processing program, and the boot processing program is used to obtain the system file from the remote server at startup and store it in the storage segment allocated in the storage space.

[0144] In an exemplary embodiment, the query module includes one of the following:

[0145] A first sending unit is configured to send a first query request to a remote server, wherein the first query request is used to request to query the file size of a system file;

[0146] The second sending unit is configured to send a second query request to the remote server, wherein the second query request is used to request the file size of the query system file and the file size of the target system file, and the boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

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

[0148] An embodiment of the present application also provides a server startup system. Figure 8 is a schematic diagram of the server startup system according to an embodiment of the present application. As shown in Figure 8, the server startup system includes: an initialization module 82 and a boot processing program 84, wherein a storage space 86 is also deployed on the server. The initialization module 82 is configured to initialize the server hardware of the server when the server is started. The boot processing program 84 is used to store system files in the storage space 86 and use the system files to load an operating system for the server. The initialization module 82 is configured to execute the steps of the initialization module in any of the above-mentioned method embodiments at runtime; the boot processing program 84 is configured to execute the steps of the boot processing program in any of the above-mentioned method embodiments at runtime.

[0149] Through the startup system of the above-mentioned server, when the server is started and the boot processing program has not yet been run, the initialization module is used to detect the storage segment in the storage space whose storage capacity is smaller than the file size of the system file, and the storage segment whose storage capacity is smaller than the file size of the system file is edited as a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, so that when the boot processing program needs to store the system file, only the storage segment whose storage capacity is greater than or equal to the file size of the system file can be used. Moreover, since the initialization module deployed on the server and set to initialize the server hardware of the server is used, in the process of initializing the server hardware of the server, the "trampling" conflict of file storage caused by the boot processing program can be resolved, and then the boot processing program can be run, thereby solving the problem of low efficiency of server startup and achieving the effect of improving the efficiency of server startup.

[0150] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.

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

[0152] In an exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0153] An embodiment of the present application also provides an electronic device. Figure 9 is a structural block diagram of an electronic device according to an embodiment of the present application. As shown in Figure 9, the above-mentioned electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned method embodiments.

[0154] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0155] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.

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

[0157] The above are merely optional embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may be subject to various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for starting a server, characterized in that: An initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is used to store system files in the storage space and use the system files to load an operating system for the server. The method is applied to the initialization module and includes: When the server is started, before the server runs the boot processing program, detecting a reference storage segment in the storage space, wherein the reference storage segment is a storage segment in the storage space having a storage capacity smaller than a file size of the system file; The reference storage segment is edited into a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, wherein after the reference storage segment is edited into the target storage segment, the boot processing program is allowed to run.

2. The method according to claim 1, characterized in that The step of editing the reference storage segment to a target storage segment that is not allowed to be allocated to the boot processing program to store the system file comprises: querying a second space attribute of the reference storage segment, wherein the second space attribute is used to indicate a usage of the reference storage segment; The second space attribute is configured as unavailable to obtain the target storage segment, wherein the storage segment whose space attribute is configured as unavailable is not allowed to be allocated to the boot processing program to store the system file.

3. The method according to claim 1, characterized in that The step of editing the reference storage segment to a target storage segment that is not allowed to be allocated to the boot processing program to store the system file comprises: Querying a space type of the reference storage segment, wherein the space type is used to indicate a service type of a storage service provided by the storage segment; The space type is configured as a target type to obtain the target storage segment, wherein the boot processing program is only allowed to use the storage segment whose space type is a reference type.

4. The method according to claim 3, characterized in that The configuring the space type as the target type to obtain the target storage segment includes: The space type is configured as a running service type to obtain the target storage segment, wherein the target type is the running service type, and the storage segment whose space type is configured as the running service type is not used to provide storage services for the stage of loading the operating system, and the reference type includes a boot service type, and the storage segment whose space type is configured as the boot service type is used to provide storage services for the stage of loading the operating system.

5. The method according to claim 1, characterized in that The step of editing the reference storage segment to a target storage segment that is not allowed to be allocated to the boot processing program to store the system file comprises: Adjust the storage position of the data stored in the storage space so that the storage segments in the storage space that do not store data do not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file, wherein the boot processing program is used to apply to the storage space for the storage segment for storing the system file according to the file size of the target system file.

6. The method according to claim 5, characterized in that The storage position of the data stored in the storage space is adjusted so that the storage segment in the storage space where no data is stored does not include a file whose capacity is smaller than the file size of the system file and larger than the file size of the target system file. Storage segments, including: The data in the storage segments storing data in the storage space are transferred to the storage segments not storing data, so that the storage segments not storing data in the storage space do not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file.

7. The method according to claim 5, characterized in that The adjusting the storage position of the data stored in the storage space so that the storage segments in the storage space that do not store data do not include a storage segment whose capacity is smaller than the file size of the system file and larger than the file size of the target system file includes: The data in the storage segments storing data in the storage space are copied to the storage segments not storing data, so that the storage segments not storing data in the storage space do not include storage segments whose capacity is smaller than the file size of the system file and larger than the file size of the target system file.

8. The method according to claim 5, characterized in that The adjusting the storage location of the data stored in the storage space includes: Extracting target data from a storage segment in the storage space that has a capacity smaller than the file size of the target system file and stores data; The reference storage segment is divided into a plurality of storage segments using the target data as the target storage segments, wherein the capacity of each storage segment in the plurality of storage segments is smaller than the file size of the target system file.

9. The method according to claim 8, characterized in that The extracting target data from a storage segment in the storage space that has a capacity smaller than the file size of the target system file and stores data includes: determining a difference between a storage capacity of the reference storage segment and a file size of the target system file; Data with a data amount that meets the difference is extracted from a storage segment in the storage space that has a capacity smaller than the file size of the target system file and stores data as the target data.

10. The method according to claim 1, characterized in that After editing the reference storage segment to a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, the method further includes: Starting the boot process; The boot processing program applies to the storage space for a storage segment having a capacity greater than the file size of the system file to store the system file.

11. The method according to claim 10, characterized in that The step of applying for a storage segment having a capacity greater than the file size of the system file from the storage space through the boot processing program to store the system file includes: Obtaining the system file from a remote server via the boot processing program, wherein the remote server is configured to provide the system file to the boot processing program; detecting the file size of the system file by the boot processing program; Applying, through the boot processing program, to the storage space for a storage segment whose capacity is greater than the file size of the system file and meets a target capacity redundancy condition; The boot processing program stores the system file in a storage segment allocated by the storage space in response to a request of the boot processing program.

12. The method according to claim 1, characterized in that The detecting the reference storage segment in the storage space includes: Filter the memory segments divided by the memory space to allow the boot processing program to store the system Candidate storage segments for files; The reference storage segment having a capacity smaller than the file size of the system file is screened from the candidate storage segments.

13. The method according to claim 12, characterized in that The step of screening, from the storage segments divided by the storage space, candidate storage segments that are allowed to be allocated to the boot processing program to store the system files comprises: detecting a first space attribute of a storage segment divided in the storage space, wherein the first space attribute is used to indicate a usage of the storage segment divided in the storage space; The storage segment whose first space attribute is available is determined as the candidate storage segment.

14. The method according to claim 13, wherein: The step of screening the reference storage segment having a capacity smaller than the file size of the system file from the candidate storage segments includes: Selecting a storage segment whose capacity is smaller than the file size of the system file from the candidate storage segments as a candidate storage segment; A storage segment having a capacity greater than the file size of a target system file in the system files is selected from the candidate storage segments as the reference storage segment, wherein the boot processing program is used to apply to the storage space for a storage segment for storing the system file according to the file size of the target system file.

15. The method according to claim 1, wherein Before detecting the reference storage segment in the storage space, the method further includes: A file size of the system file is queried from a remote server, wherein the remote server is configured to provide the system file to the boot processing program, and the boot processing program is configured to obtain the system file from the remote server and store it in a storage segment allocated in the storage space when the boot processing program is started.

16. The method according to claim 15, characterized in that The querying the file size of the system file from the remote server includes one of the following: Sending a first query request to the remote server, wherein the first query request is used to request to query the file size of the system file; A second query request is sent to the remote server, wherein the second query request is used to request the file size of the system file and the file size of the target system file, and the boot processing program is used to apply to the storage space for a storage segment for storing the system file based on the file size of the target system file.

17. A server startup device, characterized in that: An initialization module, a boot processing program, and a storage space are deployed on the server. The initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is used to store system files in the storage space and use the system files to load an operating system for the server. The device is applied to the initialization module and includes: a detection module configured to detect a reference storage segment in the storage space before the server runs the boot processing program when the server is started, wherein the reference storage segment is a storage segment in the storage space having a storage capacity smaller than a file size of the system file; The editing module is configured to edit the reference storage segment into a target storage segment that is not allowed to be allocated to the boot processing program to store the system file, wherein after the reference storage segment is edited into the target storage segment, the boot processing program is allowed to run.

18. A server startup system, characterized in that: include: An initialization module and a boot processing program, wherein a storage space is also deployed on the server, and the initialization module is configured to initialize the server hardware of the server when the server is started. The boot processing program is used to store the system file in the storage space and use the system file to load the operating system for the server, The initialization module is the initialization module described in any one of claims 1 to 16; The boot processing program is the boot processing program described in any one of claims 1 to 16.

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

20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 16 are implemented.

Citation Information

Patent Citations

  • Operating system starting method and device, server and storage medium

    CN112035172A

  • Microprocessor starting method and device, storage medium and electronic equipment

    CN116501392A

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

    CN117687703A

  • Configuring computing devices using a bootstrap configuration

    US20140365624A1