CN116301925A - Operating system starting method, device, equipment and computer readable storage medium - Google Patents

Operating system starting method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116301925A
CN116301925A CN202111566358.7A CN202111566358A CN116301925A CN 116301925 A CN116301925 A CN 116301925A CN 202111566358 A CN202111566358 A CN 202111566358A CN 116301925 A CN116301925 A CN 116301925A
Authority
CN
China
Prior art keywords
operating system
image
boot loader
storage object
boot
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
CN202111566358.7A
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.)
Beijing Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell Technology Co 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 Beijing Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202111566358.7A priority Critical patent/CN116301925A/en
Publication of CN116301925A publication Critical patent/CN116301925A/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
    • 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
    • G06F9/4406Loading of operating system

Landscapes

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

Abstract

The present disclosure relates to an operating system boot method, apparatus, device, and computer-readable storage medium, which, since a first operating system is installed in a first storage object in advance, boot loader of the operating system boots the first operating system when it is determined that operating system installation conditions are satisfied. And the first operating system acquires a second operating system image after being started, and installs the second operating system image into the second storage object. The first operating system can be started on the device and find a second operating system image available on the server, meanwhile, the second operating system image can be transmitted to the device, and then an installation environment is provided, so that an installation program can load and install a target second operating system on the device, the problem that the second operating system cannot be started due to failure or damage of upgrading is avoided, the second operating system does not need to be restored through executing a command line, complex command line operation flow is avoided, and time consumption of a restoring system is reduced.

Description

Operating system starting method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for starting an operating system.
Background
With the continuous development of computer technology, embedded devices are widely used. Specifically, the embedded device includes hardware and software. The hardware includes peripheral devices, processors, memories, hard disks, etc., and the software may be an operating system.
Along with the rapid development of the electronic industry, the competition of electronic products is also more and more vigorous, and the software performance of the electronic products becomes more and more important under the condition that the hardware conditions are the same. Among the various properties of electronic products, the stability of the software operating system becomes an indicator of the performance of the product. Because of the short development cycle from software operating system development to mass production, factory burned software versions often require several versions of system software to be updated before the product is delivered to the user. Therefore, recovery after failure of installation and upgrade of the system becomes particularly important.
The current method of updating the system is mainly to execute a command line upgrade system or an Over-the-Air Technology (OTA) upgrade system. However, the system is upgraded by the OTA, which requires the function of the OTA version to be perfect, and has the possibility of system upgrade failure, the upgrade system is installed in the partition of the embedded multimedia memory card (Embedded Multi Media Card, EMMC), and if the partition of the EMMC is damaged, the upgrade failure is caused. After the upgrade fails, the system cannot be started normally, and the recovery system needs to execute the command line. In addition, the operation flow of the device is complex by executing the command line update, the consumption time is too long, and the mass production efficiency is affected.
Disclosure of Invention
In order to solve the above technical problems, the present disclosure provides a method, an apparatus, a device, and a computer readable storage medium for starting an operating system, so as to avoid the problem that a second operating system cannot be started due to failure or damage of upgrade, and avoid the need to recover the second operating system by executing a command line, thereby avoiding a complex command line operation flow and reducing the time consumption of recovering the system.
In a first aspect, an embodiment of the present disclosure provides an operating system starting method, in response to a startup instruction, when a boot loader of an operating system determines that an operating system installation condition is satisfied, booting a first operating system previously installed in a first storage object;
the first operating system acquires a second operating system image after being started;
the first operating system installs the second operating system image into a second storage object.
In some embodiments, after the first operating system installs the second operating system image into a second storage object, the method further comprises:
and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
In some embodiments, the boot loader of the operating system determining that the operating system installation condition is met includes: the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met; and/or
When the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met; and/or
And if the second operating system is booted to fail in self-starting, the bootloader determines that the operating system installation condition is met.
In some embodiments, the first operating system obtaining the second operating system image after booting includes:
the first operating system creates a downloading thread after being started, and the downloading thread searches a second operating system mirror image from the network at regular time;
the downloading thread downloads the second operating system image after searching the second operating system image;
and after the downloading thread downloads the second operating system image, the first operating system closes the downloading thread.
In some embodiments, before the first operating system installs the second operating system image into a second storage object, the method further comprises:
and the first operating system checks the second operating system image, and if the check is successful, the second operating system image is installed in a second storage object.
In a second aspect, an embodiment of the present disclosure provides an operating system boot device, the device including:
the boot module is used for responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, the first operating system pre-installed in the first storage object is booted;
the acquisition module is used for acquiring a second operating system image after the first operating system is started;
and the installation module is used for installing the second operating system image into a second storage object by the first operating system.
In some embodiments, the boot module is further to, after the first operating system installs the second operating system image into a second storage object:
and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
In some embodiments, the boot loader of the operating system determining that the operating system installation condition is met includes: the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met; and/or
When the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met; and/or
And if the second operating system is booted to fail in self-starting, the bootloader determines that the operating system installation condition is met.
In some embodiments, the acquisition module includes a creation unit, a download unit, and a closing unit;
the creating unit is used for creating a downloading thread after the first operating system is started, and the downloading thread searches a second operating system image from the network at regular time;
the downloading unit is used for downloading the second operating system image after the downloading thread searches the second operating system image;
and the closing unit is used for closing the downloading thread by the first operating system after the downloading thread downloads the second operating system image.
In some embodiments, the apparatus further comprises: a checking module;
and the checking module is used for checking the second operating system image by the first operating system, and if the checking is successful, the installing module installs the second operating system image into a second storage object.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method according to the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium having stored thereon a computer program for execution by a processor to implement the method of the first aspect.
In a fifth aspect, the presently disclosed embodiments also provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement an operating system boot method as described above.
According to the operating system starting method, the device, the equipment and the computer readable storage medium, when the boot loader of the operating system determines that the operating system installation condition is met by responding to the starting instruction, the first operating system is started, the first operating system is an operating system which is pre-installed in a first storage object, the first operating system acquires a second operating system image after starting, and the first operating system installs the second operating system image in the second storage object. Since the first operating system is installed in the first storage object in advance, the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first operating system acquires a second operating system image after starting, and the first operating system installs the second operating system image into the second storage object. The first operating system can be started on the device and find a second operating system image available on the server, meanwhile, the second operating system image can be transmitted to the device, and then an installation environment is provided, so that an installation program can load and install a target second operating system on the device, the problem that the second operating system cannot be started due to failure or damage of upgrading is avoided, the second operating system does not need to be restored through executing a command line, complex command line operation flow is avoided, and time consumption of a restoring system is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flowchart of an operating system boot method provided by an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an application scenario provided in an embodiment of the present disclosure;
FIG. 3 is a flowchart of an operating system boot method according to another embodiment of the present disclosure;
FIG. 4 is a flowchart of an operating system boot method according to another embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an operating system starting device according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
With the continuous development of computer technology, embedded devices are widely used. Specifically, the embedded device includes hardware and software. The hardware includes peripheral devices, processors, memories, hard disks, etc., and the software may be an operating system.
Along with the rapid development of the electronic industry, the competition of electronic products is also more and more vigorous, and the software performance of the electronic products becomes more and more important under the condition that the hardware conditions are the same. Among the various properties of electronic products, the stability of the software operating system becomes an indicator of the performance of the product. Because of the short development cycle from software operating system development to mass production, factory burned software versions often require several versions of system software to be updated before the product is delivered to the user. Therefore, recovery after failure of installation and upgrade of the system becomes particularly important.
In view of this problem, embodiments of the present disclosure provide an operating system boot method, which is described below in connection with specific embodiments.
Fig. 1 is a flowchart of an operating system startup method provided in an embodiment of the present disclosure. The method can be applied to an application scenario shown in fig. 2, where the application scenario includes a server 21 and an electronic device 22, and the electronic device 22 may specifically be a terminal, for example, a smart phone, a palm computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an integrated machine, an intelligent home device, and the like. It can be appreciated that the operating system startup method provided by the embodiments of the present disclosure may also be applied in other scenarios.
The following describes the method for starting the operating system shown in fig. 1 in conjunction with the application scenario shown in fig. 2, where the method includes the following specific steps:
and S101, responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, booting a first operating system, wherein the first operating system is an operating system which is pre-installed in a first storage object.
The first operating system is installed in the first storage object in advance, and the electronic device 22 responds to the start-up instruction, and the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first memory object may be a readable memory, such as a non-volatile Flash memory (Nor Flash).
S102, the first operating system acquires a second operating system image after being started.
As shown in fig. 2, after the first operating system is started, the electronic device 22 issues a request to the server 21 to acquire the second operating system image. After receiving the acquisition request, the server 21 allows the first operating system of the electronic device 22 to download the second operating system image.
S103, the first operating system installs the second operating system image into a second storage object.
After the first operating system of the electronic device 22 downloads the second operating system image, the second operating system image is installed in the second storage object, and an environment variable corresponding to the self-starting of the second operating system is configured. The environment variable may be a field, or a flag bit. After the second operating system image is installed in the second storage object, the environment variables are configured, such as configuring a normal flag bit, and restarting the electronic device 22. After the electronic device 22 is restarted, the bootloader recognizes a normal flag bit and directs the second operating system to self-boot.
According to the embodiment of the disclosure, when the boot loader of the operating system determines that the operating system installation condition is met in response to the starting instruction, the first operating system is booted, and the first operating system is the operating system which is pre-installed in the first storage object. Further, the first operating system acquires a second operating system image after starting, and the first operating system installs the second operating system image into the second storage object. Since the first operating system is installed in the first storage object in advance, the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first operating system acquires a second operating system image after starting, and the first operating system installs the second operating system image into the second storage object. The first operating system can be started on the equipment to find the second operating system image available on the server, meanwhile, the proper second operating system image can be transmitted to the equipment, and then an installation environment is provided, so that the installation program can load and install the target second operating system on the equipment, the problem that the second operating system cannot be started due to failure or damage of upgrading can be avoided, the second operating system is not required to be recovered through executing a command line, the complex command line operation flow is avoided, the time consumption of the recovery system is reduced, the automatic upgrading of the operating system is realized, the operation flow is simplified, and the mass production working efficiency is improved.
On the basis of the foregoing embodiment, after the first operating system installs the second operating system image into the second storage object, the method further includes: and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
After the first operating system of the electronic device 22 shown in fig. 2 installs the second operating system image in the second storage object, the boot loader responds to the boot instruction to boot the second operating system for booting, and if the environment variable corresponding to the booting of the second operating system is configured to be normal. The environment variable may be a field, or a flag bit. After the second operating system image is installed in the second storage object, the environment variables are configured, such as configuring a normal flag bit, and restarting the electronic device 22. After the electronic device 22 is restarted, the bootloader recognizes a normal flag bit and directs the second operating system to self-boot.
Optionally, the determining, by the boot loader of the operating system, that the operating system installation condition is satisfied includes: and when the computer is started for the first time, the boot loader detects whether a second operating system is installed in the second storage object, and if the second operating system is not installed, the boot loader determines that the installation condition of the operating system is met.
When the electronic device 22 shown in fig. 2 is first booted up, the bootloader detects whether the second operating system is installed in the second storage object. If the fact that the second operating system is not installed is detected, the boot loader determines that the condition of installing the operating system is met; if the second operating system is detected to be installed, the boot loader determines that the operating system installation condition is not met.
Optionally, the determining, by the boot loader of the operating system, that the operating system installation condition is satisfied includes: and when the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met.
If the boot loader detects that the environmental variable is an abnormal flag bit or detects that the second operating system installed in the second storage object fails to upgrade or is damaged when the electronic device 22 is not started for the first time, the boot loader determines that the condition for installing the operating system is met; if the boot loader detects that the environment variable is a normal zone bit and detects that a second operating system installed in the second storage object is normal, the boot loader determines that the condition of installing the operating system is not met.
Optionally, the determining, by the boot loader of the operating system, that the operating system installation condition is satisfied includes: and the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met.
The embodiment of the disclosure detects whether a second operating system is installed in a second storage object through a boot loader when the computer is started for the first time, and if the second operating system is not installed, the boot loader determines that the installation condition of the operating system is met; or when the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged when the boot loader is not started for the first time, the boot loader determines that the operating system installation condition is met. Further, the first operating system is guided to start, the first operating system is an operating system which is pre-installed in a first storage object, the first operating system acquires a second operating system image after starting, the first operating system installs the second operating system image in a second storage object, and environment variables corresponding to the self-starting of the second operating system are configured, so that a boot loader responds to a starting instruction to guide the second operating system to self-start. Since the first operating system is installed in the first storage object in advance, the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first operating system acquires a second operating system image after starting, the first operating system installs the second operating system image into a second storage object, and configures an environment variable corresponding to the self-starting of the second operating system, so that the boot loader responds to a starting instruction to boot the second operating system to be self-started. The first operating system can be started on the equipment to find the second operating system image available on the server, and meanwhile, the second operating system image can be transmitted to the equipment, and then an installation environment is provided, so that an installation program can load and install the target second operating system on the equipment, the automatic upgrading of the operating system is realized, the operation flow is simplified, and the mass production working efficiency is improved. In addition, the boot loader detects whether the second operating system is installed in the second storage object when the first boot is started, or when the boot loader detects that the second operating system installed in the second storage object fails to be upgraded or is damaged when the second storage object is not started for the first time, the boot loader determines that the installation conditions of the operating system are met, and automatically downloads and installs the second operating system when the installation conditions are met, so that automatic recovery can be realized when the system fails to be upgraded and cannot be started normally.
Fig. 3 is a flowchart of an operating system startup method according to another embodiment of the present disclosure, as shown in fig. 3, where the method includes the following steps:
and S301, responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, booting a first operating system which is pre-installed in a first storage object.
Specifically, the implementation process and principle of S301 and S101 are identical, and will not be described herein.
S302, the first operating system creates a downloading thread after starting, and the downloading thread searches a second operating system image from the network at regular time.
The first operating system of the electronic device 22 shown in fig. 2, upon startup, creates a download process that periodically looks up a second operating system image from the network.
S303, the downloading thread downloads the second operating system image after searching the second operating system image.
After the downloading thread created by the first operating system of the electronic device 22 finds the second operating system image, a request for acquiring the second operating system image is sent to the server 21, and after the server 21 receives the acquisition request, the first operating system of the electronic device 22 is allowed to download the second operating system image.
Optionally, the manner in which the downloading process obtains the second operating system image includes file transfer protocol (File Transfer Protocol, ftp), simple file transfer protocol (Trivial File Transfer Protocol, tftp), hypertext transfer protocol (Hyper Text Transfer Protocol, http), and the like, and different obtaining manners may be selected according to circumstances.
Alternatively, the download process may obtain the second operating system image via Internet communication protocol version 4 (Internet Protocol version, IPv 4), internet communication protocol version 6 (Internet Protocol Version, IPv 6) link local neighbors.
Optionally, the manner in which the downloading process obtains the second os image may be an IPv 6-based dynamic host configuration protocol (Dynamic Host Configuration Protocol for IPv, DHCPv 6), an IPv 4-based dynamic host configuration protocol (Dynamic Host Configuration Protocol for IPv, DHCPv 4), a domain name system (Domain Name System, DNS), a Multicast DNS (mDNS), a DNS service discovery (DNS Service Discovery, DNS-SD), and the like.
S304, after the downloading thread downloads the second operating system image, the first operating system closes the downloading thread.
After the download thread created by the first operating system of the electronic device 22 is downloaded to the second operating system image, the first operating system closes the download thread.
S305, the first operating system installs the second operating system image into a second storage object.
Specifically, the implementation process and principle of S305 and S103 are consistent, and will not be described herein.
According to the embodiment of the disclosure, when the boot loader of the operating system determines that the operating system installation condition is met in response to the starting instruction, the first operating system is booted, and the first operating system is the operating system which is pre-installed in the first storage object. Further, the first operating system creates a downloading thread after starting, the downloading thread searches the second operating system mirror image from the network at regular time, the downloading thread downloads the second operating system mirror image after searching the second operating system mirror image, and the first operating system closes the downloading thread after the downloading thread downloads the second operating system mirror image. Then, the first operating system installs the second operating system image into the second storage object, and configures an environment variable corresponding to the self-starting of the second operating system, so that the boot loader guides the second operating system to self-start in response to the starting instruction. Since the first operating system is installed in the first storage object in advance, the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first operating system acquires a second operating system image after starting, and the first operating system installs the second operating system image into the second storage object. The first operating system can be started on the equipment to find the second operating system image available on the server, and meanwhile, the second operating system image can be transmitted to the equipment, and then an installation environment is provided, so that an installation program can load and install the target second operating system on the equipment, the automatic upgrading of the operating system is realized, the operation flow is simplified, and the mass production working efficiency is improved. The created downloading process of the embodiment can search the second operating system image from the network at regular time, so that the operating system can be upgraded in time, and the automatic upgrade of the operating system is further realized.
Fig. 4 is a flowchart of an operating system startup method according to another embodiment of the present disclosure, as shown in fig. 4, the method includes the following steps:
s401, responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, booting a first operating system which is pre-installed in a first storage object.
Specifically, the implementation process and principle of S401 and S101 are identical, and will not be described herein.
S402, the first operating system creates a downloading thread after starting, and the downloading thread searches a second operating system image from the network at regular time.
Specifically, the implementation process and principle of S402 and S302 are consistent, and will not be described herein.
S403, the downloading thread downloads the second operating system image after searching the second operating system image.
Specifically, the implementation procedures and principles of S403 and S303 are identical, and will not be described herein.
S404, after the downloading thread downloads the second operating system image, the first operating system closes the downloading thread.
Specifically, the implementation process and principle of S404 and S304 are consistent, and will not be described herein.
S405, the first operating system checks the second operating system image, if the check is successful, S406 is executed, otherwise S402 is executed.
The first operating system checks the second operating system image, and if the check is passed, the following steps S406 and steps after S406 are executed; if the verification fails, step S402 is performed.
S406, the first operating system installs the second operating system image into a second storage object.
Specifically, the implementation process and principle of S406 and S103 are identical, and will not be described herein.
S407, the boot loader detects whether the second operating system installed in the second storage object fails to upgrade, if yes, S401 is executed, otherwise S408 is executed.
The boot loader detects whether the second operating system installed in the second storage object fails to upgrade, and if so, the following steps S401 and steps following S401 are executed; if the upgrade is successful, step S408 is performed.
S408, finishing upgrading.
The system upgrade process ends.
According to the embodiment of the disclosure, when the boot loader of the operating system determines that the operating system installation condition is met in response to the starting instruction, the first operating system is booted, and the first operating system is the operating system which is pre-installed in the first storage object. Further, the first operating system creates a downloading thread after starting, the downloading thread searches the second operating system mirror image from the network at regular time, the downloading thread downloads the second operating system mirror image after searching the second operating system mirror image, and the first operating system closes the downloading thread after the downloading thread downloads the second operating system mirror image. And then, the first operating system checks the second operating system image, if the check is successful, the second operating system image is installed in the second storage object, and the environment variable corresponding to the self-starting of the second operating system is configured, so that the boot loader responds to the starting instruction to boot the second operating system to be self-started. If the booting of the second operating system fails to be self-started, the bootloader guides the first operating system to start so that the first operating system executes the subsequent steps. Since the first operating system is installed in the first storage object in advance, the boot loader of the operating system boots the first operating system when it is determined that the operating system installation condition is satisfied. The first operating system acquires a second operating system image after starting, the first operating system installs the second operating system image into a second storage object, and configures an environment variable corresponding to the self-starting of the second operating system, so that the boot loader responds to a starting instruction to boot the second operating system to be self-started. The first operating system can be started on the equipment to find the second operating system image available on the server, and meanwhile, the second operating system image can be transmitted to the equipment, and then an installation environment is provided, so that an installation program can load and install the target second operating system on the equipment, the automatic upgrading of the operating system is realized, the operation flow is simplified, and the mass production working efficiency is improved. In addition, the second operating system image is checked through the first operating system, if the check is successful, the second operating system image is installed in the second storage object, and the environment variable corresponding to the self-starting of the second operating system is configured, so that the boot loader responds to the starting instruction to boot the second operating system to be self-started. If the second operating system is booted and fails to be booted, the bootloader guides the first operating system to be booted so that the first operating system executes subsequent steps, thereby realizing automatic upgrading of the operating system, automatically recovering the operating system after the system is not booted normally due to failure in upgrading, avoiding the problem that the second operating system cannot be booted due to failure or damage of the second operating system, avoiding complex command line operation flow without recovering the second operating system by executing a command line, and reducing the time consumption of recovering the system.
Fig. 5 is a schematic structural diagram of an operating system starting device according to an embodiment of the present disclosure. The operating system boot device may be an electronic device as described in the above embodiments, or the operating system boot device may be a part or component in the electronic device. The operating system startup device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the operating system startup method, as shown in fig. 5, where the operating system startup device 50 includes: a guide module 51, an acquisition module 52, an installation module 53; the boot module 51 is configured to boot, in response to a boot instruction, a first operating system that is pre-installed in a first storage object to be started when a boot loader of the operating system determines that an operating system installation condition is satisfied; the obtaining module 52 is configured to obtain a second operating system image after the first operating system is started; the installation module 53 is configured to install the second operating system image into a second storage object by using the first operating system.
Optionally, after the first operating system installs the second operating system image into a second storage object, the boot module 51 is further configured to:
and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
Optionally, the determining, by the boot loader of the operating system, that the operating system installation condition is satisfied includes: the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met; and/or
When the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met; and/or
And if the second operating system is booted to fail in self-starting, the bootloader determines that the operating system installation condition is met.
Optionally, the obtaining module 52 includes a creating unit 521, a downloading unit 522, and a closing unit 523; the creating unit 521 is configured to create a download thread after the first operating system is started, where the download thread searches for a second operating system image from the network at regular time; the downloading unit 522 is configured to download the second operating system image after the downloading thread finds the second operating system image; the closing unit 523 is configured to close the downloading thread after the downloading thread downloads the second os image.
Optionally, the apparatus 50 further includes: a verification module 54; the checking module 54 is configured to check the second operating system image by using the first operating system, and if the check is successful, the installation module installs the second operating system image into a second storage object.
The operating system starting device of the embodiment shown in fig. 5 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device may be an electronic device as described in the above embodiments. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the operating system startup method, as shown in fig. 6, the electronic device 60 includes: a memory 61, a processor 62, computer programs and a communication interface 63; wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 for the operating system boot method as described above.
In addition, the embodiment of the present disclosure also provides a computer readable storage medium having stored thereon a computer program that is executed by a processor to implement the operating system startup method described in the above embodiment.
Furthermore, embodiments of the present disclosure provide a computer program product comprising a computer program or instructions which, when executed by a processor, implement an operating system boot method as described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. An operating system boot method, comprising:
responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, booting a first operating system which is pre-installed in a first storage object;
the first operating system acquires a second operating system image after being started;
the first operating system installs the second operating system image into a second storage object.
2. The method of claim 1, wherein after the first operating system installs the second operating system image into a second storage object, the method further comprises:
and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
3. The method of claim 2, wherein the boot loader of the operating system determining that operating system installation conditions are met comprises: the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met; and/or
When the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met; and/or
And if the second operating system is booted to fail in self-starting, the bootloader determines that the operating system installation condition is met.
4. The method of claim 1, wherein the first operating system obtaining a second operating system image after booting comprises:
the first operating system creates a downloading thread after being started, and the downloading thread searches a second operating system mirror image from the network at regular time;
the downloading thread downloads the second operating system image after searching the second operating system image;
and after the downloading thread downloads the second operating system image, the first operating system closes the downloading thread.
5. The method of claim 1, wherein prior to the first operating system installing the second operating system image into a second storage object, the method further comprises:
and the first operating system checks the second operating system image, and if the check is successful, the second operating system image is installed in a second storage object.
6. An operating system boot device, the device comprising:
the boot module is used for responding to a starting instruction, and when the boot loader of the operating system determines that the operating system installation condition is met, the first operating system pre-installed in the first storage object is booted;
the acquisition module is used for acquiring a second operating system image after the first operating system is started;
and the installation module is used for installing the second operating system image into a second storage object by the first operating system.
7. The apparatus of claim 6, wherein the boot module, after the first operating system installs the second operating system image into a second storage object, is further to:
and the boot loader responds to the starting instruction to boot the second operating system to be booted, and if the environment variable corresponding to the self-starting of the second operating system is configured to be normal.
8. The apparatus of claim 7, wherein the boot loader of the operating system determining that operating system installation conditions are met comprises: the boot loader detects whether the environment variable corresponding to the self-starting of the second operating system is normal or not, and if not, the boot loader determines that the operating system installation condition is met; and/or
When the boot loader detects that the second operating system installed in the second storage object fails to upgrade or is damaged, the boot loader determines that the operating system installation condition is met; and/or
And if the second operating system is booted to fail in self-starting, the bootloader determines that the operating system installation condition is met.
9. The apparatus of claim 6, wherein the acquisition module comprises a creation unit, a download unit, and a closing unit;
the creating unit is used for creating a downloading thread after the first operating system is started, and the downloading thread searches a second operating system image from the network at regular time;
the downloading unit is used for downloading the second operating system image after the downloading thread searches the second operating system image;
and the closing unit is used for closing the downloading thread by the first operating system after the downloading thread downloads the second operating system image.
10. The apparatus of claim 6, wherein the apparatus further comprises: a checking module;
and the checking module is used for checking the second operating system image by the first operating system, and if the checking is successful, the installing module installs the second operating system image into a second storage object.
11. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-5.
12. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202111566358.7A 2021-12-20 2021-12-20 Operating system starting method, device, equipment and computer readable storage medium Pending CN116301925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111566358.7A CN116301925A (en) 2021-12-20 2021-12-20 Operating system starting method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111566358.7A CN116301925A (en) 2021-12-20 2021-12-20 Operating system starting method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116301925A true CN116301925A (en) 2023-06-23

Family

ID=86813633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111566358.7A Pending CN116301925A (en) 2021-12-20 2021-12-20 Operating system starting method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116301925A (en)

Similar Documents

Publication Publication Date Title
CN108847950B (en) Electronic device, cloud system software automatic deployment method and storage medium
RU2417415C2 (en) Method and system for deploying software, software deployment server and user server
US8171276B2 (en) Minimal startup mode for performing multiple-reboot configuration
US20120042195A1 (en) Managing operating system deployment failure
KR100952585B1 (en) Method and system for automatic recovery of an embedded operating system
CN111475172B (en) Bare metal deployment method and device
CN104978209A (en) Application updating method and application updating device
CN103353846A (en) Project automatic-deployment plug-in
JP7454011B2 (en) Firmware publishing method for multiple binary images and electronic devices
JP6198229B2 (en) Installation engine and package format for parallelizable and reliable installation
CN108874459B (en) Rapid starting method and device based on virtualization technology
CN103200271A (en) Advanced Risc machine (ARM) server and method of automatic installation system thereof
CN113703813A (en) Kernel upgrading method, device, equipment and computer readable storage medium
CN110750280B (en) Android platform-based application upgrading method and system and storage medium
CN108459868A (en) A kind of software start-up method, device, terminal and storage medium
CN105677409A (en) System upgrading method and device
CN106293790B (en) application program upgrading method and device based on Firefox operating system
CN106484442B (en) Server system and method for updating startup mapping file
CN116301925A (en) Operating system starting method, device, equipment and computer readable storage medium
CN106528114A (en) Android firmware application, android firmware and firmware upgrading method
CN116260718A (en) Firmware upgrading method and system for Internet of things equipment
CN102455919A (en) Automatic optimization setting method for basic input output system(BIOS)
CN112416446B (en) Linux network starting method and device based on Microsoft deployment system
CN113721959A (en) Information processing method and device and electronic equipment
CN113553110A (en) Automatic correction method, device and system for hardware baseline of server

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