How to SpinRite Internal SSD on Apple Silicon
September 15, 2024 at 3:30PM
After hearing it was possible to get SpinRite to run on AppleSilicon I set about trying to get it going. With the help of some online posts and grc's forums I was successful. Here are the details.
NOTE: This requires a bootable macOS external drive. I used a NVMe usb-c enclusure with macOS Sonoma (14.1). Setup was tricky for this I may write up what I used another time.
Steps
- VirtaulBox Setup FreeDOS
- Add
VBoxManage
to the FullDisk access list.- VBoxManage location...
- VBoxManage location...
- Unmount internal drive (found in DiskUtility -> Get Info):
diskutil unmountdisk /dev/disk4
- force if error: Unmount was dissented by PID 407 ...
sudo kill -9 407
- force if error: Unmount was dissented by PID 407 ...
- Create Virtual (VMDK) for internal drive:
sudo VBoxManage internalcommands createrawvmdk -filename M2MacBookPro-Internal.vmdk -rawdisk /dev/disk4
- Open VBoxManage as admin.
- sudo /Applications/VirtualBox.app/Contents/MacOS/VirtualBox
- Add Internal Disk to VM:
- VM -> Settings -> '+'
Alternative to DiskUtility
CLOSE VERTIAL BOX BEFORE RUNNING BELOW COMMANDS use Activity Monitor if needed
- Open Terminal
- List Drives
diskutil list
- Identify which drive is internal. (e.g. dev/disk4)
- Unmount Drive:
diskutil unmountdisk /dev/disk4
- Create VMDK:
sudo VBoxManage internalcommands createrawvmdk -filename M2MacBookPro-Internal.vmdk -rawdisk /dev/disk4
VBoxManage createmedium disk --filename M1MacintoshHD-internal.vmdk --format=VMDK --variant RawDisk --property RawDrive=/dev/sdaReboot in Recovery Mode and disable SiP: `csrutil disable
Prologue
At this point I had an external NVMe drive with VirtualBox installed that ran SpinRite succesfully. I was able to reuse that drive on any AppleSilicon mac (Sonoma 14.1 compatible) using the following commands as needed.
- Create the VirtualDisk from Internal (vmdk):
- Unmount internal drive:
diskutil unmountdisk /dev/disk4
- force if error: Unmount was dissented by PID 407 ...
sudo kill -9 407
- Create:
sudo VBoxManage internalcommands createrawvmdk -filename M2MacBookPro-Internal.vmdk -rawdisk /dev/disk4
- Unmount internal drive:
- Launch VirtualBox as admin.
sudo /Applications/VirtualBox.app/Contents/MacOS/VirtualBox
Happy Coding ;-)
Helpful Links:
- GRC Forums SpinRite M1 Mac
- VirtualBox Apple Silicon hosts developer build 7.0.8
- Install VirtualBox on AppleSilicon
- kevin street run SpinRite on macOS
- ServerWatch Physical HardDrive with VirtualBox