CN108647034B - Method for installing multiple operating systems on single mobile hard disk - Google Patents
Method for installing multiple operating systems on single mobile hard disk Download PDFInfo
- Publication number
- CN108647034B CN108647034B CN201810312863.0A CN201810312863A CN108647034B CN 108647034 B CN108647034 B CN 108647034B CN 201810312863 A CN201810312863 A CN 201810312863A CN 108647034 B CN108647034 B CN 108647034B
- Authority
- CN
- China
- Prior art keywords
- partition
- hard disk
- installing
- mobile hard
- operating systems
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4406—Loading of operating system
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method for installing a plurality of operating systems on a single mobile hard disk, which comprises the following steps: 1) the formatted mobile hard disk is in a GPT format, and the partition is as follows: 3 fat32 partitions, 1 NTFS partition and 1 Ext4 partition; 2) setting partition type, setting the third fat32 partition as ESP partition, creating a protective MBR partition of 1MB, and setting partition type as EF 02; 3) installing Grub 2; 4) installing an rEFInd bootstrap program and a wind; 5) add configuration Grub2 menu; 6) downloading a system mirror image file; 7) and (6) mounting. The method for installing the plurality of operating systems on the single mobile hard disk has the advantages of high efficiency, universality, expansibility, multi-systematicness and the like, not only supports the installation of Linux and Windows systems, but also supports the installation of two disk format systems, and has good practicability.
Description
Technical Field
The invention belongs to the technical field of software testing, and particularly relates to a method for installing a plurality of operating systems on a single mobile hard disk.
Background
At present, most of the conventional methods for installing an operating system are single, such as traditional method for guiding installation through an optical drive, or installing the system by burning a system image to a usb disk, for example:
in chinese patent application CN201110065667.6, a method for quickly installing a linux operating system using a mobile hard disk is disclosed, which includes making a boot mobile hard disk, copying iso image of the linux operating system to the mobile hard disk, extracting vmlinux and initrd files, and booting from the mobile hard disk to install the linux operating system. Compared with the prior art, the method for quickly installing the linux operating system by using the mobile hard disk has the advantages that a server does not need to be provided with a separate optical drive, so that the cost is saved; if no medium exists, the phenomenon that data cannot be read due to medium scratching is avoided; the installation speed is high, and the compatibility of the server and various linux operating system versions can be conveniently verified.
In chinese patent application No. cn200610038885.x, a method for implementing the startup of LINUX operating system on a mobile hard disk is disclosed, which is implemented by inserting the mobile hard disk into a USB port of a PC, and then implementing the startup of LINUX operating system on the mobile hard disk, wherein the LINUX operating system is established in the mobile hard disk; entering a BIOS of the PC, and setting the PC to be started in a USB-HDD or USB-ZIP mode; starting a system bootstrap program, selecting the LINUX version by a user, and loading the LINUX kernel and the INITRD into the memory of the PC from the mobile hard disk by the system bootstrap program; starting a LINUX kernel, initializing a system and loading a task; entering a file system of the INITRD, and switching to a root file system on the mobile hard disk; automatically detecting hardware equipment, automatically installing a driver and automatically configuring; starting a desktop system, automatically detecting the hard disk partition after a user inputs a user name and a password, automatically mounting the hard disk partition and the like.
The above method is convenient for individuals, but has the main disadvantages for testers who often install different operating systems: firstly, a system needs to be installed once and recorded once again, if the optical disk is installed, different systems occupy a large number of optical disks, and the installation speed of the optical disks is relatively slow; secondly, if the recording of the U disk is installed, the recording is troublesome repeatedly, and the recording itself will take a certain time.
Although there is third-party software capable of booting and installing multiple systems from a single flash disk/hard disk on the current network, the functions are relatively single, some support only the installation of windows-based operating systems, some support only linux-based operating systems, and some support only legacy or UEFI-based system installation, and obviously, the use requirements cannot be completely met.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the defects in the prior art, the invention aims to provide a method for installing a plurality of operating systems on a single mobile hard disk, which can support the installation of windows and linux systems and simultaneously support legacy and UEFI modes on the premise of higher efficiency and resource saving.
The technical scheme is as follows: in order to realize the purpose of the invention, the technical scheme is as follows:
a method for installing a plurality of operating systems on a single mobile hard disk comprises the following steps:
1) the formatted mobile hard disk is in a GPT format, and at least the partition is as follows: 3 fat32 partitions, 1 NTFS partition and 1 Ext4 partition; the first fat32 partition is used for placing a boot program of the rEFInd, the second fat32 partition is used for placing a winpe file, the third fat32 partition is used for installing grub2, the NTFS partition is used for placing a decompressed file of a Windows system image, and the Ext4 partition is used for placing an image file of the Linux;
2) setting partition type, setting the third fat32 partition as ESP partition, creating a protective MBR partition of 1MB, and setting partition type as EF 02;
3) installing Grub2, creating a boot folder under the third fat32 partition, mounting the third fat32 partition to an empty directory, and then respectively installing boot programs of UEFI and LegacyGrub2 under the boot folder of the mounted directory by using a Grub-install command;
4) installing an rEFInd bootstrap program and a window, obtaining the latest rEFInd by using the prior art, decompressing and placing the latest rEFInd in a first fat32 partition, performing corresponding configuration according to a readme file, extracting the window from a Windows ADK, and placing all files of the Winpe in a second fat32 partition;
5) adding a Grub2 configuration menu, newly building a grub.cfg menu under a/boot/Grub directory of a third fat32 partition, and then configuring a boot menu of the Linux system according to the grammar of the Grub2 and the Linux image file path placed in the Ext 4;
6) downloading a system image file, downloading a Windows system image and a Linux system image which need to be installed, placing the Windows system image in a certain directory of an NTFS partition, and then respectively decompressing; the Linux image is placed in a certain directory of the EXT 4;
7) connecting the mobile hard disk to a computer to be installed, starting up the computer to a start-up menu interface according to the setting of BIOS, if a Legacy system is to be installed, selecting a Legacy start-up option of the mobile hard disk, entering a Grub2 boot menu interface, and selecting the system to be installed to start up and install; if a UEFI system is to be installed, selecting a UEFI starting option of a mobile hard disk, entering an rEFInd starting management interface, if a Windows system is installed, entering a corresponding system decompression folder after selecting Winpe starting, running setup.exe to normally install, if a Linux system is installed, selecting Grub to call a boot menu of Grub2, and selecting a system to be installed to start and install.
In the step 1), a linux partition of EXT3/EXT4 is separately divided and used for storing linux image files larger than 4 GB.
In the step 1), an NTFS partition is separately divided to store Windows system installation files and can be used as a common storage partition.
In the step 1), a fat32 partition is separately divided and used for storing the uefisher program for maintenance.
In the step 1), an NTFS partition is separately divided and used for installing a Windows system supporting the Windows togo function.
In the step 1), an EXT4 partition is separately divided and used for installing a common linux system for daily maintenance.
Has the advantages that: compared with the prior art, the method for installing the plurality of operating systems on the single mobile hard disk has the following advantages:
1) high efficiency: the preparation work in the previous period is only completed once, the operating system needing to be installed only needs to be placed in the appointed directory, and what needs to be installed and re-recorded like the recording of a U disk is not needed, so that the time is saved.
2) Universality: the method utilizes the mobile hard disk to install the system, and supports all computers which support the USB starting function and are on the market and in test development at present, including desktop computers, notebooks, servers and the like.
3) Expansibility: adding and deleting the operating system supporting installation is convenient and simple, the downloaded system files are only required to be placed into a specified directory, and the configuration files of grub2 are modified to guide installation of a new operating system or remove an unnecessary operating system (an actual system exists, a guide removal option).
4) Multisystemic: the installation of different kernel mode systems is supported, and the installation of Linux and Windows systems is supported; the method supports the installation of two disk format systems, not only supports the system installation of MBR disk format in the traditional legacy BIOS mode, but also supports the installation of GPT disk format system in the currently mainstream and popularized UEFIBIOS mode.
Drawings
FIG. 1 is a flow chart of a method for installing multiple operating systems on a single removable disk.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Example 1
The method for installing a plurality of operating systems on the single mobile hard disk comprises the following steps:
1) formatting the mobile hard disk into a GPT format, then partitioning, wherein the partition needs to meet the following conditions: if expansion is needed, other partitions can be further divided for normal storage or maintenance, wherein a boot program of rEFInd is placed in the first fat32 partition, a winpe file is placed in the second fat32 partition, a grub2 is installed in the third fat32 partition, an NTFS partition is used for placing a decompression file of Windows system images, and an Ext4 partition is used for placing an image file of Linux;
2) setting partition types, in order to realize UEFI and Legacy dual boot, Grub2 needs to be installed as a boot program, a third fat32 partition needs to be set as an ESP partition (namely, the partition type is EF 00), a protective MBR partition of 1MB is created, and the partition type is set as EF 02;
3) installing Grub2, creating a boot folder under the third fat32 partition, mounting the third fat32 partition to an empty directory, and then respectively installing boot programs of UEFI and LegacyGrub2 under the boot folder of the mounted directory by using a Grub-install command;
4) installing an rEFInd bootstrap program and a window, acquiring (for example, downloading a website) the latest rEFInd by using the prior art, decompressing and placing the rEFInd in a first fat32 partition, performing corresponding configuration according to a readme file, extracting the window from a Windows ADK, and placing all files of the Winpe in a second fat32 partition;
5) adding a Grub2 configuration menu, newly building a grub.cfg menu under a/boot/Grub directory of a third fat32 partition, and then configuring a boot menu of the Linux system according to the grammar of the Grub2 and the Linux image file path placed in the Ext 4;
6) downloading a system image file, downloading a Windows system image and a Linux system image which need to be installed, placing the Windows system image in a certain directory of an NTFS partition, and then respectively decompressing; the Linux image is placed in a certain directory of the EXT 4;
7) installing, namely inserting a mobile hard disk into a USB port of a computer to be installed, starting up to a start-up menu interface according to the setting of BIOS (basic input output System) as shown in figure 1, if a Legacy system is to be installed, selecting a Legacy start-up option of the mobile hard disk, entering a Grub2 boot menu interface, and selecting the system to be installed to start up and install; if a UEFI system is to be installed, selecting a UEFI starting option of a mobile hard disk, entering an rEFInd starting management interface, if a Windows system is installed, entering a corresponding system decompression folder after selecting Winpe starting, running setup.exe to normally install, if a Linux system is installed, selecting Grub to call a boot menu of Grub2, and selecting a system to be installed to start and install.
The hard disk used in this embodiment is a conventional mobile hard disk, and may be a mobile hard disk of a currently marketed brand, for example: toshiba, western data, Seagate, Samsung, Dietui and the like can be used only by a computer or a testing machine provided with the system to normally recognize, and the compatibility is good.
Example 2
In the expansion function of installing multiple operating systems on a single mobile hard disk in embodiment 1, the mobile hard disk needs to be initialized to a GPT format to support UEFI boot; a fat32 partition is divided separately, and grub2 is installed in the partition, so that a linux operating system and a legacy windows system are installed through grub2 booting; a fat32 partition is divided separately, and a UEFI boot management tool of a third party is stored, so that the UEFIWinpe environment is booted to install a UEFIWindows operating system; the method comprises the steps that a linux partition of EXT3/EXT4 is divided separately, the linux partition is used for storing linux image files larger than 4GB, the fat32 partition format does not support a single file larger than 4GB, the linux image is not provided with driving support of an NTFS partition format by default, and the image can only be stored in an EXT3 partition or an EXT4 partition which can be identified by the linux; an NTFS partition is separately divided, so that the NTFS partition is used for storing Windows system installation files and can be used as a common storage partition; a fat32 partition is separately divided and used for storing any uefisher program, such as a uefisher environment, and is used for maintenance; an NTFS partition is divided separately and used for installing a Windows system supporting the Windows togo function; an EXT4 partition is divided separately for installing a conventional linux system, such as Ubuntu, for routine maintenance.
Claims (6)
1. A method for installing a plurality of operating systems on a single mobile hard disk is characterized by comprising the following steps:
1) the formatted mobile hard disk is in a GPT format, and at least the partition is as follows: 3 fat32 partitions, 1 NTFS partition and 1 Ext4 partition; the first fat32 partition is used for placing a boot program of the rEFInd, the second fat32 partition is used for placing a winpe file, the third fat32 partition is used for installing grub2, the NTFS partition is used for placing a decompressed file of a Windows system image, and the Ext4 partition is used for placing an image file of the Linux;
2) setting partition type, setting the third fat32 partition as ESP partition, creating a protective MBR partition of 1MB, and setting partition type as EF 02;
3) installing Grub2, creating a boot folder under the third fat32 partition, mounting the third fat32 partition to an empty directory, and then respectively installing boot programs of UEFI and LegacyGrub2 under the boot folder of the mounted directory by using a Grub-install command;
4) installing an rEFInd bootstrap program and a window, obtaining the latest rEFInd by using the prior art, decompressing and placing the latest rEFInd in a first fat32 partition, performing corresponding configuration according to a readme file, extracting the window from a Windows ADK, and placing all files of the Winpe in a second fat32 partition;
5) adding a Grub2 configuration menu, newly building a grub.cfg menu under a/boot/Grub directory of a third fat32 partition, and then configuring a boot menu of the Linux system according to the grammar of the Grub2 and the Linux image file path placed in the Ext 4;
6) downloading a system image file, downloading a Windows system image and a Linux system image which need to be installed, placing the Windows system image in a certain directory of an NTFS partition, and then decompressing; the Linux image is placed in a certain directory of the EXT 4;
7) connecting the mobile hard disk to a computer to be installed, starting up the computer to a start-up menu interface according to the setting of BIOS, if a Legacy system is to be installed, selecting a Legacy start-up option of the mobile hard disk, entering a Grub2 boot menu interface, and selecting the system to be installed to start up and install; if a UEFI system is to be installed, selecting a UEFI starting option of a mobile hard disk, entering an rEFInd starting management interface, if a Windows system is installed, entering a corresponding system decompression folder after selecting Winpe starting, running setup.exe to normally install, if a Linux system is installed, selecting Grub to call a boot menu of Grub2, and selecting a system to be installed to start and install.
2. The method for installing multiple operating systems on a single mobile hard disk according to claim 1, wherein: as an expansion function of installing a plurality of operating systems on a single mobile hard disk, in the step 1), an EXT4 partition is separately divided and used for storing linux image files larger than 4 GB.
3. The method for installing multiple operating systems on a single mobile hard disk according to claim 1, wherein: as an expansion function for installing a plurality of operating systems on a single mobile hard disk, in the step 1), an NTFS partition is separately divided and used for storing Windows system installation files, and meanwhile, the NTFS partition can be used as a common storage partition.
4. The method for installing multiple operating systems on a single mobile hard disk according to claim 1, wherein: as an expansion function of installing a plurality of operating systems on a single mobile hard disk, in the step 1), a fat32 partition is separately divided and used for storing a uefisher program for maintenance.
5. The method for installing multiple operating systems on a single mobile hard disk according to claim 1, wherein: as an expansion function for installing a plurality of operating systems on a single mobile hard disk, in the step 1), an NTFS partition is separately divided and used for installing a Windows system supporting the Windows togo function.
6. The method for installing multiple operating systems on a single mobile hard disk according to claim 1, wherein: as an expansion function for installing a plurality of operating systems on a single mobile hard disk, in step 1), an EXT4 partition is separately divided and used for installing a common linux system for daily maintenance.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810312863.0A CN108647034B (en) | 2018-04-09 | 2018-04-09 | Method for installing multiple operating systems on single mobile hard disk |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810312863.0A CN108647034B (en) | 2018-04-09 | 2018-04-09 | Method for installing multiple operating systems on single mobile hard disk |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108647034A CN108647034A (en) | 2018-10-12 |
CN108647034B true CN108647034B (en) | 2021-04-02 |
Family
ID=63745551
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810312863.0A Active CN108647034B (en) | 2018-04-09 | 2018-04-09 | Method for installing multiple operating systems on single mobile hard disk |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108647034B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110413291A (en) * | 2019-07-18 | 2019-11-05 | 贵阳朗玛信息技术股份有限公司 | Removable storage medium and manufacturing method thereof |
CN111258666B (en) * | 2020-01-22 | 2023-07-04 | 奇安信科技集团股份有限公司 | Computer file reading method, device, computer system and storage medium |
CN113138778A (en) * | 2021-04-19 | 2021-07-20 | 统信软件技术有限公司 | Operating system installation method and computing device |
CN114462034A (en) * | 2021-12-24 | 2022-05-10 | 江苏政采数据科技有限公司 | A plug-in malicious code detection system and method for equipment in operation |
CN114579148A (en) * | 2022-03-02 | 2022-06-03 | 联想开天科技有限公司 | Installation method and device of operating system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102135897A (en) * | 2011-03-18 | 2011-07-27 | 浪潮电子信息产业股份有限公司 | Convenient server maintenance tool integration manufacturing method |
CN102147741A (en) * | 2011-03-18 | 2011-08-10 | 浪潮电子信息产业股份有限公司 | Method for rapidly installing linux operating system by using mobile hard disc |
US8006125B1 (en) * | 2005-04-29 | 2011-08-23 | Microsoft Corporation | Automatic detection and recovery of corrupt disk metadata |
CN105446771A (en) * | 2015-11-13 | 2016-03-30 | 浪潮电子信息产业股份有限公司 | Method for quickly and automatically installing operating system based on USB flash disk |
CN105786504A (en) * | 2016-02-29 | 2016-07-20 | 陶雨露 | Method for achieving installation and guided repair of various operation systems through U-disk |
CN105824678A (en) * | 2016-05-17 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Method and device for installing operating system |
CN107301348A (en) * | 2017-05-19 | 2017-10-27 | 深圳市同泰怡信息技术有限公司 | One kind detection rational algorithm of MBR contents |
CN107506216A (en) * | 2017-09-06 | 2017-12-22 | 郑州云海信息技术有限公司 | A kind of method that more disk startups are made by USB mobile devices |
CN107608681A (en) * | 2017-09-14 | 2018-01-19 | 紫光华山信息技术有限公司 | Installation method of operating system, device and server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106484437A (en) * | 2016-11-10 | 2017-03-08 | 广东浪潮大数据研究有限公司 | A kind of method of deployment operation system, apparatus and system |
-
2018
- 2018-04-09 CN CN201810312863.0A patent/CN108647034B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8006125B1 (en) * | 2005-04-29 | 2011-08-23 | Microsoft Corporation | Automatic detection and recovery of corrupt disk metadata |
CN102135897A (en) * | 2011-03-18 | 2011-07-27 | 浪潮电子信息产业股份有限公司 | Convenient server maintenance tool integration manufacturing method |
CN102147741A (en) * | 2011-03-18 | 2011-08-10 | 浪潮电子信息产业股份有限公司 | Method for rapidly installing linux operating system by using mobile hard disc |
CN105446771A (en) * | 2015-11-13 | 2016-03-30 | 浪潮电子信息产业股份有限公司 | Method for quickly and automatically installing operating system based on USB flash disk |
CN105786504A (en) * | 2016-02-29 | 2016-07-20 | 陶雨露 | Method for achieving installation and guided repair of various operation systems through U-disk |
CN105824678A (en) * | 2016-05-17 | 2016-08-03 | 浪潮电子信息产业股份有限公司 | Method and device for installing operating system |
CN107301348A (en) * | 2017-05-19 | 2017-10-27 | 深圳市同泰怡信息技术有限公司 | One kind detection rational algorithm of MBR contents |
CN107506216A (en) * | 2017-09-06 | 2017-12-22 | 郑州云海信息技术有限公司 | A kind of method that more disk startups are made by USB mobile devices |
CN107608681A (en) * | 2017-09-14 | 2018-01-19 | 紫光华山信息技术有限公司 | Installation method of operating system, device and server |
Also Published As
Publication number | Publication date |
---|---|
CN108647034A (en) | 2018-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647034B (en) | Method for installing multiple operating systems on single mobile hard disk | |
EP3518099B1 (en) | Installation of operating system | |
US7490267B2 (en) | System and method for testing computer | |
US9239725B2 (en) | System and method for installing an OS via a network card supporting PXE | |
US9804855B1 (en) | Modification of temporary file system for booting on target hardware | |
US20150149756A1 (en) | System and method for setting up a bootable storage device using image | |
JP6861886B2 (en) | Systems and methods for customized operating system conversion | |
CN101650660A (en) | Booting a computer system from a central storage | |
CN102135893A (en) | Method for integrating operating system on BIOS (Basic Input Output System) chip and starting operating system on server | |
CN115390996B (en) | Virtual machine migration method and device, computing equipment and storage medium | |
CN105138431A (en) | Linux system back-up and restoring method | |
CN106484719B (en) | Method and terminal for expanding mobile phone storage | |
CN111694585A (en) | Method, system, terminal and storage medium for replacing system partition file | |
CN104866324A (en) | Method for constructing portable operating system and portable memorizer | |
CN109002346B (en) | A kind of conversion method of Windows virtual machine boot program | |
CN114579148A (en) | Installation method and device of operating system | |
CN113760306A (en) | Method, device, electronic device and storage medium for installing software | |
CN104077196A (en) | Linux boot failure recovering method and device | |
CN105607869B (en) | Method for quickly formatting and using virtual machine disk | |
CN115129570A (en) | Memory performance test method and related device | |
US7966484B1 (en) | Automatic alternating bootable storage devices between different kinds of boot files | |
CN107436761B (en) | UEFI (unified extensible firmware interface) system and traditional system coexistence management method based on UEFI mainboard | |
US20150212866A1 (en) | Management system for service of multiple operating environments, and methods thereof | |
CN111338650B (en) | A Portable Web Application Deployment Method in Livecd | |
US20090292950A1 (en) | Method for making test fixture |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |