CN106293708A - Information processing method and storage device - Google Patents

Information processing method and storage device Download PDF

Info

Publication number
CN106293708A
CN106293708A CN201610615799.4A CN201610615799A CN106293708A CN 106293708 A CN106293708 A CN 106293708A CN 201610615799 A CN201610615799 A CN 201610615799A CN 106293708 A CN106293708 A CN 106293708A
Authority
CN
China
Prior art keywords
byte
boot variable
operating system
storage medium
variable
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
CN201610615799.4A
Other languages
Chinese (zh)
Other versions
CN106293708B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610615799.4A priority Critical patent/CN106293708B/en
Publication of CN106293708A publication Critical patent/CN106293708A/en
Priority to US15/664,038 priority patent/US20180032351A1/en
Application granted granted Critical
Publication of CN106293708B publication Critical patent/CN106293708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a kind of information processing method and electronic equipment, described method includes: install the first operating system;Obtain store path and the systematic name of described first operating system of the guidance code of described first operating system;According to described store path and described systematic name, generate boot variable;In storing the 1st sector of the first storage medium of described guidance code, the reserve bytes of storage protection leader record stores described boot variable.

Description

Information processing method and storage device
Technical field
The present invention relates to areas of information technology, particularly relate to a kind of information processing method and storage device.
Background technology
Some operating system (such as Extensible Firmware Interface (Unified Extensible Firmware Interface, UEFI) operating system) after installing, can guide the flash memory flash of UEFI generates a UEFI Variable record UEFI operating system to the store path of bootstrap.This UEFI boot variable the most also can record operation system The title of system.
Owing to UEFI boot variable is stored in the flash of UEFI, if storage has described operating system code and guides generation When the storage medium of code is moved in another electronic equipment (such as electronic equipment A), the flash of the UEFI of electronic equipment A In do not store this UEFI boot variable, therefore the guidance code of UEFI operating system cannot be found to carry out UEFI operating system Guide.
Summary of the invention
In view of this, embodiment of the present invention expectation provides a kind of information processing method and electronic equipment, at least partly solves The problems referred to above.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
Embodiment of the present invention first aspect provides a kind of information processing method, including:
First operating system is installed;
Obtain store path and the systematic name of described first operating system of the guidance code of described first operating system;
According to described store path and described systematic name, generate boot variable;
In storing the 1st sector of the first storage medium of described guidance code, the reserved word of storage protection leader record Joint stores described boot variable.
Based on such scheme, described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described in storing the 1st sector of the first storage medium of described guidance code, the guarantor of storage protection leader record Write down characters and store described boot variable in saving, including:
Described store path is stored in described store path byte;
Described systematic name is stored in described systematic name byte;
The partition identification of described guidance code place subregion is stored in described partition holding byte.
Based on such scheme, described guiding entry field includes store path byte length byte and systematic name length word Joint;
Described method also includes:
Byte number needed for described storage variable storage is stored in described store path length byte;
The required byte number of described systematic name storage is stored in described systematic name length byte.
Based on such scheme, described guiding entry field includes origin identification byte and check byte;
Described method also includes:
Origin identification is stored in described origin identification byte;
The check code storing data in described guiding entry field is stored in described check byte.
Based on such scheme, described method also includes:
When starting described first operating system, from described first storage medium, read the first boot variable;
Read the second boot variable in the second storage medium;
Judge that described first boot variable is the most consistent with described second boot variable;
When described first boot variable and described second boot variable are inconsistent, read according to described first boot variable The guidance code of described first operating system.
Based on such scheme, described when described first boot variable and described second boot variable are inconsistent, according to institute State the first boot variable and read the guidance code of described first operating system, including:
When described first boot variable and described second boot variable are inconsistent, described first boot variable is replaced institute State the second boot variable in the second storage medium;
Based on described second boot variable after replacing, read the guidance code of described first operating system.
Based on such scheme, described method also includes:
When described first boot variable is consistent with described second boot variable, read institute according to described second boot variable State guidance code.
Embodiment of the present invention second aspect provides a kind of electronic equipment, including processor and with depositing that described processor is connected Reservoir, described memorizer at least includes the first storage medium removably connected with described processor:
Described processor, for installing the first operating system;Obtain the storage of the guidance code of described first operating system Path and the systematic name of described first operating system;According to described store path and described systematic name, generate boot variable; In storing the 1st sector of the first storage medium of described guidance code, the reserve bytes of storage protection leader record stores Described boot variable.
Based on such scheme, described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described processor, specifically for storing described storage in the described store path byte of described first storage medium Path, stores in described systematic name byte in described systematic name and described partition holding byte and stores described guidance code The partition identification of place subregion.
Based on such scheme, described guiding entry field includes store path byte length byte and systematic name length word Joint;
Described processor, is additionally operable in the described store path length byte of described first storage medium described in storage deposit Byte number needed for storage variable storage, stores the required byte number of described systematic name storage in described systematic name length byte.
Based on such scheme, described guiding entry field includes origin identification byte and check byte;
Described processor, is additionally operable in the described origin identification byte of described first storage medium store origin identification, Described check byte stores the check code storing data in described guiding entry field.
Based on such scheme, described memorizer also includes second storage medium different from described first storage medium;Institute State processor to be connected with described second storage medium;
Described processor, is additionally operable to when starting described first operating system, reads the from described first storage medium One boot variable;Read the second boot variable in the second storage medium;Judge that described first boot variable and described second draws Lead variable the most consistent;When described first boot variable and described second boot variable are inconsistent, guide according to described first Variable reads the guidance code of described first operating system.
Based on such scheme, described processor, specifically for when described first boot variable and described second boot variable Time inconsistent, described first boot variable is replaced the second boot variable in described second storage medium;After replacing Described second boot variable, reads the guidance code of described first operating system.
Based on such scheme, described processor, it is additionally operable to when described first boot variable and described second boot variable one During cause, read described guidance code according to described second boot variable.
The embodiment of the present invention third aspect provides a kind of electronic equipment, including:
Installation unit, for installing the first operating system;
Acquiring unit, for obtaining the store path of the guidance code of described first operating system and described first operation system The systematic name of system;
Signal generating unit, for according to described store path and described systematic name, generates boot variable;
Memory element, in storing the 1st sector of the first storage medium of described guidance code, storage protection guides The reserve bytes of record stores described boot variable.
The information processing method of embodiment of the present invention offer and electronic equipment, can store boot variable and guidance code In same storage medium, when so this storage medium migrates, boot variable and guidance code synchronous migration, like this, no Can because boot variable and guidance code the most together migrate, cause cannot according to boot variable, read guidance code and then The problem that cannot guide the first operating system caused;Boot variable also includes the systematic name of the first operating system simultaneously, Therefore ensure that the correctness of the systematic name of the first operating system simultaneously.Additionally, in the present embodiment described boot variable is write Entering in the reserve bytes of the protection leader record of the first storage medium, reserve bytes here temporarily defines to specific for reserved The storage byte of information.So can avoid taking the first storage medium and distribute to the storage byte of other information, reduce information Memory contention, there is strong feature compatible with prior art.
Accompanying drawing explanation
The schematic flow sheet of the first information processing method that Fig. 1 provides for the embodiment of the present invention;
The schematic layout pattern of a kind of first storage medium that Fig. 2 provides for the embodiment of the present invention;
The storage schematic diagram of a kind of PMBR that Fig. 3 provides for the embodiment of the present invention;
The schematic flow sheet of the second information processing method that Fig. 4 provides for the embodiment of the present invention;
The structural representation of the first electronic equipment that Fig. 5 provides for the embodiment of the present invention;
The structural representation of the second electronic equipment that Fig. 6 provides for the embodiment of the present invention;
The structural representation of the third electronic equipment that Fig. 7 provides for the embodiment of the present invention;
The schematic flow sheet of the third information processing method that Fig. 8 provides for the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with Figure of description and specific embodiment, technical scheme is further elaborated.
Embodiment one:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
Information processing described in the present embodiment processes method and can apply in various electronic equipment, such as, desktop computer, The various electronic equipments such as notebook computer, panel computer or server.
Described guidance code can be referred to as again bootstrap, for guiding the code of described first os starting.
Described step S110 installs the first operating system, and described operating system can be various types of operating system, such as Common Windows system etc.;The most described first operating system can be also UEFI system etc..Installing described the After one operating system, the 1st fan that the operation code of described first operating system is storable in described first storage medium The protection MBR Protective Master Boot Record, PMBR in district) portion reserve bytes in.Such as, example As, described first storage medium is the storage medium of magnetic disc contingency table (GUID Partition Table, GPT) form.Then may be used The reserve bytes of the PMBR described boot variable is stored in the first storage medium of described GPT form.
It is illustrated in figure 2 the GPT format layout schematic diagram of described first storage medium;Described first storage medium includes main Subregion form district, backup subregion form district and each subregion.
In described Zhu Fen form district, storage has PMBR and subregion form (Partition Table Header, PTH).Institute State the storage of the back of the body anti-subregion form district and have the subregion form for backup.
The subregion entry field of subregion gauge outfit and each subregion is included at described subregion form.N-th cuts entrance Field at least may be used to indicate original position and the final position of the n-th subregion.In figure 3, described LBA is logical blocks ground Location, for Logical Bloock Address;LBA0 represents the 1st logical block addresses 0, and LBA1 represents logical block addresses 1, LBAm represents logical blocks m.One described logical block addresses is corresponding to a logical blocks.
Table 1 can be the definition of the PMBR of the first storage medium of a kind of described GPT form:
Table 1
Store path and the systematic name of the guidance code of described first operating system will be obtained in the present embodiment, permissible By electronic equipment by perform preset program code, automatically according to the storage position of bootstrap, generate described store path and Systematic name;Electronic equipment automatically generates, and has the advantages that error rate is low.
Boot variable will be generated in step s 130 according to store path and systematic name.The most often guide Code is in storage hard disk, and described bootstrap is stored in BIOS, facilitates BIOS performing described guidance code, according to depositing Storage boot variable in BIOS, described bootstrap is read, to complete os starting in the corresponding storage position to hard disk Bootup process.But in the present embodiment, described boot variable and described guidance code can be stored in same storage to be situated between Matter, this storage medium is referred to as the first storage medium in the present embodiment.Like this, set from an electronics when the first storage medium Standby, when moving in another electronic equipment, electronic equipment can still can become according to the guiding in this first storage medium Amount, obtains the storage position of described boot variable, and can accurately obtain according to described boot variable and be positioned at described first storage The systematic name of the first operating system in medium.Obviously, by stored along to described boot variable and guidance code same In storage medium, the easy storage medium in prior art that solves migrates the boot variable loss or the problem of mistake caused.
And in the present embodiment in order to avoid the adverse effect that the first storage medium is stored at present, can be by the present embodiment In the reserve bytes of the PMBR that described boot variable is stored in described 1st sector, so can realize good with prior art Compatibility, has compatible strong feature.
Embodiment two:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described step S140 comprises the steps that
Described store path is stored in described store path byte;
Described systematic name is stored in described systematic name byte;
The partition identification of described guidance code place subregion is stored in described partition holding byte.
Electronic equipment reads described boot variable the most for convenience, is provided with in this example and stores institute specially State guiding entry field, and read described boot variable in order to the easiest in the present embodiment, be provided with in the present embodiment The store path of store path byte storage boot variable, is provided with systematic name byte and stores the system name of the first operating system Claim.Storage may have multiple subregion in the first storage medium, described boot variable may store in any one subregion, at this In embodiment, the most described electronic equipment reads described boot variable, is also provided with partition holding byte, is used for storing institute State the partition identification of guidance code place subregion.So convenient, electronic equipment combines described boot variable and described partition identification, Described guidance code is read to corresponding subregion.The storage of the present embodiment offer boot variable is simple and easy to do.
The reserve bytes of described PMBR has 440 bytes, stores multiple operating systems when described first storage medium has When operation code and guidance code, it is clear that the boot variable of the guidance code that 440 bytes may be used for multiple operating system is deposited Storage.As it is shown on figure 3, storage has s boot variable in 440 bytes, it may include guide entry field 1, guide entry field 2 ... and guide entry field s etc..
Embodiment three:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described step S140 comprises the steps that
Described store path is stored in described store path byte;
Described systematic name is stored in described systematic name byte;
The partition identification of described guidance code place subregion is stored in described partition holding byte.
Described guiding entry field includes store path byte length byte and systematic name length byte;
Described method also includes:
Byte number needed for described storage variable storage is stored in described store path length byte;
The required byte number of described systematic name storage is stored in described systematic name length byte.
Length and the length of system name title guiding store path in entry field distinguished by convenient energy electronic equipment, with letter The reading of notelet breath and parsing.The most described guiding entrance byte also introduces store path length byte and is System Name Length byte, indicates the required byte number of corresponding informance.
Embodiment four:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described step S140 comprises the steps that
Described store path is stored in described store path byte;
Described systematic name is stored in described systematic name byte;
The partition identification of described guidance code place subregion is stored in described partition holding byte.
Described guiding entry field includes store path byte length byte and systematic name length byte;
Described method also includes:
Byte number needed for described storage variable storage is stored in described store path length byte;
The required byte number of described systematic name storage is stored in described systematic name length byte.
Described guiding entry field includes origin identification byte and check byte;
Described method also includes:
Origin identification is stored in described origin identification byte;
The check code storing data in described guiding entry field is stored in described check byte.
Store origin identification by origin identification byte in the present embodiment, so facilitate electronic equipment to pass through origin identification Scanning or reading, the easy reading confirming to have had been enter into boot variable at present.
Additionally, in order to ensure the accurateness of information, the most also introduce check byte, check byte stores school Testing code, this check code can be used for guiding other information in entry field to verify, if verification is correct, then it is assumed that work as leading In introducing port byte, the boot variable of storage is correct, and otherwise it is believed that there is mistake, to prevent the phenomenon illegally distorted, lifting is drawn Lead the memory reliability of variable.
Table 2 is the definition of a kind of described guiding entry field:
Table 2
Embodiment five:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
As shown in Figure 4, described method also includes:
Step S210: when starting described first operating system, reads the first guiding from described first storage medium and becomes Amount;
Step S220: read the second boot variable in the second storage medium;
Step S230: judge that described first boot variable is the most consistent with described second boot variable;
Step S240: when described first boot variable and described second boot variable are inconsistent, draw according to described first Lead variable and read the guidance code of described first operating system.
First operating system is starting in the present embodiment, usual basic input output system (Basic Input Output System, BIOS) the second storage medium in may storage have the second boot variable;In the present embodiment will storage Boot variable in described first storage medium is the first boot variable.But there may be the phenomenon that hard disk migrates, therefore In the present embodiment when reading boot variable, the first boot variable can be read from the first storage medium, then deposit with the second of BIOS The second boot variable in storage media is compared.The most described second storage medium obviously stores with described first Medium is not same storage medium, and is not store described boot variable and the operation code of described first operating system It it is storage medium.
Step S210 specifically comprises the steps that the 1st from the first storage medium storing described guidance code in the present embodiment In the reserve bytes of the protection leader record in sector, read described first boot variable.In step S230, comparison first is drawn Lead variable and the second boot variable.When described first boot variable and described second boot variable are inconsistent, i.e. first guides Variable and the second boot variable are different, then can be as the criterion with the first boot variable, directly read according to the first boot variable and guide generation Code;Obviously so solve hard disk to migrate the guidance code caused and cannot correctly read, so cause cannot normal boot behaviour The problem making system.
It should be noted that: the present embodiment is the further improvement on the basis of any one embodiment aforementioned, described the One boot variable concrete storage position in described first storage medium and concrete storage mode, may refer to embodiment two to Implement four, be not repeated at this.
Embodiment six:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
As shown in Figure 4, described method also includes:
Step S210: when starting described first operating system, reads the first guiding from described first storage medium and becomes Amount;
Step S220: read the second boot variable in the second storage medium;
Step S230: judge that described first boot variable is the most consistent with described second boot variable;
Step S240: when described first boot variable and described second boot variable are inconsistent, draw according to described first Lead variable and read the guidance code of described first operating system.
Described step S240 comprises the steps that
When described first boot variable and described second boot variable are inconsistent, described first boot variable is replaced institute State the second boot variable in the second storage medium;
Based on described second boot variable after replacing, read the guidance code of described first operating system.
Described first boot variable is replaced the second boot variable in the second storage medium, in the present embodiment on the one hand BIOS currently reading to guidance code for convenience;On the other hand the next reading to boot variable of BIOS can be facilitated.
Embodiment seven:
As it is shown in figure 1, the present embodiment provides a kind of information processing method, including:
Step S110: install the first operating system;
Step S120: obtain the store path of the guidance code of described first operating system and described first operating system Systematic name;
Step S130: according to described store path and described systematic name, generates boot variable;
Step S140: in storing the 1st sector of the first storage medium of described guidance code, storage protection leader record Reserve bytes in store described boot variable.
As it is shown on figure 3, described method also includes:
Step S210: when starting described first operating system, reads the first guiding from described first storage medium and becomes Amount;
Step S220: read the second boot variable in the second storage medium;
Step S230: judge that described first boot variable is the most consistent with described second boot variable;
Step S240: when described first boot variable and described second boot variable are inconsistent, draw according to described first Lead variable and read the guidance code of described first operating system.
When the most described first boot variable is consistent with described second boot variable, show that being stored in second deposits Boot variable in storage media is correct, therefore directly can read described guidance code by the second boot variable.
Embodiment eight:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
Processor 110 described in the present embodiment may correspond to various process chip or processes circuit, specifically can include central authorities Processor CPU, Micro-processor MCV, digital signal processor DSP, application processor AP, programmable array PLC or special are integrated Circuit ASIC etc..The most described processor 110 can complete above-mentioned first operating system by performing predetermined code Installation, the operation such as generation of boot variable.
Described memorizer 120 can be various storage medium, the memorizer that the most non-moment storage medium is formed, such as, The memorizer formed by flash memory flash.Such as, described first storage medium 121 can be to deposit the non-moment being made up of flash Reservoir.
Described processor 110 and the first storage medium 121 removably connect, and such first storage medium 121 of working as is dismantled Afterwards, after being connected with other processors, due in same memorizer, both stored the first operating system to operation generation Code, guidance code and described boot variable, facilitate other processors directly according to being stored in the boot variable in this memorizer, Determine the storage position of guidance code, determine the systematic name of the first operating system;Solving in prior art, electronic equipment will Guidance code and boot variable are stored in different memorizeies, after migrating occurs in the first storage medium 121, cause electronics Equipment cannot find guidance code, it is impossible to the problem guiding the first operating system.
The most also show the described processor 110 of connection and the bus 130 of described memorizer 120.Here bus can For various types of buses, it is possible to carry out information mutual, such as, can be pci bus or IIS bus.Here the first storage is situated between Matter 121 can be connected with described processor 110 by the detachable interface in the bus such as pci bus or IIS.
Embodiment nine:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described processor 110, specifically for storing institute in the described store path byte of described first storage medium 121 State store path, described systematic name byte stores in described systematic name and described partition holding byte and draw described in storage Lead the partition identification of code place subregion.
The most described guiding entry field can be field newly-increased in described guiding entry field.In this enforcement In example, Subsequent electronic facility information reads for convenience, can be at least divided into store path byte, be by described guiding entry field System title byte and partition holding byte, such electronic equipment directly according to the information of reading from which byte, determine The current information content read, to simplify the reading of information.Guiding entry field will also include subregion mark in the present embodiment Know, the subregion stored for described guidance code.In certain embodiments, described boot variable may also include described partition identification, The most described partition identification is as the ingredient of described boot variable, it is also possible to as the part outside described boot variable.
Embodiment ten:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
Described protection leader record includes guiding entry field;Described guiding entry field includes store path byte, is System title byte and partition holding byte;Described processor 110, specifically for described in described first storage medium 121 Store path byte stores described store path, described systematic name byte stores described systematic name and described storage Subregion byte stores the partition identification of described guidance code place subregion.
Described guiding entry field includes store path byte length byte and systematic name length byte;Described processor 110, needed for being additionally operable to store described storage variable storage in the described store path length byte of described first storage medium Byte number, stores the required byte number of described systematic name storage in described systematic name length byte.
In the present embodiment, described processor 110, it is additionally operable to the store path length in the first storage medium 121 storage Byte and systematic name byte, write the byte number needed for store path and systematic name, facilitate subsequent processor according to storage Required byte number, read store path and systematic name;Simplify subsequent treatment district to described store path and described system The reading of title.
Embodiment 11:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
Described protection leader record includes guiding entry field;Described guiding entry field includes store path byte, is System title byte and partition holding byte;Described processor 110, specifically for described in described first storage medium 121 Store path byte stores described store path, described systematic name byte stores described systematic name and described storage Subregion byte stores the partition identification of described guidance code place subregion.
Total at the present embodiment, described guiding entry field includes origin identification byte and check byte;Described processor 110, it is additionally operable in the described origin identification byte of described first storage medium store origin identification, described check byte is deposited Store up the check code storing data in described guiding entry field.By the depositing of check code in the introducing of start byte and check byte Storage, a side facilitates the electronic equipment reading to boot variable, on the other hand check code can also be utilized to carry out Information Authentication, really Protect the accuracy of boot variable storage.
Embodiment 12:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
As shown in Figure 6, described memorizer 120 also includes second storage medium different from described first storage medium 121 122;Described processor 110 is connected with described second storage medium 122;
Described processor 110, is additionally operable to when starting described first operating system, from described first storage medium 121 Read the first boot variable;Read the second boot variable in described second storage medium 122;Judge described first boot variable The most consistent with described second boot variable;When described first boot variable and described second boot variable are inconsistent, foundation Described first boot variable reads the guidance code of described first operating system.
Described processor 110, can be specifically for the protection leader record of the 1st sector from described first storage medium 121 Reserve bytes in read described first boot variable.
Described second storage medium 122 can include the storage medium integrally disposed with BIOS in electronic equipment.Described process Setting up to have between device 110 with described second storage medium 122 and be connected, this connection removably connects, it is also possible to be non-removable Unload connection.
Described processor 110 can be by the execution of predetermined code, respectively from the first storage medium 121 and the second storage medium 122 read the first boot variable and the second boot variable, and compare the first boot variable and the second boot variable, determine first When boot variable and the second boot variable difference, it is as the criterion with the first boot variable and reads described guidance code, it is possible to reduce guide Code reads less than the phenomenon that maybe cannot guide the first operating system.
Embodiment 13:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
As shown in Figure 6, described memorizer 120 also includes second storage medium different from described first storage medium 121 122;Described processor 110 is connected with described second storage medium 122;
Described processor 110, is additionally operable to when starting described first operating system, from described first storage medium 121 Read the first boot variable;Read the second boot variable in described second storage medium 122;Judge described first boot variable The most consistent with described second boot variable;When described first boot variable and described second boot variable are inconsistent, foundation Described first boot variable reads the guidance code of described first operating system.
Described processor 110, can be specifically for the protection leader record of the 1st sector from described first storage medium 121 Reserve bytes in read described first boot variable.
Described processor 110, specifically for when described first boot variable and described second boot variable are inconsistent, incites somebody to action Described first boot variable replaces the second boot variable in described second storage medium;Guide based on described second after replacing Variable, reads the guidance code of described first operating system.
If occurring in the present embodiment, the first boot variable and the second boot variable are inconsistent, the most described place The second boot variable in second storage medium can be replaced with described first boot variable by reason device 110, so conveniently next time Quickly read described boot variable.
Embodiment 14:
As it is shown in figure 5, the present embodiment provides a kind of electronic equipment, it is connected including processor 110 with described processor 110 Memorizer 120, described memorizer 120 at least includes the first storage medium 121 removably connected with described processor 110:
Described processor 110, for installing the first operating system;Obtain the depositing of guidance code of described first operating system Storage path and the systematic name of described first operating system;According to described store path and described systematic name, generate and guide change Amount;In storing the 1st sector of the first storage medium 121 of described guidance code, the reserve bytes of storage protection leader record The described boot variable of middle storage.
As shown in Figure 6, described memorizer 120 also includes second storage medium different from described first storage medium 121 122;Described processor 110 is connected with described second storage medium 122;
Described processor 110, is additionally operable to when starting described first operating system, from described first storage medium 121 Read the first boot variable;Read the second boot variable in described second storage medium 122;Judge described first boot variable The most consistent with described second boot variable;When described first boot variable and described second boot variable are inconsistent, foundation Described first boot variable reads the guidance code of described first operating system.
Described processor 110, is additionally operable to when described first boot variable is consistent with described second boot variable, according to institute State the second boot variable and read described guidance code.
The most described processor 110 is determined when the first boot variable and the second boot variable are consistent, directly Reading guidance code according to the second boot variable, display is feasible, and is that reading efficiency is high.
Embodiment 15:
As it is shown in fig. 7, the embodiment of the present invention also provides for a kind of electronic equipment, including:
Installation unit 210, for installing the first operating system;
Acquiring unit 220, for obtaining the store path of the guidance code of described first operating system and described first behaviour Make the systematic name of system;
Signal generating unit 230, for according to described store path and described systematic name, generates boot variable;
Memory element 240, in the 1st sector at the first storage medium of the described guidance code of storage, storage protection The reserve bytes of leader record stores described boot variable.
The most described electronic equipment can be the device corresponding to any one embodiment of the method aforementioned.Described peace Dress unit 210, acquiring unit 220 and signal generating unit 230 may correspond both to processor or process circuit, described processor or process Circuit may refer to associated description in previous embodiment, is not repeated.The most described memory element 240 can Corresponding to various storage chips, boot variable and guidance code can be stored in the first storage medium, it is to avoid storage is situated between simultaneously Matter migrates the problem that the guidance code caused cannot read and cannot guide the first operating system.
In certain embodiments, described protection leader record includes guiding entry field;Described guiding entry field includes Store path byte, systematic name byte and partition holding byte.
Described memory element 240, specifically for storing described store path in described store path byte;In described system System title byte stores described systematic name;Dividing of described guidance code place subregion is stored in described partition holding byte District identifies.
Further, described guiding entry field includes store path byte length byte and systematic name length byte; Described memory element 240, is additionally operable to store byte number needed for described storage variable storage in described store path length byte; The required byte number of described systematic name storage is stored in described systematic name length byte.
Further, described guiding entry field includes origin identification byte and check byte;Described memory element 240, it is additionally operable in described origin identification byte store origin identification;Described guiding entrance word is stored in described check byte The check code of data is stored in Duan.
In certain embodiments, described electronic equipment also includes processing unit;
This processing unit may correspond to aforementioned processor or processes circuit.Described processing unit, specifically for starting institute When stating the first operating system, from described first storage medium, read the first boot variable;Read described first operating system The second boot variable in second storage medium;Judge that described first boot variable is the most consistent with described second boot variable; When described first boot variable and described second boot variable are inconsistent, read described first according to described first boot variable The guidance code of operating system.Such as, described processing unit, specifically for described when described first boot variable and described second When boot variable is inconsistent, described first boot variable is replaced the second boot variable in described second storage medium;Based on Described second boot variable after replacement, reads the guidance code of described first operating system.
In another outer embodiments, described processing unit, it may also be used for when described first boot variable and described the When two boot variables are consistent, read described guidance code according to described second boot variable.
Below in conjunction with above-described embodiment, it is provided that a concrete example:
As shown in Figure 8, this example provides a kind of information processing method to include two stages:
First stage: memorizer place original system
Step S1: operating system OS installation procedure starts;
Step S2: create hard disk GPT partition table;
Step S3: install UEFI operating system;
Step S4: boot variable is write the special section of storage medium.Here special section can be described in record has The sector of PMBR.The sector recording described PMBR is usually the 1st sector of this storage medium.
Second stage: storage medium move after system;
Step S6: operating system adds and electrically activates;
Step S7: the guiding entry field of detection special section;
Step S8: judge to detect that the boot variable read from BIOS with the boot variable described guiding entry field is No unanimously?If entering step S10, enter step S9 if not.
Step S9: rebuild UEFI OS boot variable.Here establishment, by drawing in the guiding entry field of special section Lead variable to be written in the storage medium of BIOS.
Step S10: utilize bootstrap to guide UEFI operating system.Here bootstrap is aforesaid guiding generation Code.
In several embodiments provided herein, it should be understood that disclosed equipment and method, can be passed through it Its mode realizes.Apparatus embodiments described above is only schematically, such as, the division of described unit, it is only A kind of logic function divides, and actual can have other dividing mode, such as when realizing: multiple unit or assembly can be in conjunction with, or It is desirably integrated into another system, or some features can be ignored, or do not perform.It addition, shown or discussed each composition portion Dividing coupling each other or direct-coupling or communication connection can be the INDIRECT COUPLING by some interfaces, equipment or unit Or communication connection, can be electrical, machinery or other form.
The above-mentioned unit illustrated as separating component can be or may not be physically separate, shows as unit The parts shown can be or may not be physical location, i.e. may be located at a place, it is also possible to be distributed to multiple network list In unit;Part or all of unit therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme.
It addition, each functional unit in various embodiments of the present invention can be fully integrated in a processing module, it is possible to Being that each unit is individually as a unit, it is also possible to two or more unit are integrated in a unit;Above-mentioned Integrated unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit and realizes.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can be passed through The hardware that programmed instruction is relevant completes, and aforesaid program can be stored in a computer read/write memory medium, this program Upon execution, perform to include the step of said method embodiment;And aforesaid storage medium includes: movable storage device, read-only Memorizer (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or The various media that can store program code such as person's CD.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited thereto, and any Those familiar with the art, in the technical scope that the invention discloses, can readily occur in change or replace, should contain Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with described scope of the claims.

Claims (15)

1. an information processing method, it is characterised in that including:
First operating system is installed;
Obtain store path and the systematic name of described first operating system of the guidance code of described first operating system;
According to described store path and described systematic name, generate boot variable;
In storing the 1st sector of the first storage medium of described guidance code, in the reserve bytes of storage protection leader record Store described boot variable.
Method the most according to claim 1, it is characterised in that
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described in storing the 1st sector of the first storage medium of described guidance code, the reserved word of storage protection leader record Joint stores described boot variable, including:
Described store path is stored in described store path byte;
Described systematic name is stored in described systematic name byte;
The partition identification of described guidance code place subregion is stored in described partition holding byte.
Method the most according to claim 2, it is characterised in that
Described guiding entry field includes store path byte length byte and systematic name length byte;
Described method also includes:
Byte number needed for described storage variable storage is stored in described store path length byte;
The required byte number of described systematic name storage is stored in described systematic name length byte.
Method the most according to claim 3, it is characterised in that
Described guiding entry field includes origin identification byte and check byte;
Described method also includes:
Origin identification is stored in described origin identification byte;
The check code storing data in described guiding entry field is stored in described check byte.
5. according to the method described in any one of Claims 1-4, it is characterised in that
Described method also includes:
When starting described first operating system, from described first storage medium, read the first boot variable;
Read the second boot variable in the second storage medium;
Judge that described first boot variable is the most consistent with described second boot variable;
When described first boot variable and described second boot variable are inconsistent, read described according to described first boot variable The guidance code of the first operating system.
Method the most according to claim 5, it is characterised in that
Described when described first boot variable and described second boot variable are inconsistent, read according to described first boot variable The guidance code of described first operating system, including:
When described first boot variable and described second boot variable are inconsistent, described first boot variable is replaced described the The second boot variable in two storage mediums;
Based on described second boot variable after replacing, read the guidance code of described first operating system.
Method the most according to claim 5, it is characterised in that
Described method also includes:
When described first boot variable is consistent with described second boot variable, draw according to described second boot variable reading Lead code.
8. an electronic equipment, it is characterised in that include processor and the memorizer being connected with described processor, described memorizer At least include the first storage medium removably connected with described processor:
Described processor, for installing the first operating system;Obtain the store path of the guidance code of described first operating system Systematic name with described first operating system;According to described store path and described systematic name, generate boot variable;Depositing In 1st sector of the first storage medium storing up described guidance code, in the reserve bytes of storage protection leader record, storage is described Boot variable.
Electronic equipment the most according to claim 8, it is characterised in that
Described protection leader record includes guiding entry field;
Described guiding entry field includes store path byte, systematic name byte and partition holding byte;
Described processor, specifically for storing described storage road in the described store path byte of described first storage medium Footpath, stores in described systematic name byte in described systematic name and described partition holding byte and stores described guidance code institute Partition identification at subregion.
Electronic equipment the most according to claim 9, it is characterised in that
Described guiding entry field includes store path byte length byte and systematic name length byte;
Described processor, is additionally operable to store described storage in the described store path length byte of described first storage medium and becomes The required byte number of amount storage, stores the required byte number of described systematic name storage in described systematic name length byte.
11. electronic equipments according to claim 10, it is characterised in that
Described guiding entry field includes origin identification byte and check byte;
Described processor, is additionally operable in the described origin identification byte of described first storage medium store origin identification, described Check byte stores the check code storing data in described guiding entry field.
12. according to Claim 8 to the electronic equipment described in 11 any one, it is characterised in that
Described memorizer also includes second storage medium different from described first storage medium;Described processor and described second Storage medium connects;
Described processor, is additionally operable to when starting described first operating system, reads first and draw from described first storage medium Lead variable;Read the second boot variable in the second storage medium;Judge that described first boot variable and described second guides to become Measure the most consistent;When described first boot variable and described second boot variable are inconsistent, according to described first boot variable Read the guidance code of described first operating system.
13. methods according to claim 12, it is characterised in that
Described processor, specifically for when described first boot variable and described second boot variable are inconsistent, by described One boot variable replaces the second boot variable in described second storage medium;Based on described second boot variable after replacing, Read the guidance code of described first operating system.
14. electronic equipments according to claim 12, it is characterised in that
Described processor, is additionally operable to when described first boot variable is consistent with described second boot variable, according to described second Boot variable reads described guidance code.
15. 1 kinds of electronic equipments, it is characterised in that including:
Installation unit, for installing the first operating system;
Acquiring unit, for obtaining the store path of guidance code of described first operating system and described first operating system Systematic name;
Signal generating unit, for according to described store path and described systematic name, generates boot variable;
Memory element, in the 1st sector at the first storage medium of the described guidance code of storage, storage protection leader record Reserve bytes in store described boot variable.
CN201610615799.4A 2016-07-29 2016-07-29 Information processing method and storage device Active CN106293708B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610615799.4A CN106293708B (en) 2016-07-29 2016-07-29 Information processing method and storage device
US15/664,038 US20180032351A1 (en) 2016-07-29 2017-07-31 Information processing method and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610615799.4A CN106293708B (en) 2016-07-29 2016-07-29 Information processing method and storage device

Publications (2)

Publication Number Publication Date
CN106293708A true CN106293708A (en) 2017-01-04
CN106293708B CN106293708B (en) 2021-08-13

Family

ID=57663204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610615799.4A Active CN106293708B (en) 2016-07-29 2016-07-29 Information processing method and storage device

Country Status (1)

Country Link
CN (1) CN106293708B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255532A (en) * 2018-01-16 2018-07-06 联想(北京)有限公司 A kind of operating system migration method and apparatus
CN110187843A (en) * 2019-06-04 2019-08-30 苏州浪潮智能科技有限公司 A kind of method that storage medium name order is constant, system, terminal and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1898643A (en) * 2003-10-27 2007-01-17 美国能量变换公司 System and method for updating a software program
US20090013165A1 (en) * 2000-01-06 2009-01-08 Chow David Q Portable usb device that boots a computer as a server
CN101548265A (en) * 2006-12-31 2009-09-30 桑迪士克股份有限公司 Portable multi-platform booting systems and architectures
CN101630353A (en) * 2008-06-30 2010-01-20 英特尔公司 System and method to secure boot uefi firmware and uefi-aware operating systems on a mobile internet device (mid)
CN102043640A (en) * 2009-10-23 2011-05-04 富港电子(东莞)有限公司 Flash system and program updating method thereof
CN102200921A (en) * 2010-03-25 2011-09-28 微软公司 Intelligent boot device selection and recovery
JP2012043309A (en) * 2010-08-20 2012-03-01 Sharp Corp System module and electric equipment
US20120204019A1 (en) * 2008-04-24 2012-08-09 Dell Products, Lp Method of Using an Information Handling System Having a Boot File, and an Information Handling System and Machine-Executable Code for Carrying Out the Method
CN103430147A (en) * 2011-03-18 2013-12-04 富士通株式会社 Information processing device and method for controlling information processing device
CN103885784A (en) * 2014-04-09 2014-06-25 中国人民解放军理工大学 Method for establishing Android platform with security module and plugging function
CN105282613A (en) * 2014-06-24 2016-01-27 日照海帝电器有限公司 Smart television software upgrading method and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090013165A1 (en) * 2000-01-06 2009-01-08 Chow David Q Portable usb device that boots a computer as a server
CN1898643A (en) * 2003-10-27 2007-01-17 美国能量变换公司 System and method for updating a software program
CN101548265A (en) * 2006-12-31 2009-09-30 桑迪士克股份有限公司 Portable multi-platform booting systems and architectures
US20120204019A1 (en) * 2008-04-24 2012-08-09 Dell Products, Lp Method of Using an Information Handling System Having a Boot File, and an Information Handling System and Machine-Executable Code for Carrying Out the Method
CN101630353A (en) * 2008-06-30 2010-01-20 英特尔公司 System and method to secure boot uefi firmware and uefi-aware operating systems on a mobile internet device (mid)
CN102043640A (en) * 2009-10-23 2011-05-04 富港电子(东莞)有限公司 Flash system and program updating method thereof
CN102200921A (en) * 2010-03-25 2011-09-28 微软公司 Intelligent boot device selection and recovery
JP2012043309A (en) * 2010-08-20 2012-03-01 Sharp Corp System module and electric equipment
CN103430147A (en) * 2011-03-18 2013-12-04 富士通株式会社 Information processing device and method for controlling information processing device
CN103885784A (en) * 2014-04-09 2014-06-25 中国人民解放军理工大学 Method for establishing Android platform with security module and plugging function
CN105282613A (en) * 2014-06-24 2016-01-27 日照海帝电器有限公司 Smart television software upgrading method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255532A (en) * 2018-01-16 2018-07-06 联想(北京)有限公司 A kind of operating system migration method and apparatus
CN110187843A (en) * 2019-06-04 2019-08-30 苏州浪潮智能科技有限公司 A kind of method that storage medium name order is constant, system, terminal and storage medium
CN110187843B (en) * 2019-06-04 2020-06-26 苏州浪潮智能科技有限公司 Method, system, terminal and storage medium for keeping name sequence of storage medium unchanged

Also Published As

Publication number Publication date
CN106293708B (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN106021014B (en) A kind of EMS memory management process and device
US20090265403A1 (en) File system
EP2092530A1 (en) Method and device for reconfiguration of reliability data in flash eeprom storage pages
CN110928559B (en) Data burning method and device, electronic equipment and storage medium
US20090128570A1 (en) Method And System For Automatically Analyzing GPU Test Results
CN107526687B (en) Multi-configuration memory system and operating method thereof
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
CN107665129A (en) Information processing method and storage device
CN106293708A (en) Information processing method and storage device
CN105868127A (en) Data storage method and device and data reading method and device
CN105446856B (en) The detection method of electronic equipment interfaces, device
US20180032351A1 (en) Information processing method and storage device
CN110737577A (en) test defect data storage method and device
CN115599618A (en) Register dynamic relocation verification method and device, storage medium and processor
CN112463042B (en) Data volume import data verification method, device, terminal and storage medium
CN110209349B (en) Data processing method and terminal equipment
CN105353983A (en) Method and apparatus for identifying disk information in RAID
CN109656580B (en) Serial-port NAND FLASH data zero clearing processing method and system
RU2678512C1 (en) Related to motor vehicles data processing method for the purpose of the subsequent electrical systems electrical diagrams graphic construction
CN117172207B (en) System bus interconnection verification method and device, electronic equipment and storage medium
CN113409867B (en) Nonvolatile memory programming method, nonvolatile memory programming device, electronic equipment and storage medium
CN116166205B (en) File system storage and mounting method, device, equipment and storage medium
CN107632774A (en) Repair the method and device of disk carry
CN115185486B (en) Method, apparatus and storage medium for generating ASIC fabric declarations
CN114168085B (en) Variable processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant