Create a Linux & amp; Windows & amp; GParted Live & amp; macOS in one to maintain the U disk, making it easier to reinstall the system.

Source: Internet
Author: User
Tags gparted multiboot usb

Create a Linux & Windows & GParted Live & macOS in one to maintain the U disk, making it easier to reinstall the system.

Note: This tutorial is only applicable to computers that support EFI startup. If the installation disk contains Linux, the selected Linux release must support EFI startup.

I usually reinstall the system for myself or someone else, because sometimes I have to install Windows, and I have to refresh the installation package to my U disk every time, not only is it very difficult, but it also has poor service life. So I spent a few days studying how to plug these installation disks into a USB disk and achieved good results.

This U disk can not only start multiple systems, but also does not need to erase the entire disk when the installation disk of a system needs to be updated, as long as the corresponding partition is processed separately, it is very convenient. The effect is as follows:

Guiding Screen

My disk includes a macOS installer, a Windows 10 installer, and a GParted Live (GParted is a partition tool on the Linux platform, this is a simple Linux release that only provides the partition tool and other basic functions) and a WinPE. In the next tutorial, I will teach you how to create a boot U disk and solve some startup problems.

Various systems

Prerequisites

To prevent you from being confused, let's take a look at what EFI is. In short, EFI is an operating system boot mode.

I wonder if you still remember what the computer was just starting up a few years ago.

Award BIOS boot Screen

This black-white screen is called the boot self-check screen, which is generated by a chip called BIOS on the motherboard. The chip first completes the power-on self-check (POST) and initializes various hardware at startup, and then reads a fixed area of the disk to find the Startup Program (0 sides, 0 sectors, 1 sector ). The operating system will write its own boot program in it. When the BIOS finds this program, it will hand over control and the operating system will start. This Bootstrap mode is called Legacey Boot, and the partition table format containing the startup program block is called as the Master Boot Record (MBR), which is opposite to GPT.

Unlike the Legacey, which was invented in 2005, EFI does not search for boot programs from a fixed location on the disk, but searches for boot programs in the EFI folder in each partition. For an operating system that only supports Legacey Boot, if you want a disk to Boot, you need to use some special programs to write the Boot block. Because a hard disk has only one Boot block, it is very troublesome to implement multi-system startup. It can be implemented only with the help of tools (YUMI-Multiboot USB Creator ). The EFI boot program and common files are placed in the same place. If you want to throw an EFI-supported operating system installation disk into the U disk, simply copy all the files. You can start the instance directly without any additional operations. This tutorial uses this feature.

Because only new computers support EFI boot, make sure your computer supports EFI boot before using it on older computers. And if you want to make sure that the installation disk you want to throw into the U disk does not support EFI, you just need to open the ISO file and see if there is a folder named EFI in it.

Material Preparation

If you want to store so many installation disks, first you need a 16 gb u disk. For reference:

  • The macOS 10.13 installation disk requires 5.5 GB space.
  • The size of the Win10 1709 installation disk is 5 GB.

(The above size is rounded up to 0.5)

You need an available Windows system to run the partition tool, or a virtual machine. The macOS disk tool is basically a waste. When you create an HFS + and FAT file system in a USB disk at the same time, an error is reported directly. In addition, the FAT partition in Windows cannot be adjusted in macOS.

Error Message

Prepare the installation disk you need to put in. If you need it, you can also prepare a WinPE. I recommend AOMEI PE, which is a foreign Win PE environment that supports adding software and drivers by yourself. (This PE will block its own drive when running, which may cause some problems. We will talk about it later. Aomei pe is a company in Chengdu, but its PE is only on foreign websites. Thanks to Umi For reminding me .)

The required software is:

  • Decompress the software. An error is reported when some Linux ISO images are directly mounted. We need some tools to decompress the files. Mac: The Unarchiver, Windows: 7Zip
  • Partition tools, such as DiskGenius
  • Image Writing Tool. NTFS in Mac is not easy to use, and the U disk partition needs to be formatted as FAT32. Windows installation disks contain files larger than 4 GB, which is not supported by FAT32. Therefore, we need some special tools for writing. For example, UNetBootin (the reason for choosing UNetBootin is that this software supports writing data to a partition rather than the entire hard disk)
Write to the macOS Installer

Start with macOS. First download the macOS installation program (. app) for backup. Let's perform some partitioning operations. The GPT (GUID) Partition Table is required for macOS startup. Therefore, we need to format the disk in this format instead of the default mbr in the u disk.

Open the disk tool and select your U disk on the left. Note that you select the U disk instead of the partition, and then click the erase button to erase the entire disk as a GPT. Reset this operation will clear all the content of the U disk, pay attention to the backup. Swap (although some software can directly convert MBR and GPT, I still think it is clean to erase them)

Select the partition format as Mac OS extension (Log Type) as shown in the figure, and select the GUID partition chart as the solution. Click to erase it. There is a probability that the first time the disk is not successfully erased, because the system did not correctly detach the disk, this Bug is very common. If the first attempt fails, try again.

Then select the U disk and click partition. Now you should see that the entire hard disk uses a partition. Click the plus sign below to create a partition, and the hard disk above will be divided into two equally. Select one on the right (the first partition) and change the partition name to "macOS" in the details on the right (this name will be used in subsequent write commands ), change the size to 5.5 GB (in fact, it can be smaller, but in order to be compatible with subsequent macOS updates, I think 5.5 is a reasonable size ). Click partition.

Then you should be able to see the two partitions at the same time on the Mac desktop. After the partition operation is completed, we will write it into the installer. Open the system terminal, find your downloaded. app file, and drag it into the terminal window to enter the file path. The suffix will add a space after the file path. Delete it.

Enter/Contents/Resources/createinstallmedia --volume /Volumes/macOSThen press enter to continue running. The program will ask if you are sure you want to erase it. Enter y and press Enter. After that, you only need to wait for the task to be completed.

When the program prompts "Done.", it indicates that the write is successful. If you accidentally close the terminal window during the write process, please erase the macOS partition in the disk tool and repeat it again.

Restart your computer and press the Option key during the boot process. You should see the installer icon in the System Startup menu.

Processing and writing other partitions to Linux partitions

Not all computers, like Mac, can display each partition in the U disk in the boot menu, some efi bios will be started directly from the first zone that can be recognized by the U disk (macOS will be ignored in the PC because the macOS boot program is stored in. IABootFiles instead of the general EFI folder), and the partition after it is useless. If your first partition is the Windows Installer, you cannot enter the system (such as WinPE) in another partition.

To solve this problem, we can place a Linux release version in the first partition after the macOS partition. Most Linux distributions contain a boot program called GRUB, which can be started from its own command line to another partition.

If you need a Linux system, write it in the partition following the macOS partition. If you do not need Linux, we recommend that you write a GParted Live file. GParted is a very practical partition tool. The release version is very small and practical to solve the problem. : Gparted.org. Download 64Bit ISO.

Next, we first enter the Window to perform partitioning, connect the U disk to Windows, and the virtual machine can also be used. The system may prompt that the partition is damaged. Cancel the partition and do not format it. This is because Windows cannot read the HFS + partition.

Open DiskGenius (DG) and click the right arrow to switch to the U Disk:

You can see the following Partition graph:

Right-click to delete the large partition on the right and click Save changes. Each time the DG modifies the partition structure, it needs to be saved, otherwise, you may have entered parameters in the dialog box and asked you to save them and try again (this is a strange interaction design ).

Create a 1 GB partition in the blank area (if you want to install your release version, you may need a larger partition). The partition format is FAT32, when creating a partition, DG can only use the integer size. Do not forget to click Save changes.

When you disable DG, you should be able to see the U disk in the resource manager. Use the decompression tool to open the downloaded GParted or install ISO for other Linux distributions, and directly throw the downloaded files into the installation ISO file.

Re-enter DG, right-click the partition and adjust the partition size. For GParted, I will adjust it to 350 MB.

Then restart the system to view the written GParted boot disk in the boot menu. On Mac, It should be represented as a yellow hard drive icon named "efi boot.

Write Windows Installer

The partitioning method is similar to that of Linux. Create a new partition in the blank area. For Windows, the recommended size is 5 GB, And the partition format is FAT32.

As we mentioned earlier, a file in the Windows installation disk exceeds the maximum file size of FAT32 and needs to be written by a third-party tool. Run UNetBootin, select the ISO at the bottom, and click the three buttons to select the Windows Installation image. Select the created partition as the target. Do not select the wrong partition. If you erase other partitions, you will have to re-create them. Bytes

Click write to wait for completion.

Restart the disk and you will see another boot disk.

Write Other content

If you have no other installation disks to write, we can create a new partition for storing files in the DG.

Finally, we installed WinPE. We don't need to create a separate partition for WinPE, just put it in the last partition. Let me introduce aomei pe.

Many people may have used PE systems in China, and there are many problems. For example, many of them do not support NVME hard disks, so they cannot back up SSDS. Some unscrupulous authors may also carry private goods and secretly change the home page of the Computer Browser, automatically installs anti-virus software for a digital company. Another problem is ugly. Even the best "micro-PE" that can be found online in China currently has a lot of programs with garbled icons. So here I chose a foreign PE for use. Although there are no software commonly used by Chinese people, it is still very comfortable to use because it can be added by myself. Most importantly, it supports both EFI boot and NVME hard disks.

Download an installer from the official website. The installer must be installed in the system first. This is the case when running. Note that you can add the software and driver on your own in this step. Do not forget to add the driver. Finally, select generate ISO.

We recommend that you use DG again, because this PE hides its own disk during running, which means you cannot use the remaining space to back up files. The DG comes with a file browser that can read and write files in a disk that is not mounted, which is very convenient when backup is required. Or you have to insert another disk.

And then proceed to the next steps to generate them.

The old rule copies all the files in this disk and throws them to the last partition we just created. To make the partition of the stored file clean, you can also right-click the file and choose Properties to hide the files and folders.

After restarting, you should be able to see another new boot disk.

Convenient Adjustment

You may have noticed some problems. In the BOOT screen, the last three disks are called "efi boot 」. How can we tell which one is it? I spent a lot of time studying how to modify the display name. The conclusion is no. Mac does not seem to support modifying the display name of the FAT32 file system. But it doesn't matter. We still have something to change, that is, the disk icon.

In Mac, the startup disk icon is determined by the. VolumeIcon. icns in the root directory. Here I have made some corresponding icons, you can download and use: Baidu cloud GoogleDrive. You can also use the Image2Icon App to create your own ICNS file, which is also very convenient.

Drop the icon and change it to. VolumeIcon. icns.

Start on a computer that does not support multiple EFI partitions

Some pc uefi instances cannot identify multiple EFI partitions in a disk (even the BIOS of the Parallels Desktop virtual machine has this problem). This situation is really embarrassing. However, we have prepared a Linux partition before. Next we will teach you how to use GRUB to manually guide to other partitions.

First, start the system and enter the U disk. You will see a picture similar to this.

GRUB menu

Press the C key on the screen to enter the command line. You will see a prompt like GRUB>. Enter ls to check available hard disks and partitions.

The format in the figure is as follows (hd hard disk number, Partition Number ). Although the U disk is only divided into four partitions, because of the existence of the reserved partition added at the beginning of the macOS, there are a total of five partitions, represented from 1 to 5, respectively. If the hard drive with the serial number contains five areas, it should be the serial number of our U disk. Here it is 0, and generally it should be 0.

If we want to enter the installation program for Windows, the number of this area is 4, enter set root = (hd0, 4) in the command line and press Enter.

Enter the location of the Windows EFI Boot program, and enter chainloader/EFI/Boot/bootx64.efi + 1 (the Win10 Boot is usually in this location). You will see the following prompt, indicates that the load is successful.

Then enter boot. If no exception occurs, the Windows Installer will start properly.

If you want to start the PE, the other conditions except the Partition Number is changed to 5 are the same.

Q &

What should I do if I have a new version of the mounting disk? You only need to erase the partition and refresh it according to the previous steps. The same is true for Windows, but in Windows, this operation is called formatting.

Can I store my own files in the partitions where I have an attached disk? Of course, you can save it in the available space without waste.

What should I do if I cannot launch a USB disk? Because of the relationship between the four zones, it will be very difficult to launch on a slow U disk. This is a normal phenomenon. Just wait a while.

(The topic is taken by myself at my residence in Tokyo)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.