Operation system installation method and device, equipment and storage medium

By setting up an exception handling module in the operating system installer to identify and handle installation exceptions, the inefficiency problem caused by frequent restarts is solved and an efficient automated installation process is achieved.

CN120704955AActive Publication Date: 2025-09-26INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202511203519.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-09-26
Estimated Expiration
2045-08-27

AI Technical Summary

Technical Problem

During the operating system installation process, frequent server restarts result in time-consuming installation exception handling, reducing deployment efficiency and affecting user experience.

Method used

By setting an exception handling module in the installer, the error type is identified and handled according to different types, and the installer is reloaded to complete the operating system installation, avoiding server restart.

Benefits of technology

It implements automated error handling during the operating system installation process, reduces the number of server restarts, improves installation efficiency, and optimizes the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120704955A_ABST
    Figure CN120704955A_ABST
Patent Text Reader

Abstract

The invention provides an operating system installation method and device, equipment and a storage medium, and can be applied to the technical field of operating systems. The operating system installation method comprises the following steps: in response to an exception occurring in a process of installing a to-be-installed operating system, obtaining an error type of the installation exception based on a preset exception handling module in an installation program; according to the error type, determining a processing mode for the installation exception; in response to the processing completion instruction, target configuration information is obtained, the processing completion instruction indicates that processing of the installation exception is completed based on the processing mode for the installation exception, and the target configuration information is configuration information obtained after original configuration information is modified according to the error type of the installation exception of the to-be-installed operating system; and according to the target configuration information, reloading the installation program so as to install the to-be-installed operating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of operating systems, and in particular to an operating system installation method, apparatus, device, and storage medium. Background Art

[0002] During server deployment, the operating system must be installed first. However, various errors can occur during OS installation, leading to installation anomalies. Furthermore, the OS installer performs relevant configuration and initialization during the initial startup phase. Therefore, after resolving the error, a server restart is required to ensure that the modified configuration information is correctly recognized and applied. This allows the installer to read and install the OS according to the new configuration information. Frequent server restarts significantly prolong the overall OS installation process, reduce deployment efficiency, and negatively impact the user experience. Summary of the Invention

[0003] In view of the above problems, the present application provides an operating system installation method, apparatus, device and storage medium that improve installation efficiency.

[0004] According to a first aspect of the present application, a method for installing an operating system is provided, comprising: in response to an exception occurring during the installation of an operating system to be installed, obtaining an error type of the installation exception based on a preset exception handling module in the installation program; determining a handling method for the installation exception based on the error type; in response to a processing completion instruction, obtaining target configuration information, wherein the processing completion instruction indicates that the installation exception has been handled based on the handling method for the installation exception, and the target configuration information is configuration information obtained by modifying original configuration information based on the error type of the installation exception of the operating system to be installed; and reloading the installation program based on the target configuration information to install the operating system to be installed.

[0005] The second aspect of the present application provides an operating system installation device, including: a pre-installation module, which is used to respond to an exception occurring during the installation of the operating system to be installed, and obtain the error type of the installation exception based on a preset exception handling module in the installation program; a determination module, which is used to determine the processing method for the installation exception according to the error type; an acquisition module, which is used to respond to a processing completion instruction and obtain target configuration information, wherein the processing completion instruction indicates that the installation exception is processed based on the processing method for the installation exception, and the target configuration information is configuration information obtained by modifying the original configuration information according to the error type of the installation exception of the operating system to be installed; and a re-installation module, which is used to reload the installation program according to the target configuration information to install the operating system to be installed.

[0006] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.

[0007] The fourth aspect of the present application further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the computer program or instructions are executed by a processor.

[0008] In an embodiment of the present application, an exception handling module is set in the installer to determine the error type of the installation exception, and then different processing is performed according to different error types. After the processing is completed, the installer is reloaded to reinstall the operating system. Therefore, when the operating system installation encounters an exception, there is no need to restart the server, but to directly initialize the device from the operating system level. This not only realizes the automated handling of errors, but also reduces the number of server restarts, increases the debugging frequency within the same time, shortens the restart time, thereby significantly improving the installation efficiency and optimizing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above contents and other objects, features and advantages of the present application will become more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:

[0010] Figure 1 A schematic diagram of a hardware environment for an operating system installation method according to an embodiment of the present application is shown schematically;

[0011] Figure 2 A flowchart schematically illustrates a method for installing an operating system according to an embodiment of the present application;

[0012] Figure 3 The following schematically shows a processing flow chart of each module in the installation program according to an embodiment of the present application;

[0013] Figure 4 A flowchart schematically illustrates matching different processing mechanisms according to different error types according to an embodiment of the present application;

[0014] Figure 5 A flowchart for processing a hard disk error according to an embodiment of the present application is schematically shown;

[0015] Figure 6 The following schematically shows a flowchart for processing an installation configuration file error according to an embodiment of the present application;

[0016] Figure 7 A flowchart of installation based on an error handling function according to an embodiment of the present application is schematically shown;

[0017] Figure 8 A block diagram schematically illustrates a structure of an installation device for an operating system according to an embodiment of the present application;

[0018] Figure 9 A block diagram of an electronic device suitable for implementing an operating system installation method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0019] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present application. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.

[0020] The terms used herein are only for describing specific embodiments and are not intended to limit the present application. The terms "comprise," "include," etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0021] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0022] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0023] The method embodiments provided in the embodiments of the present application can be executed in a server, a mobile terminal, a computer terminal or a similar computing device. Taking running on a server as an example, Figure 1 The following schematically shows a hardware environment diagram of a method for creating a redundant array of independent disks according to an embodiment of the present application. Figure 1 As shown, the server may include one or more ( Figure 1The server includes a processing device 102 (only one of which is shown) (the processing device 102 may include, but is not limited to, a microcontroller unit (MCU) or a programmable logic device (FPGA)) and a memory 104 for storing data. The server may also include a transmission device 106 and an input / output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for creating a redundant array of independent disks in the embodiment of the present application. The processing device 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 examples, the memory 104 may further include a memory remotely located relative to the processing device 102, and these remote memories may be connected to the mobile terminal 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.

[0025] Transmission device 106 is used to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by a computer terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0026] Optionally, the operating system installation method in this embodiment may be executed by a server. Here, the server refers to the entire server, including relevant components and processing devices within the server that need to execute the operating system installation method. The operating system installation method in this embodiment may also be executed by the processing device 102. In some examples of this embodiment, the operating system installation method is described as being executed by the processing device.

[0027] The following will be based on Figure 1 Schematic diagram of the hardware environment described by Figures 2 to 7 The installation method of the operating system according to the embodiment of the present application is described in detail.

[0028] Figure 2 The flowchart of the method for installing an operating system according to an embodiment of the present application is schematically shown.

[0029] like Figure 2 As shown, the operating system installation method of this embodiment may include operations S210 to S240.

[0030] In operation S210 , in response to an exception occurring during the installation of the operating system to be installed, an error type of the installation exception is obtained based on a preset exception handling module in the installation program.

[0031] While the server is installing the operating system to be installed, the installation process can be monitored in real time through the installer. The installer can provide software packages. During system installation, various data, such as system files, drivers, and configuration information, can be read from these packages and deployed to the corresponding locations on the server according to preset rules. The installer can also configure system interfaces, such as graphical interfaces and command-line interfaces, so that users can manage the installation environment and software packages with simple clicks or command input, and launch corresponding applications after the operating system installation is complete. The operating system to be installed can be open source. Due to its open source nature, developers can customize and optimize the system kernel and related software components according to different hardware architectures and requirements, thereby developing versions suitable for installation on various devices.

[0032] In response to monitoring abnormal situations during the installation of the operating system to be installed, such as hardware compatibility issues (such as hard disk interface mismatch, memory stick failure causing read and write errors, etc.), software conflicts (such as conflicts with certain drivers or software already existing on the server), installation file corruption (incomplete files during downloading or bad sectors on the storage medium causing file corruption), etc., the exception handling module in the installation program can be triggered immediately.

[0033] The exception handling module can be a pre-programmed set of code, including rules and logic for identifying various possible installation exceptions. When an exception occurs, the module can determine the type of error. For example, if the installation failure is caused by a mismatched hard drive interface, the exception handling module can detect the communication between the hard drive controller and the hard drive and identify the error as a "hard drive interface compatibility issue."

[0034] In operation S220 , a handling method for the installation exception is determined according to the error type.

[0035] After obtaining the error type of the installation exception, the installation program can determine a handling method for the installation exception based on the error type.

[0036] For example, the specific handling method can be determined by a preset table of correspondences between error types and handling methods. For example, if the error type is "hard disk interface compatibility issue," the handling method may be to prompt the user to replace the hard disk controller or hard disk that supports the current hard disk interface; if the error type is "software conflict," the handling method may be to automatically disable or uninstall the software or driver that conflicts with the operating system to be installed during the installation process; if the error type is "installation file corrupted," the handling method may be to prompt the user to re-download the installation file or obtain the complete installation file from other reliable storage media.

[0037] In operation S230, in response to the processing completion instruction, target configuration information is obtained, wherein the processing completion instruction indicates that the installation exception is processed based on the processing method for the installation exception, and the target configuration information is the configuration information obtained by modifying the original configuration information according to the error type of the installation exception of the operating system to be installed.

[0038] In an embodiment of the present application, a corresponding operation entry can be provided for the user to choose to agree or reject the automated decision result. That is, before the installation exception handling / decision is processed based on the installation exception handling method, an instruction to agree or reject the processing / decision by the user can be obtained through the corresponding operation entry. If the user agrees to proceed with the processing / decision, the installation exception handling / decision is processed based on the installation exception handling method, that is, step S230 is executed. If the user rejects the processing / decision, the expert decision process is entered.

[0039] After determining how to handle installation anomalies, the installer can perform corresponding operations according to that handling method. If the handling method requires manual user intervention, the installer can prompt the user to perform the operation through the display interface and verify after the user completes the operation. If the handling method is automatic, the installer can directly execute the corresponding code logic to complete the processing. For example, when automatically uninstalling conflicting software, the installer can call system-related interfaces to safely uninstall the target software and clean up related registry entries and file residues. During this process, the user can also be asked through the display interface whether to agree to uninstall the conflicting software.

[0040] When the installation exception handling is complete, the installer can generate a handling completion instruction. This instruction not only indicates that the installation exception handling based on the installation exception handling method has been completed, but also includes relevant information about the handling result, such as whether the handling is successful and whether further operations are required.

[0041] After the instructions are generated, the installer can modify the original configuration information based on the error type of the operating system installation exception to obtain the target configuration information. The original configuration information is a series of parameters pre-set by the user or the system based on the server's hardware environment and installation requirements before installing the operating system. It includes disk partitioning scheme, file system type, network settings, and user account information.

[0042] For example, if the installation exception is caused by improper disk partitioning, the disk can be repartitioned when handling the exception. Therefore, when obtaining the target configuration information, the installer can modify the disk partition-related parameters in the original configuration information, such as partition size and partition format, based on the new disk partition situation, to generate the target configuration information that meets the current actual situation.

[0043] In operation S240 , the installation program is reloaded according to the target configuration information to install the operating system to be installed.

[0044] After obtaining the target configuration information, the installer can directly restart without restarting the server, and can initialize the operating system installation interface to apply the latest target configuration information and continue the operating system installation from the location where the installation exception occurred or at a suitable breakpoint.

[0045] For example, during the installation of a server operating system, the installer detected an exception during the file copying phase. The exception handling module determined that the error was caused by bad sectors on the hard drive, preventing the installation files from being written properly. In response to this error, the installer could immediately stop the current file copy operation and provide feedback to the end user, informing them of the bad sector issue and offering a solution: repairing the bad sectors using specialized tools. The user could then use the tools based on the feedback. During this process, the installer could remain in a waiting state and monitor changes in the hard drive status in real time. After the user completes and confirms the hard drive repair, the installer could receive a completion signal and reload the system based on the repaired hard drive status information (i.e., the target configuration information). During this process, the installer could reassess the hard drive availability, recopy any files that were previously unsuccessfully copied due to bad sectors, skip confirmed bad sector areas, and adjust file storage locations appropriately. Furthermore, the installer could repair and calibrate other aspects of the installation process affected by the bad sectors, such as system configuration parameter records. Ultimately, the entire operating system installation is complete.

[0046] It is understandable that by setting up an exception handling module in the installer, the error type of the installation exception can be determined, and different handling can be performed according to different error types. After the processing is completed, the installer is reloaded to reinstall the operating system. Therefore, when the operating system installation encounters an exception, there is no need to restart the server, but instead the device is initialized directly at the operating system level. This not only achieves automated error handling, but also reduces the number of server restarts, increases the debugging frequency within the same time, and shortens the restart time, thereby significantly improving installation efficiency and optimizing the user experience.

[0047] Based on the above embodiment, for various exceptions that occur during the installation process of the operating system to be installed, the exception handling module can parse the system log to determine the corresponding error type.

[0048] In an embodiment of the present application, based on a preset exception handling module in the installation program, the error type of the installation exception is obtained, including: obtaining the system log generated during the installation of the operating system to be installed through the exception handling module; and obtaining the error type by parsing the system log.

[0049] When an exception occurs during the installation of the operating system, the exception handling module quickly responds and activates, interacting with various components within the installer to fully capture the system logs generated during the installation process. These system logs can include every key operation from the installation startup to the exception, system status changes, and various event information such as hardware detection results, software loading status, and network connection status.

[0050] After obtaining the system log, the exception handling module can use the log parsing algorithm and the preset error pattern library to perform in-depth analysis, analyze the log text line by line, accurately identify the keywords, error codes and exception prompt information, and compare and match them with the known error patterns in the error pattern library, so as to quickly and accurately determine the error type of the installation exception.

[0051] For example, when installing an operating system for a data center server, potential physical damage to the hard drive triggers an installation exception during the disk partitioning phase, pausing the process. At this point, the exception handling module in the installer can respond immediately. By interacting with the installer's underlying interface, it quickly locates and reads the system logs generated during the installation process. It then applies text and semantic analysis algorithms to parse and structure the logs line by line, generating structured data. This structured data can then be compared with a pre-set knowledge base to determine the type of exception error: "Partitioning failure due to physical disk damage." A detailed description of the error type, the scope of impact, and recommended handling procedures can also be determined.

