OSFMount CLI - Physical drive created as "Not initialized"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DanD
    Junior Member
    • Jan 2019
    • 12

    #1

    OSFMount CLI - Physical drive created as "Not initialized"

    I've always created a logical drive but I wanted to switch to a physical drive to try OSFMount - Incorrect function. ShellExecuteEx failed option 1.

    Using command line below I seem to be getting "Not initialized" disk in "Disk management".

    Any suggestions? Thank you very much for your work!

    Code:
    C:\Program Files\OSFMount>osfmount.com -a -t vm -o physical,rw,hd,format:ntfs:"RAM Disk" -s 3G
    Creating device...
    OK
    Setting disk attributes...
    Done.
    Code:
    osfmount --version
    PassMark OSFMount Command Line Interface.
    Version V3.3 (Build 1000) - (Compiled Aug 11 2026)
    Code:
    osfmount -l
    [logical disks]
    
    [physical disks]
    \\.\PhysicalDrive2​
    Windows 26H2 Pro (23300.981​

    Click image for larger version

Name:	image.png
Views:	45
Size:	18.0 KB
ID:	60817​

    Click image for larger version

Name:	image.png
Views:	34
Size:	31.3 KB
ID:	60818​

    Seems to work fine if I do it through the desktop app - initialize, format, and even assign a preferred letter (this one not supported in CLI with "physical" option).

    Click image for larger version

Name:	image.png
Views:	33
Size:	19.8 KB
ID:	60819​

    ​



    ​

    ​
  • Simon (PassMark)
    Administrator
    • Apr 2021
    • 335

    #2
    You need to initialize the disk with gpt/mbr:

    Code:
    osfmount.com -a -t vm -s 3G -o gpt,format:ntfs:"RAM Disk"















    Comment

    • DanD
      Junior Member
      • Jan 2019
      • 12

      #3
      Thank you Simon (PassMark) for your work and help!

      That worked very well, thank you.

      Code:
      OSFMount.com -a -t vm -o physical,gpt,format:ntfs:"RAM Disk" -s 3G
      Creating device...
      OK
      Setting disk attributes...
      Initializing disk partition table
      Creating new partition
      Detecting drive letter
      Formatting new volume
      Done.
      With the physical drive I lost the ability to assign a drive letter, but I used this command after:

      Code:
      powershell -NoProfile -Command ^
         "$vol = Get-Volume -FileSystemLabel '%RAMDRIVE_LABEL%' | Select-Object -First 1; " ^
         "$vol | Get-Partition | Set-Partition -NewDriveLetter '%RAMDRIVE_LETTER%'"​
      Click image for larger version

Name:	image.png
Views:	0
Size:	21.0 KB
ID:	60846​

      Comment

      Working...