A boot method and electronic device based on hard disk

By locking and unlocking the hidden boot partition in the hard disk and indirectly accessing the boot file using the flag bit, the problem of low security in the boot area of ​​the electronic device's hard disk is solved, and the stable operating system boot of the electronic device is achieved.

CN114546503BActive Publication Date: 2024-11-22联想开天科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210129866.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-11-22
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

The hard disk boot area of ​​computers and other electronic devices is low in security and is prone to fail to successfully enter the operating system due to misoperation or access errors.

Method used

By obtaining preset flag bits in the specific storage space of the hard disk, finding and locking the hidden first boot partition, and indirectly accessing the second boot partition using the first boot file, ensuring the security of the second boot file, thereby ensuring that the electronic device can Smoothly enter the operating system.

Benefits of technology

Improve the security of the second boot file, avoid operating system startup failures caused by misoperation or access errors, and ensure that electronic devices can enter the operating system normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546503B_ABST
    Figure CN114546503B_ABST
Patent Text Reader

Abstract

The present application discloses a boot method based on a hard disk and an electronic device, the method comprising: obtaining a preset first flag in a specific storage space of a memory through the BIOS of the electronic device; based on the first flag, finding a first boot partition at a first position in the hard disk of the electronic device; obtaining a first boot file in the first boot partition; based on the first boot file, finding a second boot partition at a second position in the hard disk of the electronic device; based on the second boot file in the second boot partition, guiding the electronic device to enter an operating system. The method can ensure that the electronic device enters the operating system smoothly. It avoids the phenomenon that the second boot file cannot be called and the operating system cannot be entered smoothly due to misoperation or access errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of hard disk booting of electronic devices, and in particular to a hard disk-based booting method and electronic device. Background Art

[0002] A boot area is generally provided in the hard disk of electronic devices such as computers, and the electronic device can enter the operating system through the boot area. However, the boot area is not very secure and can be easily damaged, which causes the electronic device to fail to successfully enter the operating system. For example, when the boot file is directly retrieved from the boot area, an erroneous operation may occur, or the location of the boot area is different from the location when it was last accessed, so that the operating system cannot be successfully entered. Summary of the invention

[0003] The purpose of the embodiment of the present application is to provide a hard disk-based boot method, which can ensure that the electronic device can smoothly enter the operating system, and avoid the phenomenon that the second boot file cannot be called and the operating system cannot be smoothly entered due to misoperation or access errors.

[0004] To achieve this purpose, an embodiment of the present application provides a hard disk-based boot method, including:

[0005] Obtaining a preset first flag bit in a specific storage space in a memory through the BIOS of the electronic device;

[0006] Based on the first flag bit, finding a first boot partition at a first position in the hard disk of the electronic device;

[0007] Obtaining a first boot file in the first boot partition;

[0008] Based on the first boot file, finding a second boot partition at a second location in the hard disk of the electronic device;

[0009] Based on the second boot file in the second boot partition, the electronic device is booted into an operating system.

[0010] Optionally, the step of finding a first boot partition at a first position in a hard disk of the electronic device based on the first flag bit includes:

[0011] determining the first position based on the first flag bit;

[0012] determining the first boot partition that is hidden based on the first position, wherein the first boot partition is locked;

[0013] The locked first boot partition is unlocked based on the agreed unlocking key.

[0014] Optionally, the method further includes:

[0015] After the first boot file is retrieved and the operating system of the electronic device is started, the first boot partition is locked by the operating system, wherein the locked first boot partition has a feature of being unable to be deleted.

[0016] Optionally, after finding the second boot partition, the method further includes:

[0017] Based on the first boot file, determining the second boot file associated with the first boot file in the second boot partition;

[0018] Retrieve the second boot file.

[0019] Optionally, the first boot partition has a backup file, and the method further includes:

[0020] When it is determined that the second boot partition is damaged, repairing the second boot partition based on the backup file;

[0021] The second boot file is retrieved from the repaired second boot partition to boot the electronic device into an operating system.

[0022] Optionally, repairing the second boot partition based on the backup file includes:

[0023] At the second location, reconstructing the second boot partition;

[0024] In the reconstructed second boot partition, the second boot file is regenerated based on the backup file.

[0025] Optionally, the first position is located at the end of a storage area in the hard disk, and the second position is located at the beginning of a storage area in the hard disk.

