3

I was trying to migrate a Win7 OS from a HDD to a SSD.

I've created 2 partition with 1024KB offset, with diskpart: 100MB System Reserved and a 60GB for C:.

I've cloned their contents using Easeus Disk Copy.

I've loaded the Windows 7 Boot DVD, and wanted to use diskpart to drop the letter for the System Reserved partition and make it hidden.

select volume 0
detail volume
attribute volume set nodefaultdriveletter
attribute volume set hidden

These 2 attribute set commands actioned on both volumes (0 and 1, MSR and C:) instead of the selected one, and viceversa.

I've tried to clear these attributes from volume 1, but it cleared them also from volume 0.

Why does DiskPart have this behaviour?

Nick
  • 313
  • 1
  • 5
  • 19

2 Answers2

3
help hattributes volume

with MBR disks attributes HIDDEN, READONLY and NODEFAULTDRIVELETTER are applied to the whole disk

Kevin Panko
  • 7,466
kalup
  • 46
  • 2
2

Diskpart behaves like that because you're applying attributes on a MBR partitioned disk. Cutting the help text description, this is the output of executing help attributes volume at diskpart prompt:

    On basic master boot record (MBR) disks, the HIDDEN, READONLY, and
    NODEFAULTDRIVELETTER attributes apply to all volumes on the disk.

However, this does not explain WHY it behaves like that. The reason is simple: there's NO defined standard for "MBR attributes", unlike GPT (which are defined in the Attributes partition entry field).

I've discovered myself that volume attributes are stored on the disk itself, rather than disk attributes (which are saved into registry and are OS-wide only).

Details here: Where disk read-only attribute is stored on Windows?

ST83
  • 131
  • 8