NOTE: These steps will create a MacOS environment on a USB flash drive. As I only have one Mac, I assume it's a portable environment but I can't test that assumption.
This How To article is split into multiple parts:
Continued in Part 4B
This How To article is split into multiple parts:
- Introduction
- Using Windows to Go as the base OS for your bootable VirtualBox system
- Using Kubuntu Linux as the base OS for your bootable VirtualBox system
- Using MacOS as the base OS for your bootable VirtualBox system
- Part 4A - Setting up the MacOS drive, Installing VirtualBox (this article)
- Part 4B - Creating a SpinRite Virtual Machine, Mapping the Host drives to the SR Virtual Machine, Steps to take when moving your MacOS drive to a new Target Machine
- Downloading or Creating your VM and moving files in and out of the virtual drive
On your Target Mac (on which you will eventually run SpinRite against its drives)
A. Creating an external MacOS Boot Drive
- Target Mac MUST BE AN INTEL MAC; there is no current solution for Apple Silicon Macs.
- Create an external, bootable MacOS drive
- There are plenty of websites explaining how to do this, and you need do nothing out of the ordinary to get ready for VirtualBox
- Here's a good example set of instructions:
- https://www.prosofteng.com/blog/how-to-create-a-bootable-external-hard-drive-on-mac
- As stated in the instructions, MAKE SURE YOU ARE INSTALLING TO YOUR EXTERNAL DRIVE!!
- If using Open Core Legacy Patcher (you know who you are!!):
- Use OCLP to create a bootable USB MacOS installer flash drive
- Plug another USB external drive in your system, this will hold the actual usable MacOS system
- Holding down the Option key, boot to the EFI partition ON THE INSTALLER drive
- This will then let you select the Installer partition
- You'll run the Installer from there
- And again, MAKE SURE YOU ARE INSTALLING TO YOUR EXTERNAL DRIVE!!
- The only special settings needed are to ensure your Mac NEVER turns off its display, sleeps / suspends, or turns off (those are all related to power savings)
- Instructions vary depending on whether you're on a desktop or laptop, and version of MacOS
- Click on this link for the instructions for your particular MacOS version:
- On MacOS Sonoma for my Mac laptop, I:
- Went to the Lock Screen settings and set:
- "Start Screen Saver when inactive" to "Never"
- "Turn display off on power adapter when inactive" to "Never"
- Went to the Battery settings and clicked the "Options" button
- "Prevent automatic sleeping on power adapter when the display is off" is turned "On"
- "Put hard disks to sleep when possible" set to "Never"
- Went to the Lock Screen settings and set:
- You could also try a 3rd party utility to manage this; there is a free app in the Mac app store called Amphetamine that should also do the job
- Instructions vary depending on whether you're on a desktop or laptop, and version of MacOS
B. Installing VirtualBox
VirtualBox installation on MacOS is quite simple:- Download the VirtualBox Installer from Virtualbox.org
- Double click the Disk Image (dmg) file
- Double click the installer
- Install VirtualBox
- Open your Home folder
- Create a new folder called "VirtualBox VMs" at this level (same level as Documents and Downloads folders)
C. Running Virtual Box as "root"
- NOTE 1: There is a pre-built Virtual Machine available if you don't want to create your own. See the instructions in Part 5, here.
- NOTE 2: In order to access the physical drives of your system, you must ALWAYS start VirtualBox with elevated permissions:
- In Windows we can use "Start as Administrator"
- In Kubuntu we can edit the VirtualBox Application information to add the "sudo" command before starting VirtualBox, so that it always starts as root
- On the Mac, there is no obvious way to start a GUI-based application with elevated rights; it appears you have to go to the command line to do so
- Here are the instructions for this:
- Open a terminal window
sudo virtualbox
- You will be prompted for the user password
- VirtualBox will start
- The first time you start VirtualBox this way, you must:
- Go to the VirtualBox | Preferences window
- Set Default machine folder to:
/Users/username/VirtualBox VMs
- Replace username in the above command with the folder name of your home folder
- Exit VirtualBox, move on to Part 4B
- NOTES:
- When you start VirtualBox via the terminal and command line, do NOT close the terminal window or it will kill VirtualBox
- You must start VirtualBox from the command line with the
sudo virtualbox
command every time!!
- IF ANYONE HAS A BETTER WAY TO DO THIS, PLEASE LEAVE A COMMENT!!
- Open a terminal window
Continued in Part 4B
Last edited: