CN117407005A - Installation method and device of target operating system - Google Patents

Installation method and device of target operating system Download PDF

Info

Publication number
CN117407005A
CN117407005A CN202311161175.6A CN202311161175A CN117407005A CN 117407005 A CN117407005 A CN 117407005A CN 202311161175 A CN202311161175 A CN 202311161175A CN 117407005 A CN117407005 A CN 117407005A
Authority
CN
China
Prior art keywords
target
operating system
hard disk
environment
installation
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
CN202311161175.6A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202311161175.6A priority Critical patent/CN117407005A/en
Publication of CN117407005A publication Critical patent/CN117407005A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • 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/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators

Landscapes

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

Abstract

The embodiment of the application provides a method and a device for installing a target operating system, wherein the method comprises the following steps: responding to an operation instruction of a target object, and determining a target hard disk for installing a target operating system; mounting a target hard disk into the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting a second system architecture generated using an environment simulation tool; starting a virtual installation environment in the current system environment; and installing the target operating system selected by the target object to the target hard disk in the virtual installation environment. By the method and the device, the technical problem of how to improve the installation efficiency of the operating system is solved, and the effect of improving the installation efficiency of the operating system is achieved.

Description

Installation method and device of target operating system
Technical Field
The embodiment of the application relates to the field of computer systems, in particular to a method and a device for installing a target operating system.
Background
Currently, in the related art, conventional methods are used to migrate or replace an operating system, and basically, the methods use physical media such as an optical disc, a USB drive, or a network PXE boot, so as to guide a user to update the operating system in a specific boot environment. However, these methods are not efficient in installing an operating system in server testing and system deployment scenarios.
Accordingly, in the related art, there is a technical problem of how to improve the installation efficiency of the operating system.
Aiming at the technical problem of how to improve the installation efficiency of an operating system in the related art, no effective solution has been proposed yet.
Disclosure of Invention
The embodiment of the application provides a method and a device for installing a target operating system, which are used for at least solving the technical problem of how to improve the installation efficiency of the operating system.
According to an embodiment of the present application, there is provided a method for installing a target operating system, including: responding to an operation instruction of a target object, and determining a target hard disk for installing a target operating system; mounting the target hard disk to the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool; starting the virtual installation environment in the current system environment; and installing the target operating system selected by the target object to the target hard disk under the virtual installation environment.
In one exemplary embodiment, determining a target hard disk for installing a target operating system in response to an operation instruction of a target object includes: determining a server cluster for providing business services to the target object; determining a server to be configured from the server cluster; sending a notification message to the target object, wherein the notification message comprises all hard disks of the server to be configured, and the notification message is used for prompting the target object to determine the target hard disk; and under the condition that an operation instruction sent by the target object based on the notification message is received, determining the hard disk indicated by the operation instruction as the target hard disk.
In an exemplary embodiment, in a case that the target hard disk is plural, installing the target operating system selected by the target object to the target hard disk in the virtual installation environment includes at least one of: simultaneously installing the target operating system selected by the target object to the plurality of target hard disks under the virtual installation environment; and after the target operating system selected by the target object is installed to any one target hard disk in the virtual installation environment, performing hard disk performance test on any one target hard disk, and if the any one target hard disk is determined to pass the hard disk performance test, installing the target operating system selected by the target object to other target hard disks in the virtual installation environment, wherein the other target hard disks represent target hard disks except any one target hard disk in the target hard disks.
In an exemplary embodiment, in a process of installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, the method further includes: monitoring the running state of the target hard disk according to a preset period; under the condition that the running state indicates that the target hard disk is in normal running, if the hard disk memory of the target hard disk exceeds a preset threshold value, repairing the target hard disk; or repairing the target hard disk under the condition that the running state indicates that the target hard disk is in fault.
In an exemplary embodiment, after installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, the method further includes: and displaying other configuration options to the target object, wherein the other configuration options are used for configuring other system functions of the target operating system, and the other configuration options at least comprise one of the following: partitioning configuration, local configuration and preassembly software configuration; receiving a target configuration option determined by the target object from the other configuration options; and configuring the target operating system by using a configuration program corresponding to the target configuration option.
In one exemplary embodiment, installing the target operating system selected by the target object to the target hard disk in the virtual installation environment includes: determining a system installation file of the target operating system from the preset configuration file; copying the system installation file to the target hard disk, and obtaining an initialized first operating system by running the system installation file in the target hard disk; configuring a starting loader for the first operating system to obtain a second operating system, wherein the starting loader is used for starting the virtual installation environment; determining all operating systems to be installed contained in the target hard disk; installing the boot installation programs corresponding to all the operating systems to be installed to the second operating system to generate a boot installation function of the second operating system, wherein the boot installation function is used for displaying all the operating systems to be installed to the target object; mounting a preset file system for the second operating system to obtain a target operating system, wherein the preset file system is used for providing a file storage function; configuring the target operating system based on the configuration instruction of the target object; after the target operating system is configured, determining that the installation of the target operating system is completed, wherein the configuration instruction is used for indicating a configuration mode for configuring the target operating system.
In one exemplary embodiment, configuring the target operating system based on the configuration instructions of the target object includes: under the condition that the target object is determined to select the first installation mode, configuring system parameters of the target operating system according to the configuration instruction, wherein the system parameters at least comprise one of the following: network driving parameters, system operating parameters, application parameters; and under the condition that the target object selects the second installation mode, displaying a system parameter for configuring the target operating system and a guide configuration window corresponding to the system parameter to the target object according to the configuration instruction, generating a control instruction according to the operation of the target object in the guide configuration window, and configuring the target operating system based on the control instruction.
According to another embodiment of the present application, there is provided an installation apparatus of a target operating system, including: the response module is used for responding to the operation instruction of the target object and determining a target hard disk for installing a target operating system; the starting module is used for mounting the target hard disk to the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool, and the virtual installation environment is started in the current system environment; and the installation module is used for installing the target operating system selected by the target object to the target hard disk under the virtual installation environment.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, the target hard disk for installing the target operating system is determined by responding to the operation instruction of the target object; starting a virtual installation environment in the current system environment where the target hard disk is located; and installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, so that the technical problem of how to improve the installation efficiency of the operating system can be solved, and the effect of improving the installation efficiency of the operating system is achieved.
Drawings
FIG. 1 is a flow chart of a method of installing a target operating system according to an embodiment of the present application;
FIG. 2 is a flow chart (II) of a method of installing a target operating system according to an embodiment of the present application;
FIG. 3 is a block diagram of a target operating system installation device according to an embodiment of the present application;
FIG. 4 schematically illustrates a block diagram of a computer system for implementing an electronic device of an embodiment of the present application;
fig. 5 schematically shows a schematic diagram of an electronic device for implementing an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
In this embodiment, as shown in fig. 1, a method for installing a target operating system is provided, which specifically includes the following steps:
step S102, a target hard disk for installing a target operating system is determined in response to an operation instruction of a target object;
step S104, the target hard disk is mounted in the current system environment indicated by the operation instruction;
step S106, a preset configuration file required for configuring a virtual installation environment is obtained, and a second system architecture to be simulated by the virtual installation environment is determined according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool;
Step S108, starting the virtual installation environment in the current system environment;
and step S110, installing the target operating system selected by the target object to the target hard disk under the virtual installation environment.
Alternatively, the target hard disk may be, for example, a blank hard disk without an operating system, but is not limited thereto.
Through the steps, the target hard disk for installing the target operating system is determined by responding to the operation instruction of the target object; mounting the target hard disk to the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; the virtual installation environment is a virtual environment which is generated by using an environment simulation tool and supports the second system architecture, and the virtual installation environment is started in the current system environment; and installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, so that the technical problem of how to improve the installation efficiency of the operating system can be solved, and the effect of improving the installation efficiency of the operating system is achieved.
Alternatively, the execution subject of the above steps may be a server, a terminal, or the like, but is not limited thereto.
Optionally, in an exemplary embodiment, in order to more clearly describe the process of determining the target hard disk for installing the target operating system in response to the operation instruction of the target object in the step S102, the following implementation steps are further proposed: step S11, determining a server cluster for providing business service for the target object; step S12, determining a server to be configured from the server cluster; step S13, a notification message is sent to the target object, wherein the notification message comprises all hard disks of the server to be configured, and the notification message is used for prompting the target object to determine the target hard disk; in step S14, when an operation instruction sent by the target object based on the notification message is received, determining the hard disk indicated by the operation instruction as the target hard disk.
Alternatively, in this embodiment, for the server to be configured in step S12, the determination may be made based on, for example, the number of blank hard disks, the computing power resources of the server, whether the server supports the target operating system, and other factors.
Through the embodiment, remote installation of the operating system can be realized by combining a remote control technology. Aiming at a distributed environment and a large-scale data center, the installation efficiency is greatly improved.
Alternatively, in an exemplary embodiment, in a case that the target hard disk is plural, the installation of the target operating system selected by the target object to the target hard disk in the virtual installation environment may be achieved by: the method comprises the steps of 1, simultaneously installing target operating systems selected by the target objects to the plurality of target hard disks under the virtual installation environment; and 2, after the target operating system selected by the target object is installed to any one target hard disk in the virtual installation environment, performing hard disk performance test on any one target hard disk, and if the any one target hard disk is determined to pass the hard disk performance test, installing the target operating system selected by the target object to other target hard disks in the virtual installation environment, wherein the other target hard disks represent target hard disks except the any one target hard disk in the plurality of target hard disks.
According to the embodiment, under the scene that a large number of hard disks need to be provided with an operating system, a user can be allowed to select a plurality of hard disks at a time, the plurality of hard disks are installed in batches, and unified configuration is performed.
Optionally, in an exemplary embodiment, in the process of installing the target operating system selected by the target object to the target hard disk in the virtual installation environment in the step S110, the following technical solution may be further implemented: monitoring the running state of the target hard disk according to a preset period; under the condition that the running state indicates that the target hard disk is in normal running, if the hard disk memory of the target hard disk exceeds a preset threshold value, repairing the target hard disk; or repairing the target hard disk under the condition that the running state indicates that the target hard disk is in fault.
According to the embodiment, the detection and repair functions of the hard disk can be added in the installation process of the operating system, so that the health state of the hard disk is ensured.
Optionally, in an exemplary embodiment, after performing the step S110, other configuration options may be further presented to the target object, where the other configuration options are used to configure other system functions of the target operating system, and the other configuration options include at least one of the following: partitioning configuration, local configuration and preassembly software configuration; receiving a target configuration option determined by the target object from the other configuration options; and configuring the target operating system by using a configuration program corresponding to the target configuration option.
Through the embodiment, other configuration options in the installation process, such as partition schemes, network settings, pre-installed software and the like, can be provided for the user, so that the configuration integrity of the operating system is achieved.
Optionally, in an exemplary embodiment, a process for installing the target operating system selected by the target object to the target hard disk in the virtual installation environment is further provided, and specific steps include: s21, determining a system installation file of the target operating system from the preset configuration file; step S22, copying the system installation file to the target hard disk, and obtaining an initialized first operating system by running the system installation file in the target hard disk; step S23, configuring a starting loader for the first operating system to obtain a second operating system, wherein the starting loader is used for starting the virtual installation environment; step S24, determining all operating systems to be installed contained in the target hard disk; step S25, installing the boot installation programs corresponding to all the operating systems to be installed to the second operating system to generate a boot installation function of the second operating system, wherein the boot installation function is used for displaying all the operating systems to be installed to the target object; step S26, mounting a preset file system for the second operating system to obtain a target operating system, wherein the preset file system is used for providing a file storage function; step S27, configuring the target operating system based on the configuration instruction of the target object; and step S28, after the configuration of the target operating system is completed, determining that the installation of the target operating system is completed, wherein the configuration instruction is used for indicating a configuration mode for configuring the target operating system.
Optionally, based on the steps S21 to S28, more operating system versions and types may be provided for the user to meet the wider requirements.
In the present embodiment, the preset file system may include a FAT (File Allocation Table) file system, a NTFS (New Technology File System) file system, and an ext4 (Fourth Extended Filesystem) file system, but is not limited thereto.
Different file systems may be used for different operating systems, the specific choice depending on the requirements of the operating system and the needs of the user.
The FAT (File Allocation Table) file system is suitable for smaller storage devices, such as a usb disk and an early Windows operating system, and has the characteristics of simplicity and good compatibility, but does not support larger files and larger storage capacity. The NTFS file system is a file system commonly used in Windows operating system, has higher security, stability and performance, supports larger storage capacity and file size, and supports access control and encryption functions. The ext4 file system is a file system commonly used in a Linux operating system, has better performance and stability, supports larger files and storage capacity, and has better file system log and recovery mechanism.
Optionally, after the target operating system completes all the configurations, the preset file system may be uninstalled to complete the configuration process of the target operating system, and the configuration flow is exited.
Optionally, in an exemplary embodiment, the implementation procedure of configuring the target operating system based on the configuration instruction of the target object is described by: under the condition that the target object is determined to select the first installation mode, configuring system parameters of the target operating system according to the configuration instruction, wherein the system parameters at least comprise one of the following: network driving parameters, system operating parameters, application parameters; and under the condition that the target object selects the second installation mode, displaying a system parameter for configuring the target operating system and a guide configuration window corresponding to the system parameter to the target object according to the configuration instruction, generating a control instruction according to the operation of the target object in the guide configuration window, and configuring the target operating system based on the control instruction.
Optionally, based on the installation method for installing the target operating system in the virtual installation environment provided by the embodiment, an automation program corresponding to the installation method may be generated, and the automation program is integrated in a development tool, so as to provide a one-stop solution for a user.
Optionally, in one embodiment, a process of installing the target operating system in the virtual installation environment is provided, which specifically includes the following steps:
and step 1, selecting a hard disk (namely a target hard disk) of an operating system to be installed.
And 2, mounting the hard disk into an existing system.
And 3, selecting a corresponding CPU architecture (namely, a first system architecture) according to the ISO file to be installed (namely, the preset configuration file).
Step 4, using the environment simulation tool to simulate the x64 or ARM architecture (i.e. the second system architecture), and starting the simulation environment. The environment simulation tool is a software tool for simulating and reproducing the behaviors and characteristics of a real or virtual environment, can simulate a physical environment, a network environment, a software environment and the like, and provides a series of functions and interfaces so that a user can perform various experiments, tests, simulation and other activities in the simulated environment. Common environmental simulation tools include MATLAB Simulink, labVIEW, ansys, and the like.
Step 5, extracting the operating system file (i.e. the system installation file) from the ISO file or other source files.
And 6, copying the extracted operating system file to a target hard disk.
Step 7, configuring a boot loader for the new operating system (i.e. the target operating system).
And 8, installing the GRUB on the target hard disk. Wherein GRUB (GNU GRand Unified Bootloader) is an open-source multi-operating system bootstrap program for loading operating systems and kernels, supporting users to select different operating systems or kernels. GRUB supports a variety of file systems, such as FAT, NTFS, EXT, and is available to a variety of operating systems, such as Linux, unix, windows.
Step 9, configuring GRUB for the new operating system.
Step 10, mounting a necessary file system (i.e. a preset file system) on the new operating system, such as/proc,/dev, etc.
And step 11, entering a new operating system environment through a color command.
Step 12, manually configuring according to a pre-selected installation mode or configuring according to a ks file.
And step 13, after all the configurations are completed, exiting the color environment and unloading the file system.
The embodiment can be applied to server testing and system deployment, and the remote server or the remote equipment is installed with an operating system under the condition that the network environment is limited or the network cannot be used, so that the dependence of the network environment is reduced. In addition, manual intervention is reduced, and errors caused by manual operation are also reduced. The efficiency of operating system installation is improved, and the reliability of operating system installation is also improved. Furthermore, the ability to support multiple operating systems and installation modes can provide the user with flexible options for the type and configuration of the installed operating system in response to a variety of different environments and requirements.
Optionally, based on the above embodiment, after the user selects the target hard disk, a virtual installation environment may be constructed in the current operating system environment, where multiple operating systems to be installed and installation modes thereof are provided for the user. The method comprises the following specific steps:
optionally, in one embodiment, the foregoing installation process of the target operating system is described with reference to fig. 2, and fig. 2 is a flowchart (second) of an installation method of the target operating system according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S201, the installation tool is started. The installation tool is started in the existing operating system environment. The installation tool may be understood as a stand-alone application or as a command line tool.
Step S202, selecting a target hard disk. And selecting a target hard disk of the operating system to be installed from a user interface of the installation tool.
Step S203, starting the virtual installation environment.
Before step S203, a boot installation function may be executed to display multiple types and versions of operating systems, so that a user may select the operating systems according to his own needs.
In step S204, the user selects an installation mode of the operating system, such as an automated installation (via ks file) or a manual installation. For automated installation, a ks file may be provided, and the operating system may be installed and configured according to instructions in the ks file. For manual installation, a simulated installation environment may be entered, with the installation and configuration of the operating system being performed manually by the user.
The ks file is a Kickstart file, which is an automatic installation mode commonly used in Red Hat series (including CentOS and Fedora) operating systems, and can be used for automatically performing most of system installation steps including partition, network setting, system package selection and the like.
Step S205, installing in an installation environment by using the selected installation mode;
step S206, the installation is completed;
step S207, switching to a target operating system;
step S208, configuring a target operating system;
step S209, configuration is completed;
step S210, switching to a current operating system;
step S211, removing the hard disk.
Based on the above steps, when the installation mode is automatic installation, the method specifically comprises: and reading a ks file provided by a user, and installing an operating system according to an instruction in the ks file. The operating system is then configured according to the instructions in the ks file, such as installing network drivers, setting system parameters, installing applications, and the like. After the installation and configuration of the operating system is completed, the user can automatically return to the user interface and prompt the user to pull out the hard disk on which the new operating system is installed. The automatic installation mode enables a user to complete the installation and configuration of the whole-flow operating system without manual intervention, reduces potential errors caused by manual operation, and improves the installation efficiency and accuracy.
When the installation mode is manual installation, the method specifically comprises the following steps: the operating system is installed by the user in a simulated installation environment according to a general procedure. After the installation is completed, the operation system is switched to a new operation system for configuration. After the configuration is completed, the system is switched back to the original system environment, and at the moment, the user can safely pull out the hard disk with the new operating system installed.
In the whole installation process, the virtual installation environment can be started in a main stream starting mode such as UEFI and Legacy BIOS, and the operations such as network drive installation and test tool replication in automatic installation enable the installation method to be used for rapidly deploying a scene of a system environment with preset configuration.
Through the steps, a user is allowed to directly install and configure a new operating system for other hard disks under the current operating system, and the efficiency and flexibility of installing the operating system are obviously improved. And the new operating system is installed and configured in the established virtual installation environment, so that the remote installation can be realized without being limited by the CPU architecture and the equipment type of the physical host, and the use scene is expanded.
Alternatively, the installation process of the target operating system may be implemented by other technical schemes, for example, a PXE network guiding method, so that the installation of the operating system is implemented on multiple computers in the network at the same time, however, the method needs a stable and high-speed network environment, and the configuration and management of the PXE server are complex and have low efficiency.
Or using an optical disk or USB drive, this approach requires manual operation on each computer, which is obviously impractical in a large scale environment.
Or by using disk cloning and backup tools such as Clonezilla and Acronis True Image, although these tools can copy the installed and configured operating system to other hard disks, typically only the entire hard disk can be copied and no particular operating system can be selected from a variety of operating systems.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
In this embodiment, an architecture schematic diagram of an installation device of the target operating system is further provided, and the system is used to implement the foregoing embodiments and preferred embodiments, which are not described herein. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
In one embodiment, in conjunction with fig. 3, there is provided a target operating system installation apparatus, as shown in fig. 3, including:
the response module 32 is configured to determine a target hard disk for installing a target operating system in response to an operation instruction of the target object;
the starting module 34 is configured to mount the target hard disk to a current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool, and the virtual installation environment is started in the current system environment;
An installation module 36, configured to install the target operating system selected by the target object to the target hard disk under the virtual installation environment.
By the above embodiment, the target hard disk for installing the target operating system is determined by responding to the operation instruction of the target object; mounting the target hard disk to the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool, and the virtual installation environment is started in the current system environment; and installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, so that the technical problem of how to improve the installation efficiency of the operating system can be solved, and the effect of improving the installation efficiency of the operating system is achieved.
Optionally, in an exemplary embodiment, the response module 32 is further configured to perform the following implementation steps: step S11, determining a server cluster for providing business service for the target object; step S12, determining a server to be configured from the server cluster; step S13, a notification message is sent to the target object, wherein the notification message comprises all hard disks of the server to be configured, and the notification message is used for prompting the target object to determine the target hard disk; in step S14, when an operation instruction sent by the target object based on the notification message is received, determining the hard disk indicated by the operation instruction as the target hard disk.
Alternatively, in this embodiment, for the server to be configured in step S12, the determination may be made based on, for example, the number of blank hard disks, the computing power resources of the server, whether the server supports the target operating system, and other factors.
Through the embodiment, remote installation of the operating system can be realized by combining a remote control technology. Aiming at a distributed environment and a large-scale data center, the installation efficiency is greatly improved.
Optionally, in an exemplary embodiment, the foregoing installation module 36 is further configured to implement the following scheme when the target hard disk is plural: the method comprises the steps of 1, simultaneously installing target operating systems selected by the target objects to the plurality of target hard disks under the virtual installation environment; and 2, after the target operating system selected by the target object is installed to any one target hard disk in the virtual installation environment, performing hard disk performance test on any one target hard disk, and if the any one target hard disk is determined to pass the hard disk performance test, installing the target operating system selected by the target object to other target hard disks in the virtual installation environment, wherein the other target hard disks represent target hard disks except the any one target hard disk in the plurality of target hard disks.
According to the embodiment, under the scene that a large number of hard disks need to be provided with an operating system, a user can be allowed to select a plurality of hard disks at a time, the plurality of hard disks are installed in batches, and unified configuration is performed.
Optionally, in an exemplary embodiment, the above-mentioned installation module 36 is further configured to further implement the following technical solutions: monitoring the running state of the target hard disk according to a preset period; under the condition that the running state indicates that the target hard disk is in normal running, if the hard disk memory of the target hard disk exceeds a preset threshold value, repairing the target hard disk; or repairing the target hard disk under the condition that the running state indicates that the target hard disk is in fault.
According to the embodiment, the detection and repair functions of the hard disk can be added in the installation process of the operating system, so that the health state of the hard disk is ensured.
Optionally, in an exemplary embodiment, the mounting module 36 is further configured to: and displaying other configuration options to the target object, wherein the other configuration options are used for configuring other system functions of the target operating system, and the other configuration options at least comprise one of the following: partitioning configuration, local configuration and preassembly software configuration; receiving a target configuration option determined by the target object from the other configuration options; and configuring the target operating system by using a configuration program corresponding to the target configuration option.
Through the embodiment, other configuration options in the installation process, such as partition schemes, network settings, pre-installed software and the like, can be provided for the user, so that the configuration integrity of the operating system is achieved.
Optionally, in an exemplary embodiment, the installation module 36 is further configured to perform the following steps: s21, determining a system installation file of the target operating system from the preset configuration file; step S22, copying the system installation file to the target hard disk, and obtaining an initialized first operating system by running the system installation file in the target hard disk; step S23, configuring a starting loader for the first operating system to obtain a second operating system, wherein the starting loader is used for starting the virtual installation environment; step S24, determining all operating systems to be installed contained in the target hard disk; step S25, installing the boot installation programs corresponding to all the operating systems to be installed to the second operating system to generate a boot installation function of the second operating system, wherein the boot installation function is used for displaying all the operating systems to be installed to the target object; step S26, mounting a preset file system for the second operating system to obtain a target operating system, wherein the preset file system is used for providing a file storage function; step S27, configuring the target operating system based on the configuration instruction of the target object; and step S28, after the configuration of the target operating system is completed, determining that the installation of the target operating system is completed, wherein the configuration instruction is used for indicating a configuration mode for configuring the target operating system.
Optionally, based on the steps S21 to S28, more operating system versions and types may be provided for the user to meet the wider requirements.
In the present embodiment, the preset file system may include a FAT (File Allocation Table) file system, a NTFS (New Technology File System) file system, and an ext4 (Fourth Extended Filesystem) file system, but is not limited thereto.
Different file systems may be used for different operating systems, the specific choice depending on the requirements of the operating system and the needs of the user.
The FAT (File Allocation Table) file system is suitable for smaller storage devices, such as a usb disk and an early Windows operating system, and has the characteristics of simplicity and good compatibility, but does not support larger files and larger storage capacity. The NTFS file system is a file system commonly used in Windows operating system, has higher security, stability and performance, supports larger storage capacity and file size, and supports access control and encryption functions. The ext4 file system is a file system commonly used in a Linux operating system, has better performance and stability, supports larger files and storage capacity, and has better file system log and recovery mechanism.
Optionally, in an exemplary embodiment, the mounting module 36 is further configured to: under the condition that the target object is determined to select the first installation mode, configuring system parameters of the target operating system according to the configuration instruction, wherein the system parameters at least comprise one of the following: network driving parameters, system operating parameters, application parameters; and under the condition that the target object selects the second installation mode, displaying a system parameter for configuring the target operating system and a guide configuration window corresponding to the system parameter to the target object according to the configuration instruction, generating a control instruction according to the operation of the target object in the guide configuration window, and configuring the target operating system based on the control instruction.
Optionally, based on the installation method for installing the target operating system in the virtual installation environment provided by the embodiment, an automation program corresponding to the installation method may be generated, and the automation program is integrated in a development tool, so as to provide a one-stop solution for a user.
Optionally, the above-mentioned installation module 36 is further configured to: after the target operating system completes all the configuration, the preset file system can be uninstalled to complete the configuration process of the target operating system, and the configuration flow is exited.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having stored therein a computer program/instruction, wherein the computer program/instruction is configured to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
In an exemplary embodiment, the computer program/instructions contain program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. When executed by the central processor 401, performs the various functions provided by the embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
Fig. 4 schematically shows a block diagram of a computer system for implementing an electronic device according to an embodiment of the present application.
It should be noted that, the computer system 400 of the electronic device shown in fig. 4 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 4, the computer system 400 includes a central processing unit 401 (Central Processing Unit, CPU) which can execute various appropriate actions and processes according to a program stored in a Read-Only Memory 402 (ROM) or a program loaded from a storage section 408 into a random access Memory 403 (Random Access Memory, RAM). In the random access memory 403, various programs and data required for the system operation are also stored. The central processing unit 401, the read only memory 402, and the random access memory 403 are connected to each other via a bus 404. An Input/Output interface 405 (i.e., an I/O interface) is also connected to bus 404.
The following components are connected to the input/output interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, a speaker, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a local area network card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The driver 410 is also connected to the input/output interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present application, the processes described in the various method flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. The computer programs, when executed by the central processor 401, perform the various functions defined in the system of the present application.
According to still another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the method for installing the target operating system described above. The electronic device of the present embodiment is shown in fig. 5, and comprises a memory 502 and a processor 504, the memory 502 storing a computer program, the processor 504 being arranged to perform the steps of any of the method embodiments described above by means of the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, it will be appreciated by those skilled in the art that the configuration shown in fig. 5 is merely illustrative, and the electronic device may be a service control device. Fig. 5 is not limited to the structure of the electronic device described above. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 5, or have a different configuration than shown in FIG. 5.
The memory 502 may be used to store software programs and modules, such as program instructions/modules corresponding to the installation method and apparatus of the target operating system in the embodiments of the present application, and the processor 504 executes the software programs and modules stored in the memory 502, thereby executing various functional applications and data processing, that is, implementing the installation method of the target operating system. Memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 502 may further include memory located remotely from processor 504, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 502 may specifically, but not limited to, information such as a log for containing sensitive data. As an example, as shown in fig. 5, the memory 502 may include, but is not limited to, a response module, a startup module, and an installation module of the installation apparatus of the target operating system. In addition, other module units in the installation device of the target operating system may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 506 is configured to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 506 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 506 is a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In addition, the electronic device further includes: a display 508; and a connection bus 510 for connecting the respective module parts in the above-described electronic device.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for installing a target operating system, comprising:
responding to an operation instruction of a target object, and determining a target hard disk for installing a target operating system;
mounting the target hard disk to the current system environment indicated by the operation instruction;
acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool;
starting the virtual installation environment in the current system environment;
and installing the target operating system selected by the target object to the target hard disk under the virtual installation environment.
2. The method of claim 1, wherein determining a target hard disk for installing a target operating system in response to an operation instruction of a target object comprises:
determining a server cluster for providing business services to the target object;
determining a server to be configured from the server cluster;
sending a notification message to the target object, wherein the notification message comprises all hard disks of the server to be configured, and the notification message is used for prompting the target object to determine the target hard disk;
and under the condition that an operation instruction sent by the target object based on the notification message is received, determining the hard disk indicated by the operation instruction as the target hard disk.
3. The method according to claim 1 or 2, wherein, in the case where the target hard disk is plural, installing the target operating system selected by the target object to the target hard disk in the virtual installation environment includes at least one of:
simultaneously installing the target operating system selected by the target object to a plurality of target hard disks under the virtual installation environment;
and after the target operating system selected by the target object is installed to any one target hard disk in the virtual installation environment, performing hard disk performance test on any one target hard disk, and if the any one target hard disk is determined to pass the hard disk performance test, installing the target operating system selected by the target object to other target hard disks in the virtual installation environment, wherein the other target hard disks represent target hard disks except any one target hard disk in the target hard disks.
4. The method of claim 1, wherein during installation of the target operating system selected by the target object to the target hard disk in the virtual installation environment, the method further comprises:
monitoring the running state of the target hard disk according to a preset period;
under the condition that the running state indicates that the target hard disk is in normal running, if the hard disk memory of the target hard disk exceeds a preset threshold value, repairing the target hard disk; or repairing the target hard disk under the condition that the running state indicates that the target hard disk is in fault.
5. The method of claim 1, wherein after installing the target operating system selected by the target object to the target hard disk in the virtual installation environment, the method further comprises:
and displaying other configuration options to the target object, wherein the other configuration options are used for configuring other system functions of the target operating system, and the other configuration options at least comprise one of the following: partitioning configuration, local configuration and preassembly software configuration;
receiving a target configuration option determined by the target object from the other configuration options;
And configuring the target operating system by using a configuration program corresponding to the target configuration option.
6. The method of claim 1, wherein installing the target operating system selected by the target object to the target hard disk in the virtual installation environment comprises:
determining a system installation file of the target operating system from the preset configuration file;
copying the system installation file to the target hard disk, and obtaining an initialized first operating system by running the system installation file in the target hard disk;
configuring a starting loader for the first operating system to obtain a second operating system, wherein the starting loader is used for starting the virtual installation environment;
determining all operating systems to be installed contained in the target hard disk;
installing the boot installation programs corresponding to all the operating systems to be installed to the second operating system to generate a boot installation function of the second operating system, wherein the boot installation function is used for displaying all the operating systems to be installed to the target object;
mounting a preset file system for the second operating system to obtain a target operating system, wherein the preset file system is used for providing a file storage function;
Configuring the target operating system based on the configuration instruction of the target object;
after the target operating system is configured, determining that the installation of the target operating system is completed, wherein the configuration instruction is used for indicating a configuration mode for configuring the target operating system.
7. The method of claim 6, wherein configuring the target operating system based on the configuration instructions of the target object comprises:
under the condition that the target object is determined to select the first installation mode, configuring system parameters of the target operating system according to the configuration instruction, wherein the system parameters at least comprise one of the following: network driving parameters, system operating parameters, application parameters;
and under the condition that the target object selects the second installation mode, displaying a system parameter for configuring the target operating system and a guide configuration window corresponding to the system parameter to the target object according to the configuration instruction, generating a control instruction according to the operation of the target object in the guide configuration window, and configuring the target operating system based on the control instruction.
8. A target operating system installation apparatus, comprising:
the response module is used for responding to the operation instruction of the target object and determining a target hard disk for installing a target operating system;
the starting module is used for mounting the target hard disk to the current system environment indicated by the operation instruction; acquiring a preset configuration file required for configuring a virtual installation environment, and determining a second system architecture to be simulated by the virtual installation environment according to a first system architecture corresponding to the preset configuration file; wherein the virtual installation environment is a virtual environment supporting the second system architecture generated using an environment simulation tool, and the virtual installation environment is started in the current system environment;
and the installation module is used for installing the target operating system selected by the target object to the target hard disk under the virtual installation environment.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method as claimed in any one of claims 1 to 7 when the computer program is executed by the processor.
CN202311161175.6A 2023-09-08 2023-09-08 Installation method and device of target operating system Pending CN117407005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311161175.6A CN117407005A (en) 2023-09-08 2023-09-08 Installation method and device of target operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311161175.6A CN117407005A (en) 2023-09-08 2023-09-08 Installation method and device of target operating system

