[go: up one dir, main page]

CN1151436C - Method for putting operation system and application program into storage device - Google Patents

Method for putting operation system and application program into storage device Download PDF

Info

Publication number
CN1151436C
CN1151436C CNB001222236A CN00122223A CN1151436C CN 1151436 C CN1151436 C CN 1151436C CN B001222236 A CNB001222236 A CN B001222236A CN 00122223 A CN00122223 A CN 00122223A CN 1151436 C CN1151436 C CN 1151436C
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.)
Expired - Fee Related
Application number
CNB001222236A
Other languages
Chinese (zh)
Other versions
CN1336591A (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
Original Assignee
Daisheng Science & Technology
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 filed Critical Daisheng Science & Technology
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

Landscapes

  • Stored Programmes (AREA)

Abstract

A method of placing an operating system and an application program into a storage device, comprising: firstly, the source code of the operating system is reformed into an operating system reforming file. Compiling the operating system reforming file, and compressing the operating system reforming file to form an operating system compressed file. Unnecessary annotations in the application are removed and a reformulated application is made. Mapping the storage file pair of the application program into a file virtual device; and copying the reforming application program to the file virtual device, and then compressing the application program to store the file into an application program compressed file. After the storage device is formatted, the boot file, the operating system compressed file and the application program compressed file are copied to the storage device. And finally, modifying the execution control program.

Description

Operating system and application program are put into the method for memory storage
Technical field
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.
Background technology
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.
Summary of the invention
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, if so run into shutdown improperly or unexpected outage, can therefore not damage operating system yet, memory storage volume of the present invention is little, 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.
A kind of method of operating system and application program being put into memory storage is proposed according to the present invention, 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 executive control program/etc/rc under the boot catalogue, this method comprises: a. becomes an operating system reformation file with a source code of this UNIX operating system after through reformation; 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 should start shooting file, this operating system compressed file and this application program compressed file of i. is copied among this flash ROM.
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.
Description of drawings:
For the present invention's above-mentioned purpose, feature and advantage can be become apparent, a preferred embodiment cited below particularly, and cooperate appended accompanying drawing, be described in detail below.
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.
Embodiment
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 (proxy server), file server system (file server), POP 3, SMTP, 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 (fille 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 (Virtual Node), 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 Free BSD 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 (kerne1) 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-user mode).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 the throw the net set data of card of eth 1 expression first more, eth 2 represents second set data of throwing the net card, eth N+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 j 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 the VNode technology with this application program compressed file mapping in the memory storage 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 the internet protocol address.
7. the method for claim 1, wherein this parameter is a gateway.
8. the method for claim 1, wherein this parameter is the sub-network shade.
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 the internet protocol address.
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 for putting operation system and application program into storage device 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 for putting operation system and application program into storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB001222236A CN1151436C (en) 2000-07-31 2000-07-31 Method for putting operation system and application program into storage device

Publications (2)

Publication Number Publication Date
CN1336591A CN1336591A (en) 2002-02-20
CN1151436C true 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 for putting operation system and application program into storage device

Country Status (1)

Country Link
CN (1) CN1151436C (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425547B (en) * 2013-08-22 2016-04-27 宁波三星医疗电气股份有限公司 Based on the electric power data disposal route of vxworks operating system
CN105446975B (en) * 2014-06-23 2019-03-15 广州爱九游信息技术有限公司 A kind of file packing method and device

Also Published As

Publication number Publication date
CN1336591A (en) 2002-02-20

Similar Documents

Publication Publication Date Title
US11209991B2 (en) Tape library emulation with automatic configuration and data retention
US5491808A (en) Method for tracking memory allocation in network file server
CA2178213C (en) Incremental backup system
US6711660B1 (en) System and method for performing disk drive diagnostics and restoration using a host-inaccessible hidden partition
US6128734A (en) Installing operating systems changes on a computer system
US8073673B2 (en) Emulated memory management
US20050182796A1 (en) Method and system for protecting data associated with a replaced image file during a re-provisioning event
US20050235281A1 (en) Combined software installation package
US8176482B1 (en) Methods and systems for inserting software applications into images
US4752910A (en) Method and apparatus for continuous after-imaging
US7007195B2 (en) BIOS shadowed small-print hard disk drive as robust, always on, backup for hard disk image & software failure
US5968170A (en) Primary swap size increase on a UNIX based computer system
US5765192A (en) Method and computer program product to reuse directory search handles
US6718548B1 (en) Method for embedding an operating system and an application program into a memory apparatus
CN115576705B (en) Data synchronization method, device and medium for redundant firmware
CN1151436C (en) Method for putting operation system and application program into storage device
CN101213517A (en) Decompression technique for generating software image
CN112486517B (en) Application program installation method and system, electronic equipment and storage medium
CN115129570A (en) Memory performance test method and related device
US6985849B1 (en) System and method for portable emulation of operating environment
US7120835B2 (en) Computer equipment having a prompt access function and related method
US6510499B1 (en) Method, apparatus, and article of manufacture for providing access to data stored in compressed files
CN101714092A (en) Method for controlling boot sequence of server
CN118069600A (en) File modification method, system, device, medium and computer program product
CN117170802A (en) Methods, systems, equipment and media for quickly producing operating system images based on the Xinchuang platform

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