0

Hi Superuser friends.

Even as an Admin, using the hidden Windows 11 Pro (build 22H2) Administrator account where all things are elevated, when I try to repair an internal SSD drive using DISM that's in GPT filesystem, it always has the Access Denied error or Error: 2. I use Windows to Go to try to repair the internal drive C: (both are Windows 11, build 22H2)

We've tried (syntax are always triple checked and it's always with /Cleanup-Image /RestoreHealth w/ internet connection):

-using it parameters like /image: -even using diskpart and then assigning it the as drive z: and then doing the DISM w/ dism /image:Z:/Cleanup-Image /RestoreHealth -using advanceRun app for cmd.exe -changing the Security tab (changing the Advanced setting, that's popular in tutorials) -using icalcs

Can DISM even access GPT disks? If no, is there's a terminal command or 3rd-party app to make GPT be accessible by DISM?

Other recommendations are welcome.

Ramhound
  • 42,708
alvin777
  • 11
  • 2
  • Can you post the full command you used? And yes the dism command can be used as to repair OS on MBR as GPT partitions. – Ricardo Bohner Mar 02 '24 at 11:28
  • 1
    Of course, Command Prompt and Power Shell can both access a GPT disk, GPT has been the default disk schema for more than a decade. GPT and MBR would be invisible to those tools anyways. – Ramhound Mar 02 '24 at 11:35
  • 1
    Within the cbs.log and dism.log [%WinDir%\Logs\<CBS|DISM>] will be the reason for the error – JW0914 Mar 02 '24 at 12:04
  • What is the problem with the internal disk and how did it go bad? What happens when you try to boot from it? What model is this disk? I suggest to check the SMART data of the disk (post it in your post for us). – harrymc Mar 02 '24 at 13:53

1 Answers1

1

Can DISM even access GPT disks?

First of all, DISM doesn't access disks on its own. It only needs to access filesystems (it is a file-based tool), with the OS handling actual disk access, so it doesn't even know – or care – about what partitioning is being used.

That being said, yes, DISM can work on GPT disks. Every UEFI-based Windows installation uses GPT – this has been the case even before DISM was created – and generally DISM functions without problems on such systems. (Even the Windows installation process uses DISM, in effect, to extract the Install.wim.)

My suspicion is more on the Windows-To-Go side; I think it might have something that deliberately blocks access to internal disks.

Use a standard Windows installation USB drive; once it reaches the welcome dialog, hit Shift-F10 for Command Prompt where you'll be able to use DISM and other tools. Any other WinPE-based system should also work (e.g. Hiren's Boot).

(Although I'm not sure if, after the changes you've done in the Security tab, the system is still repairable.)

u1686_grawity
  • 452,512
  • Thanks for the insights. I think I'll just back up the Windows installation and fresh install then reinstall all the apps and restore the documents and non-program files. There might be too much damaged files (may have neglected malwares that the malware apps detected, combined with that one brown out, power outtage). – alvin777 Mar 03 '24 at 13:57