Patent Publication Number: US-2012042156-A1

Title: Method of multiple boot manager

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a method of multiple boot manager, and more particularly to a method to define partitions for multiple boot manager on hard disk. 
     2. Description of the Prior Art 
     As for computer configured with X86 Central Processing Unit (CPU), normal boot procedure is to power on computer till an operating system (OS) is loaded. 
     The first process to be performed on the computer system compatible with IBM PC is Basic Input/Output System (BIOS) after the computer is switched on. In fact, BIOS is stored in Read-Only Memory (ROM) on motherboard or Flash Memory, which acts as service program for the basic operation of computer system. Generally, software stored in hardware is to be called firmware. Firmware benefits to update or recovery the service program stored in memories via proper utility program. 
     Firstly, the BIOS perform Power On Self Test (POST) to ensure the peripheries connected with the computer in normal operation. Subsequently, BIOS performs an instruction searching for boot sector trying to read the boot sector on software and loading the operating system located in software. In the event there is no operating system located in software, BIOS read the first sector on hard disk known as master boot record (MBR) to load the operating system located in hard disk. 
       FIG. 1  shows a conventional hard disk partitions, which is illustration and not limited. In fact there are a variety of definition modes of partitions on hard disk. As shown in  FIG. 1 , the first sector on hard disk is known as master boot record (MBR)  15 , addressed at cylinder  0 , head  0 , sector  1 . The hard disk can be divided into plural partitions for loading a variety of operating system. The partition can be divided into primary partition  11 ,  12  and extended partition  13 . The primary partition is defined at most four so far. If there is an extended partition existed on hard disk, the primary partition is defined three at most. Although the extended partition is just one, it can be defined to be some logical partition  131 - 133 . 
     The data stored in MBR  15  can be divided into three parts. One is boot partition loader (BPL) or pre-loader, pre-boot  151 , for loading boot sector to memories. The second is partition data  152  for storing data of partitions on hard disk, contained with a partition table for recording conditions of the hard disk partition, such as startup address and volumn of each partition. The third is verify data  153  for verifying whether the whole sector data of MBR is correct. 
     For the example of booting up the computers, firstly, when a computer is switched on, the BIOS program is executed and BIOS is loaded into memories. Then, power on self test (POST) is executed for testing hardware on computers such as CPU, motherboard, memories etc. The testing result is output and displayed on the screen or duplicator. By means of POST, the hardware and peripheries is tested to be in normal operation in subsequent booting procedure. If there is BIOS stored in other hardware devices, such as video graphics card (VGA), integrated device electronics (IDE), or serial advanced technology attachment (SATA), BIOS program is executed at the same time. 
     BIOS perform an instruction of seeking boot sector for starting up computers and load the boot sector for starting up computers into memories. As for hard disk, MBR located at the first sector on hard disk is read and loaded into memories. The control of program execution is passed to boot partition loader of master boot record (MBR) which loads the partitions setup with boot flag into memories. The control of program execution is passed to boot sector of partitions with boot flag. The boot sector is contained with a boot loader by which loading the operating system of partitions with boot flag into memories for execution via the guiding assist. And the control of program execution is passed to the operating system, thus a booting procedure is fulfilled. 
     Although the hard disk can be divided into a plurality of partitions with a variety of operating system loaded in, there is only but partitions with booting flag loaded into memories for execution. As a result, the normal booting procedure is linear and mutually exclusive, that is, only the partitions with booting flag and OS placed thereof can be loaded directly, to the contrary, those partitions without booting flag and OS placed thereof cannot be executed. 
     For the purpose of multiple booting computers, software like multiple boot manager is developed so that different OS placed on a variety of partitions can be managed and be optional loaded into memories for execution. The conventional multiple boot manager is like that, such as SPFdisk, GRUB, LILO etc. 
     As MBR is the first sector loaded into memories for execution after BIOS is performed, most multiple boot manager is to modify or rebuild MBR which multiple boot manager installed thereon. Thus the control of program execution is obtained by MBR before OS is loaded. An option of booting computers is provided for the user to choose a partition or an operating system for booting computer. 
     However, there appears a security concern when MBR is modified or rebuilt improperly. For example, the sector is easily subject to booting virus infection or breakdown so as to abnormal booting procedure. Additionally, most multiple boot manager is out of action and cannot be executed again due to the control of program execution turned over. When changing into another OS, the computer has to be restarted and fulfill a whole boot procedure again, such as cold or hot boot. In other words, the boot procedure has to be executed after BIOS is loaded. Only when multiple boot manager obtains the control of program execution, different OS can be optionally loaded in memories. 
     SUMMARY OF THE INVENTION 
     The present invention aims to provide a method of multiple boot manager in a computer equipped with BIOS and a storing medium. The storing medium is defined with a partition for multiple boot manager, a first partition and a second partition, wherein the partition for multiple boot manager is contained with a multiple boot manager, and address flags directing the first partition or the second partition. 
     The method of multiple boot manager includes three steps: starting up a computer system, altering operating system, rebooting a computer system. 
     The first step of starting up the computer includes steps as below: executing BIOS program; BIOS loading master boot record (MBR) to memories; directing the first partition according to the pre-boot partition indicated by address flag, MBR loading the partition for multiple boot manager to memories, and passing the control of program execution to the partition for multiple boot manager; the partition for multiple boot manager contained with a multiple boot manager to be loaded to the first partition for execution, passing the control of program execution to the first partition; the first partition contained with a boot sector which has a boot loader for loading the first operating system of the first partition to memories, and passing the control of program execution to the first OS, thus the booting procedure fulfilled. 
     The step of alteration OS includes the following steps: execution an application program under the condition of the first OS, and creating a conversational option interface for choosing by the user; altering the address flag of the partition for multiple boot manager to directing the second partition according to the choice or operation of the user. 
     Finally, the step of rebooting computer includes: unloading the first OS; loading the master boot record (MBR); loading multiple boot manager located in the partition for multiple boot manager; directing the second partition according to the address flag of the partition for multiple boot manager and loading multiple boot manager to the second partition; loading the second OS located on the second partition. The step of loading the master boot record (MBR) optionally can be omitted. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  shows a conventional hard disk partitions; 
         FIG. 2  shows the partitions of hard disk according to the present invention; 
         FIG. 3  is a flow chart illustrating the method of multiple boot manager; 
         FIG. 4  is a flow chart illustrating another embodiment of the method of multiple boot manager; 
         FIG. 5  and  FIG. 6  is the flowchart of starting up a computer according to the present invention; 
         FIG. 7  shows the flowchart of rebooting procedure according to the present invention; 
         FIG. 8  shows a flowchart of another embodiment about rebooting procedure according to the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention provides a method of multiple boot manager capable of applying to computers like desktop or notebook computers configured with multiple boot modes. The method of multiple boot according to the present invention intends to load multiple optional operating system for choice at the time of switch on/off the computer for the purpose of loading the selected operating system to memories. 
       FIG. 2  shows the partitions of hard disk according to the present invention, which is just illustration and not limited, actually there are a variety of definition modes of partitions on hard disk. The computer is equipped with a storing medium  2 , preferred is hard disk. The storing medium  2  includes a master boot record (MBR)  25  located at the first sector where the address is cylinder  0 , head  0 , sector  1 . The storing medium  2  includes a plurality of partitions  21 - 24 , like a partition for multiple boot manager  24  and a plurality of primary partitions  21 - 22 , at least a first partition  21  and a second partition  22 . The primary partitions is used to load different operating system, with a first OS loaded in the first partition  21  and a second OS loaded in the second partition  22 . The different OS according to the present invention includes windows operation system of different versions, such as Windows XP, Windows VISTA, Windows 7, or other than windows operation system, such as UNIX, Linux, FreeBSD, Solaris, or MAC OSX. 
     The partition for multiple boot manager  24  according to the present invention is an independent partition of storing medium  2 , which is the designated partition for MBR  25  loaded in memories. The partition for multiple boot manager  24  includes a multiple boot manager  241  which is a program for controlling booting up a computer, a partition table  242  for recording address and volumn of each partition, and an address flag  243  for designating one partition between the first partition  21  and the second partition  22  to be loaded in memories. 
       FIG. 3  is a flow chart illustrating the method of multiple boot manager. The method described in the embodiment includes: defining a partition of multiple boot manager (step  32 ) with a multiple boot manager stored therein; starting up a computer (step  34 ) for loading the first OS; alteration OS (step  36 ) for executing an application program to alter the address flag of the partition for multiple boot manager under the condition of the first OS; rebooting a computer (step  38 ) for unloading the first OS and loading the multiple boot manager and loading the second operating system according to the address flag. 
       FIG. 4  is a flow chart illustrating another embodiment of the method of multiple boot manager. Firstly, setting up a storing medium (step  42 ) is executed. The storing medium is defined with a partition for multiple boot manager, a first partition and a second partition, wherein the partition for multiple boot manager includes multiple boot manager, and address flags directing the first partition or the second partition. 
     Here, the flow of booting up a computer according to the present invention will be described with reference to  FIG. 5  and  FIG. 6 . The step of executing starting up the computer (step  44 ) includes steps as below. BIOS program is executed (step  440 ) in response to signal of starting up or power-on computers to obtain the control of program execution. BIOS performs Power On Self Test (POST) to ensure the peripheries connected with the computer in normal operation. Subsequently, BIOS search for a boot sector for the purpose of loading master boot record (MBR) located on hard disk addressed at cylinder  0 , head  0 , sector  1  to memories (step  441 ). BIOS pass the control of program execution to master boot record (MBR) (step  442 ). MBR loads the partition for multiple boot manager to memories (step  443 ) and passes the control of program execution to the partition for multiple boot manager (step  444 ). The partition for multiple boot manager includes a multiple boot manager and address flags. The multiple boot manager loads the first partition to memories (step  445 ) according to the address flag directing to the first partition and the partition for multiple boot manager passes the control of program execution to the first partition (step  446 ). The first partition includes a boot sector which has a boot loader for loading the first OS located on the first partition to memories (step  447 ). The first partition pass the control of program execution to the first OS located on the first partition (step  448 ). 
     Next, the step of alteration operating system is executed which include the following steps: executing an application program under the condition of the first OS, and creating a conversational option interface which includes a plurality of name options of different operating system for choosing by the user, the preferred interface is designed as radio button options, wherein the name option of the first OS is disabled or unaccessible, or the name option of the first OS is unable to display. The application program alters the address flag of the partition for multiple boot manager according to the choice of the user so as to the address flag direct to the second partition for reference on next booting up. The application program can communicate with the multiple boot manager located on the partition for multiple boot manager, or call the multiple boot manager to be activated. 
     Now referring to  FIG. 7 ,  FIG. 7  shows the flowchart of rebooting procedure according to the present invention. The step of rebooting procedure includes: unloading the first OS (step  481 ) to ensure data conservation to be safe and integrated. The reboot procedure means not to restart up the computer, such as hot or cold start the computer, but the subsequent boot procedure omitting the BIOS program. The conventional boot procedure whether cold or hot boot has to load BIOS program for execution, the reboot procedure according to the present invention need load not BIOS but master boot record (MBR) into memories (step  482 ), and pass the control of program execution to boot partition loader of MBR. Then MBR loads the partition for multiple boot manager into memories (step  483 ), the control of program execution is passed to the partition for multiple boot manager which includes a multiple boot manager. The multiple boot manager loads the second partition to memories (step  485 ) according to the address flag directing to the second partition and the partition for multiple boot manager passes the control of program execution to the second partition. The second partition includes a boot sector which has a boot loader for loading the second OS located on the second partition to memories (step  487 ). The second partition pass the control of program execution to the second OS located on the second partition. 
       FIG. 8  shows a flowchart of another embodiment about rebooting procedure according to the present invention. The embodiment describes a reboot procedure which omits BIOS program and master boot record (MBR). The reboot steps includes: unloading the first operating system (step  481 ); loading not BIOS program and master boot record (MBR) but the partition for multiple boot manager into memories; passing the control of program execution to the partition for multiple boot manager; subsequently step  485  and step  487  is carried out. 
     Although the invention has been explained in relation to its preferred embodiment, many other possible modifications and variations can be made without departing from the spirit and scope of the invention as hereinafter claimed.