A system startup method and device for preventing a system from crashing, an apparatus, and a storage medium

By verifying and repairing the checksum at system startup in the embedded device, the problem of device crashes was solved, automatic repair was achieved, the crash loop was avoided, and the user experience was improved.

CN114265723BActive Publication Date: 2026-01-13SHENZHEN YOUHUA COMM TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111458846.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2026-01-13
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

When existing embedded devices experience incomplete or failed firmware writes due to power loss during system upgrades, they cannot automatically switch to the backup system, causing the device to crash and preventing automatic repair of kernel or file system corruption issues.

Method used

The system automatically repairs itself by verifying the consistency of the first and second check codes during system startup. If they do not match, the system is guided into a repair program. Once the repair is complete, a random code is generated to replace the check code, and the check code is updated after the system starts normally.

Benefits of technology

It automatically identifies and repairs system anomalies, avoiding system crashes and optimizing user experience without requiring manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114265723B_ABST
    Figure CN114265723B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a system startup method, device and equipment for preventing system crash, and a storage medium. The method comprises: starting the system to enter a kernel boot program according to a user's startup operation, and checking whether a first check code and a second check code are consistent by the kernel boot program; if not, booting into a repair program to repair the system by the repair program; generating a first random code, replacing the first check code and the second check code with the first random code after the repair is completed, and restarting the system; if consistent, booting for normal startup, generating a second random code, and replacing the first check code with the second random code; and after the normal startup is successful, replacing the second check code with the second random code. Embodiments of the present application adjust the first check code and the second check code according to whether the system is successfully started normally or repaired normally, so that when the system abnormally restarts, the system can automatically identify the abnormality and start the repair program to repair, effectively avoiding system crash.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of embedded technology, and in particular to a system startup method, apparatus, device, and storage medium that prevents system crashes. Background Technology

[0002] Existing embedded devices (such as gateways, routers, and network access points) typically employ dual backup systems to ensure system stability and reliability. Each backup includes the kernel, file system, and configuration. Currently, dual backup systems can only prevent the system from switching to the faulty partition during an upgrade process if a power outage causes incomplete firmware writing or failure, ensuring the device can continue functioning on the partition before the upgrade. However, if the kernel of the currently running system is corrupted or critical file system data is damaged, automatic switching to the backup system is not possible, resulting in system crashes. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a system startup method, apparatus, device and storage medium for preventing system crashes, so as to automatically identify and repair the system during restart when a system malfunction causes a crash, and quickly restore the device to normal use.

[0004] In a first aspect, embodiments of the present invention provide a system startup method to prevent system crashes, including:

[0005] The system boots into the kernel bootloader based on the user's boot operation, and the kernel bootloader verifies whether the first checksum and the second checksum are consistent.

[0006] If there is a discrepancy, the system will be guided into a repair procedure to repair the system.

[0007] Generate a first random code. After the repair is completed, replace the first check code and the second check code with the first random code, and restart the system.

[0008] If they match, the kernel will boot the system normally and generate a second random code, replacing the first check code with the second random code.

[0009] After the system starts up successfully, the second verification code is replaced with the second random code.

[0010] Optionally, in some embodiments, before starting the system into the kernel bootloader based on the user's boot operation, the process further includes:

[0011] Burn the repair program and pre-set the same first and second check codes.

[0012] Optionally, in some embodiments, repairing the system through the repair procedure includes:

[0013] The system invokes a preset backup system to update the current system by overwriting the existing one.

[0014] Optionally, in some embodiments, repairing the system through the repair procedure includes:

[0015] Start the httpd service to obtain the system firmware through a preset page, and update the current system based on the system firmware.

[0016] Secondly, embodiments of the present invention also provide a system startup device for preventing system crashes, comprising:

[0017] The checksum comparison module is used to start the system and enter the kernel boot program according to the user's boot operation, and the kernel boot program verifies whether the first checksum and the second checksum are consistent.

[0018] A repair module is used to guide the system into a repair procedure if there is a discrepancy, so as to repair the system through the repair procedure;

[0019] The restart module is used to generate a first random code. After the repair is completed, the first check code and the second check code are replaced with the first random code, and the system is restarted.

[0020] The normal startup module is used to boot the system normally if the checksum matches, and to generate a second random code to replace the first checksum with the second random code.

[0021] Optionally, in some embodiments, the anti-crash system startup device further includes:

[0022] The programming module is used to program the repair program and pre-sets the same first and second check codes.

[0023] Optionally, in some embodiments, the anti-crash system startup device further includes:

[0024] The repair module is used to call a preset backup system to update the current system in an overwrite manner.

[0025] Optionally, in some embodiments:

[0026] The repair module is used to start the httpd service to obtain the system firmware through a preset page and update the current system based on the system firmware.

[0027] Thirdly, embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor executes the computer program to implement the anti-crash system startup method provided in any embodiment of the present invention.

[0028] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed, implement the anti-crash system startup method provided in any embodiment of the present invention.

[0029] The technical solution provided by this invention adjusts the first and second verification codes based on whether the system has successfully started or repaired normally. The consistency between the first and second verification codes indicates whether a startup abnormality has occurred. This allows the system to automatically identify the abnormality and start a repair program when the system restarts abnormally, effectively preventing the system from entering a dead loop. Furthermore, it eliminates the need for users to perform complex manual operations to complete system repair, thus optimizing the user experience. Attached Figure Description

[0030] Figure 1 This is a flowchart of the anti-crash system startup method in Embodiment 1 of the present invention;

[0031] Figure 2 This is a flowchart of another system startup method for preventing system crashes in Embodiment 2 of the present invention;

[0032] Figure 3 This is a schematic diagram of the anti-crash system startup device in Embodiment 3 of the present invention;

[0033] Figure 4 This is a schematic diagram of another anti-crash system startup device in Embodiment 3 of the present invention;

[0034] Figure 5 This is a schematic diagram of the electronic device in Embodiment 4 of the present invention. Detailed Implementation

[0035] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. In the description of the invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise expressly specified.

[0037] Furthermore, the terms "first," "second," etc., may be used herein to describe various directions, actions, steps, or elements, but these directions, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step, or element from another direction, action, step, or element. For example, without departing from the scope of the invention, a first speed difference may be called a second speed difference, and similarly, a second speed difference may be called a first speed difference. Both a first application and a second application are applications, but they are not the same application. The terms "first," "second," etc., should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified. It should be noted that when a part is referred to as "fixed to" another part, it may be directly on the other part or there may be an intermediate part. When a part is considered to be "connected" to another part, it may be directly connected to the other part or there may be an intermediate part present. The terms “vertical,” “horizontal,” “left,” “right,” and similar expressions used in this document are for illustrative purposes only and do not represent the only possible implementation.

[0038] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0039] Example 1

[0040] Figure 1 This is a flowchart of a system startup method for preventing system crashes, provided in Embodiment 1 of the present invention. This embodiment is applicable to various electronic devices with operating systems, especially embedded devices, such as gateway devices with embedded systems. This method can automatically detect whether there is a startup abnormality when the user turns on the device, so as to repair the system when a crash occurs, without requiring the user to perform special recovery operations. Specifically, as shown... Figure 1 The method shown includes the following steps:

[0041] S110. The system is started according to the user's boot operation and enters the kernel boot program. The kernel boot program then verifies whether the first checksum and the second checksum are consistent.

[0042] In this embodiment, the electronic device is equipped with a power button for powering on, and the power-on operation is the user's action of pressing the power button. In this embodiment, the system refers to the operating system in an embedded system. Mainstream embedded operating systems include Windows CE, Palm OS, Linux, and VxWorks. This embodiment preferably uses a Linux-based embedded operating system. During startup, the system completes the power-on boot process step-by-step according to a preset sequence. The first program to start is the kernel bootloader, which launches the kernel (boot), init process, and a series of other programs—this is the normal startup method. Unlike the normal startup method, this embodiment performs a checksum verification upon entering the kernel bootloader. The electronic device provided in this embodiment has two pre-set checksums: a first checksum and a second checksum. Initially, the first and second checksums are the same. As the system starts, they change. In the case of a successful normal startup, both the first and second checksums are updated to the same value. In the case of a failed normal startup, only one of them is updated. That is, when a system malfunction causes a failed normal startup, the two checksums will be inconsistent. This embodiment uses this inconsistency to determine whether system repair is needed.

[0043] S120. If there is a discrepancy, the system will be guided into a repair procedure to repair the system.