Publications (1)

Publication Number Publication Date
CN117407005A true CN117407005A (en) 2024-01-16

Family

ID=89491569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311161175.6A Pending CN117407005A (en) 2023-09-08 2023-09-08 Installation method and device of target operating system

Country Status (1)

Country Link
CN (1) CN117407005A (en)

Similar Documents

Publication Publication Date Title
US8997090B2 (en) Installing an operating system in a host system
CN104185836A (en) Method and system for verifying proper operation of computing device after system change
CN102135893A (en) Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server
CN108509333A (en) Adjustment method and device
CN106897093A (en) A kind of dispositions method and device of windows operating systems
CN111538659B (en) Interface testing method, system, electronic equipment and storage medium of business scene
CN106528226B (en) Installation method and device of operating system
CN111078305A (en) Information acquisition method and device, server and information management system
CN113885971A (en) State management method and device based on self-adaptive platform system
CN114385251A (en) Operating system booting method, system, terminal and storage medium based on memory
CN106528114B (en) Android firmware application device and android firmware upgrading method
CN109471665B (en) Method for automatically installing Windows operating system
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN111176958A (en) Information monitoring method, system and storage medium
CN115221092A (en) Method, device and equipment for determining distributable bus of PCI-E card and storage medium
CN113821265B (en) Operating system control method and device, computer mainboard and readable storage medium
CN117407005A (en) Installation method and device of target operating system
CN115913913A (en) Network card pre-starting execution environment function fault positioning method and device
CN115237441A (en) Upgrade test method, device and medium based on cloud platform
CN111158645B (en) System and method for providing an integrated development environment
CN109684134B (en) Method and server for rapidly deploying firmware settings among multiple devices
CN113986263A (en) Code automation test method, device, electronic equipment and storage medium
CN112559006A (en) Enterprise client automatic upgrading method, system, equipment and storage medium
CN111414175A (en) Network installation method, system and device of operating system and readable storage medium

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