CN113127015A - Installation method and device and electronic equipment - Google Patents

Installation method and device and electronic equipment Download PDF

Info

Publication number
CN113127015A
CN113127015A CN202110445985.9A CN202110445985A CN113127015A CN 113127015 A CN113127015 A CN 113127015A CN 202110445985 A CN202110445985 A CN 202110445985A CN 113127015 A CN113127015 A CN 113127015A
Authority
CN
China
Prior art keywords
target
file system
program
target file
characteristic value
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.)
Pending
Application number
CN202110445985.9A
Other languages
Chinese (zh)
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 CN202110445985.9A priority Critical patent/CN113127015A/en
Publication of CN113127015A publication Critical patent/CN113127015A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • 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
    • 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/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The application discloses an installation method, an installation device and electronic equipment, wherein the method comprises the following steps: starting a first bootstrap program to load a target installation mirror image, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program; carrying out validity check on the target file system based on the first check program; under the condition that the verification is legal, loading the target file system according to a preset rule so as to execute the subsequent operation of installing the target operating system; wherein the target file system at least comprises target operating system files. According to the method and the device, when the electronic equipment is started, the first bootstrap program is started, the target installation mirror image is loaded by the first bootstrap program, and whether the target file system in the target installation mirror image is legal or not is verified by the first verification program preset in the target installation mirror image, so that the integrity of the target operating system can be guaranteed.

Description