[0044] The repair program, also known as the Recovery program, is a program pre-burned into the system to repair the system. It can initiate the system recovery process to restore a damaged system. The repair program is different for different operating systems. For example, for electronic devices with large storage space and that have been offline for a long time, the repair program usually boots an image of a normal operating system to complete the repair. For electronic devices with small storage space and that can be connected to the Internet, the repair program usually obtains a normal image of the operating system remotely through the Internet for remote repair. There is no restriction here.

[0045] S130. Generate a first random code. After the repair is completed, replace the first check code and the second check code with the first random code, and restart the system.

[0046] The first random code can be generated either before or after the repair is complete. However, replacing the first and second check codes with the first random code must be done after the repair is complete. This is because simultaneously replacing the first and second check codes ensures that the normal startup process can begin after the repair is finished. The repair program may also malfunction; if the simultaneous replacement of the two check codes is performed before the repair is complete, a situation may occur where the repair fails but the program still starts normally. More specifically, in some embodiments, the first and second check codes can be replaced separately. That is, one of them (e.g., the first check code) is replaced before the repair is complete, and the other (corresponding to the second check code) is replaced after the repair is complete. This way, even if the repair fails, the next startup will again determine that the two check codes are different and attempt repair again.

[0047] S140. If they match, the kernel boot system will boot normally and generate a second random code, replacing the first check code with the second random code.

[0048] The second random code is the same as the first random code; both are randomly generated identifiers. They can be the same random value or different random values ​​(they can be generated by the same program or different programs). They can be generated using the same random algorithm or different random algorithms. For random codes generated using different algorithms, it's possible to infer whether the system underwent repair during startup. When the first and second check codes match, it indicates that the system did not fail to start, and therefore no repair is needed; the normal startup process can proceed. It should be clarified that the second random value can be generated before or after normal startup. In some embodiments, the first and second random values ​​are actually the same random value. In this case, the first and second random values ​​are used to distinguish between two different scenarios, not to indicate that they were generated by two different programs.

[0049] S150. After the system starts up successfully, replace the second verification code with the second random code.

[0050] In this embodiment, after the system starts up successfully, the first check code will also be updated to the second random code. That is to say, after the system starts up successfully, the first check code and the second check code are used to indicate that there is no problem with the startup. In other words, when the system fails to start up successfully, one of the two check codes will be replaced and there will be inconsistency. Simply put, one of the first check code and the second check code will be replaced by the second random code before the system starts up successfully, and the other will only be replaced by the second random code after the system starts up successfully.

[0051] The following is a specific example illustrating the anti-crash system boot method provided in this embodiment: The system has a pre-programmed Recovery program and a small program for generating random codes. It contains a boot code and a system code, both initially set to A. Under normal boot conditions, the boot process is as follows: The kernel bootloader starts, verifies the boot code and system code for consistency (both are A; if they are, they are consistent), generates a random code B, replaces the boot code with B, and proceeds to normal boot. Normal boot has two possible outcomes: if normal boot is successful, the system code will be replaced with B; if normal boot fails... Afterwards, the system code remains A. At this point, the user discovers a boot error (cannot boot), manually shuts down and restarts, and the kernel bootloader starts again, verifying whether the boot code and system code are consistent. This time, one is A and the other is B. Since they are inconsistent, a random code C is generated, and the boot code is replaced with C. The Recovery program then starts, repairs the system, and after the repair is complete, replaces the system code with C and automatically restarts the system. The kernel bootloader starts a third time, and this time both the boot code and system code are C. After verification, the normal boot program is executed, and the fault has been repaired.

[0052] Embodiment 1 of the present invention provides a system startup method to prevent system crashes. The method adjusts the first and second check codes according to whether the system has successfully started or repaired normally. The consistency between the first and second check codes indicates whether a startup abnormality has occurred. When the system restarts abnormally, the system can automatically identify the abnormality and start the repair program to repair it. This effectively avoids the system from entering a crash loop and eliminates the need for users to perform complex manual operations to complete the system repair, thus optimizing the user experience.

[0053] Example 2

[0054] Embodiment 2 of the present invention provides a more detailed explanation and supplement to some aspects of Embodiment 1, such as the process of determining whether the unlocking conditions are met based on the terminal identification information and wireless signal strength in the terminal connection information, and specifically includes:

[0055] like Figure 2 As shown, before the step of starting the system and entering the kernel bootloader based on the user's boot operation, step S210 is also included:

[0056] S210, burn in the repair program, and pre-set the same first and second check codes.

