Method and device for manufacturing multi-system startup disk, method and device for installing operating system and startup disk
By cloning the operating system image and integrating plug-in packages on the initial startup disk, the problem of frequent changes in the image package is solved, and the rapid installation and efficient adaptation of the multi-system startup disk is achieved, which improves the efficiency and flexibility of operating system installation.
Patent Information
- Application Number
- CN202411070097.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-10
AI Technical Summary
Due to the different compatibility of different operating systems and different customer needs of different servers, the mirror packages are frequently changed, which increases the time cost and low operating system installation efficiency.
By cloning the image files of each operating system on the initial startup disk, and obtaining the plug-in packages and installation commands that the service software depends on, writing the plug-in installation boot program, integrating multiple operating systems, plug-in packages and service packages into multi-system startup In-disk, it realizes quick installation and flexibility of the operating system.
It improves the efficiency and flexibility of operating system installation, reduces the adaptation time of different operating systems and plug-in packages, and meets the usage needs of different users.
Smart Images

Figure CN119105769A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and boot disk for making a multi-system boot disk and installing an operating system. Background Art
[0002] At present, in order to achieve the purpose of rapid replication of the environment, the operating system, service software package and plug-in package that the service software depends on are usually installed on a server device, and after the installation is completed, the operating environment is built and the service operation test is performed to ensure that all services can work normally. After the test is passed, the Conezilla tool is used to back up the entire server environment, make it into an image package, and install the prepared image package to other server devices through a USB flash drive.
[0003] However, due to different operating system compatibility and customer requirements of different servers, image packages often change, requiring the native image of the operating system to be re-downloaded and installed, and the service software packages and plug-in packages to be retested to ensure that they can work properly in the new environment. Frequent changes and testing increase time costs and reduce the efficiency of operating system installation. Summary of the invention
[0004] In view of this, the present application provides a method, device and boot disk for producing a multi-system boot disk and installing an operating system to solve the deficiencies in the related art.
[0005] In a first aspect of the present application, a method for producing a multi-system boot disk is provided, which is applied to a first electronic device and includes:
[0006] When connected to an initial startup disk and booted from the initial startup disk, cloning each operating system installed in the first electronic device to obtain an image file of the operating system, wherein the initial startup disk includes software for cloning and restoring the operating system;
[0007] In the case that the operating system has installed the service software, obtaining a plug-in package that the service software depends on, and obtaining an installation command for installing the plug-in package for the service software;
[0008] Based on the plug-in package and the installation command, write a plug-in installation boot program;
[0009] The image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program are stored in the initial boot disk to obtain a multi-system boot disk.
[0010] According to an embodiment of the present application, a virtual machine program is pre-installed in the first electronic device, and cloning each operating system installed in the first electronic device includes:
[0011] The operating system is cloned for each operating system installed in each virtual machine of the first electronic device.
[0012] According to an embodiment of the present application, the multi-system boot disk further includes a configuration file, and the configuration file is used to record the operating system to be installed.
[0013] In a second aspect of the present application, a multi-system boot disk is provided. The multi-system boot disk is obtained according to the method proposed in the above embodiment.
[0014] In a third aspect of the present application, there is provided an operating system installation method, which is applied to a second electronic device, wherein when the second electronic device is first inserted with the multi-system boot disk obtained according to the above embodiment, the preferred boot item is configured as the multi-system boot disk, including:
[0015] When connected to the multi-system boot disk and booted from the multi-system boot disk, mounting the multi-system boot disk to a target path, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system;
[0016] Obtaining a target operating system to be installed, and installing an image file of the target operating system in the multi-system boot disk into a system disk of the second electronic device;
[0017] The service software package is installed to the target partition of the system disk, and the plug-in boot installation program is executed, so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
[0018] In a fourth aspect of the present application, a multi-system boot disk production device is provided, which is applied to a first electronic device, including:
[0019] a cloning unit, configured to clone each operating system installed in the first electronic device to obtain an image file of the operating system when connected to an initial boot disk and booted from the initial boot disk, wherein the initial boot disk includes software for cloning and restoring the operating system;
[0020] an acquisition unit, configured to acquire, when the operating system has installed the service software, a plug-in package that the service software depends on, and acquire an installation command for installing the plug-in package for the service software;
[0021] A writing unit, used to write a plug-in installation boot program based on the plug-in package and the installation command;
[0022] The storage unit is used to store the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program into the initial startup disk to obtain a multi-system startup disk.
[0023] In a fifth aspect of the present application, an operating system installation device is provided, which is applied to a second electronic device. When the second electronic device is first inserted into the multi-system boot disk obtained according to the above embodiment, the first boot item is configured as the multi-system boot disk. The device includes:
[0024] a mounting unit, configured to mount the multi-system boot disk to a target path when connected to the multi-system boot disk and booted from the multi-system boot disk, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system;
[0025] A first installation unit, configured to obtain a target operating system to be installed, and install an image file of the target operating system in the multi-system boot disk into a system disk of the second electronic device;
[0026] The second installation unit is used to install the service software package to the target partition of the system disk, and execute the plug-in boot installation program so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
[0027] In a sixth aspect of the present application, an electronic device is provided, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the steps of the method proposed in the above embodiment.
[0028] In a seventh aspect of the present application, a machine-readable storage medium is provided, wherein the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a processor, the steps of the method proposed in the above embodiment are implemented.
[0029] In an eighth aspect of the present application, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the method proposed in the above embodiment when executed by a processor.
[0030] It can be seen from the above technical solution that, by cloning each operating system installed in the first electronic device respectively for each operating system installed in the first electronic device when connected to the initial boot disk and booted from the initial boot disk, the image file of the operating system is obtained, the initial boot disk includes software for cloning and restoring the operating system, and when the operating system has installed service software, the plug-in package that the service software depends on is obtained, and the installation command for installing the plug-in package for the service software is obtained, based on the plug-in package and the installation command, the plug-in installation boot program is written, and the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program are stored in the initial boot disk to obtain a multi-system boot disk. By decoupling the operating system, service software package and plug-in package, the image files, service software packages and different plug-in packages of different operating systems are integrated into a multi-system boot disk, and the operating system is installed using the multi-system boot disk, the efficiency and flexibility of the operating system installation can be improved.
[0031] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of a method for making a multi-system boot disk provided in an embodiment of the present application;
[0033] Figure 2 It is a flowchart of a virtual machine cloning system provided in an embodiment of the present application;
[0034] Figure 3 It is a flowchart of an operating system installation method provided in an embodiment of the present application;
[0035] Figure 4 This is a flow chart of obtaining a plug-in installation boot program provided by an embodiment of the present application;
[0036] Figure 5 It is a schematic diagram of a method for making a multi-system boot disk provided in an embodiment of the present application;
[0037] Figure 6 It is a structural schematic diagram of a multi-system boot disk production device provided in an embodiment of the present application;
[0038] Figure 7 It is a structural diagram of an operating system installation device provided in an embodiment of the present application;
[0039] Figure 8 It is a schematic diagram of the hardware structure of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0042] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings.
[0043] In the related art, the operating system, service software and its dependent plug-in packages are installed on the server, the environment is built and the service operation test is performed, and then a mirror package is made, and finally the mirror package is installed on other servers, thereby replicating the server environment. However, due to the different compatibility of different servers with the operating system and different customer requirements, it is necessary to constantly change the mirror package and retest the service software package and plug-in package, which increases the time cost and reduces the efficiency of operating system installation.
[0044] In view of this, an embodiment of the present application discloses a method for producing a multi-system boot disk to solve the deficiencies in the related art.
[0045] like Figure 1 As shown, Figure 1 It is a flowchart of a method for producing a multi-system boot disk provided in an embodiment of the present application. The method for producing a multi-system boot disk can be applied to a first electronic device.
[0046] The embodiments of the present application do not specifically limit the first electronic device. Exemplarily, the first electronic device may include a client and a server for making a multi-system boot disk.
[0047] The method for making a multi-system boot disk may include the following steps.
[0048] Step 101: When connected to an initial boot disk and booted from the initial boot disk, clone each operating system installed in the first electronic device to obtain an image file of the operating system, and the initial boot disk includes software for cloning and restoring the operating system.
[0049] In an embodiment of the present application, when the initial boot disk is inserted into the first electronic device, that is, after the first electronic device is connected to the initial boot disk, the first electronic device can be booted from the initial boot disk.
[0050] For ease of understanding, this manual first introduces the boot disk:
[0051] A boot disk is a storage medium that contains the operating system core files and startup programs required to start the computer. The boot disk can guide the computer into an independent operating system environment or a specific software environment, such as a system installation environment, system recovery environment, diagnostic tools, security tools, etc.
[0052] In an embodiment of the present application, the initial boot disk includes software for cloning and restoring the operating system. Of course, as a boot disk, the initial boot disk also includes an environment for guiding the first electronic device to start and run the software for cloning and restoring the operating system.
[0053] Exemplarily, the initial boot disk may be a removable storage medium, such as a USB flash drive (U disk), a CD-ROM, a DVD, or an external hard disk.
[0054] Exemplarily, the software used for cloning and restoring the operating system in the initial boot disk may include Clonezilla. Of course, the present application does not specifically limit the software used for cloning and restoring the operating system in the initial boot disk. For example, the software used for cloning and restoring the operating system may also include Mondo Rescue, FOGProject, etc.
[0055] In some embodiments, an initial boot disk may be created in the first electronic device in the following manner:
[0056] Obtain an ISO image file of software for cloning and restoring an operating system, format a removable storage medium connected to the first electronic device, and write the ISO image file into the formatted removable storage medium using a boot disk creation software.
[0057] Exemplarily, the boot disk creation software may include UltraISO, Rufus, etc., which is not specifically limited in the embodiments of the present application.
[0058] For example, assuming that the software used to clone and restore the operating system is Clonezilla, you can first obtain the ISO image file "clonezilla-live.iso" of Clonezilla from the official website of Clonezilla, format the USB flash drive connected to the first electronic device, and then use the UltraISO tool to write the image file "clonezilla-live.iso" to the formatted USB flash drive to obtain the initial boot disk.
[0059] In some embodiments, after the initial boot disk is inserted into the first electronic device, the preferred boot item of the first electronic device can be set to the initial boot disk through the Basic Input Output System (BIOS) or the Unified Extensible Firmware Interface (UEFI), so that when the first electronic device starts, it boots from the initial boot disk, that is, loads and runs the operating system or software in the initial boot disk, rather than booting from the built-in hard disk or other storage device of the first electronic device.
[0060] In some embodiments, when the first electronic device is connected to an initial boot disk and booted from the initial boot disk, each native operating system installed in the first electronic device is cloned to obtain an image file of the native operating system.
[0061] The first electronic device can install the native operating system by installing the image file of the native operating system. It is understandable that the native operating system is an operating system that has not been additionally modified, streamlined, or added with other unofficial components by a user or a third party.
[0062] In some embodiments, the image file of the operating system obtained may be in a ".img" format. Of course, the image file of the operating system may also be in other file formats, such as ".iso" or ".vmdk", etc., which is not specifically limited in the embodiments of the present application.
[0063] In some embodiments, a virtual machine program may be pre-installed in the first electronic device, and multiple virtual machines may be created through the virtual machine program. Different operating systems may be pre-installed for multiple virtual machines according to actual business needs. It should be understood that different operating systems may be different types of operating systems (such as Windows, Linux, etc.) or different versions of the same operating system (such as Ubuntu 18.04, Ubuntu 20.04, etc.).
[0064] The operating system installed in each virtual machine of the first electronic device is cloned to obtain an image file of the operating system.
[0065] For example, Figure 2 As shown, operating system A can be installed in virtual machine A of the first electronic device by installing the image file "A.iso". Similarly, operating system B can be installed in virtual machine B, and operating system C can be installed in virtual machine C. For operating system A installed in virtual machine A of the first electronic device, Clonezilla in the initial boot disk is used to clone operating system A to obtain the image file "A.img" of operating system A. Similarly, Clonezilla is used to clone the operating systems installed in virtual machines B and C to obtain image files "B.img" and "C.img" respectively.
[0066] In some embodiments, the storage location of the image file may be determined first, and then the operating system may be cloned using software for cloning and restoring the operating system in the initial boot disk. After the cloning is completed, the image file of the operating system may be saved to the above storage location.
[0067] Exemplarily, the storage location may be a pre-set partition in an initial boot disk, or a partition in another storage medium connected to the first electronic device.
[0068] Step 102: When the operating system has installed the service software, obtain a plug-in package that the service software depends on, and obtain an installation command for installing the plug-in package for the service software.
[0069] In some embodiments, for each operating system installed in the first electronic device, after obtaining the image file of the operating system, a service software package may be obtained and installed in the operating system.
[0070] In some embodiments, for each operating system installed in the first electronic device, after obtaining the image file of the operating system, the same service software package can be obtained.
[0071] Exemplarily, a service software package may be a collection of all necessary components of one or more service software, and the service software package usually exists in the form of a compressed file, such as ".zip", ".rpm" or ".deb" and the like.
[0072] It is understandable that the service software package is the installation medium of the service software, and the service software is the function implementation after the service software package is installed. When the service software package is installed on the operating system, the software actually running in the operating system is the service software.
[0073] Exemplarily, the service software may provide specific services or functions, such as database services, Web services, and the like.
[0074] In the embodiment of the present application, for each operating system installed in the first electronic device, if the operating system has installed the service software, the plug-in package on which the service software depends is obtained.
[0075] For example, service software installed in an operating system may require additional software components to extend its functionality, improve performance, or provide additional services. These additional components are plug-in packages.
[0076] A plug-in package may contain libraries, modules, extensions, or other software that works in conjunction with the service software.
[0077] In some embodiments, the plug-in package that the service software depends on can be obtained based on user operations, and the above user operations can include operations such as searching, downloading and verifying the plug-in package. Of course, the embodiments of the present application do not specifically limit the method of obtaining the plug-in package that the service software depends on. For example, the plug-in package that the service software depends on can also be obtained through a plug-in package manager, a local storage medium, etc.
[0078] The embodiments of the present application do not specifically limit the method of obtaining the installation command for installing the plug-in package for the service software. For example, the installation command for installing the plug-in package on which the service software depends can be obtained based on user input, configuration files, or a package manager.
[0079] In some embodiments, in order to ensure that the plug-in package on which the service software depends is correctly installed, after obtaining the installation command for installing the plug-in package on which the service software depends, the installation command can be tested in the operating system environment of the first electronic device, or in the operating system environment of a virtual machine running on the first electronic device, that is, the installation command is executed, and a judgment is made as to whether the plug-in package is correctly installed and whether the service software can run normally after the plug-in package is installed. If the plug-in package can be installed correctly and the service software can run normally after the plug-in package is installed, the operating system, service software, plug-in package and installation command are associated as basic information for writing the plug-in installation boot program. Otherwise, the adjusted installation command is obtained and retested until the plug-in package can be installed correctly and the service software can run normally after the plug-in package is installed.
[0080] Step 103: Based on the plug-in package and the installation command, write a plug-in installation boot program.
[0081] In an embodiment of the present application, after obtaining the plug-in packages and installation commands of the plug-in packages that each service software depends on in the operating system environment for each operating system installed in the first electronic device, all plug-in packages and installation commands of the plug-in packages obtained in each operating system environment can be integrated to write a plug-in installation boot program.
[0082] Exemplarily, the plug-in installation boot program is used to guide each operating system to automatically install a corresponding plug-in package for the service software in each operating system.
[0083] In some embodiments, since the obtained plug-in package is a plug-in package that a service software depends on in an operating system environment, the association relationship between the operating system, service software, plug-in package and the installation command of the plug-in package can be determined based on the plug-in package and the installation command of the plug-in package, and the installation command of the plug-in package and the corresponding association relationship can be recorded in the plug-in installation boot program.
[0084] Step 104: Store the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program into the initial boot disk to obtain a multi-system boot disk.
[0085] In an embodiment of the present application, for each operating system installed in the first electronic device, the image file of the operating system and the plug-in package on which the service software in the operating system depends are obtained respectively. Therefore, the image files of multiple operating systems, multiple plug-in packages, service software packages and plug-in boot installation programs can be stored in the initial boot disk to obtain a multi-system boot disk.
[0086] It is understandable that the service software package may be a collection of all necessary components of one or more service software, and the service software package is the installation medium of the service software in the operating system. For multiple operating systems, the same service software package may be used.
[0087] In some embodiments, a configuration file may be created and stored in a multi-system boot disk. The configuration file is used to record the operating system to be installed, for example, the file name of the image file of the operating system to be installed.
[0088] In an embodiment of the present application, by connecting to an initial boot disk and booting from the initial boot disk, cloning the operating system for each operating system installed in the first electronic device to obtain the image file of the operating system, the initial boot disk includes software for cloning and restoring the operating system, and in the case where the operating system has installed service software, obtaining the plug-in package that the service software depends on, and obtaining the installation command for installing the plug-in package for the service software, writing a plug-in installation boot program based on the plug-in package and the installation command, and storing the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program in the initial boot disk to obtain a multi-system boot disk. By decoupling the operating system, service software package and plug-in package, the image files, service software packages and different plug-in packages of different operating systems are integrated into a multi-system boot disk, and the multi-system boot disk is used to install the operating system, which can save resources, meet the usage needs of different users, and improve the efficiency and flexibility of operating system installation.
[0089] like Figure 3 As shown, Figure 3 1 is a flowchart of an operating system installation method provided in an embodiment of the present application, and the operating system installation method can be applied to a second electronic device. The embodiment of the present application does not specifically limit the second electronic device. For example, the second electronic device may include a client, a server, etc. that need to install an operating system.
[0090] In an embodiment of the present application, when the second electronic device is first inserted with the multi-system boot disk obtained according to the multi-system boot disk production method, the first-choice boot item is configured as the multi-system boot disk.
[0091] In some embodiments, after the multi-system boot disk is inserted into the second electronic device, the preferred boot item of the second electronic device can be set to the multi-system boot disk through BIOS or UEFI settings, so that when the second electronic device starts, it boots from the multi-system boot disk, that is, loads and runs the operating system or software in the multi-system boot disk, rather than booting from the built-in hard disk or other storage device of the second electronic device.
[0092] The operating system installation method may include the following steps.
[0093] Step 301: When connected to the multi-system startup disk and booted from the multi-system startup disk, the multi-system startup disk is mounted to the target path, the multi-system startup disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and plug-in boot installation programs, wherein the plug-in boot installation program is used to install corresponding plug-in packages for the service software in each operating system.
[0094] When the second electronic device is connected to the multi-system boot disk and booted from the multi-system boot disk, the multi-system boot disk is mounted to the target path, so that the second electronic device can access the image files of multiple operating systems, multiple plug-in packages, service software packages, plug-in boot installation programs and other files in the multi-system boot disk through the target path just like accessing the local file system.
[0095] Step 302: Obtain the target operating system to be installed, and install the image file of the target operating system in the multi-system boot disk to the system disk of the second electronic device.
[0096] In some embodiments, the multi-system boot disk further includes a configuration file, which is used to record the operating system to be installed, such as recording the file name of the image file of the target operating system to be installed. The second electronic device can obtain the target operating system to be installed by reading the configuration file.
[0097] In some embodiments, the system disk for installing the target operating system in the second electronic device may be specified based on a preset command. For example, the sfdisk command is used to query all identifiable hard disk devices of the second electronic device and specify the system disk.
[0098] Step 303: Install the service software package to the target partition of the system disk, and execute the plug-in boot installation program, so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
[0099] In some embodiments, the target partition in the system disk of the second electronic device may be mounted to a designated directory.
[0100] In some embodiments, the plug-in installation boot program is used to guide each operating system to automatically install the corresponding plug-in package for the service software in each operating system. The plug-in installation boot program can record the installation commands of the plug-in package and the corresponding association relationship. The above association relationship is the association relationship between the operating system, service software, plug-in package and the installation command of the plug-in package.
[0101] When executing the plug-in installation boot program, the plug-in installation boot program can determine the target association relationship based on the current operating system and the service software installed in the current operating system, and determine the target plug-in package and the installation command of the target plug-in package according to the target association relationship. By executing the installation command of the target plug-in package, the target plug-in package is installed for the service software installed in the current operating system.
[0102] In an embodiment of the present application, the multi-system boot disk is mounted to a target path while being connected to and booted from the multi-system boot disk, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system, obtain a target operating system to be installed, install the image file of the target operating system in the multi-system boot disk to the system disk of the second electronic device, install the service software package to the target partition of the system disk, and execute the plug-in boot installation program so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software. By installing the operating system through a multi-system boot disk that integrates image files, service software packages and different plug-in packages of different operating systems, resources can be saved, the usage needs of different users can be met, the time for services and plug-ins to adapt to the operating system can be shortened, and the efficiency and flexibility of operating system installation can be improved.
[0103] like Figure 4 As shown, Figure 4 This is a flowchart of obtaining a plug-in installation boot program provided by an embodiment of the present application. Taking virtual machine A as an example (the same applies to virtual machines B and C), operating system A is installed in virtual machine A of the first electronic device by installing the image file "A.iso", a service software package is obtained and installed in operating system A, plug-in package A on which service software in operating system A depends is obtained, an installation command for installing plug-in package A for service software is obtained, and the installation command is tested in virtual machine A. Plug-in package A, plug-in package B, plug-in package C and their corresponding installation commands are integrated to write a plug-in installation boot program.
[0104] In some embodiments, the installation command may be tested by:
[0105] Taking virtual machine A as an example, execute the installation command, and determine whether plug-in package A is installed correctly and whether the service software can run normally after installing plug-in package A. If plug-in package A can be installed correctly and the service software can run normally after installing plug-in package A, then associate operating system A, service software, plug-in package A and the installation command as basic information for writing the plug-in installation boot program. Otherwise, obtain the adjusted installation command and retest until plug-in package A can be installed correctly and the service software can run normally after installing plug-in package A.
[0106] In an embodiment of the present application, the operating system, plug-in, and service software package are decoupled. By organizing the plug-in packages that the service software depends on and the installation commands of the plug-in packages in different operating system environments, and testing and writing plug-in installation boot programs, the efficiency and flexibility of the operating system installation can be improved.
[0107] like Figure 5 As shown, Figure 5 It is a schematic diagram of a method for making a multi-system boot disk provided in an embodiment of the present application. A Regener Dragon image file can be used to make a Regener Dragon U disk boot disk, and the cloned img files of multiple operating systems, multiple plug-in packages, plug-in installation boot programs, service software packages, configuration files, and system restore boot programs are stored in the Regener Dragon U disk boot disk to obtain a Regener Dragon multi-system U disk boot disk.
[0108] In some embodiments, after obtaining the Regener Dragon multi-system USB boot disk (hereinafter referred to as USB disk), the img image file name of the operating system to be installed can be set in the configuration file.
[0109] Insert the USB flash drive into the electronic device, boot the electronic device from the USB flash drive, enter the Regeneration Dragon interface, edit the "ocs_live_run" command in the " / syslinux / isolinux.cfg" and " / syslinux / syslinux.cfg" files, and set "ocs-live-general" to "custom-ocs", where "custom-ocs" is the system recovery boot program. By setting "ocs-live-general" to "custom-ocs", the electronic device automatically executes the program named "custom-ocs" after booting from the USB flash drive.
[0110] Insert the USB drive and system disk into the electronic device, enter BIOS, set the USB drive as the preferred boot item, save and exit BIOS, and restart the electronic device. After restarting, the electronic device will boot directly from the USB drive and automatically execute the system restore boot program.
[0111] The system restore boot program "custom-ocs" can include the following steps:
[0112] 1. Use the blkid command to identify the USB drive and mount it to the / home / partimag path
[0113] 2. Use the sfdisk command to query all identifiable hard disk devices and specify the system disk
[0114] 3. Get the img image file name in the configuration file.
[0115] 4. Execute the command "ocs-sr-g auto--nogui-brp command restoredisk xxx.img" to install the img system file to the system disk.
[0116] Among them, ocs-sr: is the command line interface of Clonezilla, used to perform various operations;
[0117] -g auto: Use Clonezilla automatic mode;
[0118] --nogui: Do not start the graphical user interface, but use the command line interface;
[0119] -b: clone operation;
[0120] -r: Restore data from the image file to the target disk.
[0121] -p command: Use command as the restore command.
[0122] restoredisk xxx.img: recovery command, where "xxx.img" is the name of the system disk image file, and restoredisk is the recovery tool in Clonezilla, which is used to restore the image file to the target disk.
[0123] 5. Mount the system disk partition to the / mnt path;
[0124] 6. Install the service software package to the system disk partition;
[0125] 7. Execute the plug-in installation boot program to install the plug-in package into the system disk partition;
[0126] 8. Unmount / mnt and / home / partimag mount points;
[0127] 9. Execute the poweroff shutdown command.
[0128] In an embodiment of the present application, the operating system, service software package, and plug-in package are decoupled, and the image files, service software packages, and different plug-in packages of different operating systems are integrated into a multi-system boot disk. The multi-system boot disk is used to install the operating system, and the installation process is highly automated, which can shorten the execution time and improve the efficiency and flexibility of the operating system installation.
[0129] The method provided by the present application is described above. The device provided by the present application is described below:
[0130] See also Figure 6, is a schematic diagram of the structure of a multi-system boot disk production device provided in an embodiment of the present application. Figure 6 As shown, the multi-system boot disk production device is applied to a first electronic device, and the device may include:
[0131] The cloning unit 610 is used to clone each operating system installed in the first electronic device to obtain an image file of the operating system when the first electronic device is connected to an initial boot disk and booted from the initial boot disk, wherein the initial boot disk includes software for cloning and restoring the operating system;
[0132] The acquisition unit 620 is used to acquire the plug-in package that the service software depends on, and acquire an installation command for installing the plug-in package for the service software, if the service software has been installed in the operating system;
[0133] A writing unit 630 is used to write a plug-in installation boot program based on the plug-in package and the installation command;
[0134] The storage unit 640 is used to store the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program into the initial boot disk to obtain a multi-system boot disk.
[0135] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0136] See also Figure 7 , is a schematic diagram of the structure of an operating system installation device provided in an embodiment of the present application. Figure 7 As shown, the operating system installation device is applied to a second electronic device, and when the second electronic device is first inserted into a multi-system boot disk obtained by a multi-system boot disk production device, the preferred startup item is configured as the multi-system boot disk, and the operating system installation device may include:
[0137] The mounting unit 710 is used to mount the multi-system boot disk to a target path when connected to the multi-system boot disk and booted from the multi-system boot disk, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system;
[0138] The first installation unit 720 is used to obtain a target operating system to be installed, and install the image file of the target operating system in the multi-system boot disk into the system disk of the second electronic device;
[0139] The second installation unit 730 is used to install the service software package to the target partition of the system disk, and execute the plug-in boot installation program so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
[0140] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0141] The present application embodiment also provides a hardware structure. Figure 8 , Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.
[0142] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the method disclosed in the above example of the present application can be implemented.
[0143] Exemplarily, the above-mentioned machine-readable storage medium can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0144] It should be noted that, in this article, relational terms such as target and target are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0145] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for making a multi-system boot disk, characterized in that: Applied to a first electronic device, the method includes: When connected to an initial startup disk and booted from the initial startup disk, cloning each operating system installed in the first electronic device to obtain an image file of the operating system, wherein the initial startup disk includes software for cloning and restoring the operating system; In the case that the operating system has installed the service software, obtaining a plug-in package that the service software depends on, and obtaining an installation command for installing the plug-in package for the service software; Based on the plug-in package and the installation command, write a plug-in installation boot program; The image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program are stored in the initial boot disk to obtain a multi-system boot disk.
2. The method according to claim 1, characterized in that The first electronic device is pre-installed with a virtual machine program, and the cloning of each operating system installed in the first electronic device includes: The operating system is cloned for each operating system installed in each virtual machine of the first electronic device.
3. The method according to claim 1, characterized in that The multi-system boot disk also includes a configuration file, and the configuration file is used to record the operating system to be installed.
4. A multi-system boot disk, characterized in that: The multi-system boot disk is obtained according to the method described in any one of claims 1-3.
5. A method for installing an operating system, characterized in that: Applied to a second electronic device, the second electronic device is inserted into the In the case of the multi-system boot disk according to claim 4, the preferred boot item is configured as the multi-system boot disk, and the method comprises: When connected to the multi-system boot disk and booted from the multi-system boot disk, mounting the multi-system boot disk to a target path, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system; Obtaining a target operating system to be installed, and installing an image file of the target operating system in the multi-system boot disk into a system disk of the second electronic device; The service software package is installed to the target partition of the system disk, and the plug-in boot installation program is executed, so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
6. A multi-system boot disk production device, characterized in that: Applied to a first electronic device, the device comprises: a cloning unit, configured to clone each operating system installed in the first electronic device to obtain an image file of the operating system when connected to an initial boot disk and booted from the initial boot disk, wherein the initial boot disk includes software for cloning and restoring the operating system; an acquisition unit, configured to acquire, when the operating system has installed the service software, a plug-in package that the service software depends on, and acquire an installation command for installing the plug-in package for the service software; A writing unit, used for writing a plug-in installation boot program based on the plug-in package and the installation command; The storage unit is used to store the image files of multiple operating systems, multiple plug-in packages, service software packages and the plug-in boot installation program into the initial startup disk to obtain a multi-system startup disk.
7. An operating system installation device, characterized in that: Applied to a second electronic device, the second electronic device is inserted into the In the case of the multi-system boot disk obtained according to claim 6, the preferred boot item is configured as the multi-system boot disk, and the device comprises: a mounting unit, configured to mount the multi-system boot disk to a target path when connected to the multi-system boot disk and booted from the multi-system boot disk, wherein the multi-system boot disk contains at least image files of multiple operating systems, multiple plug-in packages, service software packages and a plug-in boot installation program, wherein the plug-in boot installation program is used to install corresponding plug-in packages for service software in each operating system; A first installation unit, configured to obtain a target operating system to be installed, and install an image file of the target operating system in the multi-system boot disk into a system disk of the second electronic device; The second installation unit is used to install the service software package to the target partition of the system disk, and execute the plug-in boot installation program so that the plug-in boot installation program installs the target plug-in package to the target partition based on the target operating system and the installed service software.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the method according to any one of claims 1 to 3 or 5.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are executed by a processor, the method according to any one of claims 1 to 3 or 5 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 3 or 5 are implemented.
