Remove Advertisement


[Guide] Virtual hard drive on SD Card

If you're gonna create a guide... stick it in here!

[Guide] Virtual hard drive on SD Card

Postby westonpf » February 11th, 2015, 11:23 am

Windows 8 won't allow you to install certain apps or hold certain libraries on removale media such as USB drives or SD cards.

It is possible to use a modified driver to make the SD card appear as a fixed disk (search for cfadisk.inf) but a simpler albeit slightler slower (access speeds) approach is to create one or more virtual hard drives (VHD) on an SD card and have these mount during the startup process.

Windows 8 sees a mounted VHD as a fixed internal drive and will allow the OS to use it in exactly the same manner as an internal drive. You can even partition a VHD in the same way as a fixed drive, something that you can't do with an SD card or any USB drive identified as 'removable'

This approach has its issues in that the SD card is going to be slower than the internal drive, this will be further slowed by the use of a VHD, although creating a fixed size VHD rather than expanding seems to improve speed. You may also face issues if you remove the SD card or the card fails as the OS will be looking for the drive(s) that are located on the SD. The VHD will only mount after Windows has started so you can't use it to dual boot or for anything that requires disk access prior to completion of the startup process.

Fire up the disk management tool, select Action in the menu and create VHD. From here you can select the type, size, location for VHD. Create it on your SD and I found that fixed size will work faster but takes longer to create.
You will then need to use the disk management tool for initialise and format the new VHD. You can format as FAT32 or NTFS depending on what you will be using it for.

Once it's done you will have a VHD file on your SD and a new hard drive showing, this is the mounted VHD. You can use this like any internal drive.

In notepad create a startup script

Code: Select all
select vdisk file="D:\VHD.vhd"
attach vdisk
assign letter=X


You will need to change the file name and the assigned letter to match your setup/needs.

Save it as a .txt file somewhere on your C:\ drive.

Open Computer Management
Select Task Scheduler
Create task
In the General tab, enter a name and description for your task and change so that it runs whether the user is logged in or not.
Change 'Configure for:' to say Windows 8
Select the triggers tab and click New, change begin the task to 'Startup'
Select Actions tab and click New
In the Program/Script box enter 'diskpart'
In the arguments box enter '/s [full path/name of the .txt file you crated earlier]' (there is a space between the /s and the script)
Click OK
Select the Conditions tab and deselect 'Stop if computer switches to battery power' and 'Start task only if the computer is on AC Power' and click OK. As a portable device we need this to run regardless of power source.
You may then need to validate your user details.
Close computer management and reboot to test
westonpf
Linx Nerd
Linx Nerd
 
Posts: 154
Joined: January 18th, 2015, 4:36 am
Location: Wolverhampton
Linx Tablet: Linx 10
Retailer: Argos
Windows Version: Windows 10 Pro

Remove Ad



Re: [Guide] Virtual hard drive on SD Card

Postby garrywma » April 1st, 2015, 10:28 pm

Really good guide.

If you are on Windows 10 things just got a lot simpler with the introduction of Storage Sense - tucked away in the settings screen this now has the option to directly set storing new apps on an SD card. Works really well
garrywma
Linx Newbie
Linx Newbie
 
Posts: 12
Joined: January 25th, 2015, 8:52 pm
Location: Peterborough, UK
Linx Tablet: Linx 8
Retailer: Was a gift
Windows Version: Windows 10 Home


Return to Guides (All Devices)

Who is online

Users browsing this forum: adamski and 1 guest