Monday, September 25, 2017

Masking the Windows recovery partition drive letter

Once in a while, things go awry in Windows for no apparent reason.
What happened to me today was that the recovery partition started showing up as a drive letter in my system. Unfortunately, that drive letter cannot be removed through the GUI in "Disk management" in control panel. The only way is to go to a command line and use DISKPART. Here is how.

  1. Click the start menu
  2. Type DISKPART
  3. Type Ctrl + Shift + Enter to run as administrator
  4. Type "LIST DISK"
  5. Select the boot drive, usually disk 0, by typing "SELECT DISK=0"
  6. Now list the partitions on the drive, by typing "LIST PARTITION" .
  7. Select the recovery partition from the list . On my system, this was number 4, so I typed "SELECT PARTITION=4"
  8. List the partition details by typing "DETAIL PARTITION"
  9. Note the drive letter . This was N: on my system. Type "REMOVE LETTER=N
  10. You are done . Type "EXIT" to leave DISKPART
Here is the output of my actual session :

Microsoft DiskPart version 10.0.14393.0

Copyright (C) 1999-2013 Microsoft Corporation.
On computer: HIGGS

DISKPART> LIST DISK

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          894 GB      0 B        *
  Disk 1    Online         3726 GB      0 B   *    *
  Disk 2    Online         3726 GB      0 B   *    *
  Disk 3    No Media           0 B      0 B
  Disk 4    No Media           0 B      0 B
  Disk 5    No Media           0 B      0 B
  Disk 6    No Media           0 B      0 B
  Disk 7    Online         5589 GB      0 B        *

DISKPART> SELECT DISK=0

Disk 0 is now the selected disk.

DISKPART> LIST PARTITION

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Reserved           128 MB    17 KB
  Partition 2    System             100 MB   129 MB
  Partition 3    Primary            893 GB   229 MB
  Partition 4    Recovery           562 MB   893 GB

DISKPART> SELECT PARTITION=4

Partition 4 is now the selected partition.

DISKPART> DETAIL PARTITION

Partition 4
Type    : de94bba4-06d1-4d40-a16a-bfd50179d6ac
Hidden  : Yes
Required: No
Attrib  : 0000000000000000
Offset in Bytes: 959612715008

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 7     N                NTFS   Partition    562 MB  Healthy    Hidden


DISKPART> REMOVE LETTER=N

DiskPart successfully removed the drive letter or mount point.

DISKPART> EXIT

No comments:

Post a Comment