Installation method and device and electronic equipment
Technical Field
The present application relates to the field of computer operating systems, and in particular, to an installation method and apparatus, and an electronic device.
Background
When an operating system is installed on an electronic device, a boot program of the electronic device is usually used to verify a loaded kernel, that is, the boot program can only verify a target installation image directly loaded by itself, and since a root file system is not loaded by the boot program, the boot program cannot verify the root file system. If the root file system is required to be verified, the root file system can only be verified based on the sub-module dm-verify in the Device mapping module Device Mapper of the Linux kernel system when the operating system is operated after the operating system is installed, and for a non-Linux operating system, the root file system cannot be verified because the dm-verify cannot be used.
Therefore, there is a need for an installation method and apparatus capable of verifying a root file system for different operating systems, so as to ensure the integrity of the installed operating systems.
Disclosure of Invention
The embodiment of the application adopts the following technical scheme: a method of installation comprising:
starting a first bootstrap program to load a target installation mirror image, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
carrying out validity check on the target file system based on the first check program;
under the condition that the verification is legal, loading the target file system according to a preset rule so as to execute the subsequent operation of installing the target operating system;
wherein the target file system at least comprises target operating system files.
Optionally, before loading the target installation image, the method further includes:
and checking the target installation image based on a second check program in the first bootstrap program so as to load the target installation image under the condition that the check is legal.
Optionally, performing validity check on the target file system based on the first checking program includes:
calculating a first characteristic value of a target file system, and comparing the first characteristic value with a preset characteristic value preset in the first verification program;
if the comparison result meets a first condition, the target file system is legal;
and if the comparison result does not meet the first condition, the target file system is illegal.
Optionally, performing validity check on the target file system based on the first checking program includes:
calculating a second characteristic value of a target operating system file in a target file system, and comparing the second characteristic value with a preset characteristic value preset in the first verification program;
if the comparison result meets a second condition, the target file system is legal;
and if the comparison result does not meet the second condition, the target file system is illegal.
Optionally, the method further includes, when it is verified that the target file system is illegal, stopping loading the target file system in the target file system, so as to stop executing the subsequent operation of installing the target operating system.
Optionally, the method further includes: after a target file system is obtained, generating a first verification program for verifying the target file system based on the target file system and/or a target operating system file;
and compiling the first check program into the target installation image.
Optionally, the generating a first verification program for verifying the target file system based on the target file system and/or the target operating system file specifically includes:
calculating a first characteristic value of the target file system and/or a second characteristic value of the target operating system file based on a preset algorithm;
compiling the first characteristic value and/or the second characteristic value and the corresponding identification information into the first checking program.
Optionally, the compiling the first characteristic value and/or the second characteristic value and the identification information corresponding to the first characteristic value into the first verification program specifically includes:
acquiring identification information of the target file system;
establishing a first corresponding relation between the identification information and the first characteristic value;
establishing a second corresponding relation between the identification information and the second characteristic value;
compiling the first verification program based on the first feature value and the first corresponding relation and/or based on the second feature value and the second corresponding relation.
In order to solve the above problem, the present application provides a mounting device, including:
the system comprises a loading module, a verification module and a verification module, wherein the loading module is used for starting a first bootstrap program to load a target installation mirror image, the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
the verification module is used for verifying the legality of the target file system based on the first verification program;
the installation module is used for loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system;
wherein the target file system at least comprises target operating system files.
In order to solve the above problem, the present application provides an electronic device, which at least includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of any one of the installation methods when executing the computer program on the memory.
According to the method and the device, when the electronic equipment is started, the first bootstrap program is started, the target installation image is loaded by the first bootstrap program, and the first check program preset in the target installation image is used for verifying whether the target file system in the target installation image is legal or not, so that whether the target file system is legal or not can be determined before the operating system is installed, the integrity of the operating system can be guaranteed, the operating system is not limited by the type of the operating system, and the target file system can be verified.
Drawings
FIG. 1 is a flow chart of an installation method according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of installation according to yet another embodiment of the present application;
FIG. 3 is a flow chart of a method of installation according to another embodiment of the present application;
fig. 4 is a block diagram of a mounting device according to another embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It is also to be understood that although the present application has been described with reference to some specific examples, those skilled in the art are able to ascertain many other equivalents to the practice of the present application.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
An installation method provided in an embodiment of the present application may be specifically applied to an electronic device to which an operating system is to be installed, for example, an electronic device of a bare computer type after leaving a factory, as shown in fig. 1, and specifically includes the following steps:
step S101, starting a first bootstrap program to load a target installation mirror image, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
the first boot program in this step refers to a pre-started operating environment program, such as a UEFI program. The BOOT program and the UEFI program are stored in advance in the electronic equipment when the electronic equipment leaves a factory, so that the BOOT program is started first after the electronic equipment is started, then a user can set the UEFI program to be started next in the BOOT program, and therefore the target installation mirror image can be loaded from a third-party storage device such as a U disk and the like by starting the UEFI program. The target installation image in this embodiment is also referred to as an EFI file or an installer, and is pre-stored in the third-party storage device, so that when the target operating system is installed, the third-party storage device containing the target operating system file may be communicatively connected to the electronic device of the operating system to be installed, so that the electronic device may load the target installation image and obtain the target operating system file from the target installation image.
Step S102, carrying out validity check on the target file system based on the first check program;
in this step, the target file system refers to a root file system or an Initrd file or a similar small file system. The target file system contains target operating system files, and the target file system is pre-stored in the target installation image.
Step S103, loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system; wherein the target file system at least comprises target operating system files.
In this step, when the root file system is verified to be legal, the corresponding installation program may be called based on the UEFI program, which is the first boot program, and the installation program may be used to obtain the target operating system file from the target file system, thereby implementing the installation of the target operating system.
In this embodiment, when the electronic device is started, the first boot program is started, the target installation image is loaded by using the first boot program, whether the target file system in the target installation image is legal is verified by using the first check program preset in the target installation image, and the operating system file is acquired from the target file system and the installation operation is executed under the condition that the target file system is legal, so that the integrity of the installed target operating system can be ensured.
Yet another embodiment of the present application provides a method of installation, as shown in fig. 2, comprising the steps of;
step S201, starting a first bootstrap program, checking the target installation mirror image based on a second check program in the first bootstrap program, and loading the target installation mirror image under the condition that the check is legal, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first check program;
in the specific implementation process of this step, the first boot program is specifically a UEFI program. The second check-up procedure is the Secure boot procedure. In a specific implementation process, after the electronic device is started, the BOOT program is started first, and then a user can set a UEFI program to be started next in the BOOT program, so that the target installation image can be loaded from a third-party storage device such as a usb disk by starting the UEFI program. Before loading the target installation mirror image, the whole target installation mirror image needs to be checked by using a second check program, namely a Secure boot program, in the UEFI program, so as to verify whether the whole target installation mirror image is legal or not. Of course, the verification program in the BOOT program can be used to verify the target installation image. In this step, when the target installation image is verified by the second verification program, the target installation image is specifically verified by using the public key in the second verification program.
Step S202, calculating a first characteristic value of a target file system, and comparing the first characteristic value with a preset characteristic value preset in the first verification program; if the comparison result meets a first condition, the target file system is legal; and if the comparison result does not meet the first condition, the target file system is illegal.
In this step, after the target installation image is verified to be legal and loaded, the target root file system in the target installation image can be further verified by using a preset first verification program. The first check program in this step may be generated in advance based on the flag information of the target operating system file and the preset characteristic value of the target operating system file, and after the first check program is generated, the first check program and the target operating system file may be packaged into the target file system, and then the target file system is compiled into a target installation image used in the installation process, for example, Linux. More specifically, the preset characteristic value is generated based on a legal target file system and stored in the first verification program. Therefore, when the current target file system needs to be verified, the current first characteristic value can be calculated according to the current target file system, and then the first characteristic value is compared with the preset characteristic value preset in the first verification program to determine whether the target file system is legal or not.
Step S203, loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system; wherein the target file system at least comprises target operating system files.
In this step, if the target file system is verified to be legitimate, it indicates that the target operating system file in the target file system has not been tampered with, so that the target operating system file can be acquired from the target file system (root file system), and subsequent installation operations can be performed. However, if the target file system is verified to be illegal, the target file system is illegally tampered, so that the target file system can be stopped from being loaded to stop executing the subsequent operation of installing the target operating system.
In the embodiment, the target installation image is verified for two times, namely the target installation image is verified before the target installation image is loaded, and then the target file system (root file system) in the target installation image is further verified after the target installation image is loaded, so that whether the target operating system file in the root file system is legal or not can be accurately determined, and the target operating system file is acquired only under the condition that the target operating system file is legal, so that the integrity of the system can be ensured before the operating system is installed, the installation workload increased due to the installation of an illegal operating system is avoided, and the installation efficiency is improved.
Another embodiment of the present application provides an installation method, as shown in fig. 3, including the following steps:
step S301, after obtaining the target file system; and generating the first verification program for verifying the target file system based on the target file system and/or the target operating system file.
In this step, after the target file system is obtained, a first verification program needs to be generated, and the generation mode of the first verification program is specifically as follows:
the first method is as follows: calculating a first characteristic value of the target file system based on a preset algorithm; acquiring identification information of a target file system, and establishing a first corresponding relation between the identification information and the first characteristic value; compiling into the first check program based on the first characteristic value and the first corresponding relation. That is, in this embodiment, the first verification program is generated only based on the first characteristic value of the target file system and the first corresponding relationship between the first characteristic value and the identification information, and then, in the verification process, the target file system is determined whether tampered or not by only comparing the current first characteristic value of the target file system with the preset first characteristic value and determining whether the two are consistent, that is, when the two are consistent, it indicates that the target file system is not tampered, and when the two are not consistent, it indicates that the target file system is tampered.
The second method comprises the following steps: calculating a second characteristic value of the target operating system file based on a preset algorithm; acquiring identification information of a target file system where a target operating system file is located, and establishing a second corresponding relation between the identification information and the second characteristic value; and generating the first verification program based on the second characteristic value and the second corresponding relation. In other words, in this manner, the first verification program is generated only based on the preset second feature value of the target operating system file and the second corresponding relationship between the second feature value and the identification information, and then, in the verification process, the current second feature value of the target operating system file is compared with the preset second feature value, and whether the target file system is tampered or not is determined by determining whether the current second feature value of the target operating system file is consistent with the preset second feature value, that is, when the current second feature value of the target operating system file is consistent with the preset second feature value, it is determined that the target file system is not tampered, and when the current second feature value of the target operating system file is inconsistent with the.
The third method comprises the following steps: calculating a first preset characteristic value of the target file system based on a preset algorithm; calculating a second preset characteristic value of the target operating system file based on a preset algorithm; acquiring identification information of a target file system; establishing a first corresponding relation between the mark information and the first characteristic value and establishing a second corresponding relation between the identification information and the second characteristic value; compiling the first verification program based on the first feature value and the first corresponding relation and based on the second feature value and the second corresponding relation. In other words, in this embodiment, the first verification program is generated based on the first characteristic value of the target file system, the first corresponding relationship between the first characteristic value and the identification information, and the second characteristic value of the target operating system file, the second characteristic value and the second corresponding relationship between the identification information, and then, during verification, whether the target file system is legal or not is determined based on the comparison result between the current first characteristic value of the target file system and the preset first characteristic value, and the comparison result between the current second characteristic value of the target operating system file and the preset second characteristic value. That is, only when the current first characteristic value of the target file system is consistent with the preset first characteristic value and the current second characteristic value of the target operating system file is also consistent with the preset second characteristic value, it is determined that the target file system is not tampered and is legal. In this way, the accuracy of the target file system verification can be improved by generating the first verification program based on the preset first characteristic value and the preset second characteristic value at the same time, thereby providing a guarantee for obtaining a legal target operating system file subsequently. When the first verification program is obtained through compiling, identification information such as a file name of a target file system, namely a root file system, and the calculated characteristic value are transmitted into the verification code, then the verification code is recompiled according to the transmitted parameters, and the characteristic value is hard-coded into the finally generated binary program, so that the first verification program is obtained.
Step S302, compiling the first verification program into the target installation image.
Step S303, starting a first boot program, checking the target installation image based on a second check program in the first boot program, so as to load the target installation image when the check is legal, where the first boot program is used to create a software and hardware environment for installing a target operating system, and the target installation image at least includes a preset first check program.
Step S304, calculating a first characteristic value of a target file system, and calculating a second characteristic value of a target operating system file in the target file system; comparing the first characteristic value and/or the second characteristic value with a first characteristic value and/or a second characteristic value preset in the first verification program; if the comparison result meets a first condition, the target file system is legal; and if the comparison result does not meet the first condition, the target file system is illegal.
Step S305, loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system; wherein the target file system at least comprises target operating system files.
In this embodiment, in a specific implementation process, the identification information of the target file system may include one or more of the following: file name of the target system file, file icon, etc. When the first characteristic value is calculated, the calculation may be specifically performed according to the file name of the target file system, the key file data, or all the file data, and the calculation method may use a public algorithm such as an information digest algorithm MD5 or a secure hash algorithm 2 SHA-2. Of course, the first feature value may also be calculated using a private algorithm; similarly, the second characteristic value may be calculated according to the file name of the file operating system, the key file data, or all the file data, and the calculation method may use a public algorithm such as an information digest algorithm MD5 or a secure hash algorithm 2 SHA-2.
According to the method and the device, the preset characteristic value is calculated according to the target file system and/or the target operating system file, and then the first verification program is generated according to the preset characteristic value, so that a foundation is laid for accurately verifying whether the target file system is legal or not.
Another embodiment of the present application provides a mounting device, as shown in fig. 4, including:
the system comprises a loading module, a verification module and a verification module, wherein the loading module is used for starting a first bootstrap program to load a target installation mirror image, the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
the first checking module is used for checking the legality of the target file system based on the first checking program;
the installation module is used for loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system;
wherein the target file system at least comprises target operating system files.
The installation apparatus in this embodiment further includes a second check module, where the second check module is configured to check the target installation image based on a second check program in the first boot program, so that the target installation image is loaded based on the loading module when the check is legal.
In an implementation process of this embodiment, the first checking module is specifically configured to: calculating a first characteristic value of a target file system, and comparing the first characteristic value with a preset characteristic value preset in the first verification program; if the comparison result meets a first condition, the target file system is legal; and if the comparison result does not meet the first condition, the target file system is illegal.
In an implementation process of this embodiment, the first checking module is specifically configured to: calculating a second characteristic value of a target operating system file in a target file system, and comparing the second characteristic value with a preset characteristic value preset in the first verification program; if the comparison result meets a second condition, the target file system is legal; and if the comparison result does not meet the second condition, the target file system is illegal.
Specifically, the loading module is further configured to: and under the condition that the target file system is verified to be illegal, stopping loading the target file system so as to stop executing the subsequent operation of installing the target operating system.
Specifically, the installation apparatus in this embodiment further includes a generation module and a compiling module, where the generation module is specifically configured to: after the target file system is obtained; generating the first check program for verifying the target file system based on the target file system and/or the target operating system file; the compiling module is specifically configured to: and compiling the first check program into the target installation image.
In a specific implementation, the generating module is specifically configured to: calculating a first characteristic value of the target file system based on a preset algorithm; calculating a second characteristic value of the target operating system file based on a preset algorithm; compiling the first checking program based on the first characteristic value and/or the second characteristic value and the corresponding identification information.
Specifically, the generating module is specifically configured to: acquiring identification information of the target file system; establishing a first corresponding relation between the identification information and the first characteristic value; establishing a second corresponding relation between the identification information and the second characteristic value; and generating the first verification program based on the first characteristic value and the first corresponding relation and/or based on the second characteristic value and the second corresponding relation.
According to the method and the device, when the electronic equipment is started, the first bootstrap program is started, the target installation image is loaded by the first bootstrap program, and the first check program preset in the target installation image is used for verifying whether the target file system in the target installation image is legal or not, so that whether the target file system is legal or not can be determined before the operating system is installed, the integrity of the operating system can be ensured, the limitation of the type of the operating system is avoided, and the target file system can be verified.
Another embodiment of the present application provides an electronic device, which at least includes a memory and a processor, where the memory stores a computer program thereon, and the processor implements the following steps of the installation method when executing the computer program on the memory:
the method comprises the following steps: starting a first bootstrap program to load a target installation mirror image, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
step two: carrying out validity check on the target file system based on the first check program;
step three: under the condition that the verification is legal, loading the target file system according to a preset rule so as to execute the subsequent operation of installing the target operating system; wherein the target file system at least comprises target operating system files.
In this embodiment, the specific implementation process of the steps of the installation method can be referred to any one of the embodiments of the installation method, and the detailed description of this embodiment is not repeated here.
According to the method and the device, when the electronic equipment is started, the first bootstrap program is started, the target installation image is loaded by the first bootstrap program, and the first check program preset in the target installation image is used for verifying whether the target file system in the target installation image is legal or not, so that whether the target file system is legal or not can be determined before the operating system is installed, the integrity of the operating system can be ensured, the limitation of the type of the operating system is avoided, and the target file system can be verified.
The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.

Claims (10)

1. A method of installation comprising:
starting a first bootstrap program to load a target installation mirror image, wherein the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
carrying out validity check on the target file system based on the first check program;
under the condition that the verification is legal, loading the target file system according to a preset rule so as to execute the subsequent operation of installing the target operating system;
wherein the target file system at least comprises target operating system files.
2. The method of claim 1, wherein prior to loading the target installation image, further comprising:
and checking the target installation image based on a second check program in the first bootstrap program so as to load the target installation image under the condition that the check is legal.
3. The method of claim 1, wherein performing a validity check on the target file system based on the first check program comprises:
calculating a first characteristic value of a target file system, and comparing the first characteristic value with a preset characteristic value preset in the first verification program;
if the comparison result meets a first condition, the target file system is legal;
and if the comparison result does not meet the first condition, the target file system is illegal.
4. The method of claim 1, wherein performing a validity check on the target file system based on the first check program comprises:
calculating a second characteristic value of a target operating system file in a target file system, and comparing the second characteristic value with a preset characteristic value preset in the first verification program;
if the comparison result meets a second condition, the target file system is legal;
and if the comparison result does not meet the second condition, the target file system is illegal.
5. The method of claim 1, further comprising, in the event that the target file system is verified to be illegal, ceasing loading the target file system to cease performing operations for subsequent installation of the target operating system.
6. The method of claim 1, further comprising:
after a target file system is obtained, generating a first verification program for verifying the target file system based on the target file system and/or a target operating system file;
and compiling the first check program into the target installation image.
7. The method according to claim 6, wherein generating a first verification program for verifying the target file system based on the target file system and/or the target operating system file specifically comprises:
calculating a first characteristic value of the target file system and/or a second characteristic value of the target operating system file based on a preset algorithm;
compiling the first characteristic value and/or the second characteristic value and the corresponding identification information into the first checking program.
8. The method according to claim 7, wherein compiling the first feature value and/or the second feature value and the identification information corresponding thereto into the first verification program specifically includes:
acquiring identification information of the target file system;
establishing a first corresponding relation between the identification information and the first characteristic value;
establishing a second corresponding relation between the identification information and the second characteristic value;
compiling the first verification program based on the first feature value and the first corresponding relation and/or based on the second feature value and the second corresponding relation.
9. A mounting device, comprising:
the system comprises a loading module, a verification module and a verification module, wherein the loading module is used for starting a first bootstrap program to load a target installation mirror image, the first bootstrap program is used for creating a software and hardware environment for installing a target operating system, and the target installation mirror image at least comprises a preset first verification program;
the verification module is used for verifying the legality of the target file system based on the first verification program;
the installation module is used for loading the target file system according to a preset rule under the condition that the verification is legal so as to execute the subsequent operation of installing the target operating system;
wherein the target file system at least comprises target operating system files.
10. An electronic device comprising at least a memory, a processor, the memory having stored thereon a computer program, the processor realizing the steps of the installation method of any one of claims 1 to 8 when executing the computer program on the memory.
CN202110445985.9A 2021-04-25 2021-04-25 Installation method and device and electronic equipment Pending CN113127015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110445985.9A CN113127015A (en) 2021-04-25 2021-04-25 Installation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110445985.9A CN113127015A (en) 2021-04-25 2021-04-25 Installation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113127015A true CN113127015A (en) 2021-07-16

Family

ID=76779711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110445985.9A Pending CN113127015A (en) 2021-04-25 2021-04-25 Installation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113127015A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114942787A (en) * 2022-02-21 2022-08-26 联想开天科技有限公司 Data processing method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955648A (en) * 2014-05-15 2014-07-30 乐视致新电子科技(天津)有限公司 Method and device for verifying legality of system image
CN105631313A (en) * 2015-12-25 2016-06-01 东软集团股份有限公司 Method and device for processing operating system file
CN107683479A (en) * 2015-10-02 2018-02-09 谷歌有限责任公司 Checking guiding based on NAND
US20180247059A1 (en) * 2017-02-24 2018-08-30 Dell Products L.P. Systems and methods for secure boot and runtime tamper detection
CN109710315A (en) * 2017-10-25 2019-05-03 阿里巴巴集团控股有限公司 BIOS writes with a brush dipped in Chinese ink the processing method of method and BIOS image file
CN112329005A (en) * 2020-11-06 2021-02-05 中国电子信息产业集团有限公司 Boot measurement method, device, electronic equipment and medium for starting operating system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955648A (en) * 2014-05-15 2014-07-30 乐视致新电子科技(天津)有限公司 Method and device for verifying legality of system image
CN107683479A (en) * 2015-10-02 2018-02-09 谷歌有限责任公司 Checking guiding based on NAND
CN105631313A (en) * 2015-12-25 2016-06-01 东软集团股份有限公司 Method and device for processing operating system file
US20180247059A1 (en) * 2017-02-24 2018-08-30 Dell Products L.P. Systems and methods for secure boot and runtime tamper detection
CN109710315A (en) * 2017-10-25 2019-05-03 阿里巴巴集团控股有限公司 BIOS writes with a brush dipped in Chinese ink the processing method of method and BIOS image file
CN112329005A (en) * 2020-11-06 2021-02-05 中国电子信息产业集团有限公司 Boot measurement method, device, electronic equipment and medium for starting operating system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114942787A (en) * 2022-02-21 2022-08-26 联想开天科技有限公司 Data processing method and electronic equipment

