The How-To Geek Forums Have Migrated to Discourse


How-To Geek Forums / Windows Vista

(Solved) - Vista Partition Manager: Access Denied Error

(30 posts)
  • Started 9 years ago by Jobz
  • Latest reply from smeher
  • Topic Viewed 18062 times

Jobz
Posts: 0

Hey guys, for the past few days I've been trying to shrink my Vista partition to dual boot with Ubuntu, but I've run into nothing but problems. At first it wouldn't let me shrink it more than 400MB, but after going through the article here about working around the issues with the partition manager and disabling everything listed there, I was able to get it to let me shrink up to about 100GB. So that was one problem solved, unfortunately when I actually tried to shrink it (I was trying to shrink it by about 30GB) I was greeted with an 'Access Denied' error message.

So I tried several methods on this site and from elsewhere on the web, but nothing seemed to work. Eventually I ran Diskperfect in the "Consolidate Free Space" mode, and I tried shrinking again. I was able to shrink the partition by 5GB. After that I tried shrinking another 25GB to get the size I had wanted, but once again I got the Access Denied error. I tried 5GB again just to see if perhaps I had to do it in small amounts, and it did work a second time (Giving me a total of 10GB of unallocated space) but upon trying it a third time I was once again greeted with the same error.

I've tried running Diskperfect again twice and I continue to get the same error. Needless to say this has been quite frustrating. Any help with this would be greatly appreciated.

-Jobz

Posted 9 years ago
Top
 
madmacs
Posts: 0

Hi Jobz, welcome to HTG. Have you tried right clicking the cmd and running as administrator? Matt

Posted 9 years ago
Top
 
Jobz
Posts: 0

Thanks for the quick reply Matt, as of right now I haven't been using cmd for anything. I've been using Vista's partition manager in the disk management window. Should I be using the cmd instead?

Posted 9 years ago
Top
 
madmacs
Posts: 0

Sorry, my bad. I had read Diskpart and not Diskperfect!! The access denied error could be coming from protected space on your HD used for system backups!! Have you defragged after shrinking the 5 GB´s?

Posted 9 years ago
Top
 
Jobz
Posts: 0

Yes, I've run Diskperfect twice since shrinking the 5GB and have gotten the same error when trying to shrink again. Should I try a different defragger?

Posted 9 years ago
Top
 
LH
Posts: 0

What's wrong with inbuilt Vista defragger ?

Posted 9 years ago
Top
 
Jobz
Posts: 0

Nothing as far as I know. Diskperfect is the only thing that's worked so far though.

Posted 9 years ago
Top
 
ScottW
Posts: 0

@LH, if you follow The Geek's article on shrinking a partition, it explains about files that live at the end of the disk. Vista's Disk Defragmenter will not move these files in. PerfectDisk is the best tool for making space available to shrink since it has a setting to "aggressively consolidate free space".

@Jobz, try running Vista in Safe Mode for the shrink operation. It may be that the Access Denied error comes from another process that prevents Vista from getting exclusive access to the partition for shrinking. If that doesn't work, you can always run diskpart.exe from the Recovery Environment command prompt.

Posted 9 years ago
Top
 
LH
Posts: 0

