CN107368315A - A kind of startup method and device of double hard disk dual systems - Google Patents
A kind of startup method and device of double hard disk dual systems Download PDFInfo
- Publication number
- CN107368315A CN107368315A CN201710595655.1A CN201710595655A CN107368315A CN 107368315 A CN107368315 A CN 107368315A CN 201710595655 A CN201710595655 A CN 201710595655A CN 107368315 A CN107368315 A CN 107368315A
- Authority
- CN
- China
- Prior art keywords
- value
- minimized system
- minimized
- started
- preset
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1417—Boot up procedures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
本发明公开了一种双硬盘双系统的启动方法及装置,该方法包括:主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值;若CMOS寄存器的数值为0,则将CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统;若CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统;本发明通过在Bios boot的BDS阶段读取预设的CMOS寄存器的数值,可以在主板开机或重启后,选择对应的最小化系统启动;通过将CMOS寄存器的数值置为1,可以在第一预设硬盘存储的第一最小化系统不能启动的情况下,在主板重启后选择第二预设硬盘存储的第二最小化系统启动,提高了系统的稳定性。
The invention discloses a method and device for starting dual hard disks and dual systems. The method comprises: after the motherboard is powered on and started, read the value of the preset CMOS register in the BDS stage of Bios boot; if the value of the CMOS register is 0, Then the numerical value of CMOS register is set to 1, and the first minimization system of loading first preset hard disk storage; If the numerical value of CMOS register is 1, then load the second minimization system of second default hard disk storage; The present invention By reading the value of the preset CMOS register in the BDS stage of Bios boot, you can select the corresponding minimum system startup after the motherboard is turned on or restarted; In the case that the first minimized system stored cannot be started, the second minimized system stored in the second preset hard disk is selected to start after the motherboard is restarted, which improves the stability of the system.
Description
技术领域technical field
本发明涉及计算机应用技术领域,特别涉及一种双硬盘双系统的启动方法及装置。The invention relates to the field of computer application technology, in particular to a method and device for starting dual hard disks and dual systems.
背景技术Background technique
随着现代社会科技的发展,在如存储系统的系统中,系统的稳定性是重点需要保证的内容。如存储服务器中后端的海量存储介质需要在主板系统的管理和运算中实现数据的存储和运算。因此,主板的系统稳定性设计尤其重要。With the development of science and technology in modern society, in systems such as storage systems, the stability of the system is the key content that needs to be guaranteed. For example, the mass storage media at the back end of the storage server needs to realize data storage and calculation in the management and calculation of the motherboard system. Therefore, the system stability design of the motherboard is particularly important.
现有技术中,存在很多种提高系统稳定性方法,比如raid 1和windows的系统修复。但是这些方法都有其各自的局限性,如raid 1,通过磁盘数据镜像实现数据冗余,在成对的独立磁盘上产生互为备份的数据。然而如果系统文件发生损坏那么两个盘都会出现损坏,这种方法只能在其中一个硬盘硬件损坏时换另外一个盘进行数据恢复,而无法抵御系统文件层面的损坏。Windows的系统修复无法抵御由于硬件链路而带来的系统失效问题,而仅限于windows系统,对于如Linux的其他系统不适用。因此,如何提供一种可以多种系统通用的提高系统稳定性方法,不仅可以抵御由于系统文件破坏而引起的系统不能引导问题,还可以避免其中一个硬盘的链路损坏而造成的系统盘失效的问题,是现今急需解决的问题。In the prior art, there are many methods for improving system stability, such as raid 1 and windows system repair. However, these methods have their own limitations, such as raid 1, which realizes data redundancy through disk data mirroring, and generates mutual backup data on paired independent disks. However, if the system files are damaged, both disks will be damaged. This method can only be used for data recovery when one of the hard disk hardware is damaged, but cannot resist damage at the system file level. The system repair of Windows cannot resist the system failure problem caused by the hardware link, but it is limited to the windows system, and is not applicable to other systems such as Linux. Therefore, how to provide a method for improving system stability that can be used in multiple systems can not only resist the problem that the system cannot be booted due to system file damage, but also avoid the failure of the system disk caused by the link damage of one of the hard disks. The problem is the urgent need to solve the problem.
发明内容Contents of the invention
本发明的目的是提供一种双硬盘双系统的启动方法及装置,以利用硬件上双硬盘的设计,分别装上各自对应的一个的最小化系统,提高系统的稳定性。The purpose of the present invention is to provide a method and device for starting two hard disks and two systems, so as to use the design of two hard disks on the hardware to install a corresponding minimization system respectively, so as to improve the stability of the system.
为解决上述技术问题,本发明提供一种双硬盘双系统的启动方法,包括:In order to solve the above-mentioned technical problems, the present invention provides a method for starting dual hard disks and dual systems, including:
主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值;其中,所述CMOS寄存器为默认值为0;After the motherboard is powered on, read the value of the preset CMOS register in the BDS stage of Bios boot; wherein, the default value of the CMOS register is 0;
若所述CMOS寄存器的数值为0,则将所述CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统;If the value of the CMOS register is 0, then the value of the CMOS register is set to 1, and the first minimized system stored in the first preset hard disk is loaded;
若所述CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统。If the value of the CMOS register is 1, load the second minimized system stored in the second preset hard disk.
可选的,所述主板上电开机后,还包括:Optionally, after the main board is powered on, it also includes:
将预设的GPIO的数值置为0;Set the value of the preset GPIO to 0;
检测预设时间间隔内所述GPIO的数值是否为1;Detect whether the value of the GPIO is 1 within a preset time interval;
若预设时间间隔内所述GPIO的数值不为1,则重启所述主板。If the value of the GPIO is not 1 within the preset time interval, restart the mainboard.
可选的,该方法还包括:Optionally, the method also includes:
在所述第一最小化系统或所述第二最小化系统启动后,将所述GPIO的数值置为1。After the first minimized system or the second minimized system is started, the value of the GPIO is set to 1.
可选的,该方法还包括:Optionally, the method also includes:
当所述第一最小化系统启动后,检测启动的所述第一最小化系统是否为第一次加载启动;若启动的所述第一最小化系统为第一次加载启动,则将所述第一最小化系统备份到所述第二预设硬盘,并将所述第二最小化系统删除,将备份的第一最小化系统作为新的第二最小化系统;After the first minimized system is started, it is detected whether the first minimized system started is loaded and started for the first time; if the first minimized system started is loaded and started for the first time, the The first minimized system is backed up to the second preset hard disk, and the second minimized system is deleted, and the backed up first minimized system is used as a new second minimized system;
当所述第二最小化系统启动后,检测启动的所述第二最小化系统是否为第一次加载启动;若启动的所述第二最小化系统为第一次加载启动,则将所述第二最小化系统备份到所述第一预设硬盘,并将所述第一最小化系统删除,将备份的第二最小化系统作为新的第一最小化系统。After the second minimization system is started, it is detected whether the second minimization system started is the first loading startup; if the second minimization system startup is the first loading startup, then the The second minimized system is backed up to the first preset hard disk, the first minimized system is deleted, and the backed up second minimized system is used as a new first minimized system.
可选的,该方法还包括:Optionally, the method also includes:
在所述第一最小化系统或所述第二最小化系统启动后,将所述CMOS寄存器的数值置为0。After the first minimized system or the second minimized system is started, the value of the CMOS register is set to 0.
此外,本发明还提供了一种双硬盘双系统的启动装置,包括:In addition, the present invention also provides a booting device with dual hard disks and dual systems, including:
读取模块,用于主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值;其中,所述CMOS寄存器为默认值为0;The reading module is used to read the value of the preset CMOS register in the BDS stage of Bios boot after the motherboard is powered on and started; wherein, the default value of the CMOS register is 0;
第一加载模块,用于若所述CMOS寄存器的数值为0,则将所述CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统;The first loading module is used to set the value of the CMOS register to 1 if the value of the CMOS register is 0, and load the first minimized system stored in the first preset hard disk;
第二加载模块,用于若所述CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统。The second loading module is used to load the second minimization system stored in the second preset hard disk if the value of the CMOS register is 1.
可选的,该装置还包括:Optionally, the device also includes:
初始化模块,用于所述主板上电开机后,将预设的GPIO的数值置为0;The initialization module is used to set the value of the preset GPIO to 0 after the main board is powered on;
检测模块,用于检测预设时间间隔内所述GPIO的数值是否为1;A detection module, configured to detect whether the value of the GPIO in the preset time interval is 1;
重启模块,用于若预设时间间隔内所述GPIO的数值不为1,则重启所述主板。The restart module is used to restart the motherboard if the value of the GPIO is not 1 within a preset time interval.
可选的,该装置还包括:Optionally, the device also includes:
修改模块,用于在所述第一最小化系统或所述第二最小化系统启动后,将所述GPIO的数值置为1。A modification module, configured to set the value of the GPIO to 1 after the first minimized system or the second minimized system is started.
可选的,该装置还包括:Optionally, the device also includes:
第一备份模块,用于当所述第一最小化系统启动后,检测启动的所述第一最小化系统是否为第一次加载启动;若启动的所述第一最小化系统为第一次加载启动,则将所述第一最小化系统备份到所述第二预设硬盘,并将所述第二最小化系统删除,将备份的第一最小化系统作为新的第二最小化系统;The first backup module is used to detect whether the first minimized system is loaded and started for the first time after the first minimized system is started; if the first minimized system is started for the first time Loading and starting, backing up the first minimized system to the second preset hard disk, deleting the second minimized system, and using the backed up first minimized system as a new second minimized system;
第二备份模块,用于当所述第二最小化系统启动后,检测启动的所述第二最小化系统是否为第一次加载启动;若启动的所述第二最小化系统为第一次加载启动,则将所述第二最小化系统备份到所述第一预设硬盘,并将所述第一最小化系统删除,将备份的第二最小化系统作为新的第一最小化系统。The second backup module is used to detect whether the second minimized system is loaded and started for the first time after the second minimized system is started; if the second minimized system started is the first time When loading and starting, the second minimized system is backed up to the first preset hard disk, the first minimized system is deleted, and the backed up second minimized system is used as a new first minimized system.
可选的,该装置还包括:Optionally, the device also includes:
恢复模块,用于在所述第一最小化系统或所述第二最小化系统启动后,将所述CMOS寄存器的数值置为0。A recovery module, configured to set the value of the CMOS register to 0 after the first minimized system or the second minimized system is started.
本发明所提供的一种双硬盘双系统的启动方法,包括:主板上电开机后,在Biosboot的BDS阶段读取预设的CMOS寄存器的数值;其中,CMOS寄存器为默认值为0;若CMOS寄存器的数值为0,则将CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统;若CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统;A kind of start-up method of double hard disk double system provided by the present invention, comprises: after main board is powered on, reads the numerical value of preset CMOS register in the BDS stage of Biosboot; Wherein, CMOS register is default value 0; If CMOS If the value of the register is 0, then the value of the CMOS register is set to 1, and the first minimized system stored in the first preset hard disk is loaded; if the value of the CMOS register is 1, the second system stored in the second preset hard disk is loaded. Minimize the system;
可见,本发明通过主板上电开机后,在Bios(Basic Input Output System,基本输入输出系统)boot的BDS(Boot Device select,引导设备选择)阶段读取预设的CMOS寄存器的数值,可以在主板开机或重启后,选择对应的最小化系统启动;通过将CMOS寄存器的数值置为1,可以在第一预设硬盘存储的第一最小化系统不能启动的情况下,在主板重启后选择第二预设硬盘存储的第二最小化系统启动,从而不仅可以抵御由于系统文件破坏而引起的系统不能引导问题,还可以避免其中一个硬盘的链路损坏而造成的系统盘失效的问题,提高了系统的稳定性。此外,本发明还提供了一种双硬盘双系统的启动装置,同样具有上述有益效果。Visible, the present invention reads the numerical value of the preset CMOS register at the BDS (Boot Device select, boot device selection) stage of Bios (Basic Input Output System, Basic Input Output System) boot after power-on and starting of the mainboard, which can be used on the mainboard After booting or restarting, select the corresponding minimized system to start; by setting the value of the CMOS register to 1, you can select the second minimized system after the motherboard restarts when the first minimized system stored in the first preset hard disk cannot be started. The second minimized system startup of the preset hard disk storage can not only resist the problem that the system cannot be booted due to the damage of system files, but also avoid the problem of system disk failure caused by the link damage of one of the hard disks, and improve the system performance. stability. In addition, the present invention also provides a booting device with dual hard disks and dual systems, which also has the above beneficial effects.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本发明实施例所提供的一种双硬盘双系统的启动方法的流程图;FIG. 1 is a flow chart of a method for starting a dual hard disk dual system provided by an embodiment of the present invention;
图2为本发明实施例所提供的一种双硬盘双系统的启动方法的启动顺序示意图;FIG. 2 is a schematic diagram of the startup sequence of a startup method with dual hard disks and dual systems provided by an embodiment of the present invention;
图3为本发明实施例所提供的一种双硬盘双系统的启动装置的结构图。FIG. 3 is a structural diagram of a booting device with dual hard disks and dual systems provided by an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
请参考图1,图1为本发明实施例所提供的一种双硬盘双系统的启动方法的流程图。该方法可以包括:Please refer to FIG. 1 . FIG. 1 is a flow chart of a method for starting dual hard disks and dual systems provided by an embodiment of the present invention. The method can include:
步骤101:主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值;其中,CMOS寄存器为默认值为0。Step 101: after the motherboard is powered on, read the value of the preset CMOS register in the BDS stage of Bios boot; wherein, the default value of the CMOS register is 0.
可以理解的是,本步骤的目的可以为利用主板上的CMOS寄存器的数值,选择对应的第一最小化系统或第二最小化系统启动,对于CMOS寄存器的具体选择和数值的设置,可以由设计人员根据实用场景和用户需求自行设置,如可以选择CMOS 0x62的默认值为0的空闲的CMOS寄存器,只存储0(低)或1(高)两个数值,也可以选择其他可以存储更多数值的寄存器,只要可以利用该寄存器的数值,选择对应的第一最小化系统或第二最小化系统启动,本实施例对此不受任何限制。It can be understood that the purpose of this step can be to use the value of the CMOS register on the main board to select the corresponding first minimized system or the second minimized system to start. For the specific selection of the CMOS register and the setting of the value, it can be determined by design The staff can set it according to the practical scenario and user needs. For example, you can choose an idle CMOS register with a default value of 0 in CMOS 0x62, which only stores two values of 0 (low) or 1 (high), or you can choose other values that can store more values. register, as long as the value of the register can be used to select the corresponding first minimized system or the second minimized system to start, this embodiment is not subject to any limitation.
对应的,本实施例所提供的方法可以为利用读取到CMOS寄存器的数值,选择该数值对应的第一最小化系统或第二最小化系统,由于本实施例所提供的方法是以双硬盘双系统为例,因此,只需一个存储0(低)或1(高)两个数值的CMOS寄存器,便可达到上述目的;若应用于如三硬盘三系统的其他多硬盘多系统,则可以使用一个存储更多数值的寄存器或多个寄存器,本实施例对此不受任何限制。Correspondingly, the method provided by this embodiment can use the value read to the CMOS register to select the first minimization system or the second minimization system corresponding to the value, since the method provided by this embodiment is based on dual hard disks Dual systems are taken as an example. Therefore, only one CMOS register that stores two values of 0 (low) or 1 (high) can achieve the above-mentioned purpose; One register or multiple registers that store more values are used, and this embodiment is not limited in any way.
需要说明的是,本实施例所提供的方法中的主板上可以设置有第一预设硬盘和第二预设硬盘的接口,第一最小化系统和第二最小化系统分别预先安装在第一预设硬盘和第二预设硬盘上。对于第一预设硬盘和第二预设硬盘的具体类型,可以均为SSD盘(固体硬盘);也可以均为如机械硬盘的其他硬盘;或者两者混合的方式,本实施例对此不受任何限制。同样的,对于第一最小化系统和第二最小化系统的具体类型,可以为相同的Linux系统或其他系统,也可以为不同的两个系统,本实施例对此不受任何限制。It should be noted that, in the method provided in this embodiment, interfaces of the first preset hard disk and the second preset hard disk may be provided on the motherboard, and the first minimization system and the second minimization system are respectively pre-installed on the first on the default hard disk and on the second default hard disk. For the specific types of the first preset hard disk and the second preset hard disk, they can both be SSD disks (solid-state hard disks); they can also be other hard disks such as mechanical hard disks; subject to any restrictions. Similarly, the specific types of the first minimized system and the second minimized system may be the same Linux system or other systems, or may be two different systems, which are not limited in this embodiment.
步骤102:若CMOS寄存器的数值为0,则将CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统。Step 102: If the value of the CMOS register is 0, set the value of the CMOS register to 1, and load the first minimized system stored in the first preset hard disk.
其中,本步骤中将CMOS寄存器的数值置为1可以在第一最小化系统不能启动的情况下,主板进行重启后,进入步骤103,启动第二最小化系统。Wherein, setting the value of the CMOS register to 1 in this step can enter step 103 to start the second minimized system after the motherboard restarts when the first minimized system cannot be started.
可以理解的是,若加载第一预设硬盘存储的第一最小化系统后,第一最小化系统不能启动,则可以由用户或自动对主板进行重启,从而通过步骤101进入到步骤103,启动第二最小化系统。对于对主板进行重启的具体方式,可以为根据接收用户发送的指令,对主板进行重启;也可以为确定第一最小化系统不能启动后,自动对主板进行的重启。本实施例对此不受任何限制。It can be understood that if the first minimized system stored in the first preset hard disk cannot be started after loading the first minimized system, the mainboard can be restarted by the user or automatically, so as to enter step 103 through step 101 and start Second minimization system. As for the specific manner of restarting the mainboard, it may be to restart the mainboard according to receiving an instruction sent by the user; it may also be to automatically restart the mainboard after it is determined that the first minimized system cannot be started. This embodiment is not limited in any way.
优选的,为了方便用户的使用,可以在确定第一最小化系统不能启动后,自动对主板进行的重启。也就是说,本实施例所提供的方法还可以包括:将预设的GPIO的数值置为0;检测预设时间间隔内GPIO的数值是否为1;若预设时间间隔内GPIO的数值不为1,则重启主板的步骤。以及对应的,在第一最小化系统或第二最小化系统启动后,将GPIO的数值置为1的步骤。以利用预设的GPIO的数值确定,第一最小化系统或第二最小化系统是否启动成功,从而在第一最小化系统或第二最小化系统不能启动的情况下,重启主板。Preferably, for the convenience of the user, after it is determined that the first minimized system cannot be started, the mainboard can be automatically restarted. That is to say, the method provided by this embodiment may also include: setting the preset GPIO value to 0; detecting whether the GPIO value is 1 within the preset time interval; if the GPIO value within the preset time interval is not 1, then restart the mainboard steps. And correspondingly, after the first minimized system or the second minimized system is started, the step of setting the value of GPIO to 1. Whether the first minimized system or the second minimized system is started successfully is determined by using a preset GPIO value, so that when the first minimized system or the second minimized system cannot be started, the motherboard is restarted.
具体的,对于检测预设时间间隔内GPIO的数值是否为1的具体方式和过程,可以由设计人员根据实用场景和用户需求自行设置,如可以利用CPLD(Complex ProgrammableLogic Device,复杂可编程逻辑器件)的watchdog检测GPIO的数值,每个5分钟检测一次,设定检测的次数为6,即在30分钟的预设时间间隔内GPIO的数值不为1,则认定第一最小化系统或第二最小化系统不能启动,可以拉低slp_S3重启主板。本实施例对此不受任何限制。同样的,对于重启主板的具体方式,可以通过拉低slp_S3重启主板,也可以通过其他方式,本实施例对此不受任何限制。Specifically, the specific method and process for detecting whether the value of GPIO is 1 within the preset time interval can be set by the designer according to practical scenarios and user needs, such as using CPLD (Complex Programmable Logic Device, complex programmable logic device) The watchdog detects the value of GPIO, and detects once every 5 minutes. The number of detections is set to 6, that is, the value of GPIO is not 1 within the preset time interval of 30 minutes, and the first minimum system or the second minimum system is determined. If the system cannot be started, you can pull down slp_S3 to restart the motherboard. This embodiment is not limited in any way. Similarly, as for the specific method of restarting the mainboard, the mainboard can be restarted by pulling down slp_S3, or by other methods, which is not limited in this embodiment.
步骤103:若CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统。Step 103: If the value of the CMOS register is 1, load the second minimized system stored in the second preset hard disk.
其中,本步骤中加载第二预设硬盘存储的第二最小化系统的具体方式,可以由设计人员自行设置,如可以改变启动顺序,如图2所示,若CMOS寄存器的数值为1,则可以在本次启动时交换第一预设硬盘(HDD1)和第二预设硬盘(HDD2)的优先级,从第二预设硬盘加载第二最小化系统。只要可以在CMOS寄存器的数值为1时,加载第二预设硬盘存储的第二最小化系统,本实施例对此不做任何限制。Wherein, the specific way of loading the second minimized system stored in the second preset hard disk in this step can be set by the designer himself, such as changing the startup sequence, as shown in Figure 2, if the value of the CMOS register is 1, then The priorities of the first default hard disk (HDD1) and the second default hard disk (HDD2) can be exchanged during this startup, and the second minimized system is loaded from the second default hard disk. As long as the second minimized system stored in the second preset hard disk can be loaded when the value of the CMOS register is 1, this embodiment does not impose any limitation on this.
可以理解的是,为了进一步提高本实施例所提供的方法的系统稳定性,实现系统自动备份修复,可以将能够一次启动的最小化系统备份到存储另一最小化系统的硬盘上,并将另一最小化系统删除,也就是替换另一最小化系统,使两个硬盘存储的最小化系统均为能够一次启动的最小化系统。也就是说,本步骤还可以包括:当第一最小化系统启动后,检测启动的第一最小化系统是否为第一次加载启动;若启动的第一最小化系统为第一次加载启动,则将第一最小化系统备份到第二预设硬盘,并将第二最小化系统删除,将备份的第一最小化系统作为新的第二最小化系统;当第二最小化系统启动后,检测启动的第二最小化系统是否为第一次加载启动;若启动的第二最小化系统为第一次加载启动,则将第二最小化系统备份到第一预设硬盘,并将第一最小化系统删除,将备份的第二最小化系统作为新的第一最小化系统。It can be understood that, in order to further improve the system stability of the method provided by this embodiment and realize automatic system backup and repair, the minimized system that can be started at one time can be backed up to the hard disk storing another minimized system, and the other minimized system can be backed up. Deleting a minimized system means replacing another minimized system, so that the minimized systems stored in the two hard disks are all minimized systems that can be started at one time. That is to say, this step may also include: after the first minimized system is started, detecting whether the first minimized system started is loaded and started for the first time; if the first minimized system started is loaded and started for the first time, Then back up the first minimized system to the second preset hard disk, delete the second minimized system, and use the backed up first minimized system as the new second minimized system; when the second minimized system starts, Detect whether the second minimized system started is loaded and started for the first time; if the second minimized system started is loaded and started for the first time, then the second minimized system is backed up to the first preset hard disk, and the first The minimized system is deleted, and the backup second minimized system is used as the new first minimized system.
需要说明的是,检测启动的第一最小化系统或第二最小化系统是否为第一次加载启动,可以为检测第一最小化系统或第二最小化系统是否能够一次加载直接启动,也就是检测第一最小化系统或第二最小化系统的性能是否没有问题,从而将没有问题的最小化系统备份到存储另一最小化系统的硬盘上,实现如存储系统的系统自动备份修复。It should be noted that detecting whether the first minimized system or the second minimized system is started by loading for the first time may be to detect whether the first minimized system or the second minimized system can be loaded and started directly at one time, that is, Detect whether the performance of the first minimized system or the second minimized system has no problem, thereby backing up the minimized system with no problem to the hard disk storing another minimized system, so as to realize automatic backup and repair of the storage system.
具体的,对于检测启动的第一最小化系统或第二最小化系统是否为第一次加载启动的具体检测时间点,可以为在第一最小化系统或第二最小化系统启动后直接进行的步骤,如将GPIO的数值置为1的步骤;也可以为在预设时间间隔内GPIO的数值为1情况下,进行的步骤。本实施例对此不受任何限制。Specifically, for detecting whether the first minimized system or the second minimized system is the specific detection time point for the first loading start, it may be performed directly after the first minimized system or the second minimized system is started. The step is, for example, a step of setting the value of the GPIO to 1; it may also be a step performed when the value of the GPIO is 1 within a preset time interval. This embodiment is not limited in any way.
进一步的,本实施例所提供的方法还可以包括在第一最小化系统或第二最小化系统启动后,将CMOS寄存器的数值置为0的步骤,以每次启动最小化系统优先从第一预设硬盘存储的第一最小化系统启动;也可以为第二最小化系统启动后,将CMOS寄存器的数值置为0的步骤。本实施例对此不受任何限制。Further, the method provided by this embodiment may also include the step of setting the value of the CMOS register to 0 after the first minimized system or the second minimized system is started, so that the minimized system is preferentially started from the first minimized system each time. The first minimized system stored in the preset hard disk is started; it may also be a step of setting the value of the CMOS register to 0 after the second minimized system is started. This embodiment is not limited in any way.
本实施例中,本发明实施例通过主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值,可以在主板开机或重启后,选择对应的最小化系统启动;通过将CMOS寄存器的数值置为1,可以在第一预设硬盘存储的第一最小化系统不能启动的情况下,在主板重启后选择第二预设硬盘存储的第二最小化系统启动,从而不仅可以抵御由于系统文件破坏而引起的系统不能引导问题,还可以避免其中一个硬盘的链路损坏而造成的系统盘失效的问题,提高了系统的稳定性。In this embodiment, the embodiment of the present invention reads the value of the preset CMOS register in the BDS stage of Bios boot after the main board is powered on and started, and the corresponding minimized system can be selected to start after the main board is turned on or restarted; If the value of the CMOS register is set to 1, when the first minimized system stored in the first preset hard disk cannot be started, the second minimized system stored in the second preset hard disk can be selected to start after the motherboard is restarted, so that not only can Resist the problem that the system cannot be booted due to the damage of the system file, and also avoid the problem of system disk failure caused by the link damage of one of the hard disks, and improve the stability of the system.
请参考图3,图3为本发明实施例所提供的一种双硬盘双系统的启动装置的结构图。该装置可以包括:Please refer to FIG. 3 . FIG. 3 is a structural diagram of a boot device with dual hard disks and dual systems provided by an embodiment of the present invention. The device can include:
读取模块100,用于主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值;其中,CMOS寄存器为默认值为0;The reading module 100 is used to read the value of the preset CMOS register in the BDS stage of Bios boot after the motherboard is powered on and started; wherein, the CMOS register is 0 by default;
第一加载模块200,用于若CMOS寄存器的数值为0,则将CMOS寄存器的数值置为1,并加载第一预设硬盘存储的第一最小化系统;The first loading module 200 is used to set the value of the CMOS register to 1 if the value of the CMOS register is 0, and load the first minimized system stored in the first preset hard disk;
第二加载模块300,用于若CMOS寄存器的数值为1,则加载第二预设硬盘存储的第二最小化系统。The second loading module 300 is configured to load the second minimized system stored in the second preset hard disk if the value of the CMOS register is 1.
可选的,该装置还可以包括:Optionally, the device may also include:
初始化模块,用于主板上电开机后,将预设的GPIO的数值置为0;The initialization module is used to set the value of the preset GPIO to 0 after the main board is powered on;
检测模块,用于检测预设时间间隔内GPIO的数值是否为1;A detection module, configured to detect whether the value of the GPIO is 1 within a preset time interval;
重启模块,用于若预设时间间隔内GPIO的数值不为1,则重启主板。Restart the module, used to restart the motherboard if the value of GPIO is not 1 within the preset time interval.
可选的,该装置还可以包括:Optionally, the device may also include:
修改模块,用于在第一最小化系统或第二最小化系统启动后,将GPIO的数值置为1。Modify the module to set the value of GPIO to 1 after the first minimized system or the second minimized system is started.
可选的,该装置还可以包括:Optionally, the device may also include:
第一备份模块,用于当第一最小化系统启动后,检测启动的第一最小化系统是否为第一次加载启动;若启动的第一最小化系统为第一次加载启动,则将第一最小化系统备份到第二预设硬盘,并将第二最小化系统删除,将备份的第一最小化系统作为新的第二最小化系统;The first backup module is used to detect whether the first minimized system is loaded and started for the first time after the first minimized system is started; if the first minimized system started is loaded and started for the first time, then the A minimized system is backed up to the second default hard disk, and the second minimized system is deleted, and the backed up first minimized system is used as a new second minimized system;
第二备份模块,用于当第二最小化系统启动后,检测启动的第二最小化系统是否为第一次加载启动;若启动的第二最小化系统为第一次加载启动,则将第二最小化系统备份到第一预设硬盘,并将第一最小化系统删除,将备份的第二最小化系统作为新的第一最小化系统。The second backup module is used to detect whether the second minimized system started is loaded and started for the first time after the second minimized system is started; if the second minimized system started is loaded and started for the first time, then the first The second minimized system is backed up to the first preset hard disk, the first minimized system is deleted, and the backed up second minimized system is used as a new first minimized system.
可选的,该装置还可以包括:Optionally, the device may also include:
恢复模块,用于在第一最小化系统或第二最小化系统启动后,将CMOS寄存器的数值置为0。The recovery module is used to set the value of the CMOS register to 0 after the first minimized system or the second minimized system is started.
本实施例中,本发明实施例通过读取模块100在主板上电开机后,在Bios boot的BDS阶段读取预设的CMOS寄存器的数值,可以在主板开机或重启后,选择对应的最小化系统启动;通过第一加载模块200将CMOS寄存器的数值置为1,可以在第一预设硬盘存储的第一最小化系统不能启动的情况下,在主板重启后选择第二预设硬盘存储的第二最小化系统启动,从而不仅可以抵御由于系统文件破坏而引起的系统不能引导问题,还可以避免其中一个硬盘的链路损坏而造成的系统盘失效的问题,提高了系统的稳定性。In this embodiment, the embodiment of the present invention reads the value of the preset CMOS register in the BDS stage of Bios boot by reading the module 100 after the motherboard is powered on, and can select the corresponding minimum value after the motherboard is turned on or restarted. System startup; the value of the CMOS register is set to 1 by the first loading module 200, and when the first minimized system stored in the first preset hard disk cannot be started, the second preset hard disk storage can be selected after the motherboard restarts. The second is to minimize system startup, which can not only prevent the system from being unable to boot due to system file damage, but also avoid the system disk failure caused by the link damage of one of the hard disks, and improve system stability.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in the description is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and for the related information, please refer to the description of the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
以上对本发明所提供的双硬盘双系统的启动方法及装置进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The method and device for starting dual hard disks and dual systems provided by the present invention have been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710595655.1A CN107368315A (en) | 2017-07-20 | 2017-07-20 | A kind of startup method and device of double hard disk dual systems |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710595655.1A CN107368315A (en) | 2017-07-20 | 2017-07-20 | A kind of startup method and device of double hard disk dual systems |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN107368315A true CN107368315A (en) | 2017-11-21 |
Family
ID=60307045
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710595655.1A Pending CN107368315A (en) | 2017-07-20 | 2017-07-20 | A kind of startup method and device of double hard disk dual systems |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107368315A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109582372A (en) * | 2018-11-12 | 2019-04-05 | 青岛海信电器股份有限公司 | A kind of starting method and device of system |
| CN114356623A (en) * | 2021-12-14 | 2022-04-15 | 龙芯中科技术股份有限公司 | Hard disk assembly startup method, device, electronic device and storage medium |
Citations (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101599033A (en) * | 2009-07-15 | 2009-12-09 | 王颖 | Method for restoring system backup and device |
| US20100100720A1 (en) * | 2008-10-20 | 2010-04-22 | Asustek Computer Inc. | Computer system having dual bios program protecting function and control method thereof |
| CN101833487A (en) * | 2010-04-16 | 2010-09-15 | 山东高效能服务器和存储研究院 | A Realization Method of Automated Synchronous Mirroring and Restoration |
| CN101882085A (en) * | 2010-06-23 | 2010-11-10 | 迈普通信技术股份有限公司 | System starting method and embedded equipment |
| CN102214106A (en) * | 2010-04-08 | 2011-10-12 | 三星电子(中国)研发中心 | Automatic dual-system guide method of embedded device |
| CN102221864A (en) * | 2010-04-15 | 2011-10-19 | 研祥智能科技股份有限公司 | Computer, and computer startup management system and method thereof |
| CN102331958A (en) * | 2011-11-02 | 2012-01-25 | 赵玉燕 | Method for starting hard disk under Linux system |
| CN102446104A (en) * | 2010-09-30 | 2012-05-09 | 研祥智能科技股份有限公司 | Method for starting up computer system |
| CN103500074A (en) * | 2013-10-08 | 2014-01-08 | 华为技术有限公司 | Hard disk access method and hard disk access device |
| CN103678018A (en) * | 2012-09-04 | 2014-03-26 | 联想(北京)有限公司 | Method and device for recovering data |
| CN103760950A (en) * | 2014-01-09 | 2014-04-30 | 北京奇虎科技有限公司 | Wireless routing equipment management method and device |
| CN104217176A (en) * | 2014-08-28 | 2014-12-17 | 山东超越数控电子有限公司 | Realizing method for double-hard-disk secure computer based on BIOS (basic input/output system) |
| CN104834542A (en) * | 2015-04-20 | 2015-08-12 | 成都亿盟恒信科技有限公司 | Method for starting double systems based on embedded Linux equipment |
| CN105138430A (en) * | 2015-08-24 | 2015-12-09 | 浪潮集团有限公司 | Embedded operating system backup and restoration method and device |
| CN105320529A (en) * | 2014-07-08 | 2016-02-10 | 中兴通讯股份有限公司 | Boot method and device based on NAND-Flash double-boot guidance |
| CN105786545A (en) * | 2014-12-25 | 2016-07-20 | 研祥智能科技股份有限公司 | Breakpoint restoration method and system based on heterogeneous hybrid memories |
-
2017
- 2017-07-20 CN CN201710595655.1A patent/CN107368315A/en active Pending
Patent Citations (16)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100100720A1 (en) * | 2008-10-20 | 2010-04-22 | Asustek Computer Inc. | Computer system having dual bios program protecting function and control method thereof |
| CN101599033A (en) * | 2009-07-15 | 2009-12-09 | 王颖 | Method for restoring system backup and device |
| CN102214106A (en) * | 2010-04-08 | 2011-10-12 | 三星电子(中国)研发中心 | Automatic dual-system guide method of embedded device |
| CN102221864A (en) * | 2010-04-15 | 2011-10-19 | 研祥智能科技股份有限公司 | Computer, and computer startup management system and method thereof |
| CN101833487A (en) * | 2010-04-16 | 2010-09-15 | 山东高效能服务器和存储研究院 | A Realization Method of Automated Synchronous Mirroring and Restoration |
| CN101882085A (en) * | 2010-06-23 | 2010-11-10 | 迈普通信技术股份有限公司 | System starting method and embedded equipment |
| CN102446104A (en) * | 2010-09-30 | 2012-05-09 | 研祥智能科技股份有限公司 | Method for starting up computer system |
| CN102331958A (en) * | 2011-11-02 | 2012-01-25 | 赵玉燕 | Method for starting hard disk under Linux system |
| CN103678018A (en) * | 2012-09-04 | 2014-03-26 | 联想(北京)有限公司 | Method and device for recovering data |
| CN103500074A (en) * | 2013-10-08 | 2014-01-08 | 华为技术有限公司 | Hard disk access method and hard disk access device |
| CN103760950A (en) * | 2014-01-09 | 2014-04-30 | 北京奇虎科技有限公司 | Wireless routing equipment management method and device |
| CN105320529A (en) * | 2014-07-08 | 2016-02-10 | 中兴通讯股份有限公司 | Boot method and device based on NAND-Flash double-boot guidance |
| CN104217176A (en) * | 2014-08-28 | 2014-12-17 | 山东超越数控电子有限公司 | Realizing method for double-hard-disk secure computer based on BIOS (basic input/output system) |
| CN105786545A (en) * | 2014-12-25 | 2016-07-20 | 研祥智能科技股份有限公司 | Breakpoint restoration method and system based on heterogeneous hybrid memories |
| CN104834542A (en) * | 2015-04-20 | 2015-08-12 | 成都亿盟恒信科技有限公司 | Method for starting double systems based on embedded Linux equipment |
| CN105138430A (en) * | 2015-08-24 | 2015-12-09 | 浪潮集团有限公司 | Embedded operating system backup and restoration method and device |
Non-Patent Citations (3)
| Title |
|---|
| 徐云峰,郭正彪: "隔离技术产品", 《物理安全》 * |
| 电子报编辑部: "灵活配置双硬盘双操作系统", 《2006年《电子报》合订本 上》 * |
| 阿馨娜尔等: "解决硬盘病毒问题的几个简单方法", 《PC选购组装与急救-自己动手》 * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109582372A (en) * | 2018-11-12 | 2019-04-05 | 青岛海信电器股份有限公司 | A kind of starting method and device of system |
| CN114356623A (en) * | 2021-12-14 | 2022-04-15 | 龙芯中科技术股份有限公司 | Hard disk assembly startup method, device, electronic device and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN102150131B (en) | Managing cache data and metadata | |
| TWI571800B (en) | Booting method and computer system | |
| US10353779B2 (en) | Systems and methods for detection of firmware image corruption and initiation of recovery | |
| CN102216899B (en) | Managing cache data and metadata | |
| US7962739B2 (en) | Recovering from hard disk errors that corrupt one or more critical system boot files | |
| JPWO2013103023A1 (en) | Information processing apparatus, information processing method, and computer program | |
| TWI764454B (en) | Firmware corruption recovery | |
| CN115951949A (en) | Method, device and computing device for recovering configuration parameters of BIOS | |
| CN111488589A (en) | Safe and trusted boot and firmware upgrade system and method based on hardware write protection | |
| US20090013167A1 (en) | Computer device, method for booting the same, and booting module for the same | |
| CN113342365A (en) | Operating system deployment method, device, equipment and computer-readable storage medium | |
| US20140156943A1 (en) | Information processing apparatus, information processing method, and program | |
| CN120066598B (en) | Classification method of operating system startup items, computer program products and services | |
| CN116610336A (en) | Firmware upgrading method, system, device and readable storage medium | |
| US9852029B2 (en) | Managing a computing system crash | |
| CN107368315A (en) | A kind of startup method and device of double hard disk dual systems | |
| CN110399168A (en) | Majority according to disk storage server system start method, device and equipment | |
| WO2019094233A2 (en) | Systems and methods of deploying an operating system from a resilient virtual drive | |
| CN113010215A (en) | Method, device and equipment for quickly restarting operating system and readable medium | |
| US10768940B2 (en) | Restoring a processing unit that has become hung during execution of an option ROM | |
| US11762756B2 (en) | System and method for startup data verification | |
| CN117421156A (en) | Firmware management method, device, equipment and machine-readable storage medium | |
| US11354109B1 (en) | Firmware updates using updated firmware files in a dedicated firmware volume | |
| WO2024000535A1 (en) | Partition table update method and apparatus, and electronic device and storage medium | |
| CN102831032A (en) | Repair system and method for master boot record of hard disc |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171121 |