How To: Run SpinRite on a UEFI-only machine (Part 2B of 5 - Windows as base OS)

  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in please checkout the “Tips & Tricks” page for some very handy tips!

    /Steve.
  • BootAble – FreeDOS boot testing freeware

    To obtain direct, low-level access to a system's mass storage drives, SpinRite runs under a GRC-customized version of FreeDOS which has been modified to add compatibility with all file systems. In order to run SpinRite it must first be possible to boot FreeDOS.

    GRC's “BootAble” freeware allows anyone to easily create BIOS-bootable media in order to workout and confirm the details of getting a machine to boot FreeDOS through a BIOS. Once the means of doing that has been determined, the media created by SpinRite can be booted and run in the same way.

    The participants here, who have taken the time to share their knowledge and experience, their successes and some frustrations with booting their computers into FreeDOS, have created a valuable knowledgebase which will benefit everyone who follows.

    You may click on the image to the right to obtain your own copy of BootAble. Then use the knowledge and experience documented here to boot your computer(s) into FreeDOS. And please do not hesitate to ask questions – nowhere else can better answers be found.

    (You may permanently close this reminder with the 'X' in the upper right.)

Scott

Well-known member
Sep 18, 2020
155
41
This HowTo article is split into multiple parts:
  1. Introduction
  2. Using Windows to Go as the base OS for your bootable VirtualBox system:
  3. Using Kubuntu Linux as the base OS for your bootable VirtualBox system
  4. Using MacOS as the base OS for your bootable VirtualBox system
  5. Downloading or Creating your VM and moving files in and out of the virtual drive

D. Setting up the base SpinRite Virtual Machine​

  1. You could do either of the following:
    1. Part 5A - Download a pre-built Virtual Machine instead of creating your own, or
    2. Part 5B - Creating your own Virtual Machine
  2. I would recommend downloading the pre-built Virtual Machine, as setup is simpler
  3. Once you've completed one of those processes, come back here to configure access to the target system drives

E. Configuring access to target system drives​

  1. Read this for reference:
    1. https://docs.oracle.com/en/virtualization/virtualbox/7.0/user/AdvancedTopics.html#rawdisk
  2. Back in your host Windows system, open Windows Tools
  3. Right click Computer Management, run as Administrator
  4. Open Storage
  5. Open Disk Management
  6. Examine the disks. You’ll see all of the internal disks noted as Offline
  7. Note the numbers of the drives (Disk 0, Disk 1, etc.) that you want to examine with SpinRite
  8. Close this app
  9. Open an ELEVATED command prompt
    1. cd C:\Users\Admin
    2. do a dir to see if the VirtualBox VMs directory exists; if not, then
      1. md "VirtualBox VMs"
    3. cd "VirtualBox VMs"
  10. Now run:
    1. diskpart
    2. For each disk you want to access in Spinrite, enter these commands (replacing # with the number of the physical drive:
      1. list disk
      2. select disk #
      3. offline disk
      4. attribute disk clear readonly
      5. rescan
    3. exit when done and you'll be back a the Command Prompt
    4. Now, for each drive you want to have accessible to SpinRite you’ll create a special .VMDK file that VirtualBox will use to access the real drive. Here’s an example:
    5. "C:\Program Files\Oracle\VirtualBox\VBoxManage" createmedium disk --filename DISK0.vmdk --format=VMDK --variant RawDisk --property RawDrive=\\.\PhysicalDrive0
  11. For each drive on the system, you’ll want to give a unique filename, and obviously adjust the RawDrive parameter to refer to the correct Physical Drive
  12. When you’ve created the needed .vmdk file(s), exit from the command prompt
  13. Start VirtualBox (it should prompt you to start as Administrator)
  14. You should still see your SpinRite setup
  15. Go to Settings, then Storage
  16. Decide whether to attach your virtual drives to either the IDE controller or the AHCI controller
    1. IDE Controller (listed as PIIX4 in the VM Settings)
      1. Pros:
        1. Faster operation (SpinRite native IDE driver works)
      2. Cons:
        1. Can only add up to 3 drives, as IDE only supports 4 total
        2. Logs will not be written until after the SpinRite session ends
    2. AHCI Controller
      1. Pros:
        1. Can have up to 30 drives (ports 0 to 29)
        2. Can log during operation
      2. Cons:
        1. Drives are seen as BIOS attached; SpinRite native AHCI doesn't work for some reason
        2. BIOS access may be an order of magnitude slower than IDE (or the same speed, you need to test and see!!)
    3. NOTE: The Host drive does NOT have be an actual AHCI connected SATA drive. I’ve attached NVMe drives, and internal MMC drives this way. VirtualBox seems to just present the drives via LBA, not CHS, so access is just by block address
  17. The Medium Selector screen should be aware of the vmdk files you made, highlight one and select Choose
  18. Repeat as necessary to add all your vmdk files
  19. Now start your VirtualBox session
    1. At the C:\> prompt start spinrite
    2. C:\>spinrite
  20. After the memory check, SpinRite should enumerate the boot virtual drive, as well as all of the VMDKs you’ve attached
  21. And that’s it!! Perform whatever SpinRite operations you want on the attached drives

F. I want to take this disk and use it on another PC; what should I do?​

  1. Boot up the new target PC with the Windows to Go USB drive
  2. Run Windows Update to get whatever drivers you might need. You may have to reboot more than one time!
  3. Right click on VirtualBox and Start as Administrator
  4. Go into Settings of your Virtual Machine
  5. REMOVE the prior VMDK files from the AHCI controller
  6. The vmdk file will be deleted, AND removed from VirtualBox’s registry of known drives
  7. You can now add the drives from the new system you are testing
 
Last edited:
  • Like
Reactions: Bplayer
An alternative process for the ".. use it on another PC.."
5. OR from Tools select the VMDF files and click on the Release icon, and confirm the Release. Then click on the Remove icon, confirm the Remove, and finally select Delete.
 
An alternative process for the ".. use it on another PC.."
5. OR from Tools select the VMDF files and click on the Release icon, and confirm the Release. Then click on the Remove icon, confirm the Remove, and finally select Delete.
Correct, I think those files must be manually created but can be Removed and deleted via the Media Manager