Patent Publication Number: US-2011078429-A1

Title: Electronic device and booting method therefor

Description:
BACKGROUND 
     1. Technical Field 
     The present disclosure relates to an electronic device having multiple operating systems (OSs) and a booting method for the electronic device. 
     2. Description of Related Art 
     Nowadays, a user of an electronic device (such as a computer) is free to purchase and install an operating system that differs from the one installed on the device when it was purchased. There are numerous commercially available operating systems to choose from including, but not limited, to MS-DOS, UNIX, LINUX, OS/2, WINDOWS 3.x, WINDOWS NT, and WINDOWS 95. 
     Although these operating systems perform similar tasks, and many are capable of running the same application programs, each operating system has its own strengths. Sometimes a user wishing to capitalize on the strengths of these operating systems will install more than one OS on the same computer. Commercially available software utilities aid a user in installing additional operating systems on their computers. These utilities also allow a user to choose which operating system to boot while a computer is being powered-on or reset. The capability to boot different operating systems on the same computer is often referred to as an OS multi boot or multi booting. Despite the fact that many attempts have been made in the art, this kind of technology still has much room for improvement. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  a schematic block diagram of an electronic device in accordance with one embodiment. 
         FIG. 2  is a flow chart of a booting method for an electronic device in accordance with one embodiment. 
         FIGS. 3   a  and  3   b  is a flow chart of a booting method for an electronic device in a manufacture booting mode. 
         FIG. 4  is a flow chart of a booting method for an electronic device in a rescue booting mode. 
         FIG. 5  is a flow chart of a booting method for an electronic device in a recover booting mode. 
     
    
    
     DETAILED DESCRIPTION 
     The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one. 
     In general, the word “module,” as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as an EPROM. It will be appreciated that modules may comprised connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device. 
     Referring to  FIG. 1 , an electronic device  100  in accordance with one embodiment includes a boot loader module  10 , a mode selecting module  20 , and a firmware module  30 . The electronic device  100  stores programs and data of different OSs (e.g., WINDOWS 2000, WINDOWS XP, WINDOWS VISTA, LINUX, etc). 
     A memory space of the electronic device  100  can be divided into several areas. Each of the areas is configured to store the programs and data of the OS. In one embodiment, programs of WINDOWS XP OS are stored in one of the areas; programs of LINUX OS are stored in another one of the areas. 
     The boot loader module  10  includes a small program that can selectively load the operating system programs at boot. 
     The mode selecting module  20  is capable of selecting Mode1, Mode2, Mode3, or Mode4. Model is a manufacturing boot applicable while manufacturing the electronic device  100 . Mode2 is a normal boot applicable to a common usage of the electronic device  100 . Mode3 is a rescue boot mode applicable while repairing the electronic device  100 . Mode4 is a recovery boot applicable while restoring the electronic device  100  to factory settings. Mode2 is set as the default boot. If the electronic device  100  does not receive any command to interrupt the boot up process, the default boot is automatically selected. If the electronic device  100  receives a specified command during the booting process, another booting mode other than the default booting mode can be selected according to user&#39;s selection. 
     In one embodiment, the electronic device  100  can be a personal computer or other consumer electronic devices, such as a digital photo frame, a mobile phone, etc. If a common consumer uses the electronic device  100 , the mode selecting module  20  can automatically select the normal booting mode applicable to the common user. During manufacturing the electronic device  100 , a hotkey can be pressed to control the  100  to bootup the manufacture boot. If the electronic device  100  is being repaired, the mode selecting module  20  can select the rescue booting mode according to user&#39;s selection. If the electronic device  100  needs to be restored to factory settings, the mode selecting module  20  can select the recover booting mode according to user&#39;s selection. 
     Referring to  FIG. 2 , one embodiment of a booting method for the electronic device  100  includes following blocks. 
     In block S 21 , a power button of the electronic device  100  is actuated to power on the electronic device  100 . 
     In block S 22 , the mode selecting module  20  runs and selects a desired booting mode. If the mode selecting module  20  does not receive any input command during running, the mode selecting module  20  automatically selects the default booting mode (e.g. normal booting mode). If the mode selecting module  20  receives an input command during running, the mode selecting module  20  can select another booting mode (e.g. the manufacture booting mode, the rescue booting mode, or the recover booting mode) according to the input command. 
     In block S 23 , if the mode selecting module  20  receives a special input command during running, the mode selecting module  20  can select a special booting mode. 
     In block S 24 , the electronic device  100  shows a logo on a display. 
     In block S 25 , determining whether any key is hit to stop booting. If any key is hit, a password is input to enter a command line interface to control the electronic device  100 , for example, entering DOS (disk operating system). 
     In block S 26 , the mode selecting module  20  can select any booting mode (e.g. the manufacture booting mode, the rescue booting mode, or the recover booting mode) according to the input command. 
     Referring to  FIGS. 3   a  and  3   b , one embodiment of a booting method for the electronic device  100  includes following blocks in the manufacture booting mode. 
     In block S 31 , determining whether an OS kernel parameter value is zero. If the OS kernel parameter value is zero, burning a first kernel and setting the OS kernel parameter value to one. 
     In block S 32 , when the OS kernel parameter value is one, the first kernel is loaded to the RAM. Determining whether the OS kernel parameter value is two, a second kernel is loaded to the RAM if yes. Determining whether the OS kernel parameter value is three, a third kernel is loaded to the RAM if yes. If not, it will be handled as an error. 
     In block S 33 , a central processing unit of the electronic device  100  starts one of the first, second and third kernel. 
     In block S 34 , the electronic device  100  mounts root file system. 
     In block S 35 , the electronic device  100  loads a shell (user interface application system), and corresponding service module. For example, firmware upgrade module. 
     Referring to  FIG. 4 , one embodiment of a booting method for the electronic device  100  includes following blocks in the rescue booting mode. 
     In block S 41 , a rescuing process module rescues the electronic device  100 . 
     In block S 42 , determining whether the electronic device  100  is successfully rescued. If the electronic device  100  is successfully rescued, the electronic device  100  is set to the recover booting mode and the OS kernel parameter value is two. When the OS kernel parameter value is two, the OS kernel is a new firmware. When the OS kernel parameter value is one, the OS kernel is an initial firmware. The electronic device  100  is restarted. 
     In block S 43 , if the electronic device  100  is not successfully rescued, it is handled in error. 
     Referring to  FIG. 5 , one embodiment of a booting method for the electronic device  100  includes following blocks in the recover booting mode. 
     In block S 51 , the first kernel is copied to the second kernel and the third kernel. The first kernel is the original firmware. 
     In block S 52 , loading the second kernel to the RAM. The central processing unit starts the second kernel from the RAM. The electronic device  100  mounts root file system. 
     In block S 53 , the electronic device  100  starts the service module, such as system configuration service module. The electronic device  100  is set to enter the normal booting mode next time. 
     While the present disclosure has been illustrated by the description of preferred embodiments thereof, and while the preferred embodiments have been described in considerable detail, it is not intended to restrict or in any way limit the scope of the appended claims to such details. Additional advantages and modifications within the spirit and scope of the present disclosure will readily appear to those skilled in the art. Therefore, the present disclosure is not limited to the specific details and illustrative examples shown and described. 
     Depending on the embodiment, certain of the steps of methods described may be removed, others may be added, and the sequence of steps may be altered. It is also to be understood that the description and the claims drawn to a method may include some indication in reference to certain steps. However, the indication used is only to be viewed for identification purposes and not as a suggestion as to an order for the steps.