CN100530093C - Method for resetting starting system - Google Patents

Method for resetting starting system Download PDF

Info

Publication number
CN100530093C
CN100530093C CNB2005100893873A CN200510089387A CN100530093C CN 100530093 C CN100530093 C CN 100530093C CN B2005100893873 A CNB2005100893873 A CN B2005100893873A CN 200510089387 A CN200510089387 A CN 200510089387A CN 100530093 C CN100530093 C CN 100530093C
Authority
CN
China
Prior art keywords
root directory
archives economy
user
built
operating system
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.)
Expired - Fee Related
Application number
CNB2005100893873A
Other languages
Chinese (zh)
Other versions
CN1908900A (en
Inventor
游胜义
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
404 SCI-TECH Co Ltd
Original Assignee
404 SCI-TECH Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 404 SCI-TECH Co Ltd filed Critical 404 SCI-TECH Co Ltd
Priority to CNB2005100893873A priority Critical patent/CN100530093C/en
Publication of CN1908900A publication Critical patent/CN1908900A/en
Application granted granted Critical
Publication of CN100530093C publication Critical patent/CN100530093C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The recovery bootstrap system method comprises: dividing the flash memory of device with embedded Linux OS into four areas for the system guide tool, Linux micro-kernel, mini root directory system, and user root directory; setting the area with user directory as the erasable area and other areas as read-only areas; and arranging the detection program for user root directory in the mini file system to first detect the file and decide the log-in when starting.

Description

Repair the method for boot system
Technical field
The present invention is a kind of method of repairing boot system, and You Zhike makes the equipment that utilizes built-in Linux operating system, but the method for normal boot-strap.
Background technology
Definition according to Britain electrical engineer association, embedded system (Embedded System) should be control, monitor or utility appliance, machine or even the device of factory running, and the system that embedded system is a kind of computer software to be combined out with hardware, and the principle that can meet " custom-made by size ", just based on system that a certain specific use developed, and can improve the stability of product because of embedded system, portability and reduction cost of products, increase specific function etc., so used widely, at present, common embedded OS has VxWORK, QNX, Palm OS, Windos CE, Linux etc., the advantage that wherein has free mandate again with built-in Linux operating system (Embedded Linux System) is so built-in Linux operating system is adopted by most user.
And the exploitation of built-in Linux operating system needs following three basic important documents: system directs instrument (Boot Loader), Linux micro core (Kernel) and root directory archives economy (Root File System), and Linux micro core (Kernel) and root directory archives economy (Root File System) can be made read-only file (as: CRAMFS or ROMFS), again with in its burned flash memory (Flash), the user can be started shooting, this kind way can be a read-only file because of root directory archives economy (Root File System), and the generation user can't write application program the problem of this root directory archives economy (Root File System), the situation that causes some application program to use.So, relevant research staff is promptly arranged, (Root File System) is loaded on virtual disk (Ram Disk) with the root directory archives economy, and allow application program can write root directory archives economy (Root File System) in the virtual disk (Ram Disk), still, when system closedown, root directory archives economy in the virtual disk (Root FileSystem) can all be eliminated, and when using next time, must repeat above-mentioned action again, bring inconvenience.
So, in order to solve the above problems, promptly there is relevant dealer that Linux micro core (Kernel) and root directory archives economy (Root File System) are stored in respectively in the flash memory in the different blocks, see also shown in Figure 1, flash memory planning specification table for prior art, find out by knowing among the figure, the flash memory of prior art is divided into three blocks with it, and with system directs instrument (Boot Loader), Linux micro core (Kernel) and root directory archives economy (Root File System) are stored in the different blocks respectively, and this block that system directs instrument (Boot Loader) and Linux micro core (Kernel) is stored is set at read-only block, and the stored block of root directory archives economy (Root FileSystem) is set at erasable block, makes root directory archives economy (Root File System) can write other application program (as: JFFS2, EXT2 and EXT3 etc.).
Yet this kind way still can produce a great problem, because, when root directory archives economy (Root File System) when writing archives,, can cause root directory archives economy (Root File System) damage if the situation of outage takes place, and can't start shooting, and can't repair.
Therefore, how to solve above-mentioned prior art problems and defective, be the direction place that the present invention studies improvement.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method of repairing boot system, and this method is utilized read-only block and the erasable block in the equipment flash memory, stores mini root directory archives economy respectively, and user's root directory archives economy; And in mini root directory archives economy, add a detection process; Make equipment when start, whether meeting elder generation execution detection process is detected user's root directory archives economy and is damaged; Use mini root directory archives economy or user's root directory archives economy as the system of built-in Linux operating system with decision, can avoid damaging the situation that generation equipment can't use fully because of the root directory archives economy.
For reaching above-mentioned purpose and effect, the technological means that the present invention adopts is as follows:
A kind of method of repairing boot system with using the flash memory in the built-in Linux operating system equipment to be planned to four blocks, is characterized in that,
Three blocks are read-only block, and a block is erasable block;
Again with the system directs instrument in the built-in Linux operating system, Linux micro core, and mini root directory archives economy is stored to respectively in each read-only block;
User's root directory archives economy is stored in the erasable block, is provided with in this mini root directory archives economy and can detects the detection process whether user's root directory archives economy is damaged;
When device power-up, this detection process can judge whether user's root directory archives economy is good, if when good, then user's root directory archives economy is logined to built-in Linux operating system, and detection process is then logined mini root directory archives economy to (SuSE) Linux OS when judging user's root directory archives economy for damage.
Below with reference to accompanying drawing and preferred embodiment of the present invention its feature and function are described in detail, in order to understanding fully.
Description of drawings
Fig. 1 is the specification table of the flash memory planning of prior art.
Fig. 2 is the specification table of flash memory planning of the present invention.
Fig. 3 is the action flow chart of flash memory planning of the present invention.
Embodiment
See also shown in Figure 2, specification table for flash memory planning of the present invention, find out by knowing among the figure, the method that the present invention repairs boot system is earlier the planning of the flash memory in the equipment to be divided into four blocks, and with the system directs instrument (Boot Loader) in the built-in Linux operating system (Embedded Linux System), Linux micro core (Kernel), mini root directory archives economy (Mini Root File System), and user's root directory archives economy (User Root File System), be stored to respectively in the different blocks, and with system directs instrument (Boot Loader), the stored block of Linux micro core (Kernel) and mini root directory archives economy (MiniRoot File System) is set at read-only block, and the stored block of user's root directory archives economy (User Root File System) is set at erasable block, allow the user can be with other application program (as: JFFS2, EXT2 and EXT3 etc.) be written into user's root directory archives economy (User Root File System), and will increase by a detection process in the mini root directory archives economy (Mini Root File System), make equipment when start, whether meeting elder generation execution detection process is detected user's root directory archives economy (User Root File System) and is damaged, if user's root directory archives economy (User Root FileSystem) is intact, then can be with the system of user's root directory archives economy (User Root File System) as built-in Linux operating system (Embedded Linux System), if user's root directory archives economy (User Root File System) is damaged, then use the system of mini root directory archives economy (Mini Root File System) as built-in Linux operating system (Embedded Linux System), so, can allow other application program be written into user's root directory archives economy (User Root File System), again can be when damaging in user's root directory archives economy (User Root File System), start shooting with mini root directory archives economy (MiniRoot File System), do the action of reparation again, with the situation that can avoid generation equipment can't use fully.
See also Fig. 2, shown in Figure 3 again, for the specification table and the action flow chart of flash memory of the present invention planning, find out by knowing among the figure, when equipment during in start, built-in Linux operating system will carry out according to the following step:
Steps A-100 is opened device power supply (DPS);
Step B-110 carries out the system directs instrument in the built-in Linux operating system, and the Linux micro core is loaded on the storer execution;
Whether step C-120 carries out the detection process in the mini root directory archives economy, detect user's root directory archives economy and damage;
If detecting user root directory archives economy is good, then carry out step D130;
If detecting user root directory archives economy is damaged, then carry out step e 140;
Step D-130 uses the login of user's root directory archives economy.
Step e-140 is used mini root directory archives economy login.
On the mat, even user's root directory archives economy is damaged, built-in Linux operating system also can use mini root directory archives economy login, make device power-up, and after device power-up, remove to repair user's root directory archives economy again, to avoid the situation that equipment can't use fully in the prior art.
Moreover, when detection process when whether detecting user root directory archives economy is damaged, the first login user root directory archives economy of meeting is to a sub-directory of mini root directory archives economy, and confirm whether can successfully login, if can successfully login, then detection process can continue to judge whether the user's root directory archives economy that signs in under the mini root directory archives economy sub-directory has damage, do not damage if having, then continue to check in user's root directory archives economy whether have sbin/init, bin/bash, bin/sh and etc/inittab supervisor, if all exist, judge that then this user's root directory archives economy is for good, and the project that above-mentioned detection process is detected, if have wherein one for not, judge that then this user's root directory archives economy damages.
In sum, the method of reparation boot system of the present invention can be improved existing key problem in technology and be, the root directory archives economy of existing technology is divided into mini root directory archives economy, and user's root directory archives economy, and be stored in read-only block and erasable block in the flash memory respectively, and in mini root directory archives economy, add a detection process, make equipment when start, whether meeting elder generation execution detection process is detected user's root directory archives economy and is damaged, if user's root directory archives economy is intact, then can be with the system of user's root directory archives economy as built-in Linux operating system, if user's root directory archives economy is damaged, then use the system of mini root directory archives economy as built-in Linux operating system, so, can allow other application program be written into user's root directory archives economy, again can be when damaging in user's root directory archives economy, with mini root directory archives economy start, the situation that can avoid generation equipment can't use fully.
Above-mentioned detailed description is at a kind of preferable possible embodiments explanation of the present invention, this embodiment is not in order to limit claim of the present invention, all other do not break away from the equalization finished under the disclosed skill spirit to be changed and modifies change, all should be contained in the claim that the present invention contains.
In sum, the method for reparation start of the present invention has obvious effect when using promotes, and really meets the patent requirement of novelty, creativity and progressive, files an application in accordance with the law.

Claims (4)

1. a method of repairing boot system with using the flash memory in the built-in Linux operating system equipment to be planned to four blocks, is characterized in that,
Three blocks are read-only block, and a block is erasable block;
Again with the system directs instrument in the built-in Linux operating system, Linux micro core, and mini root directory archives economy is stored to respectively in each read-only block;
User's root directory archives economy is stored in the erasable block, is provided with in this mini root directory archives economy and can detects the detection process whether user's root directory archives economy is damaged;
When equipment in when start, this detection process can judge whether user's root directory archives economy is good, if when good, then user's root directory archives economy is logined to built-in Linux operating system, and detection process is then logined mini root directory archives economy to (SuSE) Linux OS when judging user's root directory archives economy for damage.
2. the method for reparation boot system as claimed in claim 1 is characterized in that,
When whether this detection process damages at detecting user root directory archives economy, can check whether have sbin/init, bin/bash, bin/sh and etc/inittab program in user's root directory archives economy.
3. a method of repairing boot system with using the flash memory in the built-in Linux operating system equipment to be planned to four blocks, is characterized in that,
Three blocks are read-only block, a block is erasable block, and store system directs instrument, Linux micro core in the built-in Linux operating system in each read-only block respectively, and mini root directory archives economy, and store user's root directory archives economy in the built-in Linux operating system in the erasable block, when equipment in when start, carry out according to the following step:
(A) open device power supply (DPS);
(B) carry out system directs instrument in the built-in Linux operating system, and the Linux micro core is loaded on memory body carries out;
(C) whether the detection process in the mini root directory archives economy of execution is detected user's root directory archives economy and is damaged, if not, then carry out step (D), if yes, then carries out step (E);
(D) use user's root directory archives economy login built-in Linux operating system;
(E) use mini root directory archives economy login built-in Linux operating system.
4. the method for reparation boot system as claimed in claim 3, it is characterized in that, when whether this detection process damages at detecting user root directory archives economy, can check whether have sbin/init, bin/bash, bin/sh and etc/inittab program in user's root directory archives economy.
CNB2005100893873A 2005-08-05 2005-08-05 Method for resetting starting system Expired - Fee Related CN100530093C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100893873A CN100530093C (en) 2005-08-05 2005-08-05 Method for resetting starting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100893873A CN100530093C (en) 2005-08-05 2005-08-05 Method for resetting starting system

Publications (2)

Publication Number Publication Date
CN1908900A CN1908900A (en) 2007-02-07
CN100530093C true CN100530093C (en) 2009-08-19

Family

ID=37700017

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100893873A Expired - Fee Related CN100530093C (en) 2005-08-05 2005-08-05 Method for resetting starting system

Country Status (1)

Country Link
CN (1) CN100530093C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221508B (en) * 2008-01-31 2010-09-29 杭州华三通信技术有限公司 Equipment starting method and device
TWI486913B (en) * 2013-06-14 2015-06-01 Vivotek Inc Security monitoring device with network and record function and failure detecting and repairing mehtod for storage device thereof
CN104751062B (en) * 2013-12-31 2019-03-19 研祥智能科技股份有限公司 A kind of method and device improving operating system reliability
CN104063256A (en) * 2014-07-18 2014-09-24 上海斐讯数据通信技术有限公司 Partition and firmware upgrading method based on minimum operating system

Non-Patent Citations (8)

* Cited by examiner, † Cited by third party
Title
Linux系统引导概述. 董明峰.微机发展,第13卷第8期. 2003
Linux系统引导概述. 董明峰.微机发展,第13卷第8期. 2003 *
一种实现嵌入式Linux的新方法. 杨琦.芜湖职业技术学院学报,第6卷第3期. 2004
一种实现嵌入式Linux的新方法. 杨琦.芜湖职业技术学院学报,第6卷第3期. 2004 *
嵌入式Linux系统在PDA设备中的应用. 桑江,陈震.计算机工程与设计,第26卷第4期. 2005
嵌入式Linux系统在PDA设备中的应用. 桑江,陈震.计算机工程与设计,第26卷第4期. 2005 *
嵌入式Linux系统的移植及其根文件系统的实现. 杨洁洁.漳州师范学院学报(自然科学版),第2期. 2005
嵌入式Linux系统的移植及其根文件系统的实现. 杨洁洁.漳州师范学院学报(自然科学版),第2期. 2005 *

Also Published As

Publication number Publication date
CN1908900A (en) 2007-02-07

Similar Documents

Publication Publication Date Title
JP5162535B2 (en) Method and memory system using memory system
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
TWI515735B (en) Data erasing method, memory control circuit unit and memory storage apparatus
TWI546818B (en) Green nand device (gnd) driver with dram data persistence for enhanced flash endurance and performance
TWI524183B (en) Data writing method, memory control circuit unit and memory storage apparatus
TWI479313B (en) Data writing method, memory controller and memory storage device
CN102629206B (en) A kind of method for updating embedded system software and system
US20070050675A1 (en) [method for restoring a booted system]
TWI470431B (en) Data writing method, memory controller and memory storage apparatus
CN101634960A (en) Method for revising BIOS parameter and regenerating checksum
TWI660271B (en) Trim command recording method, memory control circuit unit and memory storage apparatus
CN105760191A (en) Embedded system equipment programming mass production method
CN102841802A (en) Software upgrading method for mobile terminal
EP1764687B1 (en) Method for restoring a booted system
CN100530093C (en) Method for resetting starting system
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
CN102890655A (en) Memory storage device, memory controller and valid data recognition method thereof
TWI493341B (en) Memory storage device and repairing method thereof
CN100576187C (en) A kind of exploitation adjustment method and system of application program
CN105630523A (en) Computer BIOS data recovery system and method
TWI464585B (en) Data storing method, and memory controller and memory storage apparatus using the same
TWI446170B (en) Data writing method, memory controller and memory storage apparatus
CN104238956A (en) Method for writing data, controller of storage, and storage device of storage
CN111737165A (en) Memory control method, memory storage device and memory control circuit unit
TWI553477B (en) Memory management method, memory control circuit unit and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090819

Termination date: 20120805