TWI738178B - Method and system of automatic repair master boot record of the boot system - Google Patents
Method and system of automatic repair master boot record of the boot system Download PDFInfo
- Publication number
- TWI738178B TWI738178B TW109101395A TW109101395A TWI738178B TW I738178 B TWI738178 B TW I738178B TW 109101395 A TW109101395 A TW 109101395A TW 109101395 A TW109101395 A TW 109101395A TW I738178 B TWI738178 B TW I738178B
- Authority
- TW
- Taiwan
- Prior art keywords
- boot
- data
- sector
- backup
- basic input
- Prior art date
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本發明係關於一種主機設備之開機程序的修復方法,尤指一種具有自動修復開機磁區的開機方法及其開機系統。The present invention relates to a method for repairing a booting program of a host device, in particular to a booting method with automatically repairing a booting sector and a booting system thereof.
一般而言,主機設備開機時第一個被執行的動作,就是啟動基本輸入輸出系統(Basic Input Output System,以下簡稱BIOS);其中,當BIOS開始執行時,首先會對電腦裝置進行開機自我檢測以確定電腦裝置的硬體設備可以正常動作,待開機自我檢測結束後,BIOS會通知電腦裝置並會載入硬碟的第一個磁區(即,主開機磁區),其主開機磁區內的資料將會被載入至記憶體0x7C00的位置執行,然後再載入由一作業系統提供的開機磁區,用以進入該作業系統。Generally speaking, the first action to be executed when the host device is turned on is to start the Basic Input Output System (hereinafter referred to as BIOS); among them, when the BIOS starts to execute, the computer device is first booted and self-tested To ensure that the hardware equipment of the computer device can operate normally, after the boot self-test is over, the BIOS will notify the computer device and load the first sector of the hard disk (ie, the main boot sector), and its main boot sector The data inside will be loaded to the location of memory 0x7C00 for execution, and then loaded into the boot sector provided by an operating system to enter the operating system.
目前許多開機型電腦病毒主要破壞主開機磁區,使得主開機磁區內的資料被電腦病毒破壞後,其電腦裝置就無法正常啟動。為了修復電腦裝置能正常啟動,可利用一還原光碟片開機,其進入到電腦裝置的BIOS之後選擇該還原光碟片開機,再利用還原光碟的備份還原資料還原電腦裝置的開機資料。At present, many boot-type computer viruses mainly damage the main boot sector, so that after the data in the main boot sector is damaged by the computer virus, the computer device cannot start normally. In order to repair the computer device to boot normally, a recovery disc can be used to boot, after entering the BIOS of the computer device, select the recovery disc to boot, and then use the backup recovery data of the recovery disc to restore the boot data of the computer device.
然而,現有的主機裝置中,還原光碟已不再是基本的配備,因此,若要備份還原資料,還需另外準備光碟以備份開機資料,且若使用者使用一段時間後無備份開機資料時,則主機裝置無法進行還原,其主機裝置的作業系統都要重新安裝,不僅造成使用者的麻煩,且非常耗時及費力。However, in the existing host device, the recovery disc is no longer a basic equipment. Therefore, if you want to back up and restore data, you need to prepare another disc to back up the boot data, and if the user does not back up the boot data after a period of use, Therefore, the host device cannot be restored, and the operating system of the host device must be reinstalled, which not only causes trouble for the user, but is also time-consuming and labor-intensive.
因此,有鑑於開機磁區內的開機資料需另外靠還原光碟才能回復,本案之發明人係極力加以研究發明創作,而終於研發完成本發明之一種具有自動修復開機磁區的開機方法及其開機系統。Therefore, in view of the fact that the boot data in the boot sector needs to be restored by a recovery disc, the inventor of this case tried his best to research and create, and finally developed a boot method with automatic repair of the boot sector and boot of the present invention. system.
本發明提供一種具有自動修復開機磁區的開機系統,係主要由一快閃唯讀記憶體以及一控制單元所構成;其中,該快閃唯讀記憶體係設有一基本輸入輸出系統,且該快閃唯讀記憶體係具有一儲存區,如此,透過該基本輸入輸出系統自動地備份一開機磁區的開機資料於該儲存區,同時,本發明另外提出一種具有自動修復開機磁區的開機方法,當該開機磁區的開機資料不同於該備份開機資料時,該基本輸入輸出系統將該備份資料覆蓋至該開機磁區之中,若該開機磁區的開機資料相同於該備份資料時,該基本輸入輸出系統透過該開機磁區開啟該主機設備之一作業系統。The present invention provides a boot system with automatic repair of the boot sector, which is mainly composed of a flash read-only memory and a control unit; wherein the flash read-only memory system is provided with a basic input and output system, and the flash The flash read-only memory system has a storage area. In this way, the boot data of a boot sector is automatically backed up in the storage area through the basic input output system. At the same time, the present invention also proposes a boot method with automatic repair of the boot sector. When the boot data of the boot sector is different from the backup boot data, the basic input output system overwrites the backup data into the boot sector. If the boot data of the boot sector is the same as the backup data, the The basic input output system starts an operating system of the host device through the boot sector.
因此,為了達成本發明上述之目的,本案之發明人提出一種具有自動修復開機磁區的開機系統,係設置於一主機設備之一主機板上,且該主機板系設有一儲存設備;其中,該儲存設備係具有一作業系統以及一開機磁區,並包括: 一快閃唯讀記憶體,係安裝於該主機板上並耦接於該主機板上之該儲存設備,並儲存有一基本輸入輸出系統;其中,該快閃唯讀記憶體係具有一儲存區,用以儲存一開機資料;以及 一控制單元,係安裝於該主機板上,用以令該基本輸入輸出系統將該開機磁區的開機資料儲存於該儲存區之中; 其中,透過該基本輸入輸出系統將該開機磁區的開機資料備份至該儲存區,使得該儲存區儲存有一備份資料; 其中,透過該基本輸入輸出系統比對該開機磁區的開機資料與該儲存區的備份資料; 其中,當該開機資料不同於該備份資料時,該基本輸入輸出系統將該備份資料更新至該開機磁區之中; 其中,當該開機磁區的開機資料相同於該備份資料時,該基本輸入輸出系統透過該開機磁區開啟該主機設備之該作業系統。 Therefore, in order to achieve the above-mentioned object of the invention, the inventor of this case proposes a boot system with automatic boot sector repair, which is set on a motherboard of a host device, and the motherboard is provided with a storage device; wherein, The storage device has an operating system and a boot sector, and includes: A flash read-only memory is a storage device installed on the motherboard and coupled to the motherboard, and stores a basic input output system; wherein the flash read-only memory system has a storage area, Used to store a boot data; and A control unit is installed on the main board to enable the basic input output system to store the boot data of the boot sector in the storage area; Wherein, the boot data of the boot sector is backed up to the storage area through the basic input output system, so that the storage area stores a backup data; Among them, the boot data of the boot sector is compared with the backup data of the storage area through the basic input output system; Wherein, when the boot data is different from the backup data, the basic input output system updates the backup data to the boot sector; Wherein, when the boot data of the boot sector is the same as the backup data, the basic input output system starts the operating system of the host device through the boot sector.
為了達成本發明上述之目的,本案之發明人又提出一種具有自動修復開機磁區的開機方法,係包括以下步驟: (1) 在具有一開機磁區的一主機設備中安裝一控制單元,並透過該控制單元控制是否進入安裝於該主機設備之一主機板上的一快閃唯讀記憶體之一基本輸入輸出系統,若需進入該基本輸入輸出系統則執行步驟(2),若不需進入該基本輸入輸出系統則執行步驟(4); (2)透過該控制單元之一設定單元設定該基本輸入輸出系統的一備份開機資料是否需要更新,若該備份開機資料需要更新則執行步驟(3),若不需更新則執行步驟(6); (3)透過該控制單元更新該基本輸入輸出系統之備份開機資料,使得該基本輸入輸出系統之新的備份開機資料更新為目前開機磁區的開機資料,並將新的備份開機資料儲存於該快閃唯讀記憶體之一儲存區後執行步驟(1); (4)透過該快閃唯讀記憶體之一比對單元比對該開機磁區之開機資料的512位元組是否與該基本輸入輸出系統之備份開機資料的512位元組一致,若開機資料的512位元組與該備份開機資料的512位元組一致則執行步驟(6),若開機資料的512位元組與該備份開機資料的512位元組不一致則執行步驟(5); (5)透過該快閃唯讀記憶體之一更新單元將儲存區所儲存之備份開機資料覆蓋至該主機設備之該開機磁區的開機資料;以及 (6)該基本輸入輸出系統透過該開機磁區開啟該主機設備之一作業系統。 In order to achieve the above-mentioned purpose of the invention, the inventor of this case proposes a boot method with automatic repair of the boot sector, which includes the following steps: (1) Install a control unit in a host device with a boot sector, and use the control unit to control whether to access the basic input and output of a flash read-only memory installed on a motherboard of the host device System, if you need to enter the basic input output system, perform step (2), if you do not need to enter the basic input output system, perform step (4); (2) Use a setting unit of the control unit to set whether a backup boot data of the basic input output system needs to be updated, if the backup boot data needs to be updated, go to step (3), if not, go to step (6) ; (3) Update the backup boot data of the basic input output system through the control unit, so that the new backup boot data of the basic input output system is updated to the boot data of the current boot sector, and the new backup boot data is stored in the Perform step (1) after flashing a storage area of the read-only memory; (4) Through a comparison unit of the flash read-only memory, whether the 512 bytes of the boot data of the boot sector is consistent with the 512 bytes of the backup boot data of the basic input output system. If the 512 bytes of the data are consistent with the 512 bytes of the backup boot data, perform step (6), if the 512 bytes of the boot data are not consistent with the 512 bytes of the backup boot data, perform step (5); (5) Overwrite the backup boot data stored in the storage area to the boot data of the boot sector of the host device through an update unit of the flash read-only memory; and (6) The basic input output system starts an operating system of the host device through the boot sector.
為了能夠更清楚地描述本發明所提出之一種具有自動修復開機磁區的開機方法及其開機系統,以下將配合圖式,詳盡地說明本發明之較佳實施例。In order to be able to more clearly describe the booting method and booting system with automatically repairing the boot sector proposed by the present invention, the preferred embodiments of the present invention will be described in detail below in conjunction with the drawings.
請參閱圖1,圖1為本發明之具有自動修復開機磁區的開機系統架構圖。如圖1所示,本發明之一種具有自動修復開機磁區的開機系統,係設置於一主機設備10之一主機板上,且該主機板係設有一儲存設備101;其中,該儲存設備101係具有一作業系統1011以及一開機磁區1012,並主要包括:一快閃唯讀記憶體11與一控制單元12;其中,該快閃唯讀記憶體11係安裝於該主機板上並耦接於該主機板上之該儲存設備101,並儲存有一基本輸入輸出系統111;並且,該快閃唯讀記憶體11係具有一儲存區1111、一比對單元1112、以及一更新單元1113,該儲存區1111用以儲存一開機資料。進一步地,該控制單元12係安裝於該主機板上,用以令該基本輸入輸出系統111將該開機磁區1012的開機資料儲存於該儲存區1111之中。特別地,該比對單元1112係連接該開機磁區1012與該儲存區1111,用以比對該開機資料的位元組是否跟備份開機資料的位元組一致,且該更新單元1113,係連接該開機磁區1012與該儲存區1111,用以將該儲存區1111所儲存之備份開機資料覆蓋至該主機設備10之該開機磁區1012的開機資料。於此,必須特別說明的是,本發明所述之比對單元1112係比對主啟動磁區的512位元組與備份於該儲存區1111的512位元組是否一致。Please refer to FIG. 1. FIG. 1 is a structural diagram of a boot system with automatic boot sector repair according to the present invention. As shown in FIG. 1, a boot system with automatic boot sector restoration of the present invention is set on a main board of a
於本發明中,該設定單元121係耦接該基本輸入輸出系統111與該儲存設備101,用以設定該開機磁區1012的開機資料備份至該快閃唯讀記憶體11的儲存區1111,並且,一周邊裝置122係連接該主機設備10,用以控制該主機設備10進入該設定單元121。如此,透過該基本輸入輸出系統111將該開機磁區1012的開機資料備份至該儲存區1111,使得該儲存區1111儲存有一備份資料,並透過該基本輸入輸出系統111比對該開機磁區1012的開機資料與該儲存區1111的備份資料。亦即,當該開機資料不同於該備份資料時,該基本輸入輸出系統111將該備份資料更新至該開機磁區1012之中。另外,當該開機磁區1012的開機資料相同於該備份資料時,該基本輸入輸出系統111透過該開機磁區1012開啟該主機設備10之該作業系統1011。於本發明中,該周邊裝置13可為下列之任一種:滑鼠、鍵盤、或行動裝置。另一方面,本發明所述之儲存設備101可為硬碟或固態硬碟。於此,必須特別說明的是,本發明所述之設定單元121係透過函式庫、變數或運算元之形式而被編輯為至少一應用程式,進而被建立在該控制單元12之中,並且,該比對單元1112與該更新單元1113係透過函式庫、變數或運算元之形式而被編輯為至少一應用程式,進而被建立在該基本輸入輸出系統111之中。In the present invention, the
請同時參閱圖1、圖2A、以及圖2B,其中,圖2A與圖2B為本發明之具有自動修復開機磁區的開機方法流程圖。如圖1、圖2A、
以及圖2B所示,本發明之具有自動修復開機磁區的開機方法係包括以下步驟:步驟(S01),在具有一開機磁區1012的一主機設備10中安裝一控制單元12,並透過該控制單元12控制是否進入安裝於該主機設備10之一主機板上的一快閃唯讀記憶體11之一基本輸入輸出系統111,若需進入該基本輸入輸出系統111則執行步驟(S02),透過該控制單元12之一設定單元121設定該基本輸入輸出系統111的一備份開機資料是否需要更新;若該備份開機資料需要更新則執行步驟(S03),透過該控制單元12更新該基本輸入輸出系統111之備份開機資料,使得該基本輸入輸出系統111之新的備份開機資料更新為目前開機磁區1012的開機資料,並將新的備份開機資料儲存於該快閃唯讀記憶體11之一儲存區1111後執行步驟(S01);若不需更新則執行步驟(S06),該基本輸入輸出系統111透過該開機磁區1012開啟該主機設備10之一作業系統1011;若不需進入基本輸入輸出系統111則執行步驟(S04),透過該快閃唯讀記憶體11之一比對單元1112比對該開機磁區1012之開機資料的512位元組是否與該基本輸入輸出系統111之備份開機資料的512位元組一致,若開機資料的512位元組與該備份開機資料的512位元組一致則執行步驟(S06);若開機資料的512位元組與該備份開機資料的512位元組不一致則執行步驟(S05),透過該快閃唯讀記憶體11之一更新單元1113將儲存區1111所儲存之備份開機資料覆蓋至該主機設備10之該開機磁區1012的開機資料。
Please refer to FIG. 1, FIG. 2A, and FIG. 2B at the same time. FIG. 2A and FIG. 2B are flowcharts of the boot method with automatic repair of the boot sector of the present invention. As shown in Figure 1, Figure 2A,
And as shown in FIG. 2B, the booting method with automatically repairing the boot sector of the present invention includes the following steps: step (S01), installing a
如此,上述係已完整且清楚地說明本發明之具有自動修復開機磁區的開機方法及其測試系統的結構、功能;經由上述,吾人可以得知本發明係具有下列之技術特徵與優點:In this way, the above system has completely and clearly explained the structure and function of the boot method with automatic repair of the boot sector of the present invention and its test system; through the above, we can know that the present invention has the following technical features and advantages:
(1)本發明提供一種具有自動修復開機磁區的開機系統,係主要由一快閃唯讀記憶體11以及一控制單元12所構成;其中,該快閃唯讀記憶體11係設有一基本輸入輸出系統111,且該快閃唯讀記憶體11係具有一儲存區1111,如此,透過該基本輸入輸出系統111自動地備份一主機設備10之一開機磁區1012的開機資料於該儲存區1111,同時,本發明另外提出一種具有自動修復開機磁區的開機方法,當該開機磁區1012的開機資料不同於該備份開機資料時,該基本輸入輸出系統111將該備份資料覆蓋至該開機磁區1012之中,若該開機磁區1012的開機資料相同於該備份資料時,該基本輸入輸出系統111透過該開機磁區1012開啟該主機設備10之一作業系統1011。(1) The present invention provides a boot system with automatic repair of boot sectors, which is mainly composed of a flash read-
(2)另外,當升級完該主機設備10之一作業系統1011後,使用者可透過該控制單元12將該開機磁區1012升級後的開機資料更新至該基本輸入輸出系統111的該儲存區1111,使得該主機設備10之開機磁區1012的開機資料能隨時更新至該基本輸入輸出系統111之該儲存區1111,藉此能在該主機設備10升級其他作業系統後能快速地備份升級後的開機資料至該基本輸入輸出系統111的該儲存區1111。(2) In addition, after upgrading an
必須加以強調的是,上述之詳細說明係針對本發明可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。It must be emphasized that the above detailed description is a specific description of possible embodiments of the present invention, but this embodiment is not intended to limit the patent scope of the present invention. Any equivalent implementation or modification that does not deviate from the technical spirit of the present invention, All should be included in the patent scope of this case.
>本發明>
10:主機設備
101:儲存設備
1011:作業系統
1012:開機磁區
11:快閃唯讀記憶體
111:基本輸入輸出系統
1111:儲存區
1112:比對單元
1113:更新單元
12:控制單元
121:設定單元
122周邊裝置
S01~S06:方法步驟
>The invention>
10: host device
101: storage equipment
1011: operating system
1012: Boot sector
11: Flash read-only memory
111: Basic Input Output System
1111: storage area
1112: comparison unit
1113: update unit
12: Control unit
121: setting
圖1為本發明之具有自動修復開機磁區的開機系統架構圖;以及 圖2A與圖2B為本發明之具有自動修復開機磁區的開機方法的流程圖。 FIG. 1 is a diagram of the boot system architecture with automatic repair of boot sectors according to the present invention; and 2A and FIG. 2B are flowcharts of the boot method with automatic repair of the boot sector of the present invention.
10:主機設備 101:儲存設備 1011:作業系統 1012:開機磁區 11:快閃唯讀記憶體 111:基本輸入輸出系統 1111:儲存區 1112:比對單元 1113:更新單元 12:控制單元 121:設定單元 122:周邊裝置 10: host device 101: storage equipment 1011: operating system 1012: Boot sector 11: Flash read-only memory 111: Basic Input Output System 1111: storage area 1112: comparison unit 1113: update unit 12: Control unit 121: setting unit 122: Peripheral Devices
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109101395A TWI738178B (en) | 2020-01-15 | 2020-01-15 | Method and system of automatic repair master boot record of the boot system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW109101395A TWI738178B (en) | 2020-01-15 | 2020-01-15 | Method and system of automatic repair master boot record of the boot system |
Publications (2)
Publication Number | Publication Date |
---|---|
TW202129498A TW202129498A (en) | 2021-08-01 |
TWI738178B true TWI738178B (en) | 2021-09-01 |
Family
ID=78282761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW109101395A TWI738178B (en) | 2020-01-15 | 2020-01-15 | Method and system of automatic repair master boot record of the boot system |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWI738178B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200422834A (en) * | 2003-04-16 | 2004-11-01 | Insyde Software Corp | Recovery method for master boot record of hard disk drive |
TW200903333A (en) * | 2007-07-02 | 2009-01-16 | Asustek Comp Inc | Computer apparatus and starting method and module thereof |
TW201301018A (en) * | 2011-06-17 | 2013-01-01 | Hon Hai Prec Ind Co Ltd | System and method for recovering a master boot record of a disk |
TW201701154A (en) * | 2015-06-29 | 2017-01-01 | Insyde Software Corp | Booting system and booting method including an embedded controller that loads a set of second booting program codes into a booting block of a booting ROM to overwrite a set of first booting program codes |
-
2020
- 2020-01-15 TW TW109101395A patent/TWI738178B/en active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200422834A (en) * | 2003-04-16 | 2004-11-01 | Insyde Software Corp | Recovery method for master boot record of hard disk drive |
TW200903333A (en) * | 2007-07-02 | 2009-01-16 | Asustek Comp Inc | Computer apparatus and starting method and module thereof |
TW201301018A (en) * | 2011-06-17 | 2013-01-01 | Hon Hai Prec Ind Co Ltd | System and method for recovering a master boot record of a disk |
TW201701154A (en) * | 2015-06-29 | 2017-01-01 | Insyde Software Corp | Booting system and booting method including an embedded controller that loads a set of second booting program codes into a booting block of a booting ROM to overwrite a set of first booting program codes |
Also Published As
Publication number | Publication date |
---|---|
TW202129498A (en) | 2021-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7730295B1 (en) | Updating firmware of a peripheral device | |
US6804774B1 (en) | Software image transition aid comprising building a disk image based on identified hardware | |
USRE42727E1 (en) | Method for quickly booting a computer system | |
US8032351B2 (en) | Running a virtual machine directly from a physical machine using snapshots | |
JP5911504B2 (en) | Software image upgrade based on streaming technology | |
KR100860447B1 (en) | Method and system for creating and employing an operating system having selected functionality | |
US7216251B2 (en) | Computer imaging recovery without a working partition or a secondary medium | |
US6996706B1 (en) | Booting an operating system or running other pre-boot code from a file stored under a different operating system | |
CN104850762B (en) | Prevent the undesirable method of the movement of computer, computer program and computer | |
US8037291B2 (en) | Master boot record management | |
US7017004B1 (en) | System and method for updating contents of a flash ROM | |
KR20040034540A (en) | Reliable and secure updating and recovery of firmware from a mass storage device | |
US8266611B2 (en) | Hard disk drive with disk embedded DOS boot image and firmware download method | |
WO2004017195A1 (en) | Using system bios to update embedded controller firmware | |
US20060150037A1 (en) | Methods and systems for operating system recovery | |
US20120084601A1 (en) | Computer system rescue method | |
US8028158B1 (en) | Method and apparatus for creating a self booting operating system image backup on an external USB hard disk drive that is capable of performing a complete restore to an internal system disk | |
US20060212695A1 (en) | Remote boot method and mechanism, and computer-readable storage medium | |
US20080098381A1 (en) | Systems and methods for firmware update in a data processing device | |
US20080270685A1 (en) | Information processing apparatus and firmware updating method | |
KR100339051B1 (en) | Auto-recovery system of LINUX using a flash card | |
JP2016126746A (en) | System and method for erasing storage medium | |
TWI450194B (en) | Method and system for processing operating system, computer readable storage medium storing the method | |
US11030047B2 (en) | Information handling system and method to restore system firmware to a selected restore point | |
TW202137002A (en) | Data storage device and method for maintaining normal boot operation of data storage device |