CN1336591A - Method of loading operation system and application program into memory - Google Patents

Method of loading operation system and application program into memory Download PDF

Info

Publication number
CN1336591A
CN1336591A CN 00122223 CN00122223A CN1336591A CN 1336591 A CN1336591 A CN 1336591A CN 00122223 CN00122223 CN 00122223 CN 00122223 A CN00122223 A CN 00122223A CN 1336591 A CN1336591 A CN 1336591A
Authority
CN
China
Prior art keywords
application program
file
operating system
memory storage
parameter
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.)
Granted
Application number
CN 00122223
Other languages
Chinese (zh)
Other versions
CN1151436C (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.)
DAISHENG SCIENCE & TECHNOLOGY Co Ltd
Original Assignee
DAISHENG SCIENCE & TECHNOLOGY 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 DAISHENG SCIENCE & TECHNOLOGY Co Ltd filed Critical DAISHENG SCIENCE & TECHNOLOGY Co Ltd
Priority to CNB001222236A priority Critical patent/CN1151436C/en
Publication of CN1336591A publication Critical patent/CN1336591A/en
Application granted granted Critical
Publication of CN1151436C publication Critical patent/CN1151436C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The invention discloses a method to put operating system and application into memory device. The processing steps are as follows. The source code of operating system is reformed to be as a reforming file. The compressed file of operating system is obtained by compressing the compiled said reforming file of operating system. The reforming application is obtained by removing not necessary note. The file storing application is mapped as a virtual device of file. The reforming application is copied to virtual device of file. Then the storing application is comporessed to be as the application compressed file. After formatting the memory device, the bootstrap file, the compressed file of operating system, and the application compressed file is copied to the memory device. At last, the executing control program is modified.

Description

Operating system and application program are put into the method for memory storage
The present invention relates to a kind of but boot program be put into the method for memory storage, and be particularly related to a kind of method of operating system and application program being put into memory storage.
The arriving of information age, the utilization of computer is all the more universal, and the user also increases thereupon.All be to utilize server to manage the user now, and many services easily are provided.Server can be done more effective integration, utilization and management with the resource used jointly and data, the function of sharing with data with the maximum usability that reaches resource, and the waste of minimizing resource and space that data repeats to store are wasted.The operating system of general server and application program are to install to be stored among the Winchester disk drive at present, but often need to spend long time on the parameter of installing operating system and setting hardware.In addition, these operating systems and application program usually need very large hard drive space and store, and cause the increase in demand of hardware, increase cost burden.If during because of operation improperly or the situation generation of cutting off the power supply suddenly, and just system is just carrying out the action that writes hard disk, just probably causes the fault of operating system.In case operating system breaks down, repair again or reinstall initialization system when serious, the cost that whole enterprise or manpower will be paid just more is difficult to calculate.
In view of this, purpose of the present invention is exactly that a kind of method of operating system and application program being put into memory storage is being provided.In case memory storage of the present invention has been installed by system, not only can save the time of many installations and setting, and just can finish the required time of starting shooting less than one minute.Because operating system and application program have suffered at this memory storage, so, also can therefore not damage operating system if run into shutdown improperly or unexpected outage.Memory storage volume of the present invention is little, and operating system and application program do not need to take the space of Winchester disk drive again, but execution speed is fast.Also make things convenient for the installation of user or system operator to set and use.
According to purpose of the present invention, propose a kind of operating system and application program to be put into the method for memory storage, the method is summarized as follows: earlier a source code of operating system is become an operating system reformation file after through reform (crunch).Compile this operating system reformation file, after overcompression, become an operating system compressed file again.Unnecessary note and be a reformer application program in the deletion application program.One application program is deposited file to mapping of a set onto another one file virtual bench; Duplicate the reformer application program to the file virtual bench, it is an application program compressed file that the recompression application program is deposited file.After memory storage done format, the file of will starting shooting, operating system compressed file and application program compressed file were copied among the memory storage.Revise executive control program at last.Wherein, revise executive control program and comprise the following steps: more to check whether the file system of memory storage is normal, if undesired, then revises it; Setting memory storage is read-only (read only); Utilize the VNode technology with the application program compressed file mapping in the memory storage to an application program storing directory; Automatically detect and installation one hard disk, if hard disk format is as yet then done format to hard disk automatically; And detect automatically and setting one network interface card, set one of network interface card parameter in proper order according to the slot of network interface card.
The method of operating system and application program being put into memory storage that the present invention is disclosed, its advantage is as follows:
1. generally when installing, must need long time, and accidentally, be easy to set mistake with the setting operation system.In case the setting mistake just must be corrected the longer time.Especially comparatively complicated with the setting of hard disk and network interface card.Among the present invention, whether system can detect hard disk automatically and exist, if exist, (mount) will be installed automatically.If hard disk is not format as yet, formative action also will be done to it automatically by system.In addition, system also detects automatically network interface card is installed, and finishes the work of setting.The user got especially at the network interface card that is that producer, and set its related data when the setting network interface card is installed in the past.In the present invention, do not need so directly to set its network related data and get final product according to the order of slot on its motherboard.So, simplify the user and installed and the difficulty of setting, more saved the time of initialization system.
2. among the present invention, operating system and application program are placed in the memory storage, have saved the space of shared storer, also accelerated the speed of start.Install also very convenient, as long as plug the action that this memory storage has just almost been finished installation system.More and if the situation of abnormal shutdown or sudden power has taken place, also not worrying can the damage system.
For the present invention's above-mentioned purpose, feature and advantage can be become apparent, hereinafter special single preferred embodiment, and cooperate appended accompanying drawing, be described in detail below:
The simple declaration of accompanying drawing:
Fig. 1 illustrates the process flow diagram according to the making operating system mapping of one embodiment of the present invention;
Fig. 2 illustrates the process flow diagram according to the making application program of one embodiment of the present invention;
Fig. 3 illustrates the process flow diagram according to the making special compression type file system of one embodiment of the present invention;
Fig. 4 illustrates according to the process flow diagram of in one embodiment of the present invention operating system and application program being put into memory storage;
Fig. 5 illustrates the process flow diagram of general boot action;
Fig. 6 illustrates the process flow diagram according to the boot action of one embodiment of the present invention.
In general operating system, for example be the operating system of UNIX, under its root directory (root directory) many catalogues are arranged, wherein/in the boot catalogue start file that comprises that start is required, being the storage position of operating system file in the/kernel catalogue, is the storage position of application program in the/usr catalogue.And The present invention be directed to operating system and application program place two catalogue/kernel ,/file that stored among the usr provides the method for putting into memory storage.
Please refer to Fig. 1, it illustrates the process flow diagram according to the making operating system mapping (rootimage) of one embodiment of the present invention.In this embodiment, described operating system is example with Free BSD operating system.As shown in Figure 1, step 101 is that the source code (source code) of Free BSD operating system is become an operating system reformation file after through the technical finesse of reforming.Originally the source code of Free BSD operating system is made up of tens of even hundreds of programs.Each program all is a program independently, and each has its program of calling (call) (procedure) or function (function).And the program of identical function or function are because can be by different routine calls, so the program of these identical functions or function will repeat to be present between the different programs.So, operating system will become huge.In order to improve this problem, so all programmings are become single program, i.e. operating system reformation file.The mode of writing for will be originally each independently program all reorganization write as the forms of program or function, put among the operating system reformation file.And those repeat invoked program originally or just can only there be portion in function, have so just saved the shared space of operating system.
Step 102 is that compiling (compile) this operating system reformation file is an operating system execute file.Step 103 is that compression (compress) this operating system execute file becomes an operating system compressed file.
Fig. 2 illustrates the process flow diagram according to the making application program of one embodiment of the present invention.This application program can be server systems such as acting server (proxyserver), file server system (fileserver), POP 3, SM7P, WWW, FTP, DNS.Step 201 is from selected application program, deletes unnecessary note or setting and is a reformer application program.Step 202 is with this reformer application program, puts into the file system (file system) of a special compression type.And please also refer to Fig. 3 relevant for the way of step 202.Shown in Figure 3ly go out to be according to the process flow diagram of making the special compression file system in one embodiment of the present invention.In the step 301, utilize the technology of VNode (VirtualNode), earlier an application program is deposited file to file virtual bench of mapping of a set onto another (mount point).In step 302, with above-mentioned reformer application program copy so far in the file virtual bench.In the next procedure 303, the compression applications program is deposited file becomes an application program compressed file.This has also just entered the step 203 among Fig. 2.
Please refer to Fig. 4, it is shown for according to the process flow diagram of in one embodiment of the present invention operating system and application program being put into memory storage.Wherein, memory storage for example is flash ROM (flashROM).In step 401, at first storage device formatization (format) is become the form of Free BSD file system.In step 402, again will be originally among the start file under operating system/boot catalogue and operating system compressed file and application program compressed file duplicate so far memory storage.
Please refer to Fig. 5, it is shown to be the process flow diagram of general boot action.After opening the power supply of host computer, at first be step 501, (Basic Input Output System BIOS) begins to check and test peripheral hardware device to basic input/output.Enter step 502 subsequently, basic input/output is loaded into MBR (Master Boot Record) in the random-access memory (ram).MBR is writing down the information that disk is cut apart, and which disk is a startup disk.In this step, basic input/output is given MBR with control.In startup disk, there are two zones and start that confidential relation is arranged.One is first sector (sector) of this startup disk, is called boot1.Another is to be positioned at boot1 7.5k position afterwards, and this 7.5k position is called boot2.Boot1 and boot2 are in order to read the FreeBSD file system and can do interactive function with system manipulation platform (console).So in step 503, MBR is written into Boot1 in the random access memory, and in step 504, boot1 is written into boot2 in the random access memory, continues to carry out boot action.In step 505, boot2 is loaded into operating system kernel (kernel) in the random access memory, is just controlled the action of total system by operating system kernel.
As shown in the step 506, operating system kernel can be carried out this handling procedure of init (process).Init is first program that is activated among the whole operation system, and the init system that makes has entered single user's pattern (single user mode).So-called single user's pattern have only exactly this account number of using system supvr can accessing system among.In step 507, init is by calling executive control program (RC, Run Control) to check and installation file system and start basic background executive routine (daemonprocess).And at last to step 508, system is switched to multi-user's pattern (multi-usermode).And in a preferred embodiment of the invention, provide following to the executive control program in the step 507 to improve one's methods, please refer to Fig. 6.
After memory storage as implied above has been installed on the motherboard, open host power supply.Please refer to Fig. 6, it is shown to be process flow diagram according to the boot action of one embodiment of the present invention.The process flow diagram of start process as the step 500 among Fig. 5 to step 507.Then in step 601, check whether the file system in the memory storage is normal.When if file system makes a mistake, then revise this document system.In the step 602, this memory storage is set for read-only, meaning promptly only can read, and cannot write.Because operating system and application program have all been put among this memory storage, so do not need that the action that writes is arranged again.Also, can damage system because of the action that is just writing because so, need not worry when the undesired shutdown or the situation of accident power-off.In the step 603, utilize the technology of VNode, the application program compressed file mapping (mount) in the memory storage is become an application program storing directory, this application program storing directory is/usr.Next in step 604, check whether hard disk exists; If exist, hard disk just is installed automatically.If hard disk is not formatted as yet, system is with this hard disk of automatically formatting.In the step 605, all assign the network interface card (Network Interface Card) of motherboard the operating system self-verifying.And by reading the network interface card parameter that sets among enactment document/etc/rc.conf, and the parameter that network interface card is set is internet protocol address (IP address), gateway (gateway) or sub-network shade (netmask) for example.In enactment document rc.conf, can set the related data of the card of throwing the net, such as eth1 represents first set data of throwing the net card more, eth2 represents second set data of throwing the net card, ethN+1 represents the throw the net set data of card of N+1.When system has detected when card of throwing the net more, system can be according to the order of network card slot, and the network interface card set data of same sequence among the enactment document rc.conf is assigned to this network interface card.Next in step 508, again according to standard /etc/rc continues to start the pattern to the multi-user.
In above-mentioned step, step 604 can exchange with step 605, promptly can detect network interface card earlier, detects hard disk again, so can also reach purpose of the present invention.
In sum; though the present invention discloses as above with a preferred embodiment; right its is not in order to limit the present invention; any those skilled in the art; without departing from the spirit and scope of the present invention; can do various variations and modification, so protection scope of the present invention should be defined by the appended claims.

Claims (24)

1. one kind operating system and application program put into the method for memory storage, in order to an operating system and an application program are put into a memory storage, wherein, this operating system comprises a start file and an executive control program, and this method comprises:
A. the source code with this operating system becomes an operating system reformation file after reforming;
B. compiling this operating system reformation file is an operating system execute file;
C. compressing this operating system execute file is an operating system compressed file;
D. delete note unnecessary in this application program or setting and be a reformer application program;
E. utilize the VNode technology that one application program is deposited file to mapping of a set onto another one file virtual bench;
F. duplicate this reformer application program to this document virtual bench;
G. compressing this application program, to deposit file be an application program compressed file;
H. with this storage device formatization; And
I. should start shooting file, this operating system compressed file and this application program compressed file is copied among this memory storage.
2. the method for claim 1, wherein after step I, also comprise:
J. revise this executive control program, this step I also comprises following substep:
Whether the file system of j1. checking this memory storage is normal, if undesired, then revises it;
J2. it is read-only setting this memory storage;
J3. utilize this application program compressed file mapping that this memory storage is interior of VNode technology to an application program storing directory;
J4. detect automatically and installation one hard disk, if the format as yet of this hard disk is then done format to this hard disk automatically; And
J5. detect automatically and setting one network interface card, set a parameter of this network interface card according to the slot of this network interface card in proper order.
3. the method for claim 1, wherein this operating system is Free BSD.
4. method as claimed in claim 3, wherein this application program storing directory is/usr.
5. the method for claim 1, wherein this memory storage is a flash ROM.
6. the method for claim 1, wherein this parameter is internet protocol address (IP).
7. the method for claim 1, wherein this parameter is a gateway.
8. the method for claim 1, wherein this parameter is sub-network shade (netmask).
9. the method for claim 1, wherein this application program is a proxy-server system.
10. the method for claim 1, wherein this application program is the POP3 server system.
11. the method for claim 1, wherein this application program is the smtp server system.
12. the method for claim 1, wherein this application program is the www server system.
13. the method for claim 1, wherein this application program is the dns server system.
14. method of operating system and application program being put into memory storage, in order to a UNIX operating system and an application program are put into a flash ROM, wherein, this UNIX operating system it/comprise a start file and one an executive control program/etc/rc under the boot catalogue, this method comprises:
A. the source code with this UNIX operating system becomes an operating system reformation file after reforming;
B. compiling this operating system reformation file is an operating system execute file;
C. compressing this operating system execute file is an operating system compressed file;
D. delete note unnecessary in this application program or setting and be a reformer application program;
E. utilize the VNode technology that one application program is deposited file to mapping of a set onto another one file virtual bench;
F. duplicate this reformer application program to this document virtual bench;
G. compressing this application program, to deposit file be an application program compressed file;
H. format done in this flash ROM; And
I. should start shooting file, this operating system compressed file and this application program compressed file is copied among this flash ROM.
15. method as claimed in claim 14 wherein, after step I, also comprises:
J. revise this executive control program, this step I also comprises following substep:
Whether the file system of j1. checking this memory storage is normal, if undesired, then revises it;
J2. it is read-only setting this memory storage;
J3. utilize this application program compressed file mapping that this memory storage is interior of VNode technology to an application program storing directory;
J4. detect automatically and installation one hard disk, if the format as yet of this hard disk is then done format to this hard disk automatically; And
J5. detect automatically and setting one network interface card, set one of this network interface card parameter in proper order according to the slot of this network interface card.
16. method as claimed in claim 14, wherein this UNIX operating system is Free BSD.
17. method as claimed in claim 14, wherein this parameter is internet protocol address (IP).
18. method as claimed in claim 14, wherein this parameter is a gateway.
19. method as claimed in claim 14, wherein this parameter is the sub-network shade.
20. method as claimed in claim 14, wherein this application program is a proxy-server system.
21. method as claimed in claim 14, wherein this application program is the POP3 server system.
22. method as claimed in claim 14, wherein this application program is the smtp server system.
23. method as claimed in claim 14, wherein this application program is the www server system.
24. method as claimed in claim 14, wherein this application program is the dns server system.
CNB001222236A 2000-07-31 2000-07-31 Method of loading operation system and application program into memory Expired - Fee Related CN1151436C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB001222236A CN1151436C (en) 2000-07-31 2000-07-31 Method of loading operation system and application program into memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB001222236A CN1151436C (en) 2000-07-31 2000-07-31 Method of loading operation system and application program into memory

Publications (2)

Publication Number Publication Date
CN1336591A true CN1336591A (en) 2002-02-20
CN1151436C CN1151436C (en) 2004-05-26

Family

ID=4589160

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB001222236A Expired - Fee Related CN1151436C (en) 2000-07-31 2000-07-31 Method of loading operation system and application program into memory

Country Status (1)

Country Link
CN (1) CN1151436C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425547A (en) * 2013-08-22 2013-12-04 宁波三星电气股份有限公司 Electric power data processing method based on VxWorks operation system
WO2015196621A1 (en) * 2014-06-23 2015-12-30 广州爱九游信息技术有限公司 File packing method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425547A (en) * 2013-08-22 2013-12-04 宁波三星电气股份有限公司 Electric power data processing method based on VxWorks operation system
CN103425547B (en) * 2013-08-22 2016-04-27 宁波三星医疗电气股份有限公司 Based on the electric power data disposal route of vxworks operating system
WO2015196621A1 (en) * 2014-06-23 2015-12-30 广州爱九游信息技术有限公司 File packing method and device

Also Published As

Publication number Publication date
CN1151436C (en) 2004-05-26

Similar Documents

Publication Publication Date Title
US5491808A (en) Method for tracking memory allocation in network file server
US6711660B1 (en) System and method for performing disk drive diagnostics and restoration using a host-inaccessible hidden partition
US6360364B1 (en) System and method for installing an application on a portable computer
US6658435B1 (en) Disk image backup/restore with data preparation phase
US20050182796A1 (en) Method and system for protecting data associated with a replaced image file during a re-provisioning event
US7953948B1 (en) System and method for data protection on a storage medium
US6167494A (en) Method and system for recovering from operating system failure
US8135904B2 (en) Method and apparatus for facilitating fast wake-up of a non-volatile memory system
KR100289628B1 (en) Resource management method and apparatus for information processing system of multitasking facility
US8073673B2 (en) Emulated memory management
US7007195B2 (en) BIOS shadowed small-print hard disk drive as robust, always on, backup for hard disk image & software failure
US8176482B1 (en) Methods and systems for inserting software applications into images
US20050204107A1 (en) Method and apparatus for dumping memory
CN111124288B (en) VPD storage management method, device, equipment and readable storage medium
US5968170A (en) Primary swap size increase on a UNIX based computer system
CN101403966B (en) Method for implementing portable software
TWI221581B (en) Method for embedding operating system and application program in memory device
CN114579148A (en) Installation method and device of operating system
CN1151436C (en) Method of loading operation system and application program into memory
CN112486517B (en) Application program installation method and system, electronic equipment and storage medium
CN101714092A (en) Method for controlling boot sequence of server
CN115129570A (en) Memory performance test method and related device
US20050027954A1 (en) Method and apparatus to support the maintenance and reduction of FLASH utilization as it pertains to unused or infrequently referenced FLASH data
KR100706514B1 (en) Booting method of operating system on hard disk
US6950916B2 (en) Dynamically setting the optimal base addresses of process components

Legal Events

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