• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

VHD - Auto-mount at Startup in Windows 8


Posts
1
#21
Greetings David and all,

Thanks for the walkthrough. By all rights, it should work for me but it's not.

Details: Running on Windows Server 2012 R2, logged in as the original Administrator account. Even just testing manually by right-clicking the "start button", choosing "Run" and pasting:

Code:
diskpart /s W:\BoxSync-NTFS.vhdx.txt
appears to quickly open and close the shell, but even if I instead paste:

Code:
diskpart /s W:\BoxSync-NTFS.vhdx.txt > W:\diskpart.txt
I get no log file.

I am able to manually run diskpart itself from the Run dialog, and then I copied and pasted (via clicking in the upper left corner of the shell windows, choosing Edit and then Paste) exactly what I have in the text file, and indeed it works, including showing up in Windows Explorer:

BoxSync-NTFS.vhdx.jpg

Thoughts?

By the way, in case anyone wonders, the reason why I'm using a VHD for Box Sync is because I'm using an ReFS (file system) with Transparent RAID, and Box Sync refuses to work with ReFS even though all other cloud programs work just fine with it.
 

My Computer

System One

  • OS
    Windows Server 2012 R2
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Homemade
    CPU
    Athlon 64 X2 2.2 GHz
    Motherboard
    Gigabyte
    Memory
    8 Gb DDR2
    Graphics Card(s)
    ATI Radeon 4870
    Monitor(s) Displays
    TV
    Screen Resolution
    1920x1080
    Hard Drives
    3x Toshiba 3 Tb
    1x Western Digital 1 Tb
    2x Western Digital 640 Gb
    PSU
    Corsair 750
    Case
    Cooler Master
    Keyboard
    Logitech K750
    Mouse
    Logitech M570
    Internet Speed
    15 MB / 2 MB
    Browser
    Chromium 64-bit
    Antivirus
    Webroot SecureAnywhere

DavidY

Active Member
VIP Member
Pro User
Posts
955
#22
Hi there.

I must admit I don't know why it isn't working. I don't know much about Windows Server and perhaps there's a difference there that's significant.

One thing to try though - what happens if you try to put the log file in a different folder path?

So instead of this:
even if I instead paste:

Code:
diskpart /s W:\BoxSync-NTFS.vhdx.txt > W:\diskpart.txt
I get no log file.
..what happens if you use a folder on another drive to hold the log? For example, if you had a d:\temp folder, you could try something like:
Code:
diskpart /s W:\BoxSync-NTFS.vhdx.txt >D:\temp\diskpart.txt
That would eliminate the possibility of it having problems accessing W: in the first place, in which case it wouldn't be able to create a log there either.
 

My Computer

System One

  • OS
    Windows 8.1, 10

ashameen

New Member
Posts
7
#23
Hi David
Thanks for the post, the auto-mount works perfect for me, but I have an issue. If I move say the location of OneDrive to the sdcard, my c drive reduces in same proportion as the space taken by the OneDrive in the sdcard location. How can fix this.
 

My Computer

System One

  • OS
    Windows 8.1

DavidY

Active Member
VIP Member
Pro User
Posts
955
#24
Hi David
Thanks for the post, the auto-mount works perfect for me, but I have an issue. If I move say the location of OneDrive to the sdcard, my c drive reduces in same proportion as the space taken by the OneDrive in the sdcard location. How can fix this.
Hi Ashameen,

Can you say a bit more about what you're trying to do, and the setup of the disks on your computer? Which drive are you using as a VHD drive?

It might be useful if you could post a screenshot of the layout in Disk Management (to bring this up, open the Win+X Power menu and click/tap on Disk Management)

If you create a dynamically-expanding VHD (as in the option at Step 6 in this tutorial) then I believe the size of the VHD won't dynamically shrink back down again when you delete files from it. Is that the issue you're finding?
 

My Computer

System One

  • OS
    Windows 8.1, 10

ashameen

New Member
Posts
7
#25
I am saying the purpose of the sd card is to free up some space on the c drive and to use the mounted drive (sdcard) for onedrive, dropbox etc. But with this, the cdrive space reduces also as you add files from onedrive, dropbox, pictures etc. which defeats the purpose of the sd card in the first place.

I am using drive W (my sdcard) as the VHD mounted on the C drive.
Hi David
Thanks for the post, the auto-mount works perfect for me, but I have an issue. If I move say the location of OneDrive to the sdcard, my c drive reduces in same proportion as the space taken by the OneDrive in the sdcard location. How can fix this.
Hi Ashameen,

Can you say a bit more about what you're trying to do, and the setup of the disks on your computer? Which drive are you using as a VHD drive?

It might be useful if you could post a screenshot of the layout in Disk Management (to bring this up, open the Win+X Power menu and click/tap on Disk Management)

If you create a dynamically-expanding VHD (as in the option at Step 6 in this tutorial) then I believe the size of the VHD won't dynamically shrink back down again when you delete files from it. Is that the issue you're finding?
 

My Computer

System One

  • OS
    Windows 8.1

DavidY

Active Member
VIP Member
Pro User
Posts
955
#26
I am saying the purpose of the sd card is to free up some space on the c drive and to use the mounted drive (sdcard) for onedrive, dropbox etc. But with this, the cdrive space reduces also as you add files from onedrive, dropbox, pictures etc. which defeats the purpose of the sd card in the first place.

I am using drive W (my sdcard) as the VHD mounted on the C drive.
Hi ashameen,

I'm still not quite sure what your setup is?

Do I understand correctly that instead of assigning the VHD to a drive letter (which is what I did in my tutorial) you're using diskpart to set it to a mount point somewhere on the C: drive?

I've had a quick try of this scenario, and by moving a file from C: to my mounted VHD, it does reduce the space reported as used on C:, so at least for me it works.

What happens to your C: drive space when you unmount the VHD (or temporarily stop it from auto-mounting at startup)? Does the space used change?
 

My Computer

System One

  • OS
    Windows 8.1, 10

ashameen

New Member
Posts
7
#27
I created the vhdx on my C drive (C:\MyDrive\mount82.vhdx) and assign the vhdx to the drive letter W
select vdisk file="C:\MyDrive\mount82.vhdx"
attach vdisk
assign letter=W

But I reverted to using the sdcard without the vhdx until i find a solution to the issue.
 

My Computer

System One

  • OS
    Windows 8.1
#28


We are a freeware development team (sordum.org) and just read the topic and created a very small portable App to solve the problem (VHD - Auto-mount at Startup) it is very easy to use :

1. Right click Diskpart_svr.exe and run as admin
2. Edit the first command and use install service Button , if you want to uninstall it just use uninstall button

Any feedback will be greatly appreciated

Downlod:
http://www.sordum.net/forum/download/file.php?id=93
 

My Computer

System One

  • OS
    windows 7

DavidY

Active Member
VIP Member
Pro User
Posts
955
#29
I created the vhdx on my C drive (C:\MyDrive\mount82.vhdx) and assign the vhdx to the drive letter W
select vdisk file="C:\MyDrive\mount82.vhdx"
attach vdisk
assign letter=W

But I reverted to using the sdcard without the vhdx until i find a solution to the issue.
Hi ashameen,

If your VHDX is on the C: drive, then by moving files around from other C: folders to your VHDX file (with the letter W: ), you are just moving data around from one part of C: to another, so it wouldn't save space overall.

Does that help?
 

My Computer

System One

  • OS
    Windows 8.1, 10

DavidY

Active Member
VIP Member
Pro User
Posts
955
#31
Yes that helps. So I have to create the vhdx on the sdcard
You could create it on the sdcard - although if you want the auto-mount to work, it means you'd have to be sure the sdcard was always inserted when you boot up.

But I'm not sure you'd get much advantage by creating a vhdx on the SD Card. If all you want to do is save space, a simpler way would be just to use the SD Card itself directly as whatever drive letter it maps to, without trying to make a VHD.
 

My Computer

System One

  • OS
    Windows 8.1, 10

Moniquekc

New Member
Posts
5
#33
Windows 8.1 Cant get Sd to mount as drive

Hello, could I possibly get some help please?. I can't get my sd card to mount as drive E when I reboot my tablet... I'm not sure why.. I've followed the steps and created a task for it but when I restart my tablet the drive isn't mounted. The error message displayed by the task simply says "unspecified error" so I really have no idea what I did wrong.
 

My Computer

System One

  • OS
    Windows

ashameen

New Member
Posts
7
#36
What I did in my case (and it works perfectly) is to create the VHDX on the SDcard (M) ("M:\VHDX\mount82.vhdx") , created a new simple volume from the sd card and assign it to letter N, and wrote the auto-mount script and saved it to a folder in the SDCard:
select vdisk file="M:\VHDX\mount82.vhdx"attach vdisk
assign letter=N

And follow the auto-mount procedure and you should be able to get it working.
Hope this helps
 

My Computer

System One

  • OS
    Windows 8.1

KYHI

Well-Known Member
Pro User
Posts
2,753
#38
I seem to see conflicting issues - you state you can not mount your SD card as E:\

your VHD is in a folder on C:\

You are assigning E:\ My SD.vhd

So you should have a C:\ drive - D:\ SD Card - E:\ VHD

You can not have E:\ SD Card and E:\ VHD

Most people are putting the VHD file on the SD Card - not C drive
 

My Computer

System One

  • OS
    Windows 3.1 > Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Dell XPS 8700
    CPU
    I7
    Memory
    24 GB

Moniquekc

New Member
Posts
5
#39
I've tried putting the vhd on my sd card and on my C drive. Neither way is working. I deleted the mount script & task and everything. I followed the steps again (putting the vhd on my sd) but when i restart the pc the vhdx doesn't mount.
 

My Computer

System One

  • OS
    Windows

DavidY

Active Member
VIP Member
Pro User
Posts
955
#40
I've tried putting the vhd on my sd card and on my C drive.
The vhdx is in a folder on my C drive ( Here's the path: "C:\Vhdx\My Sd.vhdx" )
View attachment 59492
Can you post the mount script which you're using when the vhd is on the SD card, please? The script above would only work if the VHD was on the c: drive - the first line ("select vdisk=...") would need to point to the SD card path instead.
 

My Computer

System One

  • OS
    Windows 8.1, 10

Users Who Are Viewing This Thread (Users: 0, Guests: 1)