Abstract: A method for embedding an operating system and application program into a memory apparatus. The operating system includes a boot file and a run control (RC) program and the method includes the steps as follows. First, source codes of the operating system are processed for obtaining a crunch file of the operating system by applying a crunch technique. The crunch file of the operating system is then compiled, resulting in an executable file of the operating system which is then compressed into a system compression file. Next, eliminating unnecessary comments and settings from source codes of the application program, a compact version of the application program is obtained. Following that, a program storage file is mounted as a mount point through a virtual node technique. Next, the compact version of the application program is copied to the mount point. The program storage file is then compressed into a program compression file.