Movatterモバイル変換


[0]ホーム

URL:


CN1641524A - Multi-key boot system and method for multiple operating systems - Google Patents

Multi-key boot system and method for multiple operating systems
Download PDF

Info

Publication number
CN1641524A
CN1641524ACN 200410001598CN200410001598ACN1641524ACN 1641524 ACN1641524 ACN 1641524ACN 200410001598CN200410001598CN 200410001598CN 200410001598 ACN200410001598 ACN 200410001598ACN 1641524 ACN1641524 ACN 1641524A
Authority
CN
China
Prior art keywords
mbr
operating systems
identification information
multikey
operating system
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 200410001598
Other languages
Chinese (zh)
Other versions
CN1317616C (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.)
Inventec Corp
Original Assignee
Inventec Corp
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 Inventec CorpfiledCriticalInventec Corp
Priority to CNB2004100015982ApriorityCriticalpatent/CN1317616C/en
Publication of CN1641524ApublicationCriticalpatent/CN1641524A/en
Application grantedgrantedCritical
Publication of CN1317616CpublicationCriticalpatent/CN1317616C/en
Anticipated expirationlegal-statusCritical
Expired - Fee Relatedlegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

The invention discloses a multi-key guide system and a method of a multi-operating system, comprising the following steps: the starting-up key logic unit, EC chip and RAM, inquiry module, loading module, providing several starting-up keys and connecting with EC chip, customizing several MBRs, detecting the corresponding change of EC chip electric signal caused by pressing down specific key, writing the corresponding identification information in the RAM of EC chip, then searching the corresponding customized MBR according to the identification information, loading the corresponding MBR, and finally guiding the corresponding operating system according to the loaded MBR.

Description

Translated fromChinese
多重操作系统的多键引导系统及方法Multi-key boot system and method for multiple operating systems

技术领域technical field

本发明是关于一种计算机操作系统的开机引导系统及方法,特别是关于一种具有多重操作系统的计算机的多开机按键引导系统及方法。The present invention relates to a system and method for booting up a computer operating system, in particular to a system and method for guiding multiple boot buttons of a computer with multiple operating systems.

背景技术Background technique

启动一台计算机和加载操作系统的过程通常被叫做“bootstrap process”或简单地叫“booting”。各种不同的操作系统启动流程不尽相同,请参考图1,为Win9x/DOS的启动流程示意图,在第一阶段,系统加电自检POST过程(步骤101),POST是Power On Self Test的缩写,也就是加电自检的意思,微机执行内存FFFF0H处的程序(这里是一段固化的ROM程序),对系统的硬件(包括内存)进行检查;The process of starting a computer and loading an operating system is often called the "bootstrap process" or simply "booting". Various different operating system start-up processes are not the same, please refer to Figure 1, which is a schematic diagram of the start-up process of Win9x/DOS. In the first stage, the system power-on self-test POST process (step 101), POST is Power On Self Test Abbreviation, that is, the meaning of power-on self-test, the microcomputer executes the program at the memory FFFF0H (here is a solidified ROM program), and checks the system hardware (including memory);

第二阶段,读取分区记录和引导记录(步骤102)。当微机检查到硬件正常并与CMOS设置相符后,按照CMOS设置从相应设备启动(这里假设从硬盘启动),读取硬盘的分区记录(DPT)和主引导记录(MBR);In the second stage, partition records and boot records are read (step 102). When the microcomputer checks that the hardware is normal and consistent with the CMOS settings, start from the corresponding device according to the CMOS settings (here, it is assumed to start from the hard disk), and read the partition record (DPT) and master boot record (MBR) of the hard disk;

第三阶段,读取DOS引导记录(步骤103)。微机正确读取分区记录和主引导记录后,如果主引导记录和分区表校验正确,则执行主引导记录并进一步读取DOS引导记录(位于每一个主分区的第一个扇区),然后执行该DOS引导记录;In the third stage, the DOS boot record is read (step 103). After the microcomputer correctly reads the partition record and the master boot record, if the master boot record and the partition table check are correct, then execute the master boot record and further read the DOS boot record (located in the first sector of each primary partition), and then Execute the DOS boot record;

第四阶段,装载系统隐含文件(步骤104)。将DOS系统的隐含文件IO.SYS入内存,加载基本的文件系统FAT,这时候一般会出现StartingWindows 9x...的标志,IO.SYS将MS.SYS读入内存,并处理System.dat和User.dat文件,加载磁盘压缩程序;In the fourth stage, system hidden files are loaded (step 104). Put the hidden file IO.SYS of the DOS system into the memory, load the basic file system FAT, at this time generally there will be a sign of Starting Windows 9x..., IO.SYS will read MS.SYS into the memory, and process System.dat and User.dat file, load the disk compression program;

第五阶段,实DOS模式配置(步骤105)。系统隐含文件装载完成,微机将执行系统隐含文件,并执行系统配置文件(Config.sys),载入Config.sys中定义的各种驱动程序;The fifth stage, real DOS mode configuration (step 105). After the system hidden file is loaded, the microcomputer will execute the system hidden file, execute the system configuration file (Config.sys), and load various drivers defined in Config.sys;

第六阶段,调入命令解释程序(Command.com)(步骤106)。系统装载命令管理程序,以便对系统的各种操作命令进行协调管理(我们所使用的Dir、Copy等内部命令就是由Command.com提供的);In the sixth stage, the command interpretation program (Command.com) is transferred (step 106). The system loads the command management program to coordinate and manage various operating commands of the system (the internal commands such as Dir and Copy we use are provided by Command.com);

第七阶段,执行批处理文件(Autoexec.bat)(步骤107)。计算机将一步一步地执行批处理文件中的各条命令;In the seventh stage, the batch file (Autoexec.bat) is executed (step 107). The computer will execute each command in the batch file step by step;

第八阶段,载入Win.com(步骤108)。Win.com负责将Windows下的各种驱动程序和启动执行文件加以执行,至此启动完毕。In the eighth stage, load Win.com (step 108). Win.com is responsible for executing various drivers and start-up execution files under Windows, so far the start-up is complete.

当系统加电自检通过以后,硬盘被复位,BIOS将根据用户指定的启动顺序从软盘、硬盘或光驱进行启动。以从硬盘启动为例,系统BIOS将主引导记录读入内存。然后,将控制权交给主引导记录MBR,然后检查分区表DPT的状态,寻找活动的分区。最后,由主引导记录将控制权交给活动分区的引导程序,由引导程序加载操作系统。After the system passes the power-on self-test, the hard disk is reset, and the BIOS will start from the floppy disk, hard disk or CD-ROM according to the startup sequence specified by the user. Taking booting from the hard disk as an example, the system BIOS reads the master boot record into the memory. Then, control is passed to the master boot record MBR, and the status of the partition table DPT is checked for active partitions. Finally, the master boot record transfers control to the boot program of the active partition, and the boot program loads the operating system.

主引导扇区位于整个硬盘的0磁道0柱面1扇区(cylinder 0,side 0,sector1),包括硬盘主引导记录MBR(Main Boot Record)和分区表DPT(DiskPartition Table),大小为512字节,其中,MBR 446字节(0000h--01BDh),DPT 64字节(01BE--01FD),结束标志2字节(55 AA)。主引导记录的作用就是检查分区表是否正确以及确定哪个分区为引导分区,并在程序结束时把该分区的启动程序(例如DOS的IO.SYS)调入内存交予控制权。分区表以80H或00H为开始标志,以55AAH为结束标志,共64字节,位于本扇区的最末端。The master boot sector is located in the 0 track 0 cylinder 1 sector (cylinder 0, side 0, sector1) of the entire hard disk, including the hard disk master boot record MBR (Main Boot Record) and partition table DPT (DiskPartition Table), with a size of 512 words section, where MBR is 446 bytes (0000h--01BDh), DPT is 64 bytes (01BE--01FD), and the end flag is 2 bytes (55 AA). The role of the master boot record is to check whether the partition table is correct and determine which partition is the boot partition, and transfer the startup program of the partition (such as IO.SYS of DOS) into the memory and give control to it at the end of the program. The partition table starts with 80H or 00H and ends with 55AAH, a total of 64 bytes, located at the end of this sector.

主引导扇区结构如下:The master boot sector structure is as follows:

000H--08AH MBR启动程序(寻找开机分区)000H--08AH MBR boot program (find boot partition)

08BH--0D9H MBR启动字符串08BH--0D9H MBR boot string

0DAH--1BCH保留(″0″)0DAH--1BCH reserved ("0")

1BEH--1FDH硬盘分区表1BEH--1FDH hard disk partition table

1FEH--1FFH结束标志(55AA)1FEH--1FFH end sign (55AA)

硬盘分区表DPT总共64字节(01BE--01FD),每个分区占16个字节,所以可以表示四个分区,这也就是为什么一个磁盘的主分区和扩展分区之和总共只能有四个的原因。每个分区内部结构定义如下表所示。     Offset   Length(bytes)     Description     0h   1     分区类型:00表示非活动分区;80     表示活动分区;其它为无效分区。1h3     分区的起始地址(面/扇区/磁道),通常第一分区的起始地址开始于1面0道1扇区,因此这三个字节应为010100。     4h     1     分区的操作系统的类型     5h     3     分区的结束地址(面/扇/道)     8h     4     分区起始逻辑扇区     Ch     4     分区占用的总扇区数The hard disk partition table DPT has a total of 64 bytes (01BE--01FD), and each partition occupies 16 bytes, so it can represent four partitions, which is why the sum of the primary partition and the extended partition of a disk can only have four partitions in total. reasons. The internal structure definition of each partition is shown in the table below. Offset Length(bytes) Description 0h 1 Partition type: 00 means inactive partition; 80 Indicates an active partition; others are invalid partitions. 1h 3 The starting address of the partition (plane/sector/track), usually the starting address of the first partition starts from 1 plane, 0 track and 1 sector, so these three bytes should be 010100. 4h 1 The type of operating system for the partition 5h 3 The end address of the partition (plane/sector/track) 8 hours 4 Partition start logical sector Ch 4 The total number of sectors occupied by the partition

而操作系统引导扇区OBR(OS Boot Record),通常位于硬盘的0磁道1柱面1扇区(这是对于DOS来说的,对于那些以多重引导方式启动的系统则位于相应的主分区/扩展分区的第一个扇区),是操作系统可直接访问的第一个扇区,它也包括一个引导程序和一个被称为BPB(BIOS Parameter Block)的本分区参数记录表。其实每个逻辑分区都有一个OBR,其参数视分区的大小、操作系统的类别而有所不同。引导程序的主要任务是判断本分区根目录前两个文件是否为操作系统的引导文件(例如MSDOS或者起源于MSDOS的Win9x/Me的IO.SYS和MSDOS.SYS)。如是,就把第一个文件读入内存,并把控制权交予该文件。BPB参数块记录着本分区的起始扇区、结束扇区、文件存储格式、硬盘介质描述符、根目录大小、FAT个数、分配单元(AllocationUnit,以前也称之为簇)的大小等重要参数。OBR由高级格式化程序产生(例如DOS的Format.com)。The operating system boot sector OBR (OS Boot Record) is usually located in the 0 track 1 cylinder 1 sector of the hard disk (this is for DOS, and for those systems that start in multi-boot mode, it is located in the corresponding main partition/ The first sector of the extended partition) is the first sector directly accessible by the operating system, and it also includes a boot program and a parameter record table for this partition called BPB (BIOS Parameter Block). In fact, each logical partition has an OBR, and its parameters vary depending on the size of the partition and the type of operating system. The main task of the boot program is to judge whether the first two files in the root directory of this partition are the boot files of the operating system (such as MSDOS or IO.SYS and MSDOS.SYS of Win9x/Me originated from MSDOS). If so, read the first file into memory and transfer control to that file. The BPB parameter block records the starting sector, ending sector, file storage format, hard disk media descriptor, root directory size, FAT number, allocation unit (AllocationUnit, previously called cluster) size of the partition, etc. parameter. OBR is generated by a high-level formatter (such as Format.com for DOS).

而另一方面,现有的计算机操作系统功能已远远超出了其概念本身,其已经成为一个大杂烩,融合了许多模块、组件、应用程序等等。功能强大了所带来的必然结果就是针对性不强、效率降低,不论要做什么工作,每次必须启动整个操作系统,相对来说,启动速度就会减慢,所占用的系统资源也相对增加,使系统负担加重,功耗相应增加,假若开启了某些不安全的服务就容易受到攻击。而且,针对各种功能必须安装特定的软件,否则就无法进行正常的工作。对用户来说,要操控整个操作系统就必须具备一定计算机专业知识,不易于推广使用。On the other hand, the function of the existing computer operating system has far exceeded its concept itself, and it has become a hodgepodge, integrating many modules, components, application programs and so on. The inevitable result of powerful functions is that the pertinence is not strong and the efficiency is reduced. No matter what work is to be done, the entire operating system must be started every time. Relatively speaking, the startup speed will slow down and the system resources occupied are relatively small The increase will increase the burden on the system and increase the power consumption accordingly. If some unsafe services are enabled, they will be vulnerable to attacks. Moreover, specific software must be installed for various functions, otherwise, normal work cannot be performed. For users, to control the entire operating system, certain computer expertise must be possessed, which is not easy to popularize and use.

这从操作系统的加载所需时间就可以很明显的看出,例如,即便用户只是想打开计算机看看电影,听听音乐,但仍然也要经过漫长的时间来等待系统启动,而所加载的许多功能是用户用不到的。This can be clearly seen from the loading time of the operating system. For example, even if the user just wants to turn on the computer to watch movies or listen to music, it still takes a long time to wait for the system to start, and the loaded Many functions are not available to users.

针对上述问题,目前比较常见的解决方式是用引导装载程序引导多个操作系统,也就是说,通过一个开机按钮接通电源,在程序引导过程中,出现一个多重操作系统的选择接口,让用户进行选择,以支持多重启动功能,开发人员的工作量仅仅集中在定制特定功能的操作系统、相关组件和应用程序上,针对特定功能可以将操作系统做的更专更强。其实这也就是操作系统发展的两个方向,分别向广度和深度去着眼。In view of the above problems, the more common solution at present is to use a boot loader to guide multiple operating systems, that is, to turn on the power through a power button, and in the process of program booting, a selection interface for multiple operating systems appears, allowing the user to Select to support the multi-boot function, the developer's workload is only focused on customizing the operating system, related components and applications for specific functions, and the operating system can be made more specialized and stronger for specific functions. In fact, these are the two directions of operating system development, focusing on breadth and depth respectively.

但上述多重引导的方式,其仍要经过一定的等待时间,才能出现选择接口,对于使用者而言,还是不能直达所需的操作系统,必须经过选择才能启动所需的功能,如此,虽然定制了操作系统,但系统启动的速度并未切实得到提高,而且还引入了手工介入的步骤,限制了运行效率,增加了使用难度以及出错机率。But the above-mentioned multi-boot mode still has to pass through a certain waiting time before the selection interface can appear. For the user, it still cannot directly reach the required operating system, and must be selected to start the required function. So, although customized The operating system has been installed, but the speed of system startup has not been really improved, and the steps of manual intervention have been introduced, which limits the operating efficiency, increases the difficulty of use and the probability of errors.

发明内容Contents of the invention

本发明是为解决上述问题而提供一种多重操作系统的多键引导系统及方法,通过按下特定开机按键而启动特定操作系统,以减少系统资源的占用,提高启动速度,并减少用户对系统的干预。In order to solve the above problems, the present invention provides a multi-key boot system and method for multiple operating systems. By pressing a specific power-on button, a specific operating system is started to reduce the occupation of system resources, improve the startup speed, and reduce the user's need for the system. intervention.

本发明提供一种多重操作系统的多键引导系统,通过设置多个开机按键,按下不同的按键加载不同的定制MBR(主引导记录)而引导不同的操作系统,该引导系统包括:开机按键逻辑单元,用以提供多个开机按键并在一按键按下后产生相应的电信号;EC芯片及其RAM,与该逻辑单元相连,用以响应该电信号而产生相应中断处理,并针对不同的开机按键在该ECRAM中写入相应的标识信息;查询模块,用以根据该EC RAM中的标识信息查找相应的定制MBR;加载模块,用以根据该查询情况而加载相应的MBR。The present invention provides a multi-key boot system for multiple operating systems. By setting multiple power-on buttons and pressing different buttons to load different customized MBR (Master Boot Record) to guide different operating systems, the boot system includes: power-on buttons The logic unit is used to provide multiple power-on buttons and generate a corresponding electrical signal after a button is pressed; the EC chip and its RAM are connected to the logic unit to generate corresponding interrupt processing in response to the electrical signal, and for different Write the corresponding identification information in the ECRAM with the power-on button; the query module is used to find the corresponding customized MBR according to the identification information in the EC RAM; the loading module is used to load the corresponding MBR according to the query situation.

本发明进而提供一种多重操作系统的多键引导方法,通过设置多个开机按键,按下不同的按键加载不同的定制MBR(主引导记录)而引导不同的操作系统,该引导方法首先提供多个开机按键并与EC芯片相连,并根据操作系统数量相应定制多个MBR,接着侦测因按下特定按键而引起的EC芯片电信号的相应变化,根据该电信号而在EC芯片RAM中写入相应的标识信息,然后根据该标识信息查找与其对应的定制MBR,根据该查询情况加载相应的MBR,最后根据该加载的MBR引导相应的操作系统。The present invention further provides a multi-key boot method for multiple operating systems. By setting multiple power-on keys and pressing different keys to load different customized MBRs (Master Boot Records) to boot different operating systems, the boot method first provides multiple A power-on button is connected to the EC chip, and multiple MBRs are customized according to the number of operating systems, and then the corresponding change in the electrical signal of the EC chip caused by pressing a specific button is detected, and written in the RAM of the EC chip according to the electrical signal. Enter the corresponding identification information, then search for the corresponding customized MBR according to the identification information, load the corresponding MBR according to the query, and finally boot the corresponding operating system according to the loaded MBR.

本发明针对特定功能设置特定按键,做到使用的傻瓜型,方便用户选择,针对特定功能定制操作系统,启动速度快,占用系统资源小,功耗降低,而且服务范围和安全策略均被事先定制于操作系统内,减少用户对系统的设置,安全性提高,受到攻击的机会减小。The present invention sets specific buttons for specific functions, making it easy to use, convenient for users to choose, customizing the operating system for specific functions, fast startup speed, small system resource occupation, low power consumption, and service scope and security policies are customized in advance In the operating system, the user's settings for the system are reduced, the security is improved, and the chance of being attacked is reduced.

附图说明Description of drawings

图1为Win9x/DOS的启动流程示意图;Fig. 1 is the schematic diagram of the startup process of Win9x/DOS;

图2为本发明的多重操作系统的多键引导系统架构图;Fig. 2 is the architecture diagram of the multi-key boot system of the multi-operating system of the present invention;

图3为本发明的多重操作系统的多键引导方法流程图;Fig. 3 is the flow chart of the multi-key booting method of the multi-operating system of the present invention;

图4为本发明的加载MBR过程的示意图;Fig. 4 is the schematic diagram of loading MBR process of the present invention;

图5为本发明的功能实施流程图。Fig. 5 is a flowchart of the implementation of the functions of the present invention.

其中,附图标记说明如下:Wherein, the reference signs are explained as follows:

步骤101加电自检Step 101 POST

步骤102读取分区记录和引导记录Step 102 read partition record and boot record

步骤103读取DOS引导记录Step 103 read DOS boot record

步骤104装载系统隐含文件Step 104 load system hidden files

步骤105实DOS模式配置Step 105 real DOS mode configuration

步骤106调入命令解释程序Step 106 transfers into the command interpreter

步骤107执行批处理文件Step 107 Execute the batch file

步骤108载入Win.comStep 108 Load Win.com

201   CPU               202   芯片组201CPU 202 Chipset

203   系统RAM           204   BIOS203System RAM 204 BIOS

2041  查询模块          2042  加载模块2041query module 2042 load module

205   EC芯片            206   EC芯片RAM205EC chip 206 EC chip RAM

207   开机按键逻辑单元207 Power button logic unit

步骤301提供多个开机按键并与EC芯片相连Step 301 provides multiple power-on buttons and connects them to the EC chip

步骤302根据操作系统数量相应定制多个MBRStep 302 Customize multiple MBRs according to the number of operating systems

步骤303侦测因按下特定按键而引起的EC芯片电信号的相应变化Step 303 detects the corresponding change of the electrical signal of the EC chip caused by pressing a specific key

步骤304根据该电信号而在EC芯片RAM中写入相应的标识信息Step 304 Write the corresponding identification information in the EC chip RAM according to the electrical signal

步骤305根据该标识信息查找与其对应的定制MBRStep 305 Find the corresponding customized MBR according to the identification information

步骤306根据该查询情况加载相应的MBRStep 306 loads the corresponding MBR according to the query

步骤307根据该加载的MBR引导相应的操作系统Step 307 guides the corresponding operating system according to the loaded MBR

步骤501触发所连GPI信号,引起中断Step 501 triggers the connected GPI signal, causing an interrupt

步骤502 EC Firmware中断服务程序将标识值写入EC RAMStep 502 EC Firmware interrupt service program writes the identification value into EC RAM

步骤503根据标识值加载定制的主引导记录Step 503 loads the customized master boot record according to the identification value

步骤504定制的主引导记录是否存在Step 504 Whether the customized master boot record exists

步骤505加载主引导扇区信息,即MBR和DPTStep 505 loads the master boot sector information, namely MBR and DPT

步骤506将磁盘分区表DPT附到定制的主引导记录之后Step 506 appends the disk partition table DPT to the customized master boot record

步骤507 OS启动Step 507 OS start

具体实施方式Detailed ways

当打开计算机电源后,CPU就获得了控制权。CPU立刻执行存储在主板上的BIOS(Basic Input Output System基本输入输出系统)中的指令。在BIOS指令的最后部分,包含了启动例程。该例程的任务是读取位于第一个硬盘中第一个扇区中的主引导记录(MBR)。在主引导记录中,包含了主引导程序和描述磁盘分区情况的磁盘分区表。BIOS执行主引导程序,以继续完成引导过程。主引导程序查看磁盘分区表,以获得活动分区。如果只有一个主分区的话,那么就将装入该分区的操作系统并启动。When the computer is powered on, the CPU takes control. The CPU immediately executes the instructions stored in the BIOS (Basic Input Output System) on the motherboard. In the last part of the BIOS command, the startup routine is included. The task of this routine is to read the Master Boot Record (MBR) located in the first sector of the first hard disk. In the master boot record, the master boot program and the disk partition table describing the disk partition are included. The BIOS executes the master bootloader to continue the boot process. The main bootloader looks at the disk partition table for active partitions. If there is only one primary partition, then the operating system of that partition will be loaded and started.

如果一个硬盘中包含了多个主分区,每个可启动的分区(比如每个分区都包含了一个操作系统)的第一个扇区都包含了自己的引导记录(bootrecord)。该引导记录包含了启动该分区中操作系统的启动程序。在查询到活动分区后,主引导记录运行分区的引导程序。引导程序装入操作系统文件并运行操作系统。If a hard disk contains multiple primary partitions, the first sector of each bootable partition (for example, each partition contains an operating system) contains its own boot record (bootrecord). The boot record contains the startup program that starts the operating system in the partition. After an active partition is queried, the master boot record runs the partition's bootstrap program. The bootloader loads the operating system files and runs the operating system.

大多数操作系统,包括DOS、Windows3.x、Windows95/98、Windows NT从硬盘启动的时候,需要从活动分区启动。但是不同的操作系统用不同的方式从活动分区上启动,例如:Most operating systems, including DOS, Windows3.x, Windows95/98, and Windows NT, need to start from the active partition when they start from the hard disk. But different operating systems boot from the active partition in different ways, for example:

DOS、Window3.x、Windows95/98必需从第一个硬盘上的活动分区启动。DOS, Window3.x, Windows95/98 must start from the active partition on the first hard disk.

Windows NT可以从逻辑分区上启动,但是其引导程序必需放在第一个硬盘的活动分区上。Windows NT can be started from a logical partition, but its boot program must be placed on the active partition of the first hard disk.

OS/2可以从逻辑分区上启动。但是包含逻辑分区的扩展分区必需在硬盘的前2GB内。OS/2 can be booted from logical partitions. But the extended partition containing the logical partition must be within the first 2GB of the hard disk.

Linux可以从逻辑分区上启动,也可以从主分区上启动。Linux can be started from a logical partition or from a primary partition.

值得注意的是,MBR是由分区程序(例如DOS的Fdisk.exe)产生的,不同的操作系统可能这个扇区是不尽相同,也可以由用户自由编写,只要它能完成前述的任务即可,这也是为什么能实现多系统启动的原因。现有的支持多重启动的方法也都是对MBR进行定制的编写,因此,也就必须要等执行到加载MBR时,用户才能选择所需要的操作系统来加载。It is worth noting that MBR is generated by a partition program (such as Fdisk.exe of DOS). Different operating systems may have different sectors, and they can also be freely written by users, as long as it can complete the aforementioned tasks. , which is also the reason why multiple systems can be started. Existing methods for supporting multiple boots also all customize the MBR. Therefore, the user must wait until the MBR is loaded before the user can select the desired operating system to load.

针对这种情况,本发明提出一种多键引导方法,利用多个开机按键,不同的按键对应开启不同的操作系统。In view of this situation, the present invention proposes a multi-key booting method, using multiple power-on keys, and different keys correspond to start different operating systems.

如图2所示,为本发明的多重操作系统的多键引导系统架构图,包括:CPU201、芯片组202、系统RAM203、BIOS 204、查询模块2041、加载模块2042、EC芯片205、EC芯片RAM206以及开机按键逻辑单元207。As shown in Figure 2, it is a multi-key boot system architecture diagram of multiple operating systems of the present invention, including: CPU201,chipset 202, system RAM203,BIOS 204,query module 2041,loading module 2042,EC chip 205, EC chip RAM206 And the powerbutton logic unit 207.

其中,开机按键逻辑单元207用以提供多个开机按键并在一按键按下后产生相应的电信号,EC芯片205及其RAM206与该开机按键逻辑单元207相连,用以回应该电信号而产生相应中断处理,并针对不同的开机按键在该EC RAM206中写入相应的标识信息,查询模块2041用以根据该EC RAM中的标识信息查找相应的定制MBR,加载模块2042用以根据该查询情况而加载相应的MBR。Among them, the power-onbutton logic unit 207 is used to provide a plurality of power-on buttons and generate a corresponding electrical signal after a button is pressed, and theEC chip 205 and itsRAM 206 are connected to the power-onbutton logic unit 207 to generate an electrical signal in response to the electrical signal. Corresponding interrupt processing, and write corresponding identification information in this EC RAM206 for different power-on buttons,inquiry module 2041 is in order to search corresponding customized MBR according to the identification information in this EC RAM, andloading module 2042 is in order to according to this inquiry situation Instead load the corresponding MBR.

该开机按键逻辑单元207包括多个开机按键,每个按键相应的用于开启特定的操作系统。The power-onbutton logic unit 207 includes a plurality of power-on buttons, and each button is correspondingly used to start a specific operating system.

请参阅图3,为本发明的多重操作系统的多键引导方法流程图,首先,提供多个开机按键并与EC芯片相连(步骤301),并根据操作系统数量相应定制多个MBR(步骤302),这样就可以侦测因按下特定按键而引起的EC芯片电信号的相应变化(步骤303),根据该电信号而在EC芯片RAM中写入相应的标识信息(步骤304),然后根据该标识信息查找与其对应的定制MBR(步骤305),根据该查询情况加载相应的MBR(步骤306),最后根据该加载的MBR引导相应的操作系统(步骤307)。Please refer to Fig. 3, it is the flow chart of the multi-key booting method of multiple operating systems of the present invention, at first, provide a plurality of power-on buttons and be connected with EC chip (step 301), and customize a plurality of MBR (step 302) correspondingly according to operating system quantity ), so that the corresponding change of the EC chip electric signal caused by pressing a specific button can be detected (step 303), and the corresponding identification information is written in the EC chip RAM according to the electric signal (step 304), and then according to the The identification information searches for the corresponding customized MBR (step 305), loads the corresponding MBR according to the query (step 306), and finally boots the corresponding operating system according to the loaded MBR (step 307).

实现本发明的关键技术环节在于引导过程,即如何区分不同的硬件信号来引导相应操作系统。这是因为,当计算机加电后,8051核心的嵌入式芯片(Embedded Chip)EC中的固件(Firmware)代码即进行初始化,无需启动系统,这就为多个开机按键的区分提供了必要条件。EC具有多个GPIO(General-Purpose Input/Output,通用输入输出),可由设计者定义其功能,有效的GPI输入将引起EC中断,相应的中断服务程序随即调入。The key technical link to realize the present invention lies in the boot process, that is, how to distinguish different hardware signals to guide the corresponding operating system. This is because, when the computer is powered on, the firmware (Firmware) code in the 8051 core embedded chip (Embedded Chip) EC is initialized without starting the system, which provides a necessary condition for the distinction of multiple power-on buttons. EC has multiple GPIOs (General-Purpose Input/Output, general-purpose input and output), whose functions can be defined by the designer. A valid GPI input will cause an EC interrupt, and the corresponding interrupt service routine will be called immediately.

现有的BIOS是通过中断19H直接将主引导扇区的MBR加载至内存0:7C00H处,而本发明如果只使用原有的一个MBR显然是不够的,应该是一个操作系统对应一个独立的MBR。如图4所示,为本发明的加载MBR过程的示意图,当BIOS要加载MBR时,比原来多了一步判断的过程,它是根据EC Firmware写入RAM的标识值来载入相应的定制主引导记录。定制的操作系统及其主引导记录分别用数字1、2、3来区别。假设三个操作系统的标识值也分别为1、2、3,那么当输入标识值为2时,BIOS就加载MBR2,判断它是否存在,若存在则将DPT附在其后引导OS2;若不存在,出于保护的目的将加载MBR和DPT,按原有模式由用户选择引导OS。判断定制的主引导记录存在与否的方法可以通过预先在定制的主引导记录特定位置写入唯一的标识字符串,然后再拿他比较来实现。例如,定制为Game Station的操作系统所对应的主引导记录中可以加入“game”这一关键词串,通过搜寻这一字符串便可知是否存在该MBR。The existing BIOS directly loads the MBR of the main boot sector to the memory 0:7C00H by interrupting 19H, but if the present invention only uses the original MBR, it is obviously not enough, and it should be an operating system corresponding to an independent MBR . As shown in Figure 4, it is the schematic diagram of loading MBR process of the present invention, when BIOS will load MBR, the process of one more step of judgment than original, it is to load corresponding customized master according to the identification value that EC Firmware writes RAM boot record. Customized operating systems and their master boot records are distinguished by numbers 1, 2, and 3, respectively. Assuming that the identification values of the three operating systems are also 1, 2, and 3 respectively, then when the input identification value is 2, the BIOS will load MBR2 to determine whether it exists, and if it exists, attach DPT to it to boot OS2; if not Existence, MBR and DPT will be loaded for the purpose of protection, and the user can choose to boot the OS according to the original mode. The method for judging whether the customized MBR exists can be realized by writing a unique identification string in a specific position of the customized MBR in advance, and then comparing it with it. For example, the keyword string "game" can be added to the master boot record corresponding to the operating system customized as Game Station, and whether the MBR exists can be known by searching for this string.

因此,本发明首先需要在机构部分增加多个特定功能的开机按键及相应电路的位置,在硬件部分,将按键电信号与相应的EC GPI相连,以便EC获得相应开机信号。Therefore, the present invention first needs to add a plurality of start-up buttons with specific functions and the positions of corresponding circuits in the mechanism part, and in the hardware part, connect the button electric signal with the corresponding EC GPI, so that the EC obtains the corresponding start-up signal.

然后修改EC Firmware程序,在中断服务程序中针对不同的开机按键在EC的RAM里写入相应的标识信息,以便BIOS进行进一步处理。标识值应事先约定,唯一的标识值对应唯一的特定功能即唯一的开机按键。Then modify the EC Firmware program, and write the corresponding identification information in the RAM of the EC for different power-on buttons in the interrupt service program, so that the BIOS can perform further processing. The identification value should be agreed in advance, and the unique identification value corresponds to the only specific function, that is, the unique power-on button.

同时,对BIOS程序也要进行修改,在开机自检后根据EC RAM中开机按键标示信息以判断所使用的开机按键,以便加载相应的主引导记录。对从非MBR区域加载的定制主引导记录进行判断,如果该主引导记录存在则将MBR中的硬盘分区表信息附加在主引导记录之后,引导相应的操作系统;若该主引导记录不存在则加载MBR和DPT进行通常的用户选择引导操作系统,这是一种针对特定功能OS出错情况下的保护措施。At the same time, the BIOS program should also be modified. After the power-on self-test, the power-on button used can be judged according to the information on the power-on button label in the EC RAM, so as to load the corresponding master boot record. Judge the custom master boot record loaded from the non-MBR area, if the master boot record exists, append the hard disk partition table information in the MBR to the master boot record, and boot the corresponding operating system; if the master boot record does not exist, then Load MBR and DPT for usual user selection boot operating system, which is a protection measure against specific functional OS error conditions.

另外,也要定制MBR主引导记录,使其驻留在硬盘特定的位置(如第一磁道除了MBR以外的操作系统未定义的部分)。一个操作系统对应一个主引导记录,大小为446字节,分区表信息是共享的,无需重写。In addition, the MBR master boot record must also be customized so that it resides in a specific location on the hard disk (such as the undefined part of the operating system other than the MBR on the first track). An operating system corresponds to a master boot record with a size of 446 bytes. The partition table information is shared and does not need to be rewritten.

当然,操作系统内核、模块及上层应用程序也需做相应的组合调整,使其仅加载必要的组件,完成快速启动。Of course, the operating system kernel, modules, and upper-layer applications also need to be combined and adjusted accordingly so that only the necessary components are loaded to complete the fast startup.

请参阅图5,为本发明的功能实施流程图,当特定按钮按下开机时,引起与之相连的EC GPI pin电信号变化,触发相应中断(步骤501),ECFirmware中断服务程序对标识字(位于EC RAM中)进行赋值,每一个特定按键都对应唯一的标识值(步骤502),BIOS在POST(Power ON Self-test)过程结束后根据EC RAM中的标识值调入非MBR区域的定制主引导记录,其事先驻留在硬盘特定的位置(如第一磁道除了MBR以外的操作系统未定义的部分)(步骤503),然后判断定制主引导记录是否存在(步骤504),若不存在则读入MBR和DPT中的数据(步骤505),若存在则将主引导扇区中的硬盘分区表信息附加在定制的主引导记录之后(步骤506),最后根据当前的主引导记录和硬盘分区表引导操作系统(步骤507)。Please refer to Fig. 5, it is the flow chart of function implementation of the present invention, when specific button is pressed to start, causes the EC GPI pin electric signal connected with it to change, triggers corresponding interrupt (step 501), ECFirmware interrupt service routine is to identification word ( located in the EC RAM) for assignment, and each specific key corresponds to a unique identification value (step 502), and the BIOS transfers the customization of the non-MBR area according to the identification value in the EC RAM after the POST (Power ON Self-test) process ends. Master Boot Record, which resides in a specific location on the hard disk in advance (such as the undefined part of the operating system other than the MBR in the first track) (step 503), then determine whether the custom Master Boot Record exists (step 504), if not Then read the data in MBR and DPT (step 505), if exist then the hard disk partition table information in the master boot sector is appended after the master boot record (step 506) customized, finally according to the current master boot record and hard disk The partition table boots the operating system (step 507).

以上所述,仅为本发明其中的较佳实施例而已,并非用来限定本发明的实施范围;即,凡依本发明范围所作的均等变化与修饰,皆为本发明范围所涵盖。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the implementation scope of the present invention; that is, all equivalent changes and modifications made according to the scope of the present invention are covered by the scope of the present invention.

Claims (10)

CNB2004100015982A2004-01-142004-01-14 Multi-key boot system and method for multiple operating systemsExpired - Fee RelatedCN1317616C (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CNB2004100015982ACN1317616C (en)2004-01-142004-01-14 Multi-key boot system and method for multiple operating systems

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CNB2004100015982ACN1317616C (en)2004-01-142004-01-14 Multi-key boot system and method for multiple operating systems

Publications (2)

Publication NumberPublication Date
CN1641524Atrue CN1641524A (en)2005-07-20
CN1317616C CN1317616C (en)2007-05-23

Family

ID=34867148

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CNB2004100015982AExpired - Fee RelatedCN1317616C (en)2004-01-142004-01-14 Multi-key boot system and method for multiple operating systems

Country Status (1)

CountryLink
CN (1)CN1317616C (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN100492291C (en)*2005-10-212009-05-27神基科技股份有限公司Computer system with instant start function and processing method thereof
CN101369230B (en)*2007-08-162011-12-28联想(北京)有限公司Operating system loading method used for computer
CN102799449A (en)*2012-06-262012-11-28杭州海康威视数字技术股份有限公司Multi-system starting method and system
CN102799484A (en)*2012-07-112012-11-28中兴通讯股份有限公司Method and device for running multiple operating systems by mobile terminal
CN101751519B (en)*2008-12-092013-01-02纬创资通股份有限公司 Method for improving information security of a computer system and related computer system
CN103024547A (en)*2012-12-282013-04-03北京赛科世纪数码科技有限公司Start control method, start control device and digital television set-top box
CN103324874A (en)*2012-03-232013-09-25联想(北京)有限公司Verification method and electronic device
CN104239061A (en)*2014-09-232014-12-24陈包容Method and system for calling application program of client by volume key under standby state of mobile terminal
WO2017097176A1 (en)*2015-12-082017-06-15华为技术有限公司Operating system starting method, apparatus and system
CN107451005A (en)*2017-08-102017-12-08合肥联宝信息技术有限公司Configure method, control device, computer motherboard and the computer of memory on board

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR0162599B1 (en)*1996-05-071999-01-15김광호Power control system
US6016252A (en)*1997-06-302000-01-18Emc CorporationCable management system
CN1402125A (en)*2001-08-222003-03-12英业达股份有限公司 Method and system for directly starting personal digital assistant operating system with hardware components
CN1421774A (en)*2001-11-302003-06-04英业达股份有限公司 Method and system for starting portable computer personal digital assistant operating system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN100492291C (en)*2005-10-212009-05-27神基科技股份有限公司Computer system with instant start function and processing method thereof
CN101369230B (en)*2007-08-162011-12-28联想(北京)有限公司Operating system loading method used for computer
CN101751519B (en)*2008-12-092013-01-02纬创资通股份有限公司 Method for improving information security of a computer system and related computer system
CN103324874A (en)*2012-03-232013-09-25联想(北京)有限公司Verification method and electronic device
CN102799449A (en)*2012-06-262012-11-28杭州海康威视数字技术股份有限公司Multi-system starting method and system
CN102799449B (en)*2012-06-262015-07-22杭州海康威视数字技术股份有限公司Multi-system starting method and system
CN102799484A (en)*2012-07-112012-11-28中兴通讯股份有限公司Method and device for running multiple operating systems by mobile terminal
CN102799484B (en)*2012-07-112017-11-03中兴通讯股份有限公司The method and device of running of mobile terminal multiple operating system
CN103024547A (en)*2012-12-282013-04-03北京赛科世纪数码科技有限公司Start control method, start control device and digital television set-top box
CN104239061A (en)*2014-09-232014-12-24陈包容Method and system for calling application program of client by volume key under standby state of mobile terminal
WO2017097176A1 (en)*2015-12-082017-06-15华为技术有限公司Operating system starting method, apparatus and system
CN107451005A (en)*2017-08-102017-12-08合肥联宝信息技术有限公司Configure method, control device, computer motherboard and the computer of memory on board
CN107451005B (en)*2017-08-102020-11-17合肥联宝信息技术有限公司Onboard memory configuration method, control device, computer mainboard and computer

Also Published As

Publication numberPublication date
CN1317616C (en)2007-05-23

Similar Documents

PublicationPublication DateTitle
CN101421700B (en) Method and apparatus for supporting independent operating systems in partitions of a processing system
CN1261868C (en)Method of rapid computer start-up
CN1313922C (en)Method and system for linking firmware modules in a pre-memory execution environment
EP2705422B1 (en)Dynamically redirecting boot to another operating system
US20090094447A1 (en)Universal serial bus flash drive for booting computer and method for loading programs to the flash drive
CN1017942B (en)Method for preventing unauthorized access to BIOS
CN109426613B (en)Method for retrieving debugging data in UEFI and computer system thereof
CN1058664A (en)Loading system is with reference to the Apparatus and method for of disk map from personal computer system's subregion
CN1017838B (en)Loading of original BIOS of personal computer system
CN1049731A (en)Reduce the apparatus and method of BIOS memory space among the personal computer system
CN1049730A (en) Apparatus and method for loading basic input/output system from floppy disk in personal computer system
CN1399194A (en)Method and system for creating and using operation system with optional functions
WO2018076792A1 (en)Method and device for disk management in arm device and arm device
CN1708746A (en) Detachable device and method of starting program
US7234055B2 (en)Computer operating booting system making use of multi-buttons
CN104679540A (en)Computer system and computer system starting method
CN1641524A (en) Multi-key boot system and method for multiple operating systems
US8510543B1 (en)Firmware supporting multiple boot paths
CN107135462B (en) Bluetooth pairing method and computing system of UEFI firmware
CN114490010A (en) Resource operation control method, electronic device, chip and readable storage medium
US20070005871A1 (en)Using a block device interface to invoke device controller functionality
WO2012155439A1 (en)System and method for bios booting
US12321756B2 (en)Disabling software persistence
TW201734800A (en)Method for setting redundant array of independent disks
CN1402125A (en) Method and system for directly starting personal digital assistant operating system with hardware components

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
C17Cessation of patent right
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20070523

Termination date:20110114


[8]ページ先頭

©2009-2025 Movatter.jp