Similar Documents

Publication Publication Date Title
CN109710315B (en) BIOS (basic input output System) flash writing method and BIOS mirror image file processing method
JP4647300B2 (en) Method and system to ensure that software updates can be installed or run only on a specific device or class of devices
US20130031371A1 (en) Software Run-Time Provenance
CN108960830B (en) Intelligent contract deployment method, device, equipment and storage medium
CN111523112B (en) Method, device, equipment and medium for safely starting server
EP3859579B1 (en) Trusted computing method, and server
JP2012032925A (en) Platform integrity verification system
CN110995825B (en) Intelligent contract issuing method, intelligent node equipment and storage medium
CN112817621A (en) BIOS firmware refreshing method and device and related components
CN106569907B (en) System startup file checking and compiling method
CN108345805B (en) Method and device for verifying firmware
CN113946854B (en) File access control method and device and computer readable storage medium
CN113127015A (en) Installation method and device and electronic equipment
US7526811B1 (en) Methods for detecting executable code which has been altered
CN111241548B (en) Computer starting method
CN112507343A (en) BIOS updating method, device, equipment and medium
KR101482700B1 (en) Method For Verifying Integrity of Program Using Hash
WO2020233044A1 (en) Plug-in verification method and device, and server and computer-readable storage medium
CN115964721A (en) Program verification method and electronic equipment
CN110610091A (en) Security PXE method based on domestic network platform
US20220200807A1 (en) Device attestation
CN115544496A (en) Server-free computing method, device and equipment based on trusted execution environment
CN115629820A (en) System secure starting method, chip system, storage medium and electronic equipment
CN114282205A (en) Firmware starting method and device and computer readable storage medium
CN115220796A (en) Secure boot device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination