Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating a filesystem in a file in windows [closed]

Tags:

windows

mount

In linux we can create a filesystem in single file and mount it. Is there any way to create a filesystem in a file in windows and mount the filesystem created in a file?

like image 671
suresh Avatar asked Oct 27 '25 04:10

suresh


1 Answers

In Windows 7 you can use diskpart to do this.

Save the command lines to a text file, such as c:\newdisk.txt. This example will create a 500 MB virtual disk and mount it:

 create vdisk file=c:\test.vhd maximum=500 type=fixed
 sel vdisk file=c:\test.vhd
 attach vdisk

Execute the script with diskpart:

 diskpart /s c:\newdisk.txt

You can also format the volume, assign a drive letter, etc with diskpart.

like image 169
Dave Avatar answered Oct 30 '25 14:10

Dave