Introduction
As has been noted previously, the FreeDOS OS on which SpinRite runs can't boot on a PC with UEFI firmware that does not have a CSM (aka Legacy) mode. This includes newer Intel Macs, as well as most PCs from around 2019 and newer.
These machines CAN run SpinRite, though, but it takes some effort to make it work. Essentially, one must:
- Create a bootable external USB drive from which a UEFI-compatible OS can boot
- Boot the target PC from that drive
- Install VirtualBox on that drive
- Create a FreeDOS Virtual Machine within VirtualBox in which to run SpinRite, and install SpinRite to that VM
- Ensure that the internal drives of the host machine are UNMOUNTED, so that the actual OS does not interfere with SpinRite operations
- Map the actual physical drives of the target PC to virtual drives in VirtualBox
- Mount those virtual drives in your VM to either the IDE or AHCI controller
- Run SpinRite, which should now see those drives as attached the PC within the FreeDOS VM
There are currently 3 tested "Host OS" environments that can be setup within which one can run VirtualBox:
- Windows 11, setup in a "Windows to Go" configuration
- Kubuntu 24.04 LTS, setup in a "Live CD" configuration on a USB with Persistence
- MacOS, setup on an external drive
Which of the 3 "Host OSes" should I use?
The Windows 11 and Kubuntu setups can be used to boot any UEFI system, whether PC or Intel Mac, AND SECURE BOOT CAN STAY ON!! The MacOS setup can only be used to boot a Mac.There hasn't been enough testing to know if either Windows or Kubuntu makes for a "better" VirtualBox host, so for now the advice is to use whichever environment you're more comfortable with. Kubuntu is definitely faster and less laggy.
If you have a Mac, you should be able to boot any of the 3, but you should probably use MacOS as your host OS.
(And I did say Intel Macs; there is no current solution for Apple Silicon, and it's unlikely there will be)
What kind of drives can SpinRite in VirtualBox "see"?
The physical drives are virtualized and accessed through the VirtualBox drive controllers and/or "BIOS"; any drive that the Host OS can see can be mapped to a .VMDK file, mounted in VirtualBox, and then addressed by SpinRite.- When drives are attached to the virtual IDE controller, SpinRite accesses them through it's native IDE driver
- When drives are attached to the virtual AHCI controller, SpinRite accesses them through the virtual BIOS
I've tried multiple drive and attachment types and all have been accessible as AHCI or IDE attached drives:
- SATA-attached
- NVMe SSDs
- USB-attached
- eMMC SSD
VBoxManage createmedium disk
command.Prerequisites
There are certain items you need in order to make this work:- Prep PC
- You need a PC running Windows 10 or Windows 11 for certain prep steps (running Rufus to create the Kubuntu or Windows to Go drive), unless you are using MacOS as your host OS.
- Target PC (non Mac)
- Must boot with UEFI firmware (or in UEFI mode if it can switch between UEFI and BIOS mode)
- But if you can boot in BIOS/Legacy mode, maybe run SpinRite natively!
- It must support Virtualization and have that feature turned ON in it's firmware settings:
- Else you may get an error in VirtualBox. More info here:
- How to check if Virtualization is on?
- If you're using the Win to Go drive to run VirtualBox, run the GRC utility Securable from the Win to Go drive:
- Must boot with UEFI firmware (or in UEFI mode if it can switch between UEFI and BIOS mode)
- Target PC (Mac)
- Must be able to boot in UEFI mode (Intel Mac from about 2012 onwards)
- One USB flash drive for temporary storage of the GRC executable(s) to transfer to the new host drive
- One USB drive to run the "host OS" and VirtualBox. This could be a fast USB flash drive, but it's HIGHLY RECOMMENDED that you use an external USB SSD drive. Flash drives will quickly wear out and and slow down.
- Capacity
- For Linux setup, that should be at least 32 GB
- For Windows or MacOS setup, that should be at least 64 GB
- Speed - how do you know if a USB drive is fast enough?
- Run the GRC utility ValiDrive on the USB drive. If it finishes in less than 10 seconds, that's fast enough.
- Capacity
- And most importantly, these "items":
- A SAFETY FIRST ATTITUDE!!
- Before working on your target system, back it up!! Just like running SpinRite natively against a system, virtualized SpinRite will rewrite data, so backup your data, just in case!
- If running against an encrypted drive (with BitLocker on Windows, or FileVault on MacOS), print out your recovery key and store it safely!!
- And if possible, temporarily turn off the encryption before running SpinRite against the drive
- KNOWLEDGE!! You must be comfortable with Administration commands in both the Host OS of choice, as well as DOS and the VirtualBox application. You should NOT blindly follow this guide; you need to understand what the commands are; there is an assumption that you know your way around a PC. YOU ARE DOING THIS AT YOUR OWN RISK, AS IT IS AN UNSUPPORTED METHOD TO RUN SPINRITE. WHILE THE INSTRUCTIONS SHOULD ENSURE THAT THE DRIVES ARE UNDER EXCLUSIVE SPINRITE CONTROL, TESTING HAS NOT BEEN EXTENSIVE. DATA LOSS IS A POSSIBILITY!
- A SAFETY FIRST ATTITUDE!!
Other notes:
- Booting from external drives seems to throw off the clock on many target systems. Before starting work, double check that the time zone and time are correct. When booting back to the native OS, do the same
- The Windows and MacOS boot media seemed to shutdown cleanly; the Linux boot drive may hang during shutdown, requiring a physical push of the Off button. This did not seem to corrupt the Linux boot drive in anyway.
Choose your own adventure!!
Due to length limitations in the forum, I can't include all the instructions for all of the variations in one article. I will therefore write up the following articles from which you can choose your path. Each topic is also split into multiple parts as needed:- Introduction (this article)
- Using Windows to Go as the base OS for your bootable VirtualBox system:
- Part 2A - Setting up the Windows to Go drive, Installing VirtualBox
- Part 2B - Creating a SpinRite Virtual Machine, Mapping the Host drives to the SR Virtual Machine, Steps to take when moving your Windows to Go drive to a new Target Machine
- Part 2C - Updating the Windows to Go drive to include Mac "BootCamp" drivers (optional, and obviously only for those planning to run the Windows to Go drive against a target Mac)
- Using Kubuntu Linux as the base OS for your bootable VirtualBox system
- Using MacOS as the base OS for your bootable VirtualBox system
- Downloading or Creating your VM and moving files in and out of the virtual drive
Last edited: