A computer startup method and system for multiple operating systems

By setting the system disk identifier status and boot count record table in the BIOS, the system disk can be monitored and switched, solving the problem of multi-operating system computers being unable to automatically switch when the boot disk is damaged, thus realizing automatic system switching and fault avoidance.

CN115167930BActive Publication Date: 2026-02-03深圳渊联技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210866425.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2026-02-03
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

In existing technologies, computers with multiple operating systems cannot automatically switch to other systems when the boot disk is damaged, causing the computer to continuously restart the damaged boot disk, resulting in offline operation.

Method used

By setting the system disk identifier status and boot count log table in the BIOS, the boot status of the system disk can be monitored, and the computer can be restarted when booting fails, automatically switching to the next system disk according to the preset boot order.

Benefits of technology

It enables automatic system switching when a computer with multiple operating systems boots up, avoiding computer offline problems caused by a faulty system disk, and improving system reliability and maintenance convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115167930B_ABST
    Figure CN115167930B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of computer starting method and system of multi-operating system, wherein the computer starting method of multi-operating system, when computer starts, basic input / output system determines the first system disk of this time from at least two system disks according to preset starting order, the first state is set in system disk identification bit, then the first system disk is started, continue to monitor the starting state of the first system disk, when the first system disk starts successfully, system disk identification bit is set to second state, restart computer when starting fails, after computer restart, basic input / output system can determine the starting state of the system disk of previous starting by identifying the state information in system disk identification bit, to determine whether other system disk needs to be switched to start. The system of multi-operating system computer is automatically switched when starting, avoids the problem that basic input / output system always starts the system disk of fault and leads to computer offline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computers, and more particularly to a computer boot method and system with multiple operating systems. Background Technology

[0002] As informatization progresses, a single server needs multiple operating systems to meet the needs of different hardware and software operations. In other words, multiple operating systems are installed on the same device so that the appropriate operating system can be selected at the right time.

[0003] In existing technology, the BIOS (Basic Input Output System) can support multiple system disks and allows setting the boot order. However, if the boot process fails, the boot order cannot be changed; the next boot disk will only be selected if the original boot disk is not present. If the boot disk is present but the file system is corrupted, causing a boot failure, the computer will repeatedly boot from that corrupted disk, leading to the computer going offline.

[0004] Therefore, how to ensure that a computer with multiple operating systems can automatically switch to other systems to run when one system fails is an urgent problem to be solved. Summary of the Invention

[0005] In view of the shortcomings of the above-mentioned related technologies, the purpose of this application is to provide a computer boot method and system with multiple operating systems, which aims to solve the problem that computers with multiple operating systems cannot automatically switch operating systems.

[0006] A method for booting a computer with multiple operating systems, characterized in that the computer booting method includes:

[0007] When the computer starts up, the Basic Input / Output System determines the first system disk to be started from at least two system disks according to the preset boot order, sets the first state in the system disk identifier bit, and starts the first system disk;

[0008] Monitor the boot status of the first system disk. When the first system disk boots successfully, set the system disk identifier to the second state.

[0009] When the first system disk fails to boot, the computer is restarted. The basic input / output system identifies the system disk identifier as being in the first state, selects the second system disk to boot from at least two system disks according to the preset boot order, and monitors the boot status of the second system disk.

[0010] The aforementioned multi-operating system computer boot method involves the Basic Input / Output System (BIOS) determining the first system disk to boot from at least two system disks according to a preset boot order during computer startup. The BIOS then sets a first state in the system disk identifier bit and boots the first system disk. The boot status of the first system disk is continuously monitored. If the first system disk boots successfully, the system disk identifier bit is set to a second state; if booting fails, the computer is restarted. After restarting, the BIOS can identify the boot status of the previously booted system disk by recognizing the status information in the system disk identifier bit, thus determining whether to switch to another system disk for booting. This achieves automatic system switching during the boot process of a multi-operating system computer, avoiding the problem of the BIOS continuously booting a faulty system disk, which could lead to computer offline.

[0011] Optionally, after the computer restarts, when the basic input / output system identifies the system disk identifier bit as being in the second state, it includes:

[0012] The system disk is booted based on its identification code. The second state in the system disk identifier is changed to the first state, and the boot status of the first system disk is monitored.

[0013] In the above-described multi-operating system computer boot method, when the computer restarts, the Basic Input / Output System (BIOS) can use the identification code to determine which system disk was previously booted. It determines the boot status of the first system disk that was previously booted by recognizing the status information of the system disk identifier bit. When the status information in the system disk identifier bit is in the second state, it means that the previous system disk booted successfully, so the first system disk can continue to be booted this time. However, a successful boot in the previous case does not guarantee a successful boot this time. Therefore, while booting the first system disk, the system disk identifier bit is also set to the first state, and the boot status of the first system disk is monitored.

[0014] Optionally, when the basic input / output system sets the first state in the first identifier bit, it further includes: setting a start count record table;

[0015] When the basic input / output system determines that the system disk to be started this time is the first system disk according to the preset startup order, it obtains the startup count of the first system disk recorded in the startup count record table. When the startup count reaches a threshold, it changes to the second system disk to start according to the preset startup order.

[0016] The above-mentioned multi-operating system computer boot method also includes a boot count record table when the basic input / output system sets the first state in the system disk identifier bit. This can record the boot count of each system, thereby allowing different boot counts to be set for different system disk priorities. Furthermore, the boot count can be used to determine the reliability of the system disk, providing a basis for later maintenance.

[0017] Based on the same inventive concept, this application also provides a multi-operating system computer boot system, which includes: a management board, a basic input / output system, and a memory;

[0018] The memory stores at least two system disks;

[0019] The basic input / output system is used to determine the first system disk to be started from the memory according to the preset boot order when the computer starts up, and set the system disk identifier bit to a first state to start the first system disk; and to identify the system disk identifier bit as the first state when the computer restarts, and select the second system disk to be started from the memory according to the preset boot order.

[0020] The management board is used to monitor the boot status of the first system disk. When the first system disk boots successfully, the system disk identifier is set to the second state. When the first system disk fails to boot, the computer is restarted and the boot status of the second system disk is monitored.

[0021] The aforementioned multi-operating system computer boot system includes a management board, a basic input / output system (BIOS), and memory. When the computer boots, the BIOS determines the first system disk to boot from memory and sets its system disk identifier to a first state. It then boots the first system disk. The management board monitors the boot status of the first system disk. If the first system disk boots successfully, it sets its system disk identifier to a second state. If the boot fails, the management board controls the computer to restart. The BIOS can then determine the boot status of the previously booted system disk using the status information in the system disk identifier. This achieves automatic system switching during boot of a multi-operating system computer, avoiding the problem of the BIOS continuously booting a faulty system disk, which could lead to computer downtime. Attached Figure Description

[0022] Figure 1 A flowchart illustrating a multi-operating system computer boot method provided in an embodiment of the present invention;

[0023] Figure 2 This is a schematic diagram of the structure of a multi-operating system computer boot system provided in an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of a multi-operating system computer boot system is provided as another optional embodiment of the present invention;

[0025] Figure 4 This is a schematic diagram of a multi-operating system computer boot system provided as another optional embodiment of the present invention. Detailed Implementation

[0026] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.

[0027] 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 application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0028] When a computer with multiple operating systems is booting up, if one of the boot disks is present but the file system is corrupted, causing it to fail to boot, the computer will repeatedly try to boot from that corrupted disk, resulting in the computer going offline.

[0029] Therefore, this application aims to provide a solution that can solve the above-mentioned technical problems, the details of which will be described in subsequent embodiments.

[0030] The multi-operating system computer boot method provided in the foregoing embodiments can be applied to various computer terminal fields, such as server computers, home consoles, and smart devices that require an operating system. The above applications are merely examples of a few applications illustrated in this embodiment, and it should be understood that the application of the multi-operating system computer boot method in this embodiment is not limited to the aforementioned examples.

[0031] This embodiment provides a multi-operating system computer boot method, comprising: when the computer boots, the Basic Input / Output System (PIOS) determines the first system disk to be booted from at least two system disks according to a preset boot order, sets a first state in the system disk identifier bit, and boots the first system disk; monitors the boot status of the first system disk, and when the first system disk boots successfully, sets the system disk identifier bit to a second state; when the first system disk fails to boot, the computer is restarted, the PIOS recognizes the system disk identifier bit as the first state, selects the second system disk to be booted from at least two system disks according to the preset boot order, and monitors the boot status of the second system disk.

[0032] A flowchart illustrating the steps of a multi-operating system computer boot method provided in this embodiment can be found here. Figure 1 The computer startup method includes the following steps:

[0033] S101. When the computer starts, the basic input / output system determines the first system disk to be started from at least two system disks according to the preset startup order, sets the first state in the system disk identifier bit, and starts the first system disk.

[0034] The aforementioned basic input / output system is the BIOS. When the computer starts, the BIOS will start first and perform a self-test. After the self-test passes, it will boot from the corresponding system disk to enter the operating system interface. When the computer is a multi-operating system computer, in order to enable the BIOS to successfully find the required system disk to boot, a preset boot order will be built in advance. The preset boot order includes, but is not limited to, sequential boot, random boot, and booting in different orders according to time periods.

[0035] In order to record the boot status of the system disk, this embodiment sets the status information in the system disk identifier bit corresponding to the system disk before the BIOS boots the system disk. The storage location of the system disk identifier bit includes, but is not limited to, storing it in the storage space corresponding to the system disk, storing it in the storage space provided by the BIOS, etc.

[0036] In this embodiment, the status information of the first state can be assigned a value as needed, including but not limited to setting the status information of the first state to "starting up", or according to the definition of computing language, "1" represents successful startup and "0" represents startup in progress. At this time, the BIOS can set the status information of the first state to "0", etc.

[0037] S102. Monitor the boot status of the first system disk. If the first system disk boots successfully, proceed to step S103. If the first system disk fails to boot, proceed to step S104.

[0038] In this embodiment, the boot status of the system disk includes, but is not limited to, booting, booting successfully, and booting failed. The boot status of the system disk can be monitored by the BIOS, by an additional management board, or by the operating system itself.

[0039] S103. When the first system disk boots successfully, the system disk identifier is set to the second state.

[0040] When the first system disk boots successfully, the status information in the system disk identifier is changed from the first status to the second status. The second status indicates that the system disk booted successfully. In this way, the BIOS can know whether the first system disk of the computer was successfully booted the previous time by reading the status information in the identifier when the computer is started next time.

[0041] In this embodiment, the status information of the second state can be assigned a value as needed, including but not limited to setting the status information of the second state to "startup successful", or according to the definition of computing language, "1" represents startup success and "0" represents startup in progress. At this time, the BIOS can set the status information of the second state to "1", etc.

[0042] When the first system disk boots successfully, the first operating system can change the status information in the system disk identifier bit from the first state to the second state through the application process. Of course, it can be understood that it can also control the BIOS to change the status information in the system disk identifier bit from the first state to the second state.

[0043] S104. When the first system disk fails to boot, the computer is restarted. The basic input / output system identifies the system disk identifier as being in the first state, selects the second system disk to be booted from at least two system disks according to the preset boot order, and monitors the boot status of the second system disk.

[0044] When monitoring determines that the first system disk has failed to boot, the computer needs to be restarted. Methods for determining system disk boot failure include, but are not limited to, failing to boot successfully within a preset time period, or triggering a system restart command. Methods for restarting the computer include, but are not limited to, disconnecting the computer's power supply or triggering a reset switch. After the computer restarts, the BIOS will again determine the second system disk to boot from according to the preset boot order. It should be noted that the second system disk determined during restart can be the same as the first system disk, or it can be a different system disk.

[0045] After restarting the computer, the BIOS needs to read the status information in the system disk identifier bit to determine the boot status of the first system disk in the previous boot. When the status information is in the first state, it means that the first system disk failed to boot in the previous boot, so it is necessary to switch to another system disk to boot. When the status information is in the second state, it means that the first system disk booted successfully in the previous boot, and the second system disk can be allowed to boot this time. When there is no status information in the system disk identifier bit, it means that the computer has no boot record. At this time, the first state will be set in the system disk identifier bit and the second system disk will be booted.

[0046] It should be noted that, in this embodiment, the operating system installed on the computer may include, but is not limited to, a third system disk and a fourth system disk, in addition to the first system disk and the second system disk mentioned above. In this embodiment, the first system disk and the second system disk can be interchanged in some cases. The description of the first system disk and the second system disk is only to distinguish the system disk selected during the two computer boot processes.

[0047] This embodiment provides a method for booting a computer with multiple operating systems, including: when the computer starts, a Basic Input / Output System (BIOS) determines a first system disk to be booted from at least two system disks according to a preset boot order, sets a first state in the system disk identifier bit, and boots the first system disk; monitors the boot status of the first system disk, and when the first system disk boots successfully, sets the system disk identifier bit to a second state; when the first system disk fails to boot, the computer is restarted, and the BIOS recognizes the system disk identifier bit as the first state, selects a second system disk to be booted from at least two system disks according to the preset boot order, and monitors the boot status of the second system disk. By determining the first system disk to be booted from at least two system disks according to a preset boot order, setting the system disk identifier bit to a first state, booting the first system disk, continuing to monitor the boot status of the first system disk, setting the system disk identifier bit to a second state when the first system disk boots successfully, and restarting the computer when booting fails, after the computer restarts, the BIOS can determine the boot status of the previously booted system disk by recognizing the status information in the system disk identifier bit, and determine whether it is necessary to switch to another system disk for booting. This system enables automatic system switching during startup for computers with multiple operating systems, avoiding the problem of the Basic Input / Output System (PIOS) continuously booting from a faulty system disk, which could cause the computer to go offline.

[0048] Another optional embodiment of the present invention:

[0049] This embodiment further improves and explains a method for booting a computer with multiple operating systems, based on the above embodiments. The specific details are as follows:

[0050] In another embodiment, the preset startup sequence includes any one of: sequential startup, random startup, and conditional sequential startup.

[0051] The computer in this implementation is equipped with multiple operating systems, so the boot order of each system can be preset. For example, the common sequential boot method sets the boot order of all system disks according to the system priority. Random boot order can also be used, which is generally used when the system disks have the same priority or when the operating systems serve as backup systems for each other. Conditional sequential boot requires setting different boot orders according to different conditions. For example, in a server host, when booting during the daytime, the system disk that supports large-capacity access is prioritized, and when booting in the early morning, the low-power system disk is prioritized.

[0052] In another embodiment, before booting the first system disk, the method further includes: recording the identification code of the first system disk;

[0053] When the basic input / output system identifies the system disk identifier as being in the first state, the process of selecting the second system disk for this boot from at least two system disks according to the preset boot order further includes: when selecting the second system disk, excluding the first system disk based on the identification code of the first system disk.

[0054] Before booting from the system disk, record the system disk's identification code. This code corresponds to the system disk and can be used to identify it. The system disk identification code includes, but is not limited to, using the system disk's drive letter as the identification code, or, in the case of sequential boot, using the system disk's boot serial number. After recording the system disk's identification, the next boot can use the identification code to identify the previously booted system disk. If the status information in the system disk's identifier is the second status information, it means the previous boot was successful, and the current boot can find the previously booted system disk using the identification code and continue to use that system disk. If the status information in the system disk's identifier is the first status information, it means the previous boot failed, and the current boot can exclude the previously booted system disk using the identification code to avoid continuing to boot from the first system disk.

[0055] In another embodiment, after the computer restarts, when the basic input / output system identifies the system disk identifier bit as being in a second state, it includes:

[0056] The system disk is booted based on its identification code. The second state in the system disk identifier is changed to the first state, and the boot status of the first system disk is monitored.

[0057] After the computer restarts, the BIOS starts and reads the status information in the system disk identifier bit. When the status information is in the second state, it means that the first system disk that was previously booted successfully, and the first system disk can continue to be booted. Therefore, the first system disk can be identified based on its identification code. However, the successful boot of the first system disk in the previous attempt does not guarantee that the boot will be successful again this time. Therefore, after booting the first system disk, the system disk identifier bit needs to be changed from the second state to the first state. Then, the boot status of the first system disk is monitored. If the first system disk boots successfully, the system disk identifier bit will be set back to the second state. If the boot fails, the system disk identifier bit will remain in the first state, and the computer will restart.

[0058] In another embodiment, when the basic input / output system sets the first state in the system disk identifier bit, it further includes: setting a startup count record table;

[0059] When the basic input / output system determines that the system disk to be started this time is the first system disk according to the preset startup order, it obtains the startup count of the first system disk recorded in the startup count record table. When the startup count reaches a threshold, it changes to the second system disk to start according to the preset startup order.

[0060] When setting the first state in the system disk identifier bit, the BIOS can also set other information in the system disk identifier bit, including but not limited to the boot count record table, boot time record table, and boot duration record table. This embodiment takes the boot count record table as an example. After setting the boot count record table, information such as the total number of boots and consecutive boots of the corresponding system disk can be obtained through this table, thereby knowing the operating status of the corresponding system disk and providing a basis for subsequent maintenance. At the same time, the maximum total number of boots and the maximum consecutive boots of the corresponding system disk can also be set in the boot count record table. In this way, when the total number of boots reaches the threshold, it can be determined that the corresponding system disk needs maintenance. When the maximum consecutive boots reach the threshold, it can be determined that the corresponding system disk has failed to boot and needs to be switched to another system disk for booting.

[0061] It should be noted that continuous boot here refers to the number of times the system disk fails to boot consecutively. When the system disk identifier is set to record the number of boot counts, the BIOS can use the number of consecutive boot counts as the basis for whether to boot the system disk. When the status information in the system disk identifier is in the first state, but its consecutive boot count has not reached the threshold, the system disk can continue to boot until the system disk simultaneously meets the conditions of the status information being in the first state and the consecutive boot count reaching the threshold, then the second-priority system disk will be switched to boot.

[0062] It should be noted that in this embodiment, the second-order system disk refers to the one after the first-order system disk. For example, when booting sequentially, the BIOS sorts at least two system disks according to the preset boot order. At this time, the first-order system disk will be booted first. Only when the first-order system disk fails to boot will the subsequent system disks be booted in sequence until the boot is successful.

[0063] In another embodiment, when the preset boot order is sequential boot and the system disk in the last sequence fails to boot, the computer is restarted, and the basic input / output system selects the system disk in the first sequence to boot.

[0064] When all system disks on a computer fail to boot, for example, during a sequential boot process, each system disk has its corresponding serial number. The boot order of each system disk is sorted by the serial number. When the system disk with the last serial number is reached, if that system disk still fails to boot, after restarting the computer, the BIOS can cycle back to select the system disk with the first serial number to boot. This can prevent the computer from crashing directly when the system disk with the last serial number also fails to boot.

[0065] In other embodiments, if all system disks fail to boot, all boot records can be cleared, and the computer boot method provided in this application can be re-run to avoid a system crash. For example, when the computer uses sequential boot, if the system disk fails to boot even after booting to the last system disk in sequence, all boot records can be cleared, and the system can return to the first system disk in sequence for booting.

[0066] In another embodiment, monitoring the boot status of the first system disk includes:

[0067] The system is configured such that if the computer fails to perform a heartbeat handshake with the management board within a preset time after startup, the first system disk fails to boot and the computer is restarted.

[0068] or,

[0069] If the computer's built-in timer is not paused within a preset time after the computer starts up, the first system disk fails to boot, and the computer is restarted.

[0070] When the system disk fails to boot, the computer may get stuck on the boot screen for an extended period. To avoid this, this embodiment provides the following optional methods for restarting the computer, including but not limited to: setting up a management board that starts a timer when the computer boots; if a heartbeat handshake is not performed with the management board within a preset time, the first system disk fails to boot and the computer restarts. Here, the heartbeat handshake refers to communication between the operating system and the management board. After the operating system successfully boots, it communicates and identifies with the management board through the computer interface; alternatively, a timer built into the computer can be used for timing. This timer is usually located in the BIOS. The timer starts timing when the computer boots, and if the timer is not paused within a preset time, the first system disk fails to boot and the computer restarts. Methods for pausing the timer include controlling the timer's pause through an application that starts with the operating system.

[0071] In this embodiment, when the computer starts up and the system disk fails to boot successfully within a preset time period, the computer needs to be restarted. The methods for controlling the computer to restart include, but are not limited to, the management board provided above being connected to the power supply of the computer, and the management board controlling the computer to restart by controlling the power supply to and from the computer; or controlling the computer to restart by triggering the computer's reset button.

[0072] Another optional embodiment of the present invention:

[0073] This embodiment provides a computer boot system with multiple operating systems. The computer boot system includes: a management board, a basic input / output system, and a memory.

[0074] The memory stores at least two system disks;

[0075] The basic input / output system is used to determine the first system disk to be booted from the memory according to a preset boot order when the computer starts, and set the system disk identifier bit to a first state to boot the first system disk; and to identify the system disk identifier bit as the first state when the computer restarts, and select the second system disk to be booted from the memory according to the preset boot order; the management board is used to monitor the boot status of the first system disk, and when the first system disk boots successfully, set the system disk identifier bit to a second state; when the first system disk fails to boot, restart the computer, and monitor the boot status of the second system disk.

[0076] A schematic diagram of a multi-operating system computer boot system can be found here. Figure 2 The computer boot system includes: a management board 20, a basic input / output system 11, and a memory 12; the memory 12 stores at least two system disks, namely a first system disk 121 and a second system disk 122;

[0077] The basic input / output system 11 and memory 12 are both part of the computer 10, while the management board 20 can be integrated into the computer 10 or installed separately. The computer 10 can be connected to the management board 20 through the application system, and the connection interface includes, but is not limited to, serial port and network port.

[0078] The Basic Input / Output System 11, or BIOS, can communicate with the operating system on the system disk using firmware attributes drivers from operating systems such as Linux, or through hardware timers.

[0079] Figure 2A multi-operating system computer boot system is provided. When the computer 10 boots, the basic input / output system 11 determines the first system disk 121 to be booted from the memory 12 according to a preset boot order, sets the first system disk identifier corresponding to the first system disk 121 to a first state, and boots the first system disk 121. When the computer 10 restarts, it selects the second system disk 122 to be booted from the memory 12 according to the preset boot order, and determines whether to boot the second system disk 122 according to the status information of the second system disk identifier corresponding to the second system disk 122. The management board 20 monitors the boot status of the first system disk 121. When the first system disk 121 boots successfully, it sets the first system disk identifier to a second state. When the first system disk 121 fails to boot, it restarts the computer.

[0080] When computer 10 starts up, basic input / output system 11 will start first and perform a self-test on computer 10. After the self-test passes, it will boot from the corresponding system disk to enter the operating system interface. When computer 10 is a computer with multiple operating systems, in order to enable basic input / output system 11 to successfully find the required system disk to boot, a preset boot order will be built in advance. The preset boot order includes, but is not limited to, booting in sequence, booting randomly, and booting in different sequences according to time periods.

[0081] In order to record the boot status of the system disk, this embodiment sets the status information in the system disk identifier bit corresponding to the system disk before the basic input / output system 11 boots the system disk. The storage location of the system disk identifier bit includes, but is not limited to, storing it in the storage space corresponding to the system disk, storing it in the storage space provided by the basic input / output system 11, etc., and each system disk in the computer 10 has its corresponding system disk identifier bit.

[0082] In this embodiment, the status information of the first state and the second state can be assigned values ​​as needed, including but not limited to setting the status information of the first state to "starting" and the status information of the second state to "starting successfully", or according to the definition of computing language, "1" represents starting successfully and "0" represents starting. At this time, the basic input / output system 11 can set the status information of the first state to "0" and the status information of the second state to "1", etc.

[0083] In this embodiment, the boot status of the system disk includes, but is not limited to, booting, boot success, and boot failure. The boot status of the system disk can be monitored through the basic input / output system 11, through an additional management board 20, or through the operating system itself.

[0084] In this embodiment, when the first system disk 121 boots successfully, the status information in the system disk identifier bit is changed from the first state to the second state. The second state indicates that the system disk booted successfully. Thus, the basic input / output system 11 can determine whether the computer booted successfully the previous time by reading the status information in the system disk identifier bit when the computer 10 boots up again. When the first system disk 121 boots successfully, the first operating system can change the status information in the system disk identifier bit from the first state to the second state through application processes. It is understood that this can also include, but is not limited to, controlling the basic input / output system 11 to change the status information in the system disk identifier bit from the first state to the second state.

[0085] In this embodiment, when the management board 20 detects that the first system disk 12 has failed to boot, the computer 10 needs to be restarted. Methods for determining system disk boot failure include, but are not limited to, determining system boot failure if the boot fails to complete within a preset time period, or determining system boot failure upon triggering a system restart command. Methods for restarting the computer 10 include, but are not limited to, cutting off the computer power supply or triggering a reset switch. After the computer 10 restarts, the basic input / output system 11 again determines the second system disk 122 to boot according to the preset boot order. It should be noted that the second system disk 121 determined during restart can be the same system disk as the first system disk 121, or it can be a different system disk.

[0086] After restarting, the Basic Input / Output System 11 reads the status information in the system disk identifier bit to determine the previous startup status of the computer 10. When the status information is the first status information, it means that the previous startup of the computer 10 failed or that the previous startup of the first system disk 121 failed. This startup needs to switch to another system disk for startup. When the status information is the second status information, it means that the previous startup of the first system disk 121 was successful. This startup can continue to the first system disk 121. When there is no status information in the system disk identifier bit, it means that there is no startup record. At this time, the first status will be set in the system disk identifier bit and the second system disk 122 will be started.

[0087] It should be noted that, in this embodiment, the operating system installed on the computer 10 may include, but is not limited to, a third system disk and a fourth system disk, in addition to the first system disk 12 and the second system disk 13 mentioned above. In this embodiment, the first system disk 12 and the second system disk 13 can be interchanged in some cases. The first system disk 12 and the second system disk 13 are only used to distinguish two different system disks. There is no clear order relationship between the two system disks. In some cases, the basic input / output system 11 can use a sequential boot strategy to start the system disks, while in other cases, the basic input / output system 11 can also use a random boot strategy to start the system disks.

[0088] In another embodiment, when the basic input / output system sets a first state in the system disk identifier bit, it further includes: setting a startup count record table;

[0089] When the basic input / output system determines that the system disk to be started this time is the first system disk according to the preset startup order, it obtains the startup count of the first system disk recorded in the startup count record table. When the startup count reaches a threshold, it changes to the second system disk to start according to the preset startup order.

[0090] When setting the first state in the system disk identifier bit, the basic input / output system 11 can also set other information in the system disk identifier bit, including but not limited to the boot count record table, boot time record table, and boot duration record table. This embodiment uses the boot count record table as an example. After setting the boot count record table, the total number of boots and consecutive boots of the corresponding system disk can be obtained through this table, thereby knowing the operating status of the corresponding system disk and providing a basis for subsequent maintenance. At the same time, the maximum total number of boots and the maximum consecutive boots of the corresponding system disk can also be set in the boot count record table. In this way, when the total number of boots reaches the threshold, it can be determined that... The corresponding system disk needs maintenance. When the maximum number of consecutive boots reaches the threshold, the corresponding system disk can be determined to have failed to boot, and it needs to be switched to another system disk for booting. It should be noted that the consecutive boots here refer to the number of consecutive boot failures of the system disk. When the boot count record table is set in the system disk identifier, the basic input system 11 can use the number of consecutive boots as the basis for whether to boot the system disk. When the status information of the system disk identifier is in the first state, but its consecutive boot count has not reached the threshold, the system disk can continue to be booted until the system disk simultaneously meets the conditions of the status information being in the first state and the consecutive boot count reaching the threshold, then the next system disk in the order of priority is switched for booting.

[0091] In another embodiment, the management board monitors the boot status of the first system disk by including:

[0092] After the computer starts up, a timer begins. If the first system disk fails to perform a heartbeat handshake with the management board within a preset time, the computer restarts.

[0093] or,

[0094] If the computer's built-in timer is not paused within a preset time after the computer starts up, the first system disk fails to boot, and the computer is restarted.

[0095] See also Figure 3 and Figure 4 , Figure 3This is a schematic diagram of another multi-operating system computer boot system provided in this embodiment. Figure 4 This is a schematic diagram of another multi-operating system computer boot system provided in this embodiment. The multi-operating system computer boot system also includes a timer, which can be set in the management board 20. Figure 3 The timer 21 in the computer can also be set in the computer 10. Figure 4 Timer 111 in the middle.

[0096] When timer 21 is set in management board 20, it starts timing after computer 10 starts up. If a heartbeat handshake is not performed with management board 20 within a preset time, the first system disk 121 fails to start, and computer 10 is restarted. When timer 111 is set in computer 10, if timer 111 is not paused within a preset time after computer 10 starts up, the first system disk 121 fails to start, and computer 10 is restarted. Here, heartbeat handshake refers to communication between the operating system and management board 20. After the operating system successfully starts up, it communicates and identifies with management board 20 through the computer interface. Alternatively, timing can be performed using the computer's built-in timer 111, which is usually located in basic input / output system 11. The timer starts timing when computer 10 starts up. If the timer is not paused within a preset time, the first system disk 121 fails to start, and computer 10 is restarted. Methods for pausing timer 111 include controlling its pause through an application that starts with the operating system.

[0097] In this embodiment, when computer 10 starts up and the system disk is not successfully booted within a preset time period, computer 10 needs to be restarted. The methods for controlling computer 10 to restart include, but are not limited to, the management board 20 provided above being connected to the power supply of computer 10, and the management board 20 controlling computer 10 to restart by controlling the power supply to and from the power supply; or controlling computer to restart by triggering the reset button of computer 10.

[0098] This embodiment provides a multi-operating system computer boot system, including a management board, a basic input / output system (BIOS), and a memory. When the computer boots, the BIOS determines the first system disk to boot from the memory and sets the system disk identifier to a first state. Then, it boots the first system disk. The management board monitors the boot status of the first system disk. If the first system disk boots successfully, it sets the system disk identifier to a second state. If the boot fails, the management board controls the computer to restart. The BIOS can then determine the boot status of the previously booted system disk using the status information in the system disk identifier. This achieves automatic system switching during the boot of a multi-operating system computer, avoiding the problem of the BIOS continuously booting a faulty system disk, which could lead to computer offline operation.

[0099] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for booting a computer with multiple operating systems, characterized in that, The computer startup method includes: When the computer starts up, the Basic Input / Output System determines the first system disk to be started from at least two system disks according to the preset boot order, sets the first state in the system disk identifier bit, and starts the first system disk; Record the identification code of the first system disk; Monitor the boot status of the first system disk. When the first system disk boots successfully, set the system disk identifier to the second state. When the first system disk fails to boot, the computer is restarted. The basic input / output system identifies the system disk identifier as being in the first state, selects the second system disk to boot from at least two system disks according to the preset boot order, and monitors the boot status of the second system disk. When the basic input / output system identifies the system disk identifier as being in the first state, the process of selecting the second system disk for this boot from at least two system disks according to the preset boot order further includes: when selecting the second system disk, the first system disk is excluded based on the identification code of the first system disk, and the excluded first system disk is the system disk that failed to boot in the previous boot attempt; After the computer restarts, when the basic input / output system recognizes the system disk identifier bit as being in the second state, it includes: The system disk is identified by its identification code. The second state in the system disk identifier is changed to the first state, and the boot status of the first system disk is monitored. The second state indicates that the system disk has booted successfully.

2. The computer startup method as described in claim 1, characterized in that, The preset startup sequence includes any one of the following: sequential startup, random startup, and conditional sequential startup.

3. The computer startup method as described in claim 1, characterized in that, When the basic input / output system sets the first state in the system disk identifier bit, it also includes: setting a startup count record table; When the basic input / output system determines that the system disk to be started this time is the first system disk according to the preset startup order, it obtains the startup count of the first system disk recorded in the startup count record table. When the startup count reaches a threshold, it changes to the second system disk to start according to the preset startup order.

4. The computer startup method as described in claim 2, characterized in that, When the preset boot order is sequential boot and the system disk in the last sequence fails to boot, the computer is restarted, and the basic input / output system selects the system disk in the first sequence to boot.

5. The computer startup method according to any one of claims 1-4, characterized in that, The monitoring of the boot status of the first system disk includes: The system is configured such that if the computer fails to perform a heartbeat handshake with the management board within a preset time after startup, the first system disk fails to boot and the computer is restarted. or, If the computer's built-in timer is not paused within a preset time after the computer starts up, the first system disk fails to boot, and the computer is restarted.

6. A computer boot system with multiple operating systems, characterized in that, The computer boot system includes: a management board, a basic input / output system, and a memory; The memory stores at least two system disks; The basic input / output system is used to determine the first system disk to be started from the memory according to the preset boot order when the computer starts up, and set the system disk identifier bit to a first state to start the first system disk; and to identify the system disk identifier bit as the first state when the computer restarts, and select the second system disk to be started from the memory according to the preset boot order. The management board is used to record the identification code of the first system disk; Monitor the boot status of the first system disk. When the first system disk boots successfully, set the system disk identifier to the second state. When the first system disk fails to boot, restart the computer and monitor the boot status of the second system disk. When the basic input / output system identifies the system disk identifier as being in the first state, the process of selecting the second system disk for this boot from at least two system disks according to the preset boot order further includes: when selecting the second system disk, the first system disk is excluded based on the identification code of the first system disk, and the excluded first system disk is the system disk that failed to boot in the previous boot attempt; After the computer restarts, when the basic input / output system recognizes the system disk identifier bit as being in the second state, it includes: The system disk is identified by its identification code. The second state in the system disk identifier is changed to the first state, and the boot status of the first system disk is monitored. The second state indicates that the system disk has booted successfully.

7. The computer boot system as described in claim 6, characterized in that, When the basic input / output system is set to the first state in the system disk identifier bit, the method further includes: setting a startup count record table; When the basic input / output system determines that the system disk to be started this time is the first system disk according to the preset startup order, it obtains the startup count of the first system disk recorded in the startup count record table. When the startup count reaches a threshold, it changes to the second system disk to start according to the preset startup order.

8. The computer boot system as described in claim 6, characterized in that, The management board monitors the boot status of the first system disk, including: After the computer starts up, a timer begins. If the first system disk fails to perform a heartbeat handshake with the management board within a preset time, the computer restarts. or, If the computer's built-in timer is not paused within a preset time after the computer starts up, the first system disk fails to boot, and the computer is restarted.

Citation Information

Patent Citations

  • Method of enhancing reliability of storage equipment system disks

    CN102981935A

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

    CN114741119A