Jump to content

diskpart assign mount fails


Recommended Posts

I'm using WinPE 2004 but the same thing happens in at least one older version.

I cannot assign an access path (mount point) to a newly created partition with diskpart.

I try the following:

select disk 5
create partition primary size=2000
select volume 6
assign mount=K:\mnt

And get this error message:

DiskPart could not assign the drive letter or mount point.
Make sure the drive letter or mount point is valid.

Assigning a drive letter to the partition works:

select volume 6
assign letter=G

Mounting an existing partition at the same point works:

select volume 5
assign mount=K:\mnt

If I reboot WinPe, the previously failed command now succeeds:

select volume 6
assign mount=K:\mnt

It seems that some discovery task occurs at boot that does not occur when the partition is created.

Has anybody else seen this?

Does anybody know how to fix it without a reboot?


Link to comment
Share on other sites

Open a case with microsoft... there are issues with diskpart where not all the time after you create the partition you fail on assigning the drive letter.

It seems that creating and assigning in the same file fails (at least for me) 25% - 50% of the time.

Hotfix is almost fully regression tested.

Link to comment
Share on other sites

Thanks for the response. I'm in the process of contacting MS but was hoping this forum would be faster.

I've seen the posts about drive letter assignments failing from scripts. But in my case, drive letter assignments work just fine. Also, this happens when entering the commands interactively and waiting for several minutes (sometimes hours) between creating the partition and attempting to mount it.

Link to comment
Share on other sites

This is due to how the OS discovers the Volume.

Ever put a cd in XP and it never displays teh contents?

You must actually "Kick" the OS awake and force it to discover the new volume. I do this by using a tool we wrote in house that Queries the drive partitions and writes out the Boot Record to to a file in the ram drive. This causes the OS to go thru it's motions which will discover the new voume. It has been Very reliable.

Before that... It was a crap shoot.


Link to comment
Share on other sites

I have tried to rescan the disks but it didn't help.

I'm also trying to avoid doing anything to "Kick the OS awake" because I've done things like that plenty of times in the past and the OS always picks the worst moment to refuse to wake up. :wacko:

I think I'll wait for the hotfix.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...