Patent Publication Number: US-2018052672-A1

Title: Portable storage device and method of installing operating system from portable device

Description:
FIELD 
     The subject matter herein generally relates to portable storage devices and operating system installation methods. 
     BACKGROUND 
     A portable storage device can be used to install an operating system for a bare computer. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Implementations of the present technology will now be described, by way of example only, with reference to the attached figures. 
         FIG. 1  is a block diagram of one exemplary embodiment of a portable storage device. 
         FIG. 2  is a flowchart of one exemplary embodiment of an operating system installation method. 
     
    
    
     DETAILED DESCRIPTION 
     It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, components have not been described in detail so as not to obscure the related relevant feature being described. Also, the description is not to be considered as limiting the scope of the embodiments described herein. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features of the present disclosure. 
     The term “comprising,” when utilized, means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in the so-described combination, group, series, and the like. 
     The present disclosure is described in relation to a portable storage device and an operating system installation method for a bare computer. 
       FIG. 1  illustrates an exemplary embodiment of a portable storage device  10 . The portable storage device  10  is configured to install an operating system for a bare computer  20 . The portable storage device  10  is configured to be connected to the bare computer  20 . The portable storage device  10  comprises a storage chip  30 , a control chip  40 , and an interface  50 . The storage chip  30  stores an operating system program. In at least one exemplary embodiment, the bare computer  20  is a server, the interface  50  is a universal serial bus (USB) interface and/or is a serial advanced technology attachment (SATA) interface. 
     The control chip  40  comprises a detection unit  41 , a determining unit  42 , a setting unit  43 , a processing unit  44 , a writing unit  45 , an adjusting unit  46 , and a switching unit  47 . 
     The bare computer  20  is started by a user. The bare computer  20  is configured to enter a basic input output system (BIOS) interface after the bare computer  20  is powered on. The user sets startup options after the bare computer  20  enters the BIOS interface. The portable storage device  10  is configured to be set to be a first startup option. The bare computer  20  is further configured to be restart after the portable storage device  10  is set to be the first startup option. Thus, the bare computer  20  can be restarted by the portable storage device  10 . 
     The detection unit  41  is configured to detect hard disks of the bare computer  20 , and their respective statuses, after the bare computer  20  is restarted by the portable storage device  10 . The situation of hard disks of the bare computer  20  includes information as to whether there are usable hard disks in the bare computer  20 . The detection unit  41  is also configured to obtain a quantity of usable hard disks of the bare computer  20  after the information confirms usable hard disks in the bare computer  20 . The determining unit  42  is configured to determine whether the quantity of usable hard disks of the bare computer  20  is greater than one after the detection unit  41  obtains the quantity of usable hard disks of the bare computer  20 . When the quantity of usable hard disks of the bare computer  20  is greater than one, the bare computer  20  displays in order a first hard disk, a second hard disk, a third hard disk, . . . , and an N hard disk. The setting unit  43  is configured to set the first hard disk and the second hard disk to be a system disk if the quantity of usable hard disks of the bare computer  20  is greater than one. The processing unit  44  is configured to set the system disk to be a redundant array of independent disks (RAID) system disk. The setting unit  43  also is configured to set the only hard disk to be the system disk if the quantity of usable hard disks of the bare computer  20  is equal to one. 
     The writing unit  45  is configured to write the operating system program to the system disk. The adjusting unit  46  is configured to readjust a partition size of the system disk after the writing unit  45  writes the operating system program to the system disk. The switching unit  47  is configured to switch the startup option of the bare computer  20  to be the system disk from the portable storage device  10  after the adjusting unit  46  readjusts the partition size of the system disk. The system disk is configured to finish starting of the bare computer  20  to enable the bare computer  10  to enter a normal working interface of the operating system without being restarted after the switching unit  47  switches the startup option of the bare computer  20  to be the system disk from the portable storage device  10 . The portable storage device  10  is configured to be removable from the bare computer  20  after the system disk finishes starting of the bare computer  20 . 
     In one exemplary embodiment, the storage chip  30  also stores application programs, and the writing unit  45  is configured to write the operating system program and the application programs to the system disk. 
       FIG. 2  illustrates a flowchart of a method in accordance with an example embodiment. An operating system installation method is provided by way of example, as there are a variety of ways to carry out the method. The operating system installation method described below can be carried out using the configurations illustrated in  FIG. 1 , for example, and various elements of these figures are referenced in explaining operating system installation method. The illustrated order of blocks is by example only and the order of the blocks can change. Additional blocks may be added or fewer blocks may be utilized without departing from this disclosure. The operating system installation method can begin at block  101 . 
     At block  101 , the portable storage device  10  is inserted into the bare computer  20 . 
     At block  102 , the bare computer  20  is started and enters the BIOS interface. The user sets or resets the startup options, and the portable storage device  10  is set to be the first startup option. 
     At block  103 , the bare computer  20  is restarted by the portable storage device  10 . 
     At block  104 , the detection unit  41  detects the hard disk status of the bare computer  20  to obtain the quantity of hard disks of the bare computer  20  and the usability of same. 
     At block  105 , the determining unit  42  determines whether the quantity of usable hard disks of the bare computer  20  is greater than one. If yes, the method goes to block  106 ; if no, the method goes to block  107 . 
     At block  106 , the setting unit  43  sets first hard disk and the second hard disk of the bare computer  20  to be the system disk, and the method goes to block  108 . 
     At block  107 , the setting unit  43  sets the first hard disk of the bare computer  20  to be the system disk, then the method goes to block  109 . 
     At block  108 , the processing unit  44  sets the system disk to be a RAID system disk. 
     At block  109 , the writing unit  45  writes the operating system program to the system disk. 
     At block  110 , the adjusting unit  46  readjusts the partition size of the system disk. 
     At block  111 , the switching unit  47  switches the startup option of the bare computer  20  to be the system disk from the portable storage device  10 . 
     At block  112 , the system disk finishes starting of the bare computer  20  to enable the bare computer  10  to enter a normal working interface of the operating system without being restarted. 
     At block  109 , the writing unit  45  writes other application programs together with the operating system program to the system disk when the portable storage device  10  stores other application programs. 
     At block  110 , the adjusting unit  46  readjusts the partition size of the system disk to adjust disk space of the system disk. 
     At block  112 , the portable storage device  10  can be removed from the bare computer  20  after the system disk finishes starting of the bare computer  20 . The bare computer  20  can enter a normal working interface of the operating system, thus, the bare computer  20  can be used by a user. 
     In the exemplary embodiment, the setting unit  43  sets the first and second hard disks of the bare computer  20  to be the system disk if the quantity of usable hard disks of the bare computer  20  is determined to be greater than one, then the processing unit  44  sets the system disk to be a RAID system disk. The writing unit  45  can write the operating system program to the system disk. If one or other of the first and second hard disks is damaged, the remaining hard disk can be used, thereby avoiding non-access to the operating system if one hard disk is damaged. 
     It is to be understood that even though numerous characteristics and advantages have been set forth in the foregoing description of embodiments, together with details of the structures and functions of the embodiments, the disclosure is illustrative only and changes may be made in detail, including in the matters of shape, size, and arrangement of parts within the principles of the disclosure to the full extent indicated by the broad general meaning of the terms in which the appended claims are expressed.