[0052] The exception handling module can be further divided into an exception monitoring module, a log analysis module, an error type matching module, and an error handling module. Each module works together to achieve an efficient installation exception handling mechanism.

[0053] Figure 3 The following schematically shows a processing flow chart of each module in the installation program according to an embodiment of the present application.

[0054] like Figure 3As shown, after the operating system installation process starts, the exception monitoring module, which is deeply integrated with the installer's underlying interface, can first be loaded to continuously monitor the operating system installation process and capture state changes and event information during the installation process. If the operating system installation process does not encounter any abnormalities during the monitoring period, that is, the installation process progresses smoothly and all indicators meet expectations, the exception monitoring module can trigger the exit mechanism and complete the operating system installation. Once the exception monitoring module detects an abnormality during the operating system installation process, it can immediately activate the log analysis module to parse the system logs generated during the installation process, identify key information in the logs, and perform structured processing on this information. Subsequently, the error type matching module can compare and match the structured data output by the log analysis module with a preset error pattern library to determine the specific error type of the current installation abnormality and match the corresponding targeted processing strategy based on the mapping relationship between error type and processing method. Finally, the error handling module can present the error type and corresponding processing method to the end user in an intuitive and easy-to-understand manner, for example, by displaying detailed error information and operation instructions through a graphical interface. The end user can use this information to handle the installation abnormality and click the reinstall button after the problem is resolved. At this point, you can reload the installer based on the target configuration information without restarting the server to start the operating system reinstallation process.

[0055] It can be understood that by parsing the system logs through the exception handling module to determine the installation exception, the installation process is ensured to be controllable and the robustness of the installation process is enhanced.

[0056] In order to comprehensively and accurately deal with various exceptions that may occur during the operating system installation process, the error types can be divided into detailed and targeted categories.

[0057] In an embodiment of the present application, the error type includes at least one of an installation configuration file error, a hard disk error, and an infrastructure hardware error.

[0058] The installation configuration file serves as a guide for operating system installation. It can include critical information such as disk partitioning schemes, package selections, and network settings. Errors in the installation configuration file, such as improperly sized partitions resulting in insufficient space, incorrectly configured package dependencies, or network parameters that don't match the actual environment, can cause the installer to fail to execute as expected, leading to installation anomalies.

[0059] As the primary storage medium for operating system installation, the hard drive's condition can directly affect the smooth progress of the installation. Hard drive errors can include a variety of situations. For example, physical damage to the hard drive, such as bad sectors or head failure, can cause data read and write failures, preventing the installer from creating partitions and writing system files to the hard drive. An outdated hard drive firmware version or compatibility issues can also conflict with the installer. Furthermore, hardware connection issues, such as loose hard drive cables or damaged connectors, can also prevent the hard drive from being properly recognized or accessed during installation, leading to installation anomalies.

[0060] Infrastructure hardware is the foundation for the normal operation of servers or computers, including key components such as the motherboard, memory, CPU (Central Processing Unit), and power supply. Failures in this hardware can severely impact operating system installation. For example, memory failure can cause data transmission errors during installation, crashing or freezing the installer. Overheating or unstable CPU performance can interfere with the normal operation of the installer. A damaged motherboard chipset or incorrect BIOS (Basic Input / Output System) settings can prevent hardware devices from being correctly identified and initialized. An unstable or insufficient power supply can cause a system reboot or hardware malfunction, leading to a failed operating system installation.

[0061] It is understandable that by clearly defining the error type, the root cause of the installation anomaly can be located more accurately, and corresponding treatment measures can be taken accordingly, thereby improving the success rate and stability of the operating system installation.

[0062] Figure 4 A flowchart schematically illustrates matching different processing mechanisms according to different error types according to an embodiment of the present application.

[0063] like Figure 4 As shown, operating system installation errors can be categorized into configuration file errors, hard disk errors, and infrastructure hardware errors. Different error types can be handled differently. Configuration file errors can be handled via the configuration file error handling process; hard disk errors can be handled via the hard disk error handling process; and other errors, such as infrastructure hardware errors, can be handled via the default infrastructure hardware error handling process.

[0064] Based on the above embodiments, in this embodiment, a handling method for installation abnormalities is determined according to the error type, including: when the error type is a hardware error in a hard disk error, the handling method is determined to be to perform a hard disk replacement or removal operation, and generate a first guidance message, the first guidance message is used to guide the terminal user to replace or remove the hard disk, and the target configuration information indicates the status information of the hard disk when the hard disk replacement or removal operation is completed.

[0065] During the operating system installation process, if the error type is displayed as a hard disk error, you can determine the type of hard disk error. The error type could be a hardware error, meaning that the hard disk has experienced irreversible damage or failure at the physical level, preventing the operating system installer from performing critical operations such as reading, writing, partitioning, and storing files on the hard disk. For example, the hard disk may have severe bad sectors, preventing accurate data writing or reading; damage to the hard disk head assembly, preventing normal access to stored data; a circuit board failure, preventing the hard disk from being recognized by the system, or abnormal power supply.

[0066] Because damaged hard drives are often difficult to repair through software, continued use may cause unpredictable problems or even damage other hardware. Therefore, for hard drive hardware errors, a solution can be determined to be replacing or removing the hard drive. After determining the solution, a first guidance message can be generated. This message can include detailed information about the error type, the hardware drive letter and serial number, etc. Furthermore, the first guidance message can be delivered to the end user in the form of a pop-up window, allowing the user to directly locate the specific hardware slot and remove the hard drive or replace it with a new one.

[0067] In the event of a hard drive hardware error, the target configuration information can indicate the status of the hard drive after the hard drive replacement or removal operation is completed. If the user chooses to replace the hard drive, the target configuration information can record basic information such as the new hard drive's model, capacity, and interface type, as well as the new hard drive's device identifier in the system and the partition scheme (if the user chooses to repartition), so that the installer can correctly install the operating system on the new hard drive based on this information. If the user chooses to remove the failed hard drive without replacing it, the target configuration information can update the list of hard drives in the system, excluding the removed hard drive, and adjust the disk partitioning and storage policy accordingly to ensure that the installer can continue to install the operating system based on the remaining available hard drives.

[0068] On the basis of the above embodiment, the handling method for the installation exception is determined according to the error type, including: when the error type is a non-hardware error in the hard disk error, the handling method is determined to be formatting and repairing the hard disk, and a second guidance information is generated. The second guidance information is used to guide the terminal user to format the hard disk, and the target configuration information indicates the status information of the hard disk after the formatting process is completed.

[0069] Non-hardware errors, classified as hard drive errors, can be caused by software-level issues such as file system corruption, partition table errors, and incompatible disk formats. For example, the file system may become corrupted due to a sudden power outage or system crash, preventing the installer from recognizing or accessing files on the hard drive. The partition table may be incorrectly modified or lost, resulting in a loss of partition information. The disk format may be incompatible with the format required by the installer, affecting normal system installation.

[0070] For non-hardware errors on the hard disk, the handling method can be determined to be formatting to repair the hard disk. The formatting operation can clear all data on the hard disk and re-establish the file system and partition table, restoring the hard disk to its original usable state, thereby resolving installation obstacles caused by software problems. At the same time, a second guidance message can be generated to guide the end user to format the hard disk. The second guidance message can explain to the user the purpose and possible impact of the formatting operation, that is, it will clear all data on the hard disk, and remind the user to back up important files in advance. At the same time, it can also explain in detail how to enter the hard disk formatting option in the operating system installation interface or through specific tool software, guide the user to select the appropriate file system format, and how to confirm and execute the formatting operation, to ensure that the user can complete the hard disk formatting correctly and safely.

[0071] In the non-hardware error scenario of the hard disk, the target configuration information can indicate the status information of the hard disk after the formatting process is completed. For example, it can record the available space size of the hard disk after formatting, the allocated partition information (including partition size, file system type, etc.), and the logical identification of the hard disk in the system.

[0072] For example, during the operating system startup installation process, the installer will first perform an initialization operation on the disk. However, when there is junk data left in the hard disk equipped with the server, or there is independent disk redundant array information that has not been cleared, the disk initialization will fail, causing the operating system installation to be abnormal. At this time, information can be fed back to the user in the form of a pop-up window, and the detailed information of the reported hard disk error, drive letter and serial number and other information will be displayed in the form of a pop-up window. At the same time, the user can decide whether to format the hard disk. When the user chooses to format, the disk cleanup command can be called to perform a formatting operation on the abnormal hard disk. After the formatting is successfully completed, the installer can reload the target configuration information and restart the installation interface to reinstall the system.

[0073] Figure 5 The figure schematically shows a flowchart of processing a hard disk error according to an embodiment of the present application.

[0074] like Figure 5 As shown, after the operating system installation process begins, the hard disk error type can be determined first. If there is junk data or a file system error in the hard disk, it can be determined as a non-hardware error. At this time, the error disk information can be prompted to ask the user to confirm whether to format the hard disk. If the user confirms, the hard disk will be formatted, and then the hard disk will be reinitialized and the installation program will be reloaded. If it is a storage medium error or other type of error, it can be determined as a hard disk hardware error, and the error hard disk information can also be prompted, waiting for the terminal user to confirm whether the error hard disk has been removed. After the user confirms, the hard disk can also be reinitialized and the installation program can be reloaded.

[0075] It is understandable that by specifically dividing hard disk errors, clearly distinguishing between hardware errors and non-hardware errors, and formulating corresponding processing methods and generating corresponding guidance information for different types, the handling of hard disk abnormalities during the operating system installation process can be more targeted and standardized, which not only helps to quickly locate and solve hardware-level faults, but also efficiently handle hard disk problems at the software level, thereby ensuring the smooth progress of the operating system installation process and improving the efficiency and reliability of the entire installation process.

[0076] Based on the operating system installation exception handling architecture constructed in the above embodiment, this embodiment further focuses on the key error type of installation configuration file error, and elaborates and optimizes its handling method in detail.

[0077] Based on the above embodiments, in this embodiment, a handling method for installation exceptions is determined according to the error type, including: when the error type is a source address configuration error in the installation configuration file, determining the handling method to modify the source address in the installation configuration file, and generating a third guidance information, the third guidance information is used to guide the terminal user to modify the source address in the installation configuration file to the target address, and the target configuration information indicates the installation configuration file when the source address modification is completed.

[0078] When an installation anomaly is detected due to an installation configuration file error, the error type determination mechanism can be quickly activated to distinguish whether it is a source address configuration error or another type of error. At the same time, guidance information can be prompted to the end user in the form of a pop-up window based on the different error types.

[0079] If it is determined that the error type is a source address configuration error in the installation configuration file, the corresponding processing method can be determined to be to modify the source address in the installation configuration file. At the same time, in order to ensure that the user can perform the modification operation clearly and accurately, a third guidance message can be generated. The guidance message can prompt the user that there is a problem with the source address in the installation configuration file, and explain in detail how to modify the source address in the installation configuration file to the target address. For example, the guidance information can clearly indicate the specific location of the source address in the configuration file, as well as the correct format and content of the target address, and can also provide examples for explanation to help users quickly understand and complete the modification operation. In addition, the third guidance message can also explain the impact that the source address error may have on the installation process, such as the inability to obtain the software packages and system files required for installation from the specified source.

[0080] In the source address configuration error handling scenario, the target configuration information can indicate the status of the installation configuration file after the source address modification is completed, including the modified source address information, whether other relevant parameters of the configuration file are affected, etc., to ensure that the installation program can continue to execute based on the correct configuration file.

[0081] It is understandable that the source address configuration error in the installation configuration file is treated as a specific error type, and the processing method of modifying the source address is determined, so that the error can be accurately corrected, the correctness of the installation configuration file is ensured, and invalid processing measures due to inaccurate error type judgment are avoided, ensuring that the problem is solved in the correct direction.

[0082] Based on the above embodiments, in this embodiment, reloading the installation program according to the target configuration information to install the operating system to be installed includes: reloading the installation program to install the operating system to be installed based on the installation configuration file whose source address has been modified; calling the exception handling module to obtain the error type in the installation configuration file whose source address has been modified; pausing the installation process based on the error type, and generating fourth guidance information according to the error type, the fourth guidance information is used to guide the terminal user to modify the installation configuration file, and the target configuration information indicates the corrected installation configuration file.

[0083] After completing the modification operation on the source address in the installation configuration file, the installation program can be reloaded based on the installation configuration file with the modified source address, and then the installation operation of the operating system to be installed can be performed.

[0084] However, even if the source address has been corrected, there may still be other problems in the configuration file that affect the installation. Therefore, in the process of reloading the installer and executing the installation, in order to ensure the accuracy and stability of the installation, the installer can continue to call the exception handling module to perform a comprehensive test on the installation configuration file whose source address has been modified to determine whether there are other potential error types, such as partition errors, software package errors, parameter setting errors, and syntax errors. Once the error type is detected, the installation process can be paused immediately to avoid further expansion of the error, resulting in installation failure or system instability. At the same time, a fourth guidance message can be generated based on the detected error type to guide the terminal user to modify the installation configuration file. For example, the guidance information can clearly indicate the specific location of the error, the nature of the error, and the suggestions and methods for modification to help users quickly locate and solve the problem.

[0085] The target configuration information may include not only the correct information after the source address is modified, but also the complete configuration content after other errors are corrected, to ensure that the installation program can continue to execute based on the correct configuration, thereby successfully completing the installation task of the operating system to be installed.

[0086] Figure 6 The following schematically shows a flowchart for processing an installation configuration file error according to an embodiment of the present application.

[0087] like Figure 6As shown, when an installation configuration file configuration error is detected, such as a source address configuration error, a guidance message can be sent to the user to guide the user to modify the source address in the installation configuration file. After the user completes the modification operation of the installation configuration file, the "Reload" button can be clicked to reset the installation program, and the updated installation configuration file content can be read in time to synchronize the system with the latest target configuration information. Then, the system can be restarted to start the installation interface and initialize it, and the operating system to be installed can be installed. In this process, the exception handling module can be called to continuously detect the installation configuration file, and if an installation abnormality is detected, the above series of commands from prompting the user to modify to restarting and initializing are repeated until the installation configuration file has been verified multiple times and it is confirmed that there are no problems at all, then the operating system installation continues and the entire processing flow ends.

