无法删除 diskpart 中的分区-参数无效?

无法删除 diskpart 中的分区-参数无效?

我正在尝试使用 Diskpart 删除 UFD 上的分区。我通过提升的 CMD 提示符运行它。但问题是它报告我使用了无效参数。请参阅下面的日志。

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>diskpart

Microsoft DiskPart version 6.3.9600

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

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB  1024 KB        *
  Disk 1    Online         3819 MB  3670 MB        *

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> delete

Microsoft DiskPart version 6.3.9600

DISK        - Delete a missing disk from the disk list.
PARTITION   - Delete the selected partition.
VOLUME      - Delete the selected volume.

DISKPART> delete partition 1

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition 2

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> help delete partition

    Deletes the partition with focus.

Syntax:  DELETE PARTITION [NOERR] [OVERRIDE]

    NOERR       For scripting only. When an error is encountered, DiskPart
                continues to process commands as if the error did not occur.
                Without the NOERR parameter, an error causes DiskPart to exit
                with an error code.

    OVERRIDE    Enables DiskPart to delete any partition regardless of type.
                Typically, DiskPart only permits you to delete known data
                partitions.

    You cannot delete the system partition, boot partition, or any partition
    that contains the active paging file or crash dump (memory dump) filed.

    A partition must be selected for this operation to succeed.

    Partitions cannot be deleted from dynamic disks or created on dynamic
    disks.

Example:

    DELETE PARTITION

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition 2 override

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART>

问:本案中的“论据”是什么?为什么它无效?

这不是我第一次使用 Diskpart,以前每当磁盘驱动器上有特殊的隐藏恢复分区而无法使用传统磁盘工具(如 Diskmgmt.msc)删除时,我都会使用它几次。因此,我很确定我的语法正确,并且我按照帮助页面做了所有事情。

我正在使用 Windows 8.1,UFD 是全新的 SanDisk Cruzer Blade 4 GB。我只在上面安装了 PassMark Memtest86,这就是我用它做的所有事情。我今天格式化了 UFD 以从中删除 Memtest86(在 Explorer 中快速格式化),但 UFD 上留下了一个隐藏的 EFI 分区。见下面的屏幕截图。

A

答案1

参数无效!我现在明白了。

当已经选定分区时,无需在命令中附加分区号。

代替:

select partition 2
delete partition 2 override

用这个:

select partition 2
delete partition override

就如此容易...

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. Med ensamrätt.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.2.9200

Copyright (C) 1999-2012 Microsoft Corporation.
On computer: SKANNING26

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          698 GB      0 B        *
  Disk 1    Online         3819 MB  3670 MB        *

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             49 MB    64 KB
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition 1

The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 2    System              98 MB    51 MB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> delete partition

Virtual Disk Service error:
Det går inte att ta bort en skyddad partition utan att parametern Tvinga skyddad
 har angetts.


DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
* Partition 2    System              98 MB    51 MB

DISKPART> delete partition override

DiskPart successfully deleted the selected partition.

DISKPART> list partition

There are no partitions on this disk to show.

DISKPART>

A

相关内容