Summary of the invention
In view of this, the object of the invention is to propose a kind of method starting the operating system from storage medium, can from there is no the memory device of os starting source option among BIOS, not start the operating system.
The method starting the operating system from storage medium, comprising: start and be arranged on the master operating system in computer host hard disk or the first storage medium; Exterior storage medium detected, start the installation procedure in described exterior storage medium, the kernel of the second operating system in described exterior storage medium, initial file system bag, boot files and boot configuration file are copied in described computer host hard disk or the first storage medium, and increase startupoptions in the boot configuration file of described master operating system, make user in start-up course, can select to start master operating system or start the second operating system; Wherein, the boot files of the second operating system, kernel, initial file system bag can move successively in described master operating system bootup process; Restart main frame and in described master operating system bootup process, judgement need to start the second operating system, from described exterior storage medium, starting the second operating system; Wherein, the BIOS of main frame supports to start master operating system from described host hard drive or the first storage medium, does not support to start the second operating system from described exterior storage medium.
According to one embodiment of present invention, further, restart main frame and start described master operating system, when the boot of the described master operating system of operation, provide startupoptions to select for user, in described startupoptions, select to start the second operating system; Move the boot of described the second operating system, the initial file system bag and the kernel bag that load this second operating system move in internal memory; In internal memory, move in the initial file system bag of this second operating system and the process of kernel bag, according to this second operating system features, search for the described exterior storage medium at its place; The exterior storage medium at this second operating system place of carry or image file, in internal memory, move this complete second operating system.
According to one embodiment of present invention, further, the boot of described master operating system is main BootLoader program; The boot of described the second operating system is the 2nd BootLoader program; According to one embodiment of present invention, further, in described exterior storage medium, store startup secondary file and the installation procedure file thereof of a plurality of the second operating systems; Start the installation procedure in described exterior storage medium, the startup secondary file of a plurality of the second operating systems in described exterior storage medium is copied in described computer host hard disk, and the file of the second operating system comprises: the kernel of operating system, initial file system bag, boot files and boot configuration file; Revise the boot configuration file of described master operating system, increase startupoptions, make user in start-up course, can select to start master operating system or start the second operating system.
According to one embodiment of present invention, further, the second operating system features comprises: unique filename or UUID; Described master operating system and described the second operating system are class Unix operating system, comprising: (SuSE) Linux OS; Described the first storage medium, exterior storage medium comprise: portable hard drive, USB flash disk or flash memory, by USB interface access host; Described USB interface is USB2.0 or USB3.0 interface.
The object of the invention is to propose a kind of device starting the operating system from storage medium, can from there is no the memory device of os starting source option among BIOS, not start the operating system.
The device starting the operating system from storage medium, comprising: master operating system start unit, for starting the master operating system that is arranged on computer host hard disk or the first storage medium; The second operating system copied cells, for detection of arriving exterior storage medium, start the installation procedure in described exterior storage medium, the kernel of the second operating system in described exterior storage medium, initial file system bag, boot files and boot configuration file are copied in described computer host hard disk or the first storage medium, and increase startupoptions in the boot configuration file of described master operating system, make user in start-up course, can select to start master operating system or start the second operating system; Wherein, the boot of the second operating system, kernel, initial file system can be moved successively in described master operating system start-up course; The second os starting unit for restarting main frame and in described master operating system start-up course, judgement need to start the second operating system, starts the second operating system from described exterior storage medium; Wherein, the BIOS of main frame supports to start master operating system from described host hard drive or the first storage medium, does not support to start the second operating system from described exterior storage medium.
According to one embodiment of present invention, further, restart main frame and start described master operating system, when the boot of the described master operating system of operation, provide startupoptions to select for user, in described startupoptions, select to start the second operating system; Described the second os starting unit moves the boot of described the second operating system, and the initial file system bag and the kernel bag that load this second operating system move in internal memory; Described the second os starting unit moves in the initial file system bag of this second operating system and the process of kernel bag in internal memory, searches for the described exterior storage medium at its place according to this second operating system features; The exterior storage medium at described second this second operating system place of os starting unit carry or image file, in internal memory, move this complete second operating system.
According to one embodiment of present invention, further, the boot of described master operating system is main BootLoader program; The boot of described the second operating system is the 2nd BootLoader program;
According to one embodiment of present invention, further, in described exterior storage medium, store the file of a plurality of the second operating systems; Described the second operating system copied cells starts the installation procedure in described exterior storage medium, by the file copy of a plurality of the second operating systems in described exterior storage medium, in described computer host hard disk, the file of the second operating system comprises: the kernel of operating system, initial file system bag, boot files and boot configuration file; Described the second operating system copied cells is revised the boot configuration file of described master operating system, increases startupoptions, makes user in start-up course, can select to start master operating system or start the second operating system.
According to one embodiment of present invention, further, the second operating system features comprises: unique filename or UUID; Described master operating system and described the second operating system are class Unix operating system, comprising: (SuSE) Linux OS; Described the first storage medium, exterior storage medium comprise: portable hard drive, USB flash disk or flash memory, by USB interface access host; Described USB interface is USB2.0 or USB3.0 interface.
As can be seen from above, the method and apparatus starting the operating system from storage medium provided by the invention, can from there is no the memory device of os starting source option among BIOS, not start the operating system, make user can not be subject to the restriction of computer hardware, carry out easily computer utility, expanded user's range of application.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
Fig. 1 is the block diagram of an embodiment of the method starting the operating system from storage medium of the present invention.As shown in Figure 1:
Step 101, starts and is arranged on the master operating system in computer host hard disk or the first storage medium.In BIOS, support to start master operating system from host hard drive or the first storage medium, do not support to start the second operating system from exterior storage medium.
BIOS is the abbreviation of " Basic Input Output System ", for Basic Input or Output System (BIOS), it is one group and is cured to the program on a rom chip on the interior mainboard of computing machine, self-check program and system self-triggered program after the program of the most important basic input and output of its in store computing machine, system configuration information, start, its major function provides the bottom, the most direct hardware setting and control for computing machine.
Step 102, exterior storage medium detected, start the installation procedure in exterior storage medium, the kernel of the second operating system in exterior storage medium, initial file system bag, boot files and boot configuration file are copied in computer host hard disk or the first storage medium, and increase startupoptions in the boot configuration file of master operating system, make user in start-up course, can select to start master operating system or start the second operating system.
The boot files of the second operating system, kernel, initial file system bag can move successively in described master operating system bootup process.
Step 103, is restarting main frame and in described master operating system bootup process,, judgement need to start the second operating system, starts the second operating system from exterior storage medium.
" master operating system " of the present invention and " the second operating system " is upper for difference for describing, and comprising: the operating systems such as windows, linux, unix, or can be Embedded operating system.
" first " of the present invention, " second " are upper for difference for describing, not other special implications.
According to one embodiment of present invention, restart main frame and start master operating system, when the boot of operation master operating system, eject startupoptions frame, provide startupoptions to select for user, in startupoptions, select to start the second operating system.
Move the boot of the second operating system, the initial file system bag and the kernel bag that load this second operating system move in internal memory.
In internal memory, move in the initial file system bag of this second operating system and the process of kernel bag, according to this second operating system features, search for the exterior storage medium at its place.
The exterior storage medium at this second operating system place of carry or image file, in internal memory, move this complete second operating system.
According to one embodiment of present invention, master operating system comprises: the main BootLoader program of master operating system, the master configuration file of main BootLoader program.
BootLoader program is exactly one section of small routine of operation before operating system nucleus operation.By this section of small routine, we can initiating hardware equipment, set up memory headroom mapping graph, thereby take the hardware environment of system to a proper states, to be ready to correct environment for final call operation system kernel.In embedded system, common not firmware program as BIOS, some embedded type CPUs also can embedded one section of short and small start-up routine, so the loading initiating task of whole system is just completed by BootLoader completely.
The configuration file of BootLoader program: realize the automatic configuration of the lower systematic parameter of BootLoader program, just must notify which parameter that has of BootLoader program to change or to configure.These information are transmitted by self-defining configuration file, and configuration file plays function served as bridge in whole process, are the interfaces that user and BootLoader program are carried out information communication.Therefore, the content of configuration file not only will have good readability and alterability concerning user, and in BootLoader, will be easy to resolve.
The file of the second operating system comprises: the 2nd BootLoader program of the initial file system bag of the second operating system and kernel bag, the second operating system, the second configuration file of the 2nd BootLoader program.The initial file system bag of the second operating system and kernel bag, the 2nd BootLoader program can be moved in the start-up course of master operating system.
Revise master configuration file, increase startupoptions, make user in start-up course, can select to start master operating system or start the second operating system.
According to one embodiment of present invention, operating system 1 place medium 1, as the hard disk on main frame, operating system 1 comprises: the Bootloader1 in operating system 1, the configuration file 1 of the Bootloader1 in operating system 1.The file of the second operating system comprises: the kernel of operating system, initial file system bag, boot files and boot configuration file.
The installation procedure of operating system 2 on medium 2 is included in the file that copies to operating system 1 Shang place medium 1 in operating system 1 after operation.For example, the configuration file 2 of Bootloader2, operating system 2 Bootloader2 on operating system 1 of operating system 2 in operating system 1, operating system 2 is (as the kernel bag of operating system 2 in operating system 1, the initial file system bag of operating system 2 in operating system 1) in operating system 1 Shang core.
The medium 2 at operating system 2 places, as USB flash disk, portable hard drive, SD card, SSD.Operating system 2 can be file system on storage medium or the image file in the file system on storage medium.
According to one embodiment of present invention, from operating system 1 place medium 1, start, operation system 1, by the Peripheral Interface on operating system 2 place medium 2 update system 1 place media 1, as USB interface.The Bootloader2 of replicate run system 2 in operating system 1 is in operating system 1 medium, the configuration file 2 of the Bootloader2 of replicate run system 2 in operating system 1 is in operating system 1 medium, replicate run system 2 in operating system 1 Shang core in operating system 1 medium, if the kernel bag of replicate run system 2 in operating system 1 is in operating system 1 medium, the file system bag of replicate run system 2 in operating system 1 is in operating system 1 medium.
Installation procedure in operating system 1 completes configuration modification work, and the configuration file 1 of the Bootloader1 of retouching operation system 1 increases by one and starts options, and this is realized Bootloader1 and carries out Bootloader2.
According to one embodiment of present invention, installation process finishes rear reboot operation system 1, select the startup item of operating system 2, operating system 2 cores in load operation system 1 file system (as operating system 2 kernel bags and operating system 2 initial file system bags) are to internal memory operation.In internal memory, operating system 2 cores are according to operating system 2 signature search operating system 2 place media 2, and carry operating system 2 place media or image file be to internal memory, operation system 2.
According to one embodiment of present invention, exterior storage medium comprises the file of a plurality of the second operating systems.By the file copy of a plurality of the second operating systems in exterior storage medium in computer host hard disk.Revise master configuration file, increase startupoptions, make user in start-up course, can select to start master operating system or start second operating system of a plurality of the second operating systems.
According to one embodiment of present invention, start master operating system, wherein, in startupoptions, select to start second operating system.According to the second configuration file of the 2nd BootLoader program of the second operating system therewith, move this 2nd BootLoader program, the initial file system bag and the kernel bag that load this second operating system move in internal memory.
In internal memory, move in the initial file system bag of this second operating system and the process of kernel bag, according to this second operating system features, search for the exterior storage medium at its place.The exterior storage medium at this second operating system place of carry or image file, in internal memory, move this complete second operating system.
According to one embodiment of present invention, the second operating system features comprises: unique filename or UUID.Master operating system and the second operating system are class Unix operating system, comprising: (SuSE) Linux OS.The first storage medium, exterior storage medium comprise: portable hard drive, USB flash disk or flash memory, and by USB interface access host.USB interface is USB2.0 or USB3.0 interface.
According to one embodiment of present invention, operating system 2 has unique search characteristics, as filename, UUID etc.Operating system 2 cores are according to operating system 2 signature search operating system 2 place media 2, and carry operating system 2 place media 2 or image file, to internal memory, move complete operating system 2.
According to one embodiment of present invention, user has a USB flash disk, on USB flash disk, there is LINUX operating system, user is owing to there being special circumstances need to use at once the data in USB flash disk, but the BIOS of the computing machine that can use does not support to start the operating system from USB flash disk, the operating system that this computing machine carries is that WINDOWS or operating system have fault, by method of the present invention, user can start from USB flash disk and start LINUX operating system, usage data.
Fig. 2 is the schematic diagram of an embodiment of the device starting the operating system from storage medium of the present invention.As shown in Figure 2: the device 21 starting the operating system from storage medium comprises: master operating system start unit 211, the second operating system copied cells 212, the second os starting unit 213213.
211 startups of master operating system start unit are arranged on the master operating system in computer host hard disk or the first storage medium.
The second operating system copied cells 212 detects exterior storage medium, start the installation procedure in described exterior storage medium, the kernel of the second operating system in described exterior storage medium, initial file system bag, boot files and boot configuration file are copied in described computer host hard disk or the first storage medium, and increase startupoptions in the boot configuration file of described master operating system, make user in start-up course, can select to start master operating system or start the second operating system; Wherein, the boot of the second operating system, kernel, initial file system can be moved successively in described master operating system start-up course.
Main frame is being restarted and in described master operating system start-up course, judgement need to start the second operating system in the second os starting unit 213, starts the second operating system from described exterior storage medium; Wherein, the BIOS of main frame supports to start master operating system from described host hard drive or the first storage medium, does not support to start the second operating system from described exterior storage medium.
According to one embodiment of present invention, restart main frame and start master operating system, when the boot of operation master operating system, eject startupoptions frame, provide startupoptions to be chosen in selection in startupoptions for user and start the second operating system.
The boot of described the second operating system of the second os starting unit 213 operation, the initial file system bag and the kernel bag that load this second operating system move in internal memory.
The second os starting unit 213 moves in the initial file system bag of this second operating system and the process of kernel bag in internal memory, searches for the described exterior storage medium at its place according to this second operating system features.
The exterior storage medium at second this second operating system place of os starting unit 213 carries or image file, in internal memory, move this complete second operating system.
According to one embodiment of present invention, the boot of master operating system is main BootLoader program.The boot of the second operating system is the 2nd BootLoader program.
According to one embodiment of present invention, in exterior storage medium, store the file of a plurality of the second operating systems.
The installation procedure that the second operating system copied cells 212 starts in exterior storage medium, by the file copy of a plurality of the second operating systems in exterior storage medium, in computer host hard disk, the file of the second operating system comprises: the kernel of operating system, file system bag, boot files and boot configuration file.
The second operating system copied cells 212 is revised the boot configuration file of master operating system, increases startupoptions, makes user in start-up course, can select to start master operating system or start the second operating system.
The method and apparatus starting the operating system from storage medium provided by the invention, makes user can not be subject to the restriction of computer hardware, carries out easily computer utility, has expanded user's range of application.
May realize in many ways method and system of the present invention.For example, can realize method and system of the present invention by any combination of software, hardware, firmware or software, hardware, firmware.The said sequence that is used for the step of method is only in order to describe, and the step of method of the present invention is not limited to above specifically described order, unless otherwise specified.In addition, in certain embodiments, can be also the program being recorded in recording medium by the invention process, these programs comprise for realizing the machine readable instructions of the method according to this invention.Thereby the present invention also covers storage for carrying out the recording medium of the program of the method according to this invention.
Description of the invention provides for example with for the purpose of describing, and is not exhaustively or limit the invention to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.Selecting and describing embodiment is for better explanation principle of the present invention and practical application, thereby and makes those of ordinary skill in the art can understand the various embodiment with various modifications that the present invention's design is suitable for special-purpose.