[0026] Optionally, the method further includes:

[0027] Based on the request instruction, the first boot partition is constructed at a first location in the hard disk of the electronic device, wherein the capacity of the first boot partition can be dynamically adjusted during use.

[0028] An electronic device according to an embodiment of the present application includes:

[0029] A first acquisition module is configured to acquire a preset first flag bit in a specific storage space of a memory through a BIOS of an electronic device;

[0030] A first processing module, configured to find a first boot partition at a first position in the hard disk of the electronic device based on the first flag bit;

[0031] A second acquisition module, configured to acquire a first boot file in the first boot partition;

[0032] A second processing module is configured to find a second boot partition at a second location in the hard disk of the electronic device based on the first boot file;

[0033] Based on the second boot file in the second boot partition, the electronic device is booted into an operating system.

[0034] An electronic device according to an embodiment of the present application includes a processor and a memory, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the method steps described above.

[0035] The hard disk-based boot method of this embodiment, by setting two different first boot partitions and second boot partitions, makes it impossible to directly access the second boot file storing the boot file for entering the operating system, thereby increasing the security of the second boot file. It is ensured that the electronic device can smoothly enter the operating system. It avoids the phenomenon that the second boot file cannot be called and the operating system cannot be smoothly entered due to misoperation or access error. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A flowchart of a hard disk-based boot method according to an embodiment of the present application;

[0037] Figure 2 For the embodiments of this application Figure 1 A flowchart of an example of step S200;

[0038] Figure 3 A flowchart of an embodiment of a hard disk-based boot method according to an embodiment of the present application;

[0039] Figure 4 A flowchart of another embodiment of the hard disk-based boot method of the embodiment of the present application;

[0040] Figure 5 For the embodiments of this application Figure 4 A flowchart of an embodiment of step S800;

[0041] Figure 6 A flowchart of a specific embodiment of the hard disk-based boot method of the embodiment of the present application;

[0042] Figure 7 A structural block diagram of an electronic device according to an embodiment of the present application;

[0043] Figure 8 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0044] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0045] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0046] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0047] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0048] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0049] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0050] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0051] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0052] Figure 1 Flow chart of the hard disk-based boot method according to an embodiment of the present application, such as Figure 1 Shown and combined Figure 6, a hard disk-based booting method according to an embodiment of the present application can be applied in the startup process of electronic devices such as computers, and the method includes the following steps:

[0053] S100, obtaining a preset first flag bit in a specific storage space of a memory through BIOS of an electronic device.

[0054] For example, a computer or other electronic device has a BIOS (Basic Input Output System), which is a set of programs fixed to a ROM chip on the motherboard of the computer. It stores important basic input and output programs of computers and other electronic devices, self-test programs after power-on, and system self-starting programs.

[0055] The memory of the electronic device has a specific storage space, in which data can be stored, and can also be isolated from other storage areas in the memory according to actual usage. The specific storage area has a first flag, which is used to indicate the location of the first boot partition in the hard disk. For example, the location of the first boot partition in the hard disk can be indicated by a pointer, and the pointer can be the address of the first boot partition.

[0056] In this embodiment, when the electronic device does not enter the operating system during the boot process, the preset first flag bit can be obtained from the specific storage space in the memory through the BIOS. For example, the first flag bit can be read from the specific storage space based on the communication protocol.

[0057] S200: Based on the first flag bit, find a first boot partition at a first position in the hard disk of the electronic device.

[0058] The first flag bit can be various types of indication information, such as a pointer or address information, thereby indicating the first position in the hard disk. The first position can be set in advance in the hard disk for ease of management and to avoid data therein from being destroyed. The first position can be set at the end of the hard disk, thereby setting the first boot partition at the end of the entire hard disk.

[0059] The first boot partition can be set to a hidden state to prevent misoperation. Since it is invisible, ordinary users will not easily find it. The first boot partition can be found at the first position in the hard disk by using the indication function of the first flag bit. Thus, the first boot partition can be operated.

[0060] S300: Obtain a first boot file in the first boot partition.

[0061] Exemplarily, the first boot partition may store a first boot file and other related data for starting the electronic device. The first boot file is used to guide the BIOS to enter the second boot partition in the hard disk. The second boot partition is different from the first boot partition, and the second boot partition may store data for booting. The second boot partition is booted through the first boot file without using other direct calling methods to access, which will greatly increase the security of the second boot partition.

[0062] In this embodiment, the first boot file can be obtained from the first boot partition through BIOS, such as the first boot file can be a bootx64.efi file. A capture program is provided in the BIOS, and the first boot file, such as the bootx64.efi file, is captured from the first boot partition through the capture program during the boot process of the electronic device.

[0063] S400: Find a second boot partition at a second location in the hard disk of the electronic device based on the first boot file.

[0064] Exemplarily, the second boot partition may store files for booting the electronic device into the operating system. The second position of the second boot partition is different from the first position described above, so that the position of the second boot partition is different from the first boot partition. The second boot partition may be distinguished from the first boot partition, so that the second boot partition cannot be directly accessed, but is indirectly searched and then accessed through the first boot file, thereby increasing the security of the files stored in the second boot partition. The first boot partition may not store files for booting the electronic device into the operating system, thereby reducing the risk of file damage.

[0065] In this embodiment, on the one hand, the first boot file can also be a variety of files with boot functions, such as the above-mentioned pointer, address information, etc. The specific content of the first boot file can be used to determine the second position in the hard disk, that is, to find the second boot partition, so as to operate the second boot partition. On the other hand, the first boot file can also be used to call files in the second boot partition, such as calling the second boot file mentioned later. That is, the second boot file in the second boot partition is determined by the first boot file and called. For example, the first boot file is the bootx64.efi file, and the second boot file can be called through the bootx64.efi file.

[0066] S500: Boot the electronic device into an operating system based on the second boot file in the second boot partition.

[0067] Exemplarily, the second boot file can be used to boot the electronic device into the operating system, thereby enabling the electronic device to boot normally. The second boot file is stored in the second boot partition. Since the second boot partition cannot be accessed directly but needs to be called by the first boot file, the security of the second boot file is improved.

[0068] The second boot file is used to guide the electronic device into the operating system, so that during the boot process of the electronic device, the operating system can be correctly entered after the BIOS is started.

[0069] The hard disk-based boot method of this embodiment, by setting two different first boot partitions and second boot partitions, makes it impossible to directly access the second boot file storing the boot file for entering the operating system, thereby increasing the security of the second boot file. It is ensured that the electronic device can smoothly enter the operating system. It avoids the phenomenon that the second boot file cannot be called and the operating system cannot be smoothly entered due to misoperation or access error.

[0070] In one embodiment of the present application, based on the first flag bit, the first boot partition is found at a first position in the hard disk of the electronic device, such as Figure 2 As shown, including:

[0071] S210: Determine the first position based on the first flag bit.

[0072] The data structure of the first flag bit may be a pointer, which is used to indicate the first position. For example, the address of the first position in the hard disk is "55AA", and the pointer may be used to indicate "55AA", thereby determining the first boot partition.

[0073] S220: Determine the hidden first boot partition based on the first position, wherein the first boot partition is locked.

[0074] Exemplarily, the state of the first boot partition is a hidden state, and the first boot partition in the hidden state is invisible to general users, so that the first boot partition cannot be easily accessed, and the first boot file therein cannot be easily destroyed.

[0075] In this embodiment, the first boot partition is locked, and the first boot partition in the locked state cannot be moved, the capacity and / or the state cannot be illegally changed, thereby further improving the security of the first boot partition.

[0076] S230: Unlock the locked first boot partition based on the agreed unlocking key.

[0077] Exemplarily, the first boot partition can be locked by an encryption key. There is an unlocking key corresponding to the encryption key. The encryption key can be used to lock the first boot partition so that the first boot partition will not be illegally operated, such as illegally moved, illegally changed state, etc. After finding the first boot partition, in order to be able to access data normally, the first boot partition can be unlocked by BIOS, and then the first boot file stored therein can be called.

[0078] In one embodiment of the present application, the method further includes the following steps: after the first boot file is retrieved and the operating system of the electronic device is started, the first boot partition is locked by the operating system, wherein the locked first boot partition has a feature that it cannot be deleted.

[0079] Exemplarily, after the first boot file in the first boot partition is retrieved and the electronic device successfully starts the operating system, the first boot partition still needs to be locked, ensuring that the first boot partition can be unlocked when used and locked again in time after use, thereby ensuring the security of the first boot partition.

[0080] Furthermore, the first boot partition can be pre-registered in the operating system so that the operating system can operate the first boot partition. After the electronic device successfully starts the operating system, the operating system can be used to lock the first boot partition so that the first boot partition cannot be deleted or modified at will. In addition, the operating system can also keep or set the first boot partition to a hidden state so that it is invisible to ordinary users.

[0081] In one embodiment of the present application, after finding the second boot partition, Figure 3 As shown, the method further comprises the following steps:

[0082] S600, based on the first boot file, determining the second boot file associated with the first boot file in the second boot partition;

[0083] S700: Retrieve the second boot file.

[0084] Exemplarily, on one hand, the first boot file is associated with the second boot file, and the second boot file is stored in the second boot partition. Therefore, the second boot partition can be determined based on the first boot file, and then the correct second boot file can be retrieved. The electronic device can use the second boot file to boot it and enter the operating system.

[0085] On the other hand, the second boot partition may store multiple second boot files, and different second boot files may boot different operating systems. Based on the first boot file, a second boot file matching the first boot file may be extracted, and then the electronic device is booted into the operating system associated with the second boot file.

[0086] In one embodiment of the present application, the first boot partition has a backup file, such as Figure 4 As shown, the method further comprises the following steps:

[0087] S800: When it is determined that the second boot partition is damaged, repair the second boot partition based on the backup file.

[0088] Exemplarily, the second boot partition may be damaged during use, causing the data stored therein to be damaged and unusable. In this case, the first boot partition in this embodiment has a backup file, which is a backup of the data in the second boot partition. When the second boot partition is detected to be damaged, the backup file is called from the first boot partition to repair the second boot partition, including repairing the data in the second boot partition. For example, the second boot file in the second boot partition is repaired, thereby ensuring the integrity and correctness of the second boot file.

[0089] S900: Retrieve the second boot file from the repaired second boot partition to boot the electronic device into an operating system.

[0090] The repaired second boot file can be considered as a correct boot file, and the electronic device is booted into the operating system corresponding to the second boot file using the correct second boot file.

[0091] In one embodiment, the backup file can be used to repair the second boot partition and then the second boot file, and the backup file can also be used to upgrade the second boot file, thereby ensuring the effectiveness of the version of the second boot file.

[0092] In one embodiment of the present application, the second boot partition is repaired based on the backup file, such as Figure 5 As shown, including:

[0093] S810, reconstructing the second boot partition at the second position;

[0094] S820: Regenerate the second boot file in the reconstructed second boot partition based on the backup file.

[0095] For example, if the second boot partition is damaged, the data therein is likely to be damaged. In this case, there is no need to retrieve the second boot file therein, and the damaged second boot file can be directly deleted, and the second boot partition can be rebuilt at the second position of the hard disk, that is, the original position of the second boot partition, and the second boot file can be regenerated. The correctness of the second boot file is guaranteed.

[0096] In one embodiment of the present application, the first position is located at the end of the storage area in the hard disk, and the second position is located at the head of the storage area in the hard disk. This makes it easy to find the first boot area and the second boot area, thereby avoiding affecting the use of other storage areas in the hard disk.

[0097] In one embodiment of the present application, the method further includes the following steps: based on a request instruction, constructing the first boot partition at a first location in the hard disk of the electronic device, wherein the capacity of the first boot partition can be dynamically adjusted during use.

[0098] Exemplarily, the capacity of the first boot partition can be set and adjusted based on the amount of data it needs to store, and the construction tool can be used to construct the first boot partition that meets the capacity requirements in the hard disk. For example, based on empirical data, a request instruction is generated, and the construction tool constructs the first boot partition at the first position of the hard disk according to the request instruction.

[0099] In addition, during the use of the first boot partition, if its capacity is found to be inappropriate according to actual use, such as too large or too small, its capacity can be dynamically adjusted, thereby meeting the need to store appropriate data without occupying too much storage space of the hard disk.

[0100] The present application also provides an electronic device, such as Figure 7 As shown, including:

[0101] The first acquisition module is configured to acquire a preset first flag bit in a specific storage space of a memory through the BIOS of the electronic device.

[0102] For example, a computer or other electronic device has a BIOS (Basic Input Output System), which is a set of programs fixed to a ROM chip on the motherboard of the computer. It stores important basic input and output programs of computers and other electronic devices, self-test programs after power-on, and system self-starting programs.

[0103] The memory of the electronic device has a specific storage space, in which data can be stored, and can also be isolated from other storage areas in the memory according to actual usage. The specific storage area has a first flag, which is used to indicate the location of the first boot partition in the hard disk. For example, the location of the first boot partition in the hard disk can be indicated by a pointer, and the pointer can be the address of the first boot partition.

[0104] In this embodiment, when the electronic device does not enter the operating system during the boot process, the first acquisition module can obtain the preset first flag from the specific storage space in the memory through BIOS. For example, the first flag can be read from the specific storage space based on the communication protocol.

[0105] The first processing module is configured to find a first boot partition at a first position in the hard disk of the electronic device based on the first flag bit.

[0106] Exemplarily, the first flag bit can be various types of indication information, such as a pointer or address information, thereby indicating the first position in the hard disk. The first position can be set in advance in the hard disk for ease of management and to avoid data therein from being destroyed. The first position can be set at the end of the hard disk, thereby setting the first boot partition at the end of the entire hard disk.

[0107] The first boot partition can be set to a hidden state to prevent misoperation. Since it is invisible, ordinary users will not easily find it. The first processing module can find the first boot partition at the first position in the hard disk by using the indication of the first flag bit, so as to operate the first boot partition.

[0108] The second acquisition module is configured to acquire a first boot file in the first boot partition.

[0109] Exemplarily, the first boot partition may store a first boot file and other related data for starting the electronic device. The first boot file is used to guide the BIOS to enter the second boot partition in the hard disk. The second boot partition is different from the first boot partition, and the second boot partition may store data for booting. The second boot partition is booted through the first boot file without using other direct calling methods to access, which will greatly increase the security of the second boot partition.

[0110] In this embodiment, the second acquisition module can obtain the first boot file from the first boot partition through BIOS, such as the first boot file can be a bootx64.efi file. A capture program is provided in the BIOS, and during the boot process of the electronic device, the second acquisition module captures the first boot file from the first boot partition through the capture program, such as the bootx64.efi file.

[0111] The second processing module is configured to find a second boot partition at a second location in the hard disk of the electronic device based on the first boot file; and to boot the electronic device into an operating system based on the second boot file in the second boot partition.

[0112] Exemplarily, the second boot partition may store files for booting the electronic device into the operating system. The second position of the second boot partition is different from the first position described above, so that the position of the second boot partition is different from the first boot partition. The second boot partition may be distinguished from the first boot partition, so that the second boot partition cannot be directly accessed, but is indirectly searched and then accessed through the first boot file, thereby increasing the security of the files stored in the second boot partition. The first boot partition may not store files for booting the electronic device into the operating system, thereby reducing the risk of file damage.

[0113] In this embodiment, on the one hand, the first boot file can also be a variety of files with boot functions, such as the above-mentioned pointer, address information, etc. The second processing module can use the specific content of the first boot file to determine the second position in the hard disk, that is, to find the second boot partition, so as to operate the second boot partition. On the other hand, the first boot file can also be used to call files in the second boot partition, such as calling the second boot file mentioned later. That is, the second processing module determines the second boot file in the second boot partition through the first boot file and calls it. For example, the first boot file is the bootx64.efi file, and the second boot file can be called through the bootx64.efi file.

[0114] Exemplarily, the second processing module can use the second boot file to boot the electronic device into the operating system, thereby enabling the electronic device to boot normally. The second boot file is stored in the second boot partition. Since the second boot partition cannot be accessed directly but needs to be called through the first boot file, the security of the second boot file is improved.

[0115] The second processing module uses the second boot file to guide the electronic device into the operating system, thereby ensuring that during the boot process of the electronic device, the operating system can be correctly entered after the BIOS is started.

[0116] In one embodiment of the present application, the first processing module is further configured as follows:

[0117] determining the first position based on the first flag bit;

[0118] determining the first boot partition that is hidden based on the first position, wherein the first boot partition is locked;

[0119] The locked first boot partition is unlocked based on the agreed unlocking key.

[0120] In one embodiment of the present application, the second processing module is further configured as follows:

[0121] After the first boot file is retrieved and the operating system of the electronic device is started, the first boot partition is locked by the operating system, wherein the locked first boot partition has a feature of being unable to be deleted.

[0122] In one embodiment of the present application, the second processing module is further configured as follows:

[0123] Based on the first boot file, determining the second boot file associated with the first boot file in the second boot partition;

[0124] Retrieve the second boot file.

[0125] In one embodiment of the present application, the first boot partition has a backup file, and the electronic device further includes a repair module, and the repair module is configured as follows:

[0126] When it is determined that the second boot partition is damaged, repairing the second boot partition based on the backup file;

[0127] The second boot file is retrieved from the repaired second boot partition to boot the electronic device into an operating system.

[0128] In one embodiment of the present application, the repair module is further configured as follows:

[0129] At the second location, reconstructing the second boot partition;

[0130] In the reconstructed second boot partition, the second boot file is regenerated based on the backup file.

[0131] In one embodiment of the present application, the first position is located at the end of the storage area in the hard disk, and the second position is located at the beginning of the storage area in the hard disk.

[0132] In one embodiment of the present application, the electronic device further includes a building module, and the building module is configured as follows:

[0133] Based on the request instruction, the first boot partition is constructed at a first location in the hard disk of the electronic device, wherein the capacity of the first boot partition can be dynamically adjusted during use.

[0134] The present application also provides an electronic device, such as Figure 8 As shown, it includes a processor and a memory, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the steps in the hard disk-based booting method as described above.

[0135] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A boot method based on a hard disk, comprising: Obtaining a preset first flag bit in a specific storage space in a memory through the BIOS of the electronic device; Based on the first flag bit, finding a first boot partition at a first position in the hard disk of the electronic device; Obtaining a first boot file in the first boot partition; Based on the first boot file, finding a second boot partition at a second location in the hard disk of the electronic device, wherein the second boot partition cannot be directly accessed and is found through the first boot file; Based on the first boot file, determining in the second boot partition a second boot file that is compatible with the first boot file; Retrieving the second boot file; Based on the second boot file in the second boot partition, the electronic device is booted into an operating system.

2. The method according to claim 1, wherein the step of finding the first boot partition at the first position in the hard disk of the electronic device based on the first flag bit comprises: determining the first position based on the first flag bit; determining the first boot partition that is hidden based on the first position, wherein the first boot partition is locked; The locked first boot partition is unlocked based on the agreed unlocking key.

3. The method according to claim 2, further comprising: After the first boot file is retrieved and the operating system of the electronic device is started, the first boot partition is locked by the operating system, wherein the locked first boot partition has a feature of being unable to be deleted.

4. The method according to claim 1, wherein the first boot partition has a backup file, and the method further comprises: When it is determined that the second boot partition is damaged, repairing the second boot partition based on the backup file; The second boot file is retrieved from the repaired second boot partition to boot the electronic device into an operating system.

5. The method according to claim 4, wherein the repairing the second boot partition based on the backup file comprises: At the second location, reconstructing the second boot partition; In the reconstructed second boot partition, the second boot file is regenerated based on the backup file. 6 . The method according to claim 1 , wherein the first position is located at the end of a storage area in the hard disk, and the second position is located at the beginning of a storage area in the hard disk.

7. The method according to claim 1, further comprising: Based on the request instruction, the first boot partition is constructed at a first location in the hard disk of the electronic device, wherein the capacity of the first boot partition can be dynamically adjusted during use.

8. An electronic device comprising: A first acquisition module is configured to acquire a preset first flag bit in a specific storage space of a memory through a BIOS of an electronic device; A first processing module, configured to find a first boot partition at a first position in the hard disk of the electronic device based on the first flag bit; A second acquisition module, configured to acquire a first boot file in the first boot partition; A second processing module is configured to find a second boot partition at a second location in the hard disk of the electronic device based on the first boot file, wherein the second boot partition cannot be directly accessed and is found through the first boot file; Based on the first boot file, determining in the second boot partition a second boot file that is compatible with the first boot file; Retrieving the second boot file; Based on the second boot file in the second boot partition, the electronic device is booted into an operating system.

9. An electronic device, comprising a processor and a memory, wherein an executable program is stored in the memory, and the processor executes the executable program to implement the method steps as claimed in any one of claims 1 to 7.