[0088] It is understandable that the cyclic checking mechanism for the installation configuration file can better ensure the correctness of the installation configuration file, thereby providing a solid foundation for the smooth installation of the operating system.

[0089] Based on the operating system installation exception handling framework constructed in the above embodiment, this embodiment further refines the handling method and related information transmission mechanism for the specific error type of infrastructure hardware error.

[0090] Based on the above embodiments, in this embodiment, a handling method for installation exceptions is determined according to the error type, including: when the error type is an infrastructure hardware error, the handling method is determined to be manual operation, and a fifth guidance message is generated. The fifth guidance message is used to guide the terminal user to trigger an assistance request, and the target configuration information indicates the infrastructure hardware status information when the modification is completed.

[0091] When an infrastructure hardware error is detected, given that infrastructure hardware encompasses the core components of a server or computer, such as the motherboard, CPU, memory, and power supply, and that these hardware failures are often complex and specialized, they are difficult to repair through simple software operations or automated processes. Therefore, manual intervention is determined, requiring server engineers to conduct a comprehensive and detailed inspection and repair of the hardware, effectively resolving the infrastructure hardware error.

[0092] After manual operation is determined as the handling method, a fifth guidance message can also be generated to guide the end user in initiating an assistance request. The fifth guidance message can specifically include the following: a brief description of the error (e.g., "An error has been detected in the infrastructure hardware, which may affect the normal installation of the operating system"), the method for triggering the assistance request (e.g., "through a specific button or menu option in the system interface, or by calling a designated technical support number or sending an email"), and key points for reporting the problem (e.g., "the specific time the error occurred, the stage of the operating system installation, the specific content of the error message, etc.").

[0093] In the event of an infrastructure hardware error, the target configuration information can indicate the status of the infrastructure hardware after the modification is complete. This information indicates the normal status of the infrastructure hardware after manual operation, such as the hardware model, specifications, and operating parameters. Furthermore, the target configuration information can also indicate the connection method and configuration information between the infrastructure hardware, including the slot connection status between the motherboard and hardware such as the CPU, memory, and hard drive, as well as relevant parameters in the BIOS settings, such as the boot order and memory frequency. This allows for rapid restoration of normal hardware connections and configurations during maintenance, preventing the recurrence of problems caused by configuration errors.

[0094] Understandably, automated procedures are unable to fully cover and effectively resolve infrastructure hardware errors. Therefore, manual processing was chosen to avoid secondary issues caused by incorrect handling and improve the professionalism and accuracy of problem solving.

[0095] When the error type of the installation exception is obtained by loading the exception handling module as mentioned above, in order to achieve flexible control over whether the exception handling module is called or not, a target startup parameter can be added to the startup options of the operating system. That is, according to the specific setting of the target startup parameter, it is dynamically decided whether to activate the preset exception handling module, thereby providing a more convenient and controllable operation method for exception handling during the entire installation process.

[0096] In an embodiment of the present application, based on a preset exception handling module in the installation program, the error type of the installation exception is obtained, including: calling the exception handling module through the target startup parameters of the operating system to be installed to obtain the error type of the installation exception, wherein the target startup parameters are used to trigger a preset logical link to call the exception handling module.

[0097] The target startup parameter can be designed and coded into the interaction logic between the installer and the operating system. When the operating system is started and installed, the target startup parameter can be detected in the startup options according to preset rules. Once the target startup parameter is detected, which triggers the call of the exception handling module, the corresponding preset logical link can be activated.

[0098] A pre-programmed logical chain can be a series of pre-programmed instructions and function calls. It executes sequentially in a specific order. It first checks whether the exception handling module has been loaded into the installer. If not, the logical chain directs the installer to read the exception handling module code from a specified storage location (such as a specific directory within the installer or a system library within the operating system) and load it into the appropriate area within the installer. Once loaded, the logical chain further initializes the relevant parameters and status of the exception handling module to ensure proper operation. Finally, the exception handling module is called through a specific interface function, enabling it to monitor and assess various installation anomalies, thereby determining the type of installation error.

[0099] To add the new startup parameter "mon" to the operating system startup options, you need to make corresponding modifications in the operating system startup configuration file.

[0100] For example, the startup options in the operating system can be modified accordingly, adding a new startup parameter "mon". When the operating system is started and installed, the "mon" parameter can be passed to the operating system kernel. During the operating system kernel startup process, this parameter can be detected and the exception handling module can be called according to the preset logic to determine the error type of the installation exception.

[0101] It should be noted that for details not included in this embodiment, please refer to the implementation details of the aforementioned embodiment.

[0102] If you believe your current installation environment is stable and you don't need to enable the exception handling module, you can simply start the installer without adding the target startup parameter. This will allow the installer to proceed as normal without loading the exception handling module, thus reducing system resource usage and improving installation efficiency.

[0103] It is understandable that binding the call of the exception handling module to the target startup parameters of the system, rather than fixing it within the installation process, makes the activation of the exception handling function more flexible and controllable.

[0104] The exception handling module can be called through the target startup parameter. On this basis, it can be further determined whether the target startup parameter exists in multiple startup parameters related to the installation of the operating system to be installed, so as to ensure the stability and reliability of the system installation.

[0105] Based on the above embodiments, in this embodiment, the exception handling module is called through the target startup parameters of the operating system to be installed to obtain the error type of the installation exception, including: in response to starting the installation of the operating system to be installed, reading multiple preset startup parameters related to the installation of the operating system to be installed; calling the parameter parsing function to parse the multiple startup parameters to obtain the characteristics of the multiple startup parameters; when there are features in the multiple startup parameters that match the features of the target startup parameters, calling the exception handling module to obtain the error type of the installation exception.

[0106] After receiving the instruction to start the installation of the operating system to be installed, the preset startup parameter storage location can be located according to the predefined path and file reading rules. In common operating system installation scenarios, the startup parameters can be stored in a specific configuration file of the installation medium in the form of a list. For example, in the operating system installation, it can be stored in the configuration file of the boot loader. Then, the startup parameter list can be read from the configuration file to extract multiple startup parameters related to the installation of the operating system to be installed, including but not limited to the target disk partition information of the system installation, the installation mode (such as a new installation or an upgrade installation), whether to enable certain specific functions (such as network installation, encrypted installation, etc.), and the target startup parameters.

[0107] After reading multiple startup parameters, the startup parameters can be parsed by the parameter parsing function. In this process, the parameter parsing function can use string processing and pattern matching algorithms to identify the format and content of each startup parameter.

[0108] For example, for the startup parameter "install_mode=full", the parameter parsing function can first identify the parameter name "install_mode" and the parameter value "full" and store them in corresponding data structures. At the same time, the function can also verify the validity of the parameter value according to preset rules to ensure that it meets the requirements of system installation. The parameter parsing function can then extract the unique feature information of each startup parameter, such as the parameter name, specific identifier, and value range, thereby generating a detailed feature description for each startup parameter, providing an accurate data foundation for subsequent feature matching.

[0109] After parsing the multiple startup parameters and obtaining their characteristics, feature matching can begin. Specifically, the characteristics of the multiple startup parameters are searched for those that match the characteristics of the target startup parameters. To achieve efficient and accurate matching, data structures such as hash tables or binary trees can be used to store and manage the characteristic information of the startup parameters. When the characteristics of a particular startup parameter are traversed, they can be compared one by one with the characteristics of the target startup parameter. If a complete match is found, or if a preset similarity threshold is met, it can be determined that a feature that matches the characteristics of the target startup parameter exists. At this point, the call mechanism of the exception handling module can be immediately triggered to determine the error type of the installation exception.

[0110] It should be noted that as the system continues to develop and update, new functional modules may be added to the installer. Therefore, these functional modules can be flexibly enabled or disabled by setting corresponding startup parameters. For example, a new virtual reality support module has been added, and users can enable this feature by setting the corresponding startup parameters. After the system identifies this parameter, it can load the VR-related drivers and library files to enable VR support, thereby meeting users' diverse functional needs.

[0111] It is understandable that by screening multiple startup parameters, it is possible to accurately identify the target startup parameters related to exception handling. At the same time, abnormal parameter settings can also be detected. Once abnormal parameters are found, loading can be rejected or isolation measures can be taken, effectively preventing abnormal parameters from causing damage to the system and ensuring the safe operation of the system.

[0112] When the target startup parameters exist and the exception handling module is called to determine the error type of the installation exception, and the corresponding processing method is taken to handle the installation exception according to the error type, the target configuration information can be obtained based on the error handling function defined in the installation program to reinstall the operating system to be installed.

[0113] Based on the above embodiments, in this embodiment, in response to a processing completion instruction, target configuration information is obtained, including: based on an error handling function predefined in the installer, obtaining the installation type of the operating system to be installed and the path of the installation source, the installation type is used to determine the method of reading the target configuration information, and the path of the installation source is used to determine the location where the installer obtains the target configuration information; saving the installation type to a type variable, and saving the path of the installation source to a path variable; in response to the processing completion instruction, obtaining the target configuration information according to the type variable and the path variable.

[0114] Figure 7 A flowchart of installation based on an error handling function according to an embodiment of the present application is schematically shown.

[0115] like Figure 7 As shown, if the target boot parameter is present, an error handling function can be called. The error handling function (e.g., the error handler function) can first perform a comprehensive system scan and analysis to obtain the installation type and installation source path of the operating system to be installed. The installation type indicates how the target configuration information is read. Different reading methods will result in different installation methods during the operating system installation process, such as using optical storage media or configuration files. The installation source path indicates the specific location of the target configuration information on the storage device. Whether it is a local hard drive, an external storage device (such as a USB flash drive, a mobile hard drive), or a network share, the target configuration information can be accurately located using the path. Only by obtaining the correct installation source path can the installer successfully read the required installation resources and complete the operating system installation. If the target boot parameter is not present, the default installation method can be used.

[0116] After obtaining the installation type and installation source path, to facilitate subsequent program use and processing, the installation type can be stored in a type variable (i.e., the type variable), and the installation source path can be stored in a path variable (i.e., the source variable). Type and path variables can be predefined memory spaces with specific data types and storage structures to securely and efficiently store the corresponding information. For example, the type variable can use an enumeration type to define different enumeration values ​​for different installation methods (such as KS (kickstart) installation and network PXE (Pre-boot Execution Environment) installation). This allows subsequent program use of a simple comparison to determine the installation type, improving code readability and maintainability. The path variable can use a string type to store the installation source path in a standard file path format. Specific string processing functions can also be used to verify and correct the path to ensure its accuracy and validity.

[0117] The installation type and the path of the installation source may also be stored in a persistent storage medium, such as a specific configuration file on a local hard disk, a system registry, or a specific database.

[0118] When the processing completion instruction is triggered, the installation program may load the type variable and the path variable, and obtain target configuration information according to the installation type and the path of the installation source stored therein.

[0119] As you can understand, the installer uses type and path variables to organically combine the installation type and the installation source path, ensuring a smooth and accurate installation of the operating system. Furthermore, storing the installation type and installation source path as dynamic variables allows for real-time modification during error handling, enhancing flexibility.

[0120] Based on the installation type stored in the type variable, the installation method of the operating system to be installed can be determined, such as installation through removable optical storage media or based on a specific automated configuration script. Different processing can be performed for different installation methods.

[0121] In some exemplary embodiments, the installation method of the operating system to be installed may be obtained, and different installation processes may be started for the operating system to be installed according to different installation methods.

[0122] For example, if the type variable stores the local physical media installation type, it means that the user can choose to use a CD as the installation medium. At the same time, the path stored in the path variable can indicate the specific location of the operating system image file on the CD. After the installer recognizes this installation method, it can load modules related to local physical media installation. These modules can be responsible for interacting with the CD drive, and based on the path information provided by the path variable, accurately locate the target image file in the file system of the CD and read it into the memory in its entirety. Once the image file is successfully read, the installer can gradually complete the installation of the operating system according to the operating system information and installation guide contained in the image file.

[0123] For example, when the KS installation type is stored in the type variable, it means that the user can install the operating system through the automated installation configuration file. In this case, the path stored in the path variable can point to the automated installation configuration file (i.e., KS file). The KS file is a key configuration file for implementing automated installation and can contain various settings and options during the installation process, thereby enabling unattended system installation. After detecting the KS installation method, the installer can immediately call the module for parsing the KS file, parse each line of code and each parameter in the KS file, and obtain detailed installation parameters and configuration information, such as disk partitioning scheme, software package installation list, and user account creation information. Ultimately, the installer can automatically complete the operating system installation process according to the process and parameters defined in the KS file.

[0124] It is understandable that different installation processes are initiated for different installation methods, allowing for flexible adaptation to various installation scenarios and meeting the needs of different user groups. At the same time, the installer improves overall installation efficiency by quickly identifying the installation method and immediately invoking the corresponding module for processing.

[0125] Based on the above embodiments, in this embodiment, the installation program is reloaded according to the target configuration information to install the operating system to be installed, including: in a pre-boot execution environment, sending a network boot request to a remote server, the network boot request is used by the remote server to locate and extract the corresponding target configuration information from a resource library that stores configuration information; receiving the target configuration information, and reloading the installation program according to the target configuration information to install the operating system to be installed in parallel on multiple servers.

[0126] In scenarios with a large number of servers, you can use PXE or iPXE (Internet Preboot Execution Environment) for batch automated installation. That is, the preboot execution environment can be a PXE or iPXE execution environment. PXE is a network boot protocol that allows computers to load operating systems from remote servers over the network without local storage devices (such as hard drives or optical drives). iPXE is an open source network boot protocol that expands and enhances traditional PXE technology.

[0127] In the pre-boot execution environment, the installer can proactively send a network boot request to a remote server. This request can include specific identification information to clearly inform the remote server of key information such as the identity and model of the server currently initiating the request, as well as the version of the operating system to be installed. After receiving the request, the remote server can use this information to accurately locate the server from the resource library that stores configuration information. As an information warehouse, the resource library can store various configuration information for different server models and different operating system versions. Using complex query algorithms, the remote server quickly extracts the target configuration information that matches the request from the resource library, ensuring that the extracted information is suitable for the installation requirements of the server initiating the request.