My bad :(

Posted 9 years ago
Top
 
Jobz
Posts: 0

Thanks Scott, I give that a try when I get home.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Just tried in safe mode and got the same error. Are there any decent tutorials on how to use diskpart.exe to shrink a partition? I'm not so great with cmd and I don't want to screw anything up.

Posted 9 years ago
Top
 
madmacs
Posts: 0

Jobz, have you got a lot of data you need backing up?

Posted 9 years ago
Top
 
Jobz
Posts: 0

Yeah, about 100GB of data I'd rather not lose. Looks like it's time to go clear off my external :P

Posted 9 years ago
Top
 
ScottW
Posts: 0

Jobz, definitely backup your data before performing any partition operations. I just kind of assumed that you had already done that.

I don't know of a tutorial on diskpart, but here is the detailed explanation of all the command line options. I can give you the commands to run. Let's do a test run. You can run the following commands with Vista up and running. They will only provide information and not change anything. You need an elevated Command Prompt -- right-click and select run as administrator:

diskpart

Now you will have a new prompt that says "DISKPART>" and you type commands after the ">".

list volume
list disk
select disk 0
list partition

Now you will have a list of the partitions on your first physical hard drive. We want to look at your Vista partition, which I will assume is partition 1, but if you see that your Vista partition is a different partition number then change it in the command:

select partition 1
detail partition
shrink querymax
exit

Right-click in the Command Prompt window, choose "Select All", then press Enter. That will copy the entire session to the clipboard and you can paste it here or in Notepad for editing before pasting here.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Ok, followed your instructions in cmd, and I'm in the process of clearing my external HD off to back up my files.

Here's the cmd session:

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\Jay>diskpart

Microsoft DiskPart version 6.0.6001
Copyright (C) 1999-2007 Microsoft Corporation.
On computer: JAY-PC

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 E DVD-ROM 0 B No Media
Volume 1 F DVD-ROM 0 B No Media
Volume 2 C NTFS Partition 279 GB Healthy System
Volume 3 D RECOVERY NTFS Partition 9 GB Healthy
Volume 4 H JOBZ FAT32 Partition 233 GB Healthy

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ---------- ------- ------- --- ---
Disk 0 Online 298 GB 10 GB
Disk 1 Online 233 GB 0 B

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list partition

Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 279 GB 32 KB
Partition 2 Primary 9 GB 289 GB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> detail partition

Partition 1
Type : 07
Hidden: No
Active: Yes

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 2 C NTFS Partition 279 GB Healthy System

DISKPART> shrink querymax

The maximum number of reclaimable bytes is: 91 GB

DISKPART>

Posted 9 years ago
Top
 
ScottW
Posts: 0

OK, that's good info. I see that you have a 320 GB hard drive, probably the internal, and a 250 GB, probably the external. The 320 GB drive, 298 gigabytes to a computer, has a 9 gb recovery partition, a 279 gb primary partition for Vista, and about 10 gb of unallocated space from your shrinking. Volume letter C in Windows is assigned to the Vista partition, a primary, active, NTFS partition with no label. BTW, it's a good idea to give a label to your partitions so that when you are working with tools like diskpart, you know exactly what's what. Diskpart says that it can shrink this partition by 91 gb, down to about 180 gb and leaving 101 total unallocated.

You 250 GB external drive is formatted as FAT32, though NTFS would be more efficient at such a partition size. I see that you are running Vista SP1, and not SP2. Get that backup done and you will be ready for more shrinking.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Ok, I've finished backing up my files, and from reading through the diskpart command line options, I'm pretty sure I've got the commands to shrink it right. Just figured I'd post it here to verify I haven't gotten anything wrong before I do it.

diskpart
list volume
list disk
select disk 0
list partition
select partition 1
shrink desired=25000
exit

Posted 9 years ago
Top
 
ScottW
Posts: 0

Jobz, those commands look fine. One thing that I recommend is that after you select a partition ("select partition 1") that you run "detail partition" to be absolutely sure that you have the right one. The detail partition command will show you the label, the size, the file system, the volume letter, and so on. By checking all of those, you can be sure that you have the partition that you mean to work on. Right now, your situation is fairly uncomplicated, but when you start adding disks and making partitions it quickly gets complex.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Well...I ran diskpart and attempted to shrink the disk, but I was greeted with the same old error message "Access is Denied". It's looking like my only option is to format and reinstall Vista, or run Gparted (But I've heard horror stories about that). Unless there's another method I could try that one of you guys knows of.

Posted 9 years ago
Top
 
Jobz
Posts: 0

I just booted from my Vista install disk to make sure I had a repair option (It's a specialized HP disk that came with the laptop) and unfortunately it does not. The only thing I can do with it is format and reinstall Vista. So I guess I'm gonna have to format, unless like I said you guys know of any other methods I can try.

Posted 9 years ago
Top
 
ScottW
Posts: 0

Jobz, run the diskpart commands from the Windows Recovery Environment. Boot from a Vista install disc, or make a Repair CD, and choose "Repair You Computer" to get to the Recovery Environment. Choose Command Prompt to get to the command line.

By running in the Recovery Environment, you are outside of Windows so there can't be any processes interfering with drive access.

Another thought I have -- the access denied message might be due to a file system error. Before trying the shrink operation again, run "chkdsk /F c:" from the command line until it says "no problems found" in the output.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Ok, I made the repair CD, booted from it and entered the recovery environment. I ran "chkdsk /F c:" and it said no problems were found, after that I ran the diskpart commands but I got the same Access Denied error.

Posted 9 years ago
Top
 
ScottW
Posts: 0

Doh! I just don't understand the source of this access denied error. When you enter the Recovery Environment, are you asked to choose a account to login with? The only thing I can think of is that somehow Windows thinks that the account you are using does not have proper permission to access (and modify) the partition and/or the files on it. It's as if the security descriptors indicate that some other user owns the partition or the file system or I-don't-know what else.

At this point, I see two best options. To avoid the whole shrink business, if you could make a backup *image* of the Vista partition, then you could delete the partition (hopefully), re-create it at a smaller size, then restore the backup image. A backup image would save *all* of the data on the drive. Since it is only the data that is in use, and you can use compression, it's possible that it could fit on your 250 GB external drive if there is room.

The next alternative would be to try some other ways to get the shrink to work, such as using the hidden Administrator account. Finally, if none of that worked, then it would seem that the only option would be a re-install.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Ok, I just tried to run diskpart in the hidden administrator account but got the same error as always. How would I go about making an image of the partition? Is there free software to do it or would I have to buy Acronis?

I've been strongly considering formatting, the problem is that because HP did not give me a real install disk all I can do with my disk is restore the computer to factory settings (Which would give Vista back the entire harddrive and put me back at square 1). So unless there's a way to get a real Vista install disk without having to buy a new copy, I'd probably just format and install Windows 7 instead.

Posted 9 years ago
Top
 
ScottW
Posts: 0

Jobz, it just so happens that we have a thread on imaging partitions that lists some freeware applications. I have used DriveImage XML and the free version of Macrium Reflect. Paragon Drive Backup Express is also freeware, though I have not tried it myself. Macrium Reflect is very nice.

I haven't used the HP restore software, but it might be possible that you could create a partition of the size you wish and tell it to do the factory restore there. Or, it might be that immediately after a factory restore, you could shrink the partition without an access denied error.

Posted 9 years ago
Top
 
Jobz
Posts: 0

Thanks for the link Scott, I'll see if I can fit an image of my HD on the external once I get home.

Posted 9 years ago
Top
 
Jobz
Posts: 0

I finally decided just to format and install Windows 7 rather than Vista, I was able to dual boot Windows 7 with Ubuntu and so far both are running smoothly. Thanks to everyone for your help, especially ScottW.

Posted 9 years ago
Top
 
ScottW
Posts: 0

Jobz, if you're happy, then I'm happy. Though I am still curious why that access denied came up. You're welcome.

Posted 9 years ago
Top
 
Jobz
Posts: 0

It must have been an issue with Vista (Perhaps HP's software prevents the user from resizing the HD?) because once 7 was installed I just ran the shrink volume application inside Disk Management and it worked perfectly.

Posted 9 years ago
Top
 
smeher
Posts: 0

Hi Jobz, I had exactly the same problem you are facing. I had problems with reformatting my HP Pavilion dv5t laptop.
However I was able to get a workaround. I am publishing it here with hope that it will save someones precious time. It's actually very easy - Just reboot and press F8 while rebooting to login to 'Safe mode with Command Prompt'.
On the command prompt type the DISKPART commands discussed above.

Note: If incase the querymax command doesn't show as much space that you desired, just reboot to Windows normally and do a offline defragment with 'PerfectDisk' software (free trial version is available in it's website). Then continue with the above steps.
If anyone has questions, pls feel free to contact me. Have a nice day!

Posted 9 years ago
Top
 



Topic Closed

This topic has been closed to new replies.

The Best Tech Newsletter Anywhere

Join 250,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.