[0057] The repair program is burned into the memory during the embedded device manufacturing process, and the same first and second checksums are set in the system. This ensures that the system will boot normally upon initial startup. It should be understood that the repair program in this embodiment should include complete files capable of repairing the system. For example, for repair programs that require a system image for repair, the system image should be burned along with the repair program. Further examples are not provided here.

[0058] S220. The system is started according to the user's boot operation and enters the kernel boot program. The kernel boot program then verifies whether the first checksum and the second checksum are consistent.

[0059] S230. If there is a discrepancy, the system will be guided into a repair procedure to repair the system.

[0060] S240. Generate a first random code. After the repair is completed, replace the first check code and the second check code with the first random code, and restart the system.

[0061] S250. If they match, the kernel boot system will boot normally and generate a second random code, replacing the first check code with the second random code.

[0062] S260. After the system starts up successfully, replace the second verification code with the second random code.

[0063] More specifically, in some embodiments, such as Figure 3 As shown, the system repair process in step S230 involves two scenarios:

[0064] The first method involves a pre-configured backup system on the device. During repair, the repair program calls the preset backup system to update the current system by overwriting the existing one, replacing the original system with the backup system to fix the faulty parts. However, this method requires a significant amount of storage space from the backup system, which is often insufficient for embedded devices, making it less than the optimal choice.

[0065] The second method is an online update method used for devices that can connect to the internet:

[0066] The repair program starts the httpd service to retrieve the system firmware via a preset page and updates the current system based on the firmware. This method allows network-connected devices to use a separately configured repair system to retrieve data when the system fails to boot. This repair system is only used to pull the system firmware via the httpd service, requiring minimal storage space from the device. This method is a preferred solution for network-connected embedded devices such as gateway devices.

[0067] This embodiment provides a system startup method to prevent system crashes based on the aforementioned embodiments. It further provides a repair solution for different devices through a repair program, which can be customized according to actual needs.

[0068] Example 3

[0069] Figure 3 The diagram shown is a structural schematic of a wireless network-based unlocking device 300 according to Embodiment 3 of the present invention. The specific structure of the wireless network-based unlocking device 300 is as follows:

[0070] The verification code comparison module 310 is used to start the system and enter the kernel boot program according to the user's boot operation, and the kernel boot program verifies whether the first verification code and the second verification code are consistent.

[0071] Repair module 320 is used to guide the system into a repair procedure if there is a discrepancy, so as to repair the system through the repair procedure;

[0072] Restart module 330 is used to generate a first random code. After the repair is completed, the first check code and the second check code are replaced with the first random code, and the system is restarted.

[0073] The normal startup module 340 is used to boot the system normally if the check code matches, and generate a second random code to replace the first check code with the second random code.

[0074] The success verification module 350 is used to replace the second verification code with the second random code after the system starts up normally.

[0075] Optionally, in some embodiments, such as Figure 4 The system startup device 300 shown for preventing system crashes also includes:

[0076] The programming module 360 ​​is used to program the repair program and is pre-set with the same first and second verification codes.

[0077] Optionally, in some embodiments, the repair module 320 is specifically used to call a preset backup system to update the current system in an overwrite manner, and / or to start the httpd service to obtain the system firmware through a preset page and update the current system based on the system firmware.

[0078] The present invention provides a system startup device to prevent system crashes. The device adjusts the first and second verification codes according to whether the system has successfully started or repaired normally. The consistency between the first and second verification codes indicates whether a startup abnormality has occurred. When the system restarts abnormally, the system can automatically identify the abnormality and start the repair program to fix it. This effectively prevents the system from entering a crash loop and eliminates the need for users to perform complex manual operations to complete the system repair, thus optimizing the user experience.

[0079] Example 4

[0080] Figure 5 This is a schematic diagram of the structure of an electronic device 400 provided in Embodiment 4 of the present invention, as shown below. Figure 5 As shown, this electronic device includes a memory 410 and a processor 420. The number of processors 420 in the electronic device can be one or more. Figure 5 Taking a processor 420 as an example; the memory 410 and processor 420 in the electronic device can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.

[0081] A bus refers to one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0082] Electronic device 400 typically includes a variety of computer-readable storage media. These media can be any available media that can be accessed by electronic device 400, including volatile and non-volatile media, removable and non-removable media.

[0083] Memory 410 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. Electronic device 400 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, memory 410 may be used to read and write non-removable, non-volatile magnetic media. Disk drives for reading and writing to removable non-volatile disks (e.g., "floppy disks") and optical disk drives for reading and writing to removable non-volatile optical disks (e.g., CD-ROMs, DVD-ROMs, or other optical media) may be provided. In these cases, each drive may be connected to a bus via one or more data media interfaces. Memory 410 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0084] The memory 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 410 may further include memory remotely located relative to the processor 420, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0085] The processor 420 is used to run a computer-executable program stored in the memory 410 to perform the following steps: Step 110: Start the system according to the user's boot operation and enter the kernel boot program, and have the kernel boot program verify whether the first checksum and the second checksum are consistent; Step 120: If they are inconsistent, boot into the repair program to repair the system; Step 130: Generate a first random code, and after the repair is completed, replace the first checksum and the second checksum with the first random code, and restart the system; Step 140: If they are consistent, the kernel boots the system to boot normally and generates a second random code, replacing the first checksum with the second random code; Step 150: After the system boots normally and successfully, replace the second checksum with the second random code.

[0086] Of course, the electronic device provided in the embodiments of the present invention is not limited to performing the method operation described above, but can also perform related operations in the anti-crash system startup method provided in any embodiment of the present invention.

[0087] The above-mentioned device can execute the anti-crash system startup method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0088] Example 5

[0089] Embodiment 5 of the present invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a system startup method to prevent system crashes. The system startup method to prevent system crashes includes:

[0090] The system boots into the kernel bootloader based on the user's boot operation, and the kernel bootloader verifies whether the first checksum and the second checksum are consistent.

[0091] If there is a discrepancy, the system will be guided into a repair procedure to repair the system.

[0092] Generate a first random code. After the repair is completed, replace the first check code and the second check code with the first random code, and restart the system.

[0093] If they match, the kernel will boot the system normally and generate a second random code, replacing the first check code with the second random code.

[0094] After the system starts up successfully, the second verification code is replaced with the second random code.

[0095] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, electronic device, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0096] It is worth noting that in the above embodiments of the unlocking device based on wireless network, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0097] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A system startup method to prevent system crashes, characterized in that, include: Burn the repair program and pre-set the same first and second check codes; The system boots into the kernel bootloader based on the user's boot operation, and the kernel bootloader verifies whether the first checksum and the second checksum are consistent. If there is a discrepancy, the system is determined to have started abnormally and is guided into the repair program to repair the system. Generate a first random code. After the repair is completed, replace the first check code and the second check code with the first random code, and restart the system. If they match, the system is determined to have started normally. The kernel then boots the system and generates a second random code, replacing the first check code with the second random code. After the system starts up successfully, the second verification code is replaced with the second random code.

2. The system startup method for preventing system crashes according to claim 1, characterized in that, The system repair process includes: The system invokes a preset backup system to update the current system by overwriting the existing one.

3. The system startup method for preventing system crashes according to claim 1, characterized in that, The system repair process includes: Start the httpd service to obtain the system firmware through a preset page, and update the current system based on the system firmware.

4. A system startup device for preventing system crashes, characterized in that, include: The programming module is used to program the repair program and is pre-set with the same first and second check codes. The checksum comparison module is used to start the system and enter the kernel boot program according to the user's boot operation, and the kernel boot program verifies whether the first checksum and the second checksum are consistent. The repair module is used to determine that the system startup is abnormal if there is a discrepancy, and to guide the system into the repair program to repair the system. The restart module is used to generate a first random code. After the repair is completed, the first check code and the second check code are replaced with the first random code, and the system is restarted. The normal startup module is used to determine that the system startup is normal if the check code matches, and the kernel guides the system to start normally and generates a second random code to replace the first check code with the second random code. The success verification module is used to replace the second verification code with the second random code after the system starts up normally.

5. The anti-crash system startup device according to claim 4, characterized in that: The repair module is used to call a preset backup system to update the current system in an overwrite manner.

6. The anti-crash system startup device according to claim 4, characterized in that: The repair module is used to start the httpd service to obtain the system firmware through a preset page and update the current system based on the system firmware.

7. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor executes the computer program to implement the anti-crash system startup method as described in any one of claims 1-3.

8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed, implement the anti-crash system startup method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Startup method and apparatus for embedded operation system

    CN106325912A