[0128] Once the remote server successfully extracts the target configuration information, it transmits it back to the requesting server over the network. Upon receiving the target configuration information, the installer can perform a detailed analysis, extracting key parameters such as the disk partitioning scheme, package installation list, and network configuration parameters. Based on these parameters, the installer can reload itself and adjust its internal installation logic and processes to suit the current server's installation requirements.

[0129] For example, taking the batch deployment of operating systems in a certain enterprise data center as an example, there are multiple servers in the pre-boot execution environment that need to be installed at the same time. At this time, a network boot request can be sent to the remote server. After receiving the boot request, the remote server can locate and extract the corresponding target configuration information from the resource library that stores the configuration information, which may include a KS file, and then transmit the target configuration information back to the server that initiated the request. After the installation program receives the information, it can reload its own logic based on the KS file in the target configuration information. During parallel installation, each server can operate according to the unified specifications of the KS file. For example, the installation program can divide the local disk according to the disk partition scheme, download and install the software from the specified software source according to the software package installation list, and set the network parameters according to the network configuration parameters. Ultimately, through the precise configuration of the KS file, multiple servers can complete the installation of the operating system simultaneously and consistently.

[0130] It is understandable that installing the operating system to be installed on multiple servers in parallel can fully utilize the computing resources and network bandwidth of multiple servers and improve installation efficiency.

[0131] The operating system installation method provided in the embodiments of the present application can verify different errors during the operating system installation process, determine the error type of the installation anomaly through verification, and send the error type to the end user. After the user handles the installation anomaly based on the handling method for the installation anomaly, the system installation program can be reloaded, avoiding the need to restart the server, thereby shortening the system installation time and improving the efficiency of the operating system installation.

[0132] Based on the above operating system installation method, this application also provides an operating system installation device. Figure 8 The device is described in detail.

[0133] Figure 8 The structural block diagram of the installation device of the operating system according to an embodiment of the present application is schematically shown.

[0134] like Figure 8 As shown, the operating system installation device 800 of this embodiment includes a pre-installation module 810 , a determination module 820 , an acquisition module 830 and a re-installation module 840 .

[0135] The pre-installation module 810 is used to respond to an exception during the installation of the operating system to be installed, and obtain the error type of the installation exception based on the preset exception handling module in the installation program. In one embodiment, the pre-installation module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0136] The determination module 820 is used to determine a handling method for the installation anomaly according to the error type. In one embodiment, the determination module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0137] Acquisition module 830 is configured to acquire target configuration information in response to a processing completion instruction, wherein the processing completion instruction indicates that the installation exception has been processed based on the installation exception processing method, and the target configuration information is configuration information obtained by modifying the original configuration information based on the error type of the installation exception of the operating system to be installed. In one embodiment, acquisition module 830 can be configured to perform operation S230 described above, which will not be further described here.

[0138] The reinstallation module 840 is used to reload the installation program according to the target configuration information to install the operating system to be installed. In one embodiment, the reinstallation module 840 can be used to perform the operation S240 described above, which will not be repeated here.

[0139] According to an embodiment of the present application, the pre-installation module 810 can be specifically used to: obtain the system log generated during the installation of the operating system to be installed through the exception handling module; and obtain the error type by parsing the system log.

[0140] According to an embodiment of the present application, the error type includes at least one of an installation configuration file error, a hard disk error, and an infrastructure hardware error.

[0141] According to an embodiment of the present application, the determination module 820 can be specifically used to: when the error type is a hardware error in a hard disk error, determine that the processing method is to perform a hard disk replacement or removal operation, and generate a first guidance message, the first guidance message is used to guide the terminal user to replace or remove the hard disk, and the target configuration information indicates the status information of the hard disk when the hard disk replacement or removal operation is completed.

[0142] According to an embodiment of the present application, the determination module 820 can be specifically used to: when the error type is a non-hardware error in a hard disk error, determine that the processing method is to format and repair the hard disk, and generate a second guidance information, the second guidance information is used to guide the terminal user to format the hard disk, and the target configuration information indicates the status information of the hard disk after the formatting process is completed.

[0143] According to an embodiment of the present application, the determination module 820 can be specifically used to: when the error type is a source address configuration error in the installation configuration file, determine that the processing method is to modify the source address in the installation configuration file, and generate a third guidance information, the third guidance information is used to guide the terminal user to modify the source address in the installation configuration file to the target address, and the target configuration information indicates the installation configuration file when the source address modification is completed.

[0144] According to an embodiment of the present application, the reinstallation module 840 can be specifically used to: reload the installation program to perform installation on the operating system to be installed based on the installation configuration file whose source address has been modified; call the exception handling module to obtain the error type in the installation configuration file whose source address has been modified; based on the error type, suspend the installation process, and generate a fourth guidance information according to the error type, the fourth guidance information is used to guide the terminal user to modify the installation configuration file, and the target configuration information indicates the corrected installation configuration file.

[0145] According to an embodiment of the present application, the determination module 820 can be specifically used to: when the error type is an infrastructure hardware error, determine that the processing method is manual operation, and generate a fifth guidance information, the fifth guidance information is used to guide the terminal user to trigger an assistance request, and the target configuration information indicates the infrastructure hardware status information when the modification is completed.

[0146] According to an embodiment of the present application, the pre-installation module 810 can be specifically used to: call the exception handling module through the target startup parameters of the operating system to be installed, and obtain the error type of the installation exception, wherein the target startup parameters are used to trigger a preset logical link to call the exception handling module.

[0147] According to an embodiment of the present application, the pre-installation module 810 can also be used to: in response to starting the installation of the operating system to be installed, read multiple preset startup parameters related to the installation of the operating system to be installed; call the parameter parsing function to parse the multiple startup parameters to obtain the characteristics of the multiple startup parameters; when there are characteristics in the multiple startup parameters that match the characteristics of the target startup parameters, call the exception handling module to obtain the error type of the installation exception.

[0148] According to an embodiment of the present application, the acquisition module 830 can be specifically used to: obtain the installation type and the path of the installation source of the operating system to be installed based on the error handling function predefined in the installer, the installation type is used to determine the method of reading the target configuration information, and the path of the installation source is used to determine the location where the installer obtains the target configuration information; save the installation type to the type variable, and save the path of the installation source to the path variable; in response to the processing completion instruction, obtain the target configuration information according to the type variable and the path variable.

[0149] According to an embodiment of the present application, the reinstallation module 840 can be specifically used to: send a network boot request to a remote server in a pre-boot execution environment, and the network boot request is used for the remote server to locate and extract the corresponding target configuration information from a resource library that stores configuration information; receive the target configuration information, and reload the installation program based on the target configuration information, so as to install the operating system to be installed in parallel on multiple servers.

[0150] According to an embodiment of the present application, any multiple modules among the pre-installation module 810, the determination module 820, the acquisition module 830, and the re-installation module 840 can be combined into a single module, or any one of them can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to an embodiment of the present application, at least one of the pre-installation module 810, the determination module 820, the acquisition module 830, and the re-installation module 840 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware by any other reasonable means of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the pre-installation module 810 , the determination module 820 , the acquisition module 830 and the re-installation module 840 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.

[0151] Figure 9 A block diagram of an electronic device suitable for implementing an operating system installation method according to an embodiment of the present application is schematically shown.

[0152] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present application includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present application.

[0153] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to the embodiment of the present application by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to the embodiment of the present application by executing the programs stored in one or more memories.

[0154] According to an embodiment of the present application, electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to bus 904. Electronic device 900 may also include one or more of the following components connected to I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or modem. Communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to I / O interface 905 as needed. Removable media 911, such as a magnetic disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed in drive 910 as needed, so that computer programs read from the removable media can be installed into storage section 908 as needed.

[0155] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of this application is implemented.

[0156] According to an embodiment of the present application, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.

[0157] The embodiments of the present application also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the operating system installation method provided in the embodiments of the present application.

[0158] The computer program executes the above functions defined in the system / device of the embodiment of the present application when the processor 901 executes the computer program. According to the embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0159] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0160] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present application are performed. According to the embodiment of the present application, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.

[0161] According to an embodiment of the present application, the program code for executing the computer program provided by the embodiment of the present application can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).

[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0163] Those skilled in the art will appreciate that the features described in the various embodiments of this application may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in this application. In particular, the features described in the various embodiments of this application may be combined and / or coupled in various ways without departing from the spirit and teachings of this application. All such combinations and / or couplings fall within the scope of this application.

[0164] The embodiments of the present application have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present application. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present application, those skilled in the art may make various substitutions and modifications, and these substitutions and modifications should all fall within the scope of the present application.

Claims

1. A method for installing an operating system, characterized in that: The method comprises: In response to an exception occurring during the installation of the operating system to be installed, obtaining an error type of the installation exception based on a preset exception handling module in the installation program; Determining a handling method for the installation exception based on the error type; In response to a processing completion instruction, obtaining target configuration information, wherein the processing completion instruction indicates that processing of the installation exception is completed based on the processing method for the installation exception, and the target configuration information is configuration information obtained by modifying original configuration information according to an error type of the installation exception of the operating system to be installed; Reload the installation program according to the target configuration information to install the operating system to be installed.

2. The method according to claim 1, characterized in that The error type of the installation exception is obtained based on the preset exception handling module in the installation program, including: Obtaining, through the exception handling module, a system log generated during the installation of the operating system to be installed; The error type is obtained by parsing the system log.

3. The method according to claim 1, characterized in that The error type includes at least one of an installation configuration file error, a hard disk error, and an infrastructure hardware error.

4. The method according to claim 3, characterized in that Determining a handling method for the installation exception according to the error type includes: In the case where the error type is a hardware error among the hard disk errors, the processing method is determined to be to perform a hard disk replacement or removal operation, and a first guidance message is generated. The first guidance message is used to guide the terminal user to replace or remove the hard disk, and the target configuration information indicates the status information of the hard disk when the hard disk replacement or removal operation is completed.

5. The method according to claim 3 or 4, characterized in that Determining a handling method for the installation exception according to the error type includes: When the error type is a non-hardware error among the hard disk errors, the processing method is determined to be formatting and repairing the hard disk, and a second guidance information is generated. The second guidance information is used to guide the terminal user to format the hard disk. The target configuration information indicates the status information of the hard disk after the formatting process is completed.

6. The method according to claim 3, characterized in that Determining a handling method for the installation exception according to the error type includes: When the error type is a source address configuration error in the installation configuration file, the processing method is determined to be to modify the source address in the installation configuration file, and a third guidance information is generated. The third guidance information is used to guide the terminal user to modify the source address in the installation configuration file to the target address. The target configuration information indicates the installation configuration file when the source address modification is completed.

7. The method according to claim 6, characterized in that The step of reloading the installation program according to the target configuration information to install the operating system to be installed includes: Reloading the installation program to install the operating system to be installed based on the installation configuration file whose source address has been modified; Calling the exception handling module to obtain the error type in the installation configuration file whose source address has been modified; Based on the error type, the installation process is suspended, and fourth guidance information is generated according to the error type, wherein the fourth guidance information is used to guide the terminal user to modify the installation configuration file, and the target configuration information indicates the modified installation configuration file.

8. The method according to claim 3, characterized in that Determining a handling method for the installation exception according to the error type includes: When the error type is the infrastructure hardware error, the processing method is determined to be manual operation, and a fifth guidance information is generated. The fifth guidance information is used to guide the terminal user to trigger an assistance request, and the target configuration information indicates the infrastructure hardware status information when the modification is completed.

9. The method according to claim 1, characterized in that The error type of the installation exception is obtained based on the preset exception handling module in the installation program, including: The exception handling module is called through the target startup parameters of the operating system to be installed to obtain the error type of the installation exception, wherein the target startup parameters are used to trigger a preset logical link to call the exception handling module.

10. The method according to claim 9, characterized in that The calling of the exception handling module according to the target startup parameter of the operating system to be installed to obtain the error type of the installation exception includes: In response to starting the installation of the operating system to be installed, reading a plurality of preset startup parameters related to the installation of the operating system to be installed; Calling a parameter parsing function to parse the plurality of startup parameters to obtain characteristics of the plurality of startup parameters; In the case that there is a feature among the multiple startup parameters that matches the feature of the target startup parameter, the exception handling module is called to obtain the error type of the installation exception.

11. The method according to claim 1, wherein The step of obtaining target configuration information in response to the processing completion instruction includes: Based on a predefined error handling function in the installer, obtaining an installation type and an installation source path of the operating system to be installed, wherein the installation type is used to determine a method for reading the target configuration information, and the installation source path is used to determine a location from which the installer obtains the target configuration information; Saving the installation type to a type variable, and saving the path of the installation source to a path variable; In response to the processing completion instruction, the target configuration information is acquired according to the type variable and the path variable.

12. The method according to claim 1, characterized in that Reloading the installation program according to the target configuration information to install the operating system to be installed includes: In the pre-boot execution environment, a network boot request is sent to a remote server, where the network boot request is used by the remote server to locate and extract corresponding target configuration information from a resource library storing configuration information; The target configuration information is received, and according to the target configuration information, the installation program is reloaded to install the operating systems to be installed on multiple servers in parallel.

13. An operating system installation device, characterized in that: The device comprises: A pre-installation module, configured to, in response to an exception occurring during the installation of the operating system to be installed, obtain an error type of the installation exception based on a preset exception handling module in the installation program; A determination module, configured to determine a handling method for the installation anomaly based on the error type; an acquisition module, configured to acquire target configuration information in response to a processing completion instruction, wherein the processing completion instruction indicates that processing of the installation exception is completed based on the processing method for the installation exception, and the target configuration information is configuration information obtained by modifying original configuration information according to an error type of the installation exception of the operating system to be installed; The reinstallation module is used to reload the installation program according to the target configuration information to install the operating system to be installed.

14. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Installation method, device and system for Linux operating system

    CN106126303A

  • Operation system installation method and device, equipment and storage medium

    CN115167883A

  • System starting method and device of equipment, equipment and storage medium

    CN115291966A

  • Operation system batch deployment method and device, computer equipment and storage medium

    CN115878195A

  • Operating system deployment method and device, computer equipment and storage medium

    CN116431230A

Cited By

  • Method and device for detecting abnormal exit defect of operating system software

    CN121579266A