How To Create A Bootable Installer For MACos & Windows/ Linux


As an IT support professional, I frequently find myself installing operating systems (OS’s) on both Mac’s and Windows PC’s. In order to do this, I would traditionally have stored different installers on a number of USB flash drives. However, it is possible to copy all the installers required onto a single flash drive, using a different partition for each installer.

In this setup guide, I’d like to describe how to create a multi-OS installer flash drive using a Mac. The drive created will be bootable in a Mac or a Windows PC.

For the purpose of developing these instructions, I’ve worked through the steps and captured screenshots using macOS Big Sur.

Preparation of the Flash Drive

We shall begin by erasing and formatting the flash drive we’re going to use. You’ll require a drive with at least 32 GB of storage, though preferably more than this. Following are the steps required.

Ensure that your flash drive is plugged into a USB port on your Mac before commencing this procedure.

  1. Open Finder, select Utilities and open Disk Utility.
  2. Check the View menu in Disk Utility to ensure that Show All Devices is selected.
  3. Your flash drive will be listed under External in the left-hand pane of Disk Utility. Select it and then click Erase.

 

4.Give your drive a Name and choose Mac OS Extended (Journaled) as the Format and GUID Partition Map as the partitioning Scheme.

5.Click Erase and then Done when erasure and formatting of the drive is complete.

 

Writing the macOS Big Sur Installer to the Flash Drive

You’re now ready to copy the macOS installer to the flash drive. We’re going to use macOS Big Sur as it’s the most recent release at the time of writing.

You need to first download the installer for macOS Big Sur from Apple. To make this easy, Apple has provided a page containing links to download all the recent versions of the macOS, together with instructions for the creation of a single bootable installer. Just click on macOS Big Sur under the heading Download macOS. You’ll be taken to the App Store where you simply need to click GET. After a few seconds, you’ll be asked whether you are sure that you want to download macOS Big Sur and you should click Download to confirm this.

After the download has completed, dismiss any attempt to begin the installation of the macOS. The installer has now been downloaded to your Applications folder and it’s called Install macOS Big Sur.

To write the installer to the desired partition on your flash drive, open Finder, select Utilities and then launch Terminal. When the Terminal window opens, type the following command.

sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia –volume /Volumes/OperatingSystems <enter>

Note that if you named your drive something other than ‘OperatingSystems’ you’ll need to enter the name you chose after Volumes/.

After you press enter you’ll need to enter your administrator password then confirm that you wish to continue, and the operation will proceed. The time taken for this will depend on the speed of your flash drive, and you’ll see the progress from 0 to 100% as the files are copied to the drive.

Adding a Windows 10 Installer Partition

We shall now add a Windows 10 installer partition to the flash drive.

You first need to download a Windows 10 ISO file (installer) from Microsoft. To do this visit their Download Windows Disc Image (ISO File) page. For the purpose of this guide, I shall assume you’re downloading the 64-bit English International version. When the download is complete, take a note of its full name in your Downloads folder.

Return to Disk Utility, click on the drive, and select Partition once again. This time add a partition named Windows10, with format MS-DOS (FAT) and size 8 GB.

Click Apply and then Partition as before.

Return to your Terminal window and type the following command to mount the downloaded ISO file.

hdiutil mount ~/Downloads/<full name of downloaded ISO file> <enter>

You’ll need to put inverted commas around it if there are any spaces in the name.

Then open Disk Utility and take a note of the name of the disk image you have just created, which you’ll see under Disk Images in the left-hand pane.

The only complication with writing the Windows 10 installer to the Windows partition on the flash drive is that one of the files to be written is larger than the maximum file size possible when using a FAT32 partition (4 GB). For this reason, it’s necessary to split this file into two parts.

Return to the Terminal window and type the following command to copy everything except the large file (install.wim) to the Windows partition on the flash drive.

rsync -avh –progress –exclude=sources/install.wim /Volumes/<name of disk image>/* /Volumes/W10 <enter>

You now need to install a package management tool called Homebrew. To do this, use the following command in Terminal.

/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” <enter>

You’ll need to enter your administrator password and confirm the operation. Once it has been installed, type the following command to install wimlib which is ‘an open source, cross-platform library for creating, extracting, and modifying Windows Imaging (WIM) archives’.

brew install wimlib <enter>

Finally, enter the following command to split the install.wim file into two parts and write it to the Windows partition on the flash drive.

wimlib-imagex split /Volumes/<name of disk image>/sources/install.wim /Volumes/W10/sources/install.swm 3800 <enter>

Adding a Linux Partition

We are now going to add a Linux installer partition to the flash drive. We shall use the latest long-term supported (LTS) version of Ubuntu which is Ubuntu 20.04.2.0 LTS. This can be downloaded as an ISO file from the Download Ubuntu Desktop page.

Having downloaded the Ubuntu installer to your Downloads folder, you need to create another FAT32 partition using Disk Utility, in the same manner as for the Windows installer. We are formatting the partition as FAT32 rather than Mac OS Extended (Journaled) so that the Ubuntu installer will be bootable in a Windows PC as well as in a Mac. A partition size of 4 GB is adequate for this installer and let’s call the partition Ubuntu.

We shall use a tool called UNetbootin to write the Ubuntu installer to the relevant partition on the flash drive. The tool can be downloaded from the UNetbootin home page. In order to launch the tool you’ll need to control click it and then select Open as the app was created by an unverified developer. Having launched UNetbootin, you’ll need to provide your administrator password in order to be able to write to the flash drive.

Before you can proceed you need to identify the name of the target drive (partition) on the flash drive. In order to do this, return to the Terminal window and type diskutil list <enter>. In the resulting output, look for Microsoft Basic Data U and take note of the name of the IDENTIFIER. In my case this is disk2s3.

Now return to the UNetbootin window, locate the Ubuntu disk image in your Downloads folder and enter this as the name of the DIskimage. Then select your USB drive as the Type: and your IDENTIFIER as the Drive. Click OK and the Ubuntu image will be written to the Ubuntu partition on the flash drive.

 

Testing the Installers in Mac & PC

The flash drive we’ve just created should be bootable in a Mac or a PC. You can use it on a Mac to install macOS, Windows or Linux to appropriately formatted partitions on the Mac. You could even install different operating systems to different partitions on the Mac and choose the one you want to boot at startup. You can also use the drive on a PC to install Windows or Linux.

To test your flash drive on a Mac, power on the computer with the drive connected, and hold down the option key as you do so. After a short period of time, you should see all the different bootable options available to you, both for the hard drive in the Mac, and the flash drive. Clicking on any one of the installers available on the flash drive will launch the relevant installer, enabling you to proceed with the installation of that operating system.

To test the flash drive on a Windows PC, ensure that secure boot is disabled and configure the BIOS/UEFI settings to enable booting from a USB drive. After powering on the computer, you should be able to select either the Windows or the Linux installer. It’s also possible to run a live Ubuntu session on the PC by selecting the relevant option after booting from the Linux partition.

Conclusion

We’ve created a multi-OS installer flash drive for macOS Big Sur, Windows 10 and Ubuntu. For my own purposes I’ve taken this a step further and also created partitions for older versions of the macOS. This means that the drive is suitable for use with Apple Mac computers of an older vintage that don’t support macOS Big Sur.

Roman Markovich

My Name is Roman Markovich. I been IT professional for the last 10 years. I am was hoping to establish to help many users with OS errors. I hope you will enjoy our content.

Recent Posts