CN111522690B - Data storage device and method for maintaining normal start-up operation of data storage device - Google Patents
Data storage device and method for maintaining normal start-up operation of data storage device Download PDFInfo
- Publication number
- CN111522690B CN111522690B CN202010229601.5A CN202010229601A CN111522690B CN 111522690 B CN111522690 B CN 111522690B CN 202010229601 A CN202010229601 A CN 202010229601A CN 111522690 B CN111522690 B CN 111522690B
- Authority
- CN
- China
- Prior art keywords
- operating system
- storage area
- firmware
- data
- boot
- 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.)
- Active
Links
Classifications
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本发明提供一种数据储存装置及维持数据储存装置正常开机运作的方法,数据存储装置包括一控制器及一数据储存单元,数据储存单元包括一第一系统储存区及一第二系统储存区;第一系统储存区储存一原始操作系统且包括一第一起始扇区地址,而第二系统储存区储存一备用操作系统且包括一第二起始扇区地址;控制器包括一韧体,韧体定义有一开机指针位移程序,韧体默认一开机指针指向第一系统储存区的第一起始扇区地址,并以原始操作系统执行开机;当原始操作系统损坏时,控制器的韧体执行开机指针位移程序以将开机指针移至第二起始扇区地址,并以第二系统储存区的备用操作系统执行开机。据此,在原始操作系统故障时,电子装置能够继续运作。
The present invention provides a data storage device and a method for maintaining normal boot operation of the data storage device. The data storage device includes a controller and a data storage unit, and the data storage unit includes a first system storage area and a second system storage area; The first system storage area stores an original operating system and includes a first initial sector address, and the second system storage area stores an alternate operating system and includes a second initial sector address; the controller includes a firmware, the firmware The body defines a boot pointer displacement program, and the firmware defaults to a boot pointer pointing to the first starting sector address of the first system storage area, and executes the boot with the original operating system; when the original operating system is damaged, the firmware of the controller executes the boot The pointer displacement program is used to move the boot pointer to the address of the second initial sector, and perform booting with the standby operating system in the second system storage area. Accordingly, when the original operating system fails, the electronic device can continue to operate.
Description
技术领域technical field
本发明有关于一种数据存储装置及维持数据储存装置正常开机运作的方法。The invention relates to a data storage device and a method for maintaining the normal boot operation of the data storage device.
背景技术Background technique
计算机使用时,常常会因为操作的失当、中毒或断电而造成操作系统的损坏。以往计算机出货前,计算机制造商都会附上一还原光盘。还原光盘包含有一操作系统的还原文件(如操作系统的映像文件)。当计算机的操作系统产生损坏时,用户可以通过还原光盘的还原文件执行一操作系统的还原程序。然而,还原光盘容易遗失或刮伤,以致操作系统的还原程序常常无法顺利执行。When the computer is used, the operating system is often damaged due to improper operation, poisoning or power failure. In the past, before the computer was shipped, the computer manufacturer would include a recovery disc. The recovery disc contains a recovery file of an operating system (such as an image file of the operating system). When the operating system of the computer is damaged, the user can execute a restoring program of the operating system through the restoring file of the restoring CD. However, the recovery disc is easily lost or scratched, so that the recovery process of the operating system often cannot be executed smoothly.
或者,以往操作系统还原程序也可通过一微型化系统来执行。计算机内部的一数据储存装置切割成一操作系统区及一系统还原区。操作系统区储存有一操作系统,而系统还原区储存有一系统映像文件及一微型化系统(如Windows PE)。当用户欲执行计算机的操作系统还原程序时,按压一电性连接主板的一还原键进行操作系统还原功能的触发。操作系统还原功能被触发后,BIOS利用系统还原区执行开机。系统还原区开机后,操作人员通过微型化系统的操作,以解开系统映像文件,并利用解开后的系统映像文件还原操作系统。Alternatively, the conventional operating system restore procedure can also be executed by a miniaturized system. A data storage device inside the computer is divided into an operating system area and a system restore area. The operating system area stores an operating system, and the system restore area stores a system image file and a miniaturized system (such as Windows PE). When the user wants to execute the operating system recovery program of the computer, he presses a recovery key electrically connected to the motherboard to trigger the operating system recovery function. After the operating system restore function is triggered, the BIOS uses the system restore area to perform booting. After the system recovery area is turned on, the operator operates the miniaturized system to decompress the system image file, and uses the decompressed system image file to restore the operating system.
以微型化系统执行操作系统还原程序,系统映像文件的文件格式以及操作系统的版本必须能够被微型化系统所解析,否则,无法解开系统映像文件以及无法对于操作系统执行还原。因此,以微型化系统执行操作系统还原程序大都只适合使用在微软windows操作系统的计算机上。To execute the operating system restoration program with a miniaturized system, the file format of the system image file and the version of the operating system must be able to be resolved by the miniaturized system, otherwise, the system image file cannot be unpacked and the operating system cannot be restored. Therefore, most of the miniaturized systems that perform the operating system recovery program are only suitable for use on computers with the Microsoft Windows operating system.
再者,目前工控设备中的操作系统大都采非windows操作系统,例如:Linux、TinyOS。若以微型化系统执行工控设备的操作系统还原程序,势必需要根据于工控设备所采用的操作系统的版本重新设计微型化系统的软件架构,否则工控设备的操作系统的还原流程将无法顺利完成。在此,重新设计微型化系统将会造成工控设备的软件设计人员不少的困扰。Furthermore, most of the operating systems in industrial control equipment currently use non-windows operating systems, such as Linux and TinyOS. If the miniaturization system is used to execute the operating system restoration program of the industrial control equipment, it is necessary to redesign the software architecture of the miniaturization system according to the version of the operating system adopted by the industrial control equipment, otherwise the restoration process of the operating system of the industrial control equipment will not be completed smoothly. Here, redesigning the miniaturization system will cause a lot of troubles for software designers of industrial control equipment.
发明内容Contents of the invention
本发明的一目的,在于提出一种数据储存装置,其数据储存装置能够设置在一电子装置中,且包括一控制器及一数据储存单元。控制器包括一韧体,韧体定义有一开机指针位移程序。数据储存单元包括一储存一原始操作系统的第一系统储存区以及一储存一第一备用操作系统的第二系统储存区。控制器的韧体预设一开机指针指向第一系统储存区的一第一起始扇区地址,并以第一起始扇区地址作为一主启动扇区地址。当原始操作系统正常时,控制器的韧体读取第一初始扇区地址中的主启动记录,并以第一初始扇区地址中的主启动记录执行原始操作系统的开机流程。当原始操作系统故障时,控制器的韧体将会执行一开机指针位移程序,以将开机指针从第一系统储存区的第一初始扇区地址移至第二系统储存区的第二初始扇区地址,且读取第二初始扇区地址中的主启动记录,并以第二初始扇区地址中的主启动记录执行第一备用操作系统的开机流程。如此,当原始操作系统故障时,将可以利用第一备用操作系统快速恢复电子装置的开机,进而使得电子装置能够通过第一备用操作系统继续运作。An object of the present invention is to provide a data storage device, which can be installed in an electronic device and includes a controller and a data storage unit. The controller includes a firmware, and the firmware defines a boot pointer displacement program. The data storage unit includes a first system storage area for storing an original operating system and a second system storage area for storing a first backup operating system. The firmware of the controller presets a boot pointer to point to a first initial sector address of the first system storage area, and uses the first initial sector address as a main boot sector address. When the original operating system is normal, the firmware of the controller reads the master boot record in the first initial sector address, and uses the master boot record in the first initial sector address to execute the boot process of the original operating system. When the original operating system fails, the firmware of the controller will execute a boot pointer displacement program to move the boot pointer from the first initial sector address of the first system storage area to the second initial sector address of the second system storage area area address, and read the master boot record in the second initial sector address, and execute the boot process of the first standby operating system with the master boot record in the second initial sector address. In this way, when the original operating system fails, the first backup operating system can be used to quickly restore the booting of the electronic device, so that the electronic device can continue to operate through the first backup operating system.
本发明的一目的,在于提出一种数据储存装置,其数据储存装置的控制器的韧体定义有一操作系统还原程序。当第一系统储存区中的原始操作系统故障时,控制器的韧体执行操作系统还原程序,以一复制扇区数据的方式将第二系统储存区中数据扇区所储存的第一备用操作系统的数据复制至第一系统储存区的数据扇区中,以便还原第一系统储存区中的原始操作系统。以复制扇区数据的方式还原原始操作系统,完全无需解析原始操作系统的架构,则采用微软windows操作系统架构或采用非微软windows操作系统架构的电子装置都能够轻易地执行操作系统的还原动作。An object of the present invention is to provide a data storage device, the firmware of the controller of the data storage device defines an operating system recovery program. When the original operating system in the first system storage area fails, the firmware of the controller executes the operating system recovery program, and the first backup operation stored in the data sector in the second system storage area is performed by copying sector data. The data of the system is copied to the data sector of the first system storage area, so as to restore the original operating system in the first system storage area. Restoring the original operating system by copying the sector data does not need to analyze the original operating system architecture, and the electronic device adopting the Microsoft Windows operating system architecture or the non-Microsoft Windows operating system architecture can easily perform the operating system restoring operation.
为达成上述目的,本发明提供一种数据储存装置,包括:一数据储存单元,包括:一第一系统储存区,储存有一原始操作系统,包括一第一起始扇区地址;及一第二系统储存区,储存有一第一备用操作系统,包括一第二起始扇区地址;及一控制器,连接数据储存单元,包括一韧体,韧体定义有一开机指针位移程序,韧体默认一开机指针指向第一系统储存区的第一起始扇区地址,并以原始操作系统执行开机;当原始操作系统损坏时,控制器的韧体执行开机指针位移程序,以将开机指针移至第二系统储存区的第二起始扇区地址,并以第二系统储存区的第一备用操作系统执行开机流程。To achieve the above object, the present invention provides a data storage device, including: a data storage unit, including: a first system storage area, storing an original operating system, including a first initial sector address; and a second system storage area The storage area stores a first standby operating system, including a second starting sector address; and a controller, connected to the data storage unit, including a firmware, which defines a boot pointer displacement program, and the firmware defaults to a boot The pointer points to the first starting sector address of the first system storage area, and the original operating system is used to boot; when the original operating system is damaged, the firmware of the controller executes the boot pointer displacement program to move the boot pointer to the second system The second starting sector address of the storage area, and executes the boot process with the first standby operating system in the second system storage area.
本发明一实施例中,数据储存装置更包括一数据传输接口,控制器连接数据传输接口,当控制器通过数据传输接口接收一外部的触发命令时,控制器的韧体根据触发指令执行开机指针位移程序。In one embodiment of the present invention, the data storage device further includes a data transmission interface, and the controller is connected to the data transmission interface. When the controller receives an external trigger command through the data transmission interface, the firmware of the controller executes the boot pointer according to the trigger command. displacement program.
本发明一实施例中,控制器连接一输入输出埠,当输入输出埠被触发时,控制器的韧体执行开机指针位移程序。In one embodiment of the present invention, the controller is connected to an I/O port, and when the I/O port is triggered, the firmware of the controller executes the boot pointer displacement program.
本发明一实施例中,第一起始扇区地址的数据扇区以及第二起始扇区地址的数据扇区分别记录有有一主启动记录。In an embodiment of the present invention, the data sector with the first initial sector address and the data sector with the second initial sector address respectively record a master boot record.
本发明一实施例中,数据储存单元更包括有一第三系统储存区,第三系统储存区储存有一第二备用操作系统,韧体更定义有一操作系统还原程序;当第一备用操作系统完成开机且进行运作时,控制器的韧体执行操作系统还原程序,以利用第三系统储存区的第二备用操作系统还原第一系统储存区的原始操作系统。In one embodiment of the present invention, the data storage unit further includes a third system storage area, the third system storage area stores a second standby operating system, and the firmware further defines an operating system restore program; when the first standby operating system is booted And when running, the firmware of the controller executes the operating system restoration program to restore the original operating system in the first system storage area by using the second backup operating system in the third system storage area.
本发明又提供一种数据储存装置,包括:一数据储存单元,包括:一第一系统储存区,储存有一原始操作系统;及一第二系统储存区,储存有一备用操作系统;及一控制器,连接数据储存单元,包括一韧体,韧体定义有一操作系统还原程序,当原始操作系统损坏时,控制器的韧体执行操作系统还原程序以利用第二系统储存区的备用操作系统还原第一系统储存区的原始操作系统,而后以还原后的原始操作系统执行开机。The present invention also provides a data storage device, including: a data storage unit, including: a first system storage area, storing an original operating system; and a second system storage area, storing a backup operating system; and a controller , connected to the data storage unit, including a firmware, the firmware defines an operating system recovery program, when the original operating system is damaged, the firmware of the controller executes the operating system recovery program to restore the first operating system using the backup operating system in the second system storage area An original operating system in the system storage area, and then execute booting with the restored original operating system.
本发明一实施例中,数据储存装置更包括一数据传输接口,控制器连接数据传输接口,当控制器通过数据传输接口接收一外部的触发命令时,控制器的韧体根据触发指令执行操作系统还原程序。In one embodiment of the present invention, the data storage device further includes a data transmission interface, and the controller is connected to the data transmission interface. When the controller receives an external trigger command through the data transmission interface, the firmware of the controller executes the operating system according to the trigger command. Restore program.
本发明一实施例中,控制器连接一输入输出埠,当输入输出埠被触发时,控制器的韧体执行操作系统还原程序。In one embodiment of the present invention, the controller is connected to an I/O port, and when the I/O port is triggered, the firmware of the controller executes the operating system restore program.
本发明又提供一种维持数据储存装置正常开机运作的方法,数据储存装置包括一数据储存单元及一控制器,数据储存单元包括一第一系统储存区及一第二系统储存区,第一系统储存区储存有一原始操作系统及包括一第一起始扇区地址,第二系统储存区储存有一第一备用操作系统及包括一第二起始扇区地址,控制器包括一韧体,韧体定义有一开机指针位移程序,控制器的韧体执行方法的步骤包括:默认一开机指针指向第一系统储存区的第一起始扇区地址;在原始操作系统损坏时执行开机指针位移程序以将开机指针移至第二系统储存区的第二起始扇区地址;读取第二系统储存区的第二起始扇区地址中的一主机启动记录;及以第二系统储存区的第二起始扇区地址中的主机启动记录执行第一备用操作系统的开机流程。The present invention also provides a method for maintaining normal boot operation of a data storage device. The data storage device includes a data storage unit and a controller. The data storage unit includes a first system storage area and a second system storage area. The first system The storage area stores an original operating system and includes a first initial sector address, the second system storage area stores a first standby operating system and includes a second initial sector address, the controller includes a firmware, and the firmware definition There is a boot pointer displacement program, and the steps of the firmware execution method of the controller include: a default boot pointer points to the first starting sector address of the first system storage area; Move to the second starting sector address of the second system storage area; read a host boot record in the second starting sector address of the second system storage area; and start with the second starting sector address of the second system storage area The host startup record in the sector address executes the boot process of the first standby operating system.
本发明一实施例中,数据储存单元更包括有一第三系统储存区,第三系统储存区储存有一第二备用操作系统,韧体更定义有一操作系统还原程序,当第一备用操作系统完成开机且进行运作时,控制器的韧体执行方法的步骤更包括:执行操作系统还原程序;及利用第三系统储存区的第二备用操作系统还原第一系统储存区的原始操作系统。In one embodiment of the present invention, the data storage unit further includes a third system storage area, the third system storage area stores a second standby operating system, and the firmware further defines an operating system restore program, when the first standby operating system is booted And when running, the steps of the firmware execution method of the controller further include: executing the operating system restoration program; and restoring the original operating system in the first system storage area by using the second backup operating system in the third system storage area.
本发明提供一种维持数据储存装置正常开机运作的方法,数据储存装置包括一数据储存单元及一控制器,数据储存单元包括一第一系统储存区及一第二系统储存区,第一系统储存区储存有一原始操作系统,第二系统储存区储存有一备用操作系统,控制器包括一韧体,韧体定义有一操作系统还原程序,控制器的韧体执行方法的步骤包括:在原始操作系统损坏时执行操作系统还原程序以利用第二系统储存区的备用操作系统还原第一系统储存区的原始操作系统;及以还原后的原始操作系统执行开机。The present invention provides a method for maintaining normal boot operation of a data storage device. The data storage device includes a data storage unit and a controller. The data storage unit includes a first system storage area and a second system storage area. The first system stores An original operating system is stored in the area, and a standby operating system is stored in the second system storage area. The controller includes a firmware, and the firmware defines an operating system recovery program. The steps of the method for executing the firmware of the controller include: when the original operating system is damaged Executing the operating system recovery program to restore the original operating system in the first system storage area by using the backup operating system in the second system storage area; and performing booting with the restored original operating system.
附图说明Description of drawings
图1是本发明数据储存装置的结构示意图。FIG. 1 is a schematic structural diagram of a data storage device of the present invention.
图2是本发明数据储存装置的数据储存单元一实施例的扇区示意图。FIG. 2 is a schematic diagram of sectors of an embodiment of a data storage unit of the data storage device of the present invention.
图3是本发明数据储存装置的数据储存单元又一实施例的扇区示意图。FIG. 3 is a schematic diagram of sectors of another embodiment of a data storage unit of the data storage device of the present invention.
图4是本发明数据储存装置的数据储存单元又一实施例的扇区示意图。FIG. 4 is a schematic diagram of sectors of another embodiment of a data storage unit of the data storage device of the present invention.
图5是本发明一种维持数据储存装置正常开机运作的方法一实施例的流程图。FIG. 5 is a flow chart of an embodiment of a method for maintaining normal boot operation of a data storage device according to the present invention.
图6是本发明一种维持数据储存装置正常开机运作的方法又一实施例的流程图。FIG. 6 is a flowchart of another embodiment of a method for maintaining normal boot operation of a data storage device according to the present invention.
主要组件符号说明:Description of main component symbols:
100数据储存装置 11 控制器100 data storage device 11 controller
111韧体 1111开机指针位移程序111 firmware 1111 boot pointer displacement program
1113操作系统还原程序 13 数据储存单元1113 operating system recovery program 13 data storage unit
130开机指针 131第一系统储存区130 boot pointer 131 first system storage area
1311第一初始扇区地址 1312主启动记录1311 First initial sector address 1312 Master boot record
132原始操作系统 133第二系统储存区132 original operating system 133 second system storage area
1331第二初始扇区地址 1332主启动记录1331 second initial sector address 1332 master boot record
134第一备用操作系统 135数据储存区134 first standby operating system 135 data storage area
136第二备用操作系统 137第三系统储存区136 second backup operating system 137 third system storage area
15数据传输接口 150触发命令15 data transmission interface 150 trigger commands
17输入输出埠 171触发键17 input and output port 171 trigger key
具体实施方式Detailed ways
请参阅图1,为本发明数据储存装置的结构示意图,并配合参阅图2为本发明数据储存装置的数据储存单元一实施例的扇区示意图。如图1所示,本发明数据储存装置100亦可为一固态硬盘(Solid State Disk),其设置于一电子装置中,如计算机、自动化设备,作为电子装置的一储存媒体。数据储存装置100包括一控制器11、一数据储存单元13、一数据传输接口15及一输入输出埠17。控制器11分别连接数据储存单元13、数据传输接口15及输入输出端口17。Please refer to FIG. 1 , which is a schematic structural diagram of a data storage device of the present invention, and refer to FIG. 2 , which is a schematic diagram of sectors of an embodiment of a data storage unit of the data storage device of the present invention. As shown in FIG. 1 , the data storage device 100 of the present invention can also be a solid state disk (Solid State Disk), which is installed in an electronic device, such as a computer or automation equipment, as a storage medium of the electronic device. The data storage device 100 includes a controller 11 , a data storage unit 13 , a data transmission interface 15 and an input/output port 17 . The controller 11 is respectively connected to the data storage unit 13 , the data transmission interface 15 and the input/output port 17 .
控制器11包括一韧体111。韧体111定义有一开机指针位移程序1111。数据储存单元13包括有复数个闪存,闪存形成有复数个数据扇区。如图2所示,控制器11的韧体111将对于数据储存单元13的数据扇区进行分割,以分割出一第一系统储存区131、一第二系统储存区133及一数据储存区135。第一系统储存区131用以储存一原始操作系统132,且包括有一第一初始扇区地址1311。第二系统储存区133用以储存一第一备用操作系统134,且包括有一第二初始扇区地址1331。第一初始扇区地址1311的数据扇区记录有一主启动记录(Master Boot Record;MBR)1312,而第二初始扇区地址1331的数据扇区记录有另一主启动记录(MBR)1332。本发明一实施例中,控制器11的韧体111预设一开机指针130指向第一系统储存区131的第一起始扇区地址1311,并以第一起始扇区地址1311作为一主启动扇区地址,例如:第零个逻辑区块地址(Logical block addressing 0,LBA 0)。The controller 11 includes a firmware 111 . The firmware 111 defines a boot pointer displacement program 1111 . The data storage unit 13 includes a plurality of flash memory, and the flash memory is formed with a plurality of data sectors. As shown in FIG. 2 , the firmware 111 of the controller 11 will divide the data sector of the data storage unit 13 into a first system storage area 131 , a second system storage area 133 and a data storage area 135 . The first system storage area 131 is used to store an original operating system 132 and includes a first initial sector address 1311 . The second system storage area 133 is used to store a first standby operating system 134 and includes a second initial sector address 1331 . The data sector at the first initial sector address 1311 records a master boot record (MBR) 1312 , and the data sector at the second initial sector address 1331 records another master boot record (MBR) 1332 . In one embodiment of the present invention, the firmware 111 of the controller 11 presets a boot pointer 130 to point to the first starting sector address 1311 of the first system storage area 131, and uses the first starting sector address 1311 as a main boot sector Area address, for example: the zeroth logical block addressing (Logical block addressing 0, LBA 0).
当电子装置启动(power on)时,首先,根据开机指针130的指引,控制器11的韧体111进入数据储存单元13的第一系统储存区131,读取第一系统储存区131的第一初始扇区地址1311中的主启动记录1312,并以主启动记录1312执行原始操作系统132的开机流程。原始操作系统132正常开机后,电子装置将以原始操作系统132执行运作。When the electronic device is powered on, at first, according to the guidance of the boot pointer 130, the firmware 111 of the controller 11 enters the first system storage area 131 of the data storage unit 13, and reads the first system storage area 131 of the first system storage area 131. The master boot record 1312 in the initial sector address 1311, and execute the boot process of the original operating system 132 with the master boot record 1312. After the original operating system 132 is booted up normally, the electronic device will run with the original operating system 132 .
再者,若原始操作系统132发生故障而无法顺利开机,控制器11的韧体111将会执行开机指针位移程序1111,以将开机指针130从第一系统储存区131的第一初始扇区地址1311移至第二系统储存区133的第二初始扇区地址1331,且主启动扇区地址(LBA 0)移至第二初始扇区地址1331。接着,控制器11的韧体111读取第二系统储存区133的第二初始扇区地址1331中的主启动记录1332,并以主启动记录1332执行第一备用操作系统134的开机流程。第一备用操作系统134正常开机后,电子装置将以第一备用操作系统134执行运作。Furthermore, if the original operating system 132 fails to boot smoothly, the firmware 111 of the controller 11 will execute the boot pointer displacement program 1111 to move the boot pointer 130 from the first initial sector address of the first system storage area 131 1311 is moved to the second initial sector address 1331 of the second system storage area 133 , and the main boot sector address (LBA 0 ) is moved to the second initial sector address 1331 . Next, the firmware 111 of the controller 11 reads the master boot record 1332 in the second initial sector address 1331 of the second system storage area 133 , and uses the master boot record 1332 to execute the boot process of the first backup operating system 134 . After the first backup operating system 134 is booted up normally, the electronic device will run with the first backup operating system 134 .
于此,当原始操作系统132故障时,控制器11的韧体111通过开机指针130的位移,以将开机流程的执行从第一系统储存区131的原始操作系统132转变为第二系统储存区133的第一备用操作系统134,以便利用第一备用操作系统134快速恢复电子装置的开机,进而使得电子装置能够通过第一备用操作系统134继续运作。Here, when the original operating system 132 fails, the firmware 111 of the controller 11 uses the displacement of the boot pointer 130 to change the execution of the boot process from the original operating system 132 in the first system storage area 131 to the second system storage area 133 of the first backup operating system 134, so as to use the first backup operating system 134 to quickly restore the booting of the electronic device, so that the electronic device can continue to operate through the first backup operating system 134.
请参阅图3,为本发明数据储存装置的数据储存单元又一实施例的扇区示意图,并配合参阅第1图。如图1及图3所示,在本实施例中,控制器11的韧体111另定义有一操作系统还原程序1113。当原始操作系统132故障而无法顺利开机时,控制器11的韧体111执行操作系统还原程序1113,以利用第二系统储存区133的第一备用操作系统134还原第一系统储存区131的原始操作系统132。当电子装置重新启动时,控制器11的韧体111再度利用还原后的原始操作系统132执行开机程序,并以还原后的原始操作系统132执行运作。Please refer to FIG. 3 , which is a schematic diagram of sectors of another embodiment of the data storage unit of the data storage device of the present invention, and refer to FIG. 1 together. As shown in FIG. 1 and FIG. 3 , in this embodiment, the firmware 111 of the controller 11 further defines an operating system recovery program 1113 . When the original operating system 132 fails to boot smoothly, the firmware 111 of the controller 11 executes the operating system recovery program 1113 to restore the original operating system 134 of the first system storage area 131 using the first backup operating system 134 of the second system storage area 133. operating system 132 . When the electronic device is restarted, the firmware 111 of the controller 11 uses the restored original operating system 132 to execute the booting procedure again, and executes operations with the restored original operating system 132 .
再者,本发明控制器11的韧体111以一复制扇区数据的方式进行原始操作系统132的还原流程,将第二系统储存区133中数据扇区所储存的第一备用操作系统134的数据复制至第一系统储存区131的数据扇区中,以便还原原始操作系统132。于此,原始操作系统132的还原过程中,原始操作系统132的版本完全无需被解析及辨识。如此据以实施,采用微软windows操作系统或采用非微软windows操作系统(如Linux、TinyOS)的电子装置都能够轻易地执行操作系统的还原动作。Furthermore, the firmware 111 of the controller 11 of the present invention performs the restoration process of the original operating system 132 in a manner of copying sector data, and stores the first standby operating system 134 stored in the data sector in the second system storage area 133. The data is copied to the data sector of the first system storage area 131 so as to restore the original operating system 132 . Here, during the restoring process of the original operating system 132, the version of the original operating system 132 does not need to be analyzed and identified at all. According to such implementation, the electronic device adopting Microsoft windows operating system or adopting non-Microsoft windows operating system (such as Linux, TinyOS) can easily perform the restoring operation of the operating system.
请参阅图4,为本发明数据储存装置的数据储存单元又一实施例的扇区示意图,并配合参阅图1。如图1及图4所示,本实施例数据储存单元13进一步被划分有一第三系统储存区137。第三系统储存区137用以储存一第二备用操作系统136。在本实施例中,第三系统储存区137为一不可写入的只读区。控制器11的韧体111定义有开机指针位移程序1111及操作系统还原程序1113。Please refer to FIG. 4 , which is a schematic diagram of sectors of another embodiment of the data storage unit of the data storage device of the present invention, and refer to FIG. 1 together. As shown in FIG. 1 and FIG. 4 , the data storage unit 13 of this embodiment is further divided into a third system storage area 137 . The third system storage area 137 is used for storing a second standby operating system 136 . In this embodiment, the third system storage area 137 is a non-writable read-only area. The firmware 111 of the controller 11 defines a boot pointer displacement program 1111 and an operating system restoration program 1113 .
当原始操作系统132正常时,控制器11之韧体111根据开机指针130的指引进入数据储存单元13的第一系统储存区131,读取第一系统储存区131的第一初始扇区地址1311中的主启动记录1312,并以主启动记录1312执行原始操作系统132的开机流程。When the original operating system 132 is normal, the firmware 111 of the controller 11 enters the first system storage area 131 of the data storage unit 13 according to the guidance of the boot pointer 130, and reads the first initial sector address 1311 of the first system storage area 131 The master boot record 1312 in the main boot record 1312 is used to execute the boot process of the original operating system 132 .
反之,当原始操作系统132发生故障而无法顺利开机时,控制器11的韧体111执行开机指针位移程序1111,将开机指针130从第一系统储存区131的第一初始扇区地址1311移至第二系统储存区133的第二初始扇区地址1331,设定第二初始扇区地址1331为主启动扇区地址(LBA 0),读取第二系统储存区133的第二初始扇区地址1331中的主启动记录1332,并以主启动记录1332执行第一备用操作系统134的开机流程。接续,当第一备用操作系统134已完成开机且进行运作时,控制器11的韧体111进一步执行操作系统还原程序1113,以利用第三系统储存区137的第二备用操作系统136还原第一系统储存区131的原始操作系统132。则电子装置下一次启动时,控制器11的韧体111再度利用还原后的原始操作系统132执行开机程序,并以还原后的原始操作系统132执行运作。Conversely, when the original operating system 132 fails to boot smoothly, the firmware 111 of the controller 11 executes the boot pointer displacement program 1111 to move the boot pointer 130 from the first initial sector address 1311 of the first system storage area 131 to The second initial sector address 1331 of the second system storage area 133, set the second initial sector address 1331 as the main boot sector address (LBA 0), and read the second initial sector address of the second system storage area 133 1331 in the master boot record 1332, and use the master boot record 1332 to execute the boot process of the first backup operating system 134. Next, when the first backup operating system 134 has been booted and is running, the firmware 111 of the controller 11 further executes the operating system recovery program 1113 to restore the first backup operating system 136 using the third system storage area 137. The original operating system 132 of the system storage area 131 . Then, when the electronic device starts up next time, the firmware 111 of the controller 11 uses the restored original operating system 132 to execute the booting procedure again, and executes the operation with the restored original operating system 132 .
再度参阅图1,在本发明一实施例中,能够以一软件触发方式控制控制器11的韧体111执行开机指针位移程序1111或操作系统还原程序1113。本发明数据储存装置100可以设置在电子装置内部且与电子装置的一主板电性连接。当主板上的一输入输出系统(BIOS)侦测出数据储存装置100的原始操作系统132损坏时,将发布一触发命令150。当控制器11的韧体111通过数据传输接口15接收到触发命令150后,将根据触发命令150执行开机指针位移程序1111或操作系统还原程序1113,以使数据储存装置100能够重新恢复正常的开机运作。Referring to FIG. 1 again, in an embodiment of the present invention, the firmware 111 of the controller 11 can be controlled to execute the boot pointer displacement program 1111 or the operating system restore program 1113 in a software-triggered manner. The data storage device 100 of the present invention can be disposed inside the electronic device and electrically connected to a main board of the electronic device. When an input/output system (BIOS) on the motherboard detects that the original operating system 132 of the data storage device 100 is damaged, a trigger command 150 will be issued. When the firmware 111 of the controller 11 receives the trigger command 150 through the data transmission interface 15, it will execute the boot pointer displacement program 1111 or the operating system recovery program 1113 according to the trigger command 150, so that the data storage device 100 can resume normal booting. operate.
或者,在本发明另一实施例中,本发明能够以一硬件触发方式控制控制器11的韧体111执行开机指针位移程序1111或操作系统还原程序1113。输入输出埠17连接一触发键171。当数据储存装置100的用户得知数据储存装置100的原始操作系统132损坏时,亦可按压触发键171触发输入输出埠17。当控制器11的韧体111判断出输入输出埠17已被触发,将执行开机指针位移程序1111或操作系统还原程序1113,以使数据储存装置100能够重新恢复正常的开机运作。Alternatively, in another embodiment of the present invention, the present invention can control the firmware 111 of the controller 11 to execute the boot pointer displacement program 1111 or the operating system recovery program 1113 in a hardware trigger manner. The I/O port 17 is connected to a trigger key 171 . When the user of the data storage device 100 knows that the original operating system 132 of the data storage device 100 is damaged, he can also press the trigger key 171 to trigger the I/O port 17 . When the firmware 111 of the controller 11 determines that the I/O port 17 has been triggered, it will execute the boot pointer displacement program 1111 or the operating system recovery program 1113 to restore the normal boot operation of the data storage device 100 .
请参阅图5,为本发明维持数据储存装置正常开机运作的方法一实施例的流程图。数据储存装置100的数据储存单元13被划分为一第一系统储存区131、一第二系统储存区133及一数据储存区135。第一系统储存区131储存一原始操作系统132,而第二系统储存区133用以储存一第一备用操作系统134。第一系统储存区131的一第一初始扇区地址1311储存有一主机启动记录1312,而第二系统储存区133的一第二初始扇区地址1331储存有另一主机启动记录1332。Please refer to FIG. 5 , which is a flow chart of an embodiment of the method for maintaining the normal boot operation of the data storage device according to the present invention. The data storage unit 13 of the data storage device 100 is divided into a first system storage area 131 , a second system storage area 133 and a data storage area 135 . The first system storage area 131 stores an original operating system 132 , and the second system storage area 133 is used to store a first backup operating system 134 . A first initial sector address 1311 of the first system storage area 131 stores a host boot record 1312 , and a second initial sector address 1331 of the second system storage area 133 stores another host boot record 1332 .
如图5所示,首先,步骤S31,控制器11的韧体111预设一开机指针130指向第一系统储存区131的第一初始扇区地址1311,且设定第一初始扇区地址1311为一主启动扇区地址。步骤S32,当电子装置启动时,控制器11的韧体111读取第一系统储存区131的第一初始扇区地址1311中的主启动记录1312,并以第一系统储存区131中的原始操作系统132执行开机流程。As shown in FIG. 5, first, in step S31, the firmware 111 of the controller 11 presets a boot pointer 130 to point to the first initial sector address 1311 of the first system storage area 131, and sets the first initial sector address 1311 is a master boot sector address. Step S32, when the electronic device starts, the firmware 111 of the controller 11 reads the master boot record 1312 in the first initial sector address 1311 of the first system storage area 131, and uses the original The operating system 132 executes a boot process.
步骤S33,若原始操作系统132开机成功,继续执行步骤S34,电子装置将以原始操作系统132进行运作;反之,若原始操作系统132开机失败,执行步骤S35,控制器11的韧体111执行开机指针位移程序1111,以将开机指针130从第一系统储存区131的第一初始扇区地址1311移至第二系统储存区133的第二初始扇区地址1331,且设定第二初始扇区地址1331为主启动扇区地址。接着,步骤S36,控制器11的韧体111读取第二系统储存区133的第二初始扇区地址1331中的主启动记录1332,并以第二系统储存区133中的第一备用操作系统134执行开机流程。步骤S37,电子装置通过第一备用操作系统134开机后,以第一备用操作系统134执行运作。In step S33, if the original operating system 132 boots successfully, continue to execute step S34, and the electronic device will operate with the original operating system 132; otherwise, if the original operating system 132 fails to boot, execute step S35, and the firmware 111 of the controller 11 executes booting Pointer displacement program 1111, to move the boot pointer 130 from the first initial sector address 1311 of the first system storage area 131 to the second initial sector address 1331 of the second system storage area 133, and set the second initial sector Address 1331 is the main boot sector address. Next, in step S36, the firmware 111 of the controller 11 reads the master boot record 1332 in the second initial sector address 1331 of the second system storage area 133, and uses the first standby operating system in the second system storage area 133 134 Execute the boot process. In step S37 , after the electronic device is powered on through the first backup operating system 134 , it runs with the first backup operating system 134 .
再者,本发明又一实施例中,本发明数据储存装置100的数据储存单元13进一步划分出一第三系统储存区137。第三系统储存区137储存有一第二备用操作系统136。接续,步骤S38,在第一备用操作系统134的运作期间,控制器11的韧体111执行操作系统还原程序1113,以利用第三系统储存区137的第二备用操作系统136还原第一系统储存区131的原始操作系统132。最后,步骤S39,当电子装置下一次启动时,控制器11的韧体111再度利用还原后的原始操作系统132执行开机流程,并以还原后的原始操作系统132执行运作。Moreover, in yet another embodiment of the present invention, the data storage unit 13 of the data storage device 100 of the present invention is further divided into a third system storage area 137 . The third system storage area 137 stores a second standby operating system 136 . Next, step S38, during the operation of the first standby operating system 134, the firmware 111 of the controller 11 executes the operating system restore program 1113, so as to restore the first system storage by using the second standby operating system 136 in the third system storage area 137 The original operating system 132 of the zone 131 . Finally, in step S39 , when the electronic device starts up next time, the firmware 111 of the controller 11 uses the restored original operating system 132 to execute the boot process again, and executes operations with the restored original operating system 132 .
请参阅图6,为本发明维持数据储存装置正常开机运作的方法又一实施例的流程图。首先,图6实施例的步骤S31至步骤S34同于图5实施例的步骤S31至步骤S34。Please refer to FIG. 6 , which is a flowchart of another embodiment of the method for maintaining the normal boot operation of the data storage device according to the present invention. First, the steps S31 to S34 of the embodiment in FIG. 6 are the same as the steps S31 to S34 in the embodiment of FIG. 5 .
步骤S34,当原始操作系统132开机失败,执行步骤S40,控制器11的韧体111执行操作系统还原程序1113,以利用第三系统储存区137的第二备用操作系统136还原第一系统储存区131的原始操作系统132。最后,步骤S41,当电子装置下一次启动时,控制器11的韧体111再度利用还原后的原始操作系统132执行开机流程,并以还原后的原始操作系统132执行运作。Step S34, when the original operating system 132 fails to boot, step S40 is executed, the firmware 111 of the controller 11 executes the operating system restoration program 1113, so as to restore the first system storage area by using the second backup operating system 136 of the third system storage area 137 131 of the original operating system 132 . Finally, in step S41 , when the electronic device starts up next time, the firmware 111 of the controller 11 uses the restored original operating system 132 to execute the boot process again, and executes operations with the restored original operating system 132 .
以上所述是本发明较佳实施例及其所运用的技术原理,对于本领域的技术人员来说,在不背离本发明的精神和范围的情况下,任何基于本发明技术方案基础上的等效变换、简单替换等显而易见的改变,均属于本发明保护范围之内。The above are the preferred embodiments of the present invention and the technical principles used therein. For those skilled in the art, without departing from the spirit and scope of the present invention, any technical solution based on the present invention, etc. Obvious changes such as effective conversion and simple replacement all fall within the protection scope of the present invention.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010229601.5A CN111522690B (en) | 2020-03-27 | 2020-03-27 | Data storage device and method for maintaining normal start-up operation of data storage device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010229601.5A CN111522690B (en) | 2020-03-27 | 2020-03-27 | Data storage device and method for maintaining normal start-up operation of data storage device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111522690A CN111522690A (en) | 2020-08-11 |
| CN111522690B true CN111522690B (en) | 2023-08-18 |
Family
ID=71901625
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010229601.5A Active CN111522690B (en) | 2020-03-27 | 2020-03-27 | Data storage device and method for maintaining normal start-up operation of data storage device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111522690B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114610226A (en) * | 2020-12-03 | 2022-06-10 | 宜鼎国际股份有限公司 | Data storage device and method for maintaining normal startup of data storage device |
| TWI808362B (en) * | 2020-12-03 | 2023-07-11 | 宜鼎國際股份有限公司 | Computer system and method capable of self-monitoring and restoring an operation of operating system |
| TWI765443B (en) * | 2020-12-03 | 2022-05-21 | 宜鼎國際股份有限公司 | Data storage device and method for maintaining normal boot operation of data storage device |
| CN114595093A (en) * | 2020-12-03 | 2022-06-07 | 宜鼎国际股份有限公司 | Computer system and method for self-monitoring and recovery of operating system |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6167494A (en) * | 1998-04-28 | 2000-12-26 | International Business Machine Corporation | Method and system for recovering from operating system failure |
| CN1815450A (en) * | 2005-02-01 | 2006-08-09 | 神基科技股份有限公司 | Operating system restoration method and system |
| CN101470644A (en) * | 2007-12-28 | 2009-07-01 | 英业达股份有限公司 | Operating system recovery device and method |
| CN101807154A (en) * | 2009-02-16 | 2010-08-18 | 技嘉科技股份有限公司 | Electronic device and starting method thereof |
| CN105279046A (en) * | 2015-11-04 | 2016-01-27 | 研华科技(中国)有限公司 | Method for improving reliability of embedded system |
| CN110750309A (en) * | 2019-09-17 | 2020-02-04 | 宜鼎国际股份有限公司 | System and method for remotely controlling electronic equipment |
-
2020
- 2020-03-27 CN CN202010229601.5A patent/CN111522690B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6167494A (en) * | 1998-04-28 | 2000-12-26 | International Business Machine Corporation | Method and system for recovering from operating system failure |
| CN1815450A (en) * | 2005-02-01 | 2006-08-09 | 神基科技股份有限公司 | Operating system restoration method and system |
| CN101470644A (en) * | 2007-12-28 | 2009-07-01 | 英业达股份有限公司 | Operating system recovery device and method |
| CN101807154A (en) * | 2009-02-16 | 2010-08-18 | 技嘉科技股份有限公司 | Electronic device and starting method thereof |
| CN105279046A (en) * | 2015-11-04 | 2016-01-27 | 研华科技(中国)有限公司 | Method for improving reliability of embedded system |
| CN110750309A (en) * | 2019-09-17 | 2020-02-04 | 宜鼎国际股份有限公司 | System and method for remotely controlling electronic equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111522690A (en) | 2020-08-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI813869B (en) | Data storage device and method for maintaining normal boot operation of data storage device | |
| CN111522690B (en) | Data storage device and method for maintaining normal start-up operation of data storage device | |
| US9158628B2 (en) | Bios failover update with service processor having direct serial peripheral interface (SPI) access | |
| US9448889B2 (en) | BIOS failover update with service processor | |
| TWI765443B (en) | Data storage device and method for maintaining normal boot operation of data storage device | |
| US8266611B2 (en) | Hard disk drive with disk embedded DOS boot image and firmware download method | |
| US9448808B2 (en) | BIOS update with service processor without serial peripheral interface (SPI) access | |
| US20080098381A1 (en) | Systems and methods for firmware update in a data processing device | |
| TWI808362B (en) | Computer system and method capable of self-monitoring and restoring an operation of operating system | |
| JP4422136B2 (en) | Storage device and activation method | |
| US7827376B2 (en) | System and method for protecting hidden protected area of HDD during operation | |
| US7849300B2 (en) | Method for changing booting sources of a computer system and a related backup/restore method thereof | |
| WO2000054133A1 (en) | Information processor, method for saving/loading data, and information recorded medium | |
| CN103106086B (en) | Operating system disposal route and system | |
| CN113646745A (en) | Disable software persistence | |
| KR101026321B1 (en) | Removable device with user interface | |
| TWI786945B (en) | Data storage device and method capable of quickly updating operating system | |
| US20060168440A1 (en) | OS selection methods and computer systems utilizing the same | |
| CN114610226A (en) | Data storage device and method for maintaining normal startup of data storage device | |
| JP6160688B2 (en) | Information processing apparatus, information processing method, and information processing program | |
| CN101739262A (en) | Firmware updating method and electronic device applying same | |
| CN100501671C (en) | Initialization method and system of display chip | |
| US11836033B2 (en) | Information processing apparatus and control method for controlling information processing apparatus | |
| JP4858720B2 (en) | Emulator, emulation method, program, and recording medium | |
| CN116126385A (en) | Data storage device and method capable of rapidly updating operating system |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |