Formatar disco USB usando DiskPart gera erro "Nenhum volume selecionado"

Formatar disco USB usando DiskPart gera erro "Nenhum volume selecionado"

Eu uso a seguinte diskpart.exesequência. Quero especificar o número do disco e formatar o disco.

C:\>diskpart

Microsoft DiskPart version 10.0.18362.1

Copyright (C) Microsoft Corporation.
On computer: AAAAAAA

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> clean

DiskPart succeeded in cleaning the disk.

DISKPART> create partition primary

DiskPart succeeded in creating the specified partition.

DISKPART> format fs=ntfs label="My USB Disk" quick

There is no volume selected.
Please select a volume and try again.

DISKPART>

Como você pode ver, o script deve funcionar e pode funcionar Windows 7, pois várias páginas pesquisadas na internet dizem isso, mas na minha Windows 10instalação recebo

Não há volume selecionado

Esseartigonão se aplica. O autor realmente esqueceu o arquivo create primary partition. Idemaqui.

Como você pode ver nesta captura de tela, definitivamente há um volume no disco 2.

diskpart mostrando um único volume

Minha unidade flash USB tem um único volume, então formatdeve funcionar.

Pensamentos?

Responder1

O código está quase correto, mas aqui está o fragmento que falta. Modifique-o de acordo com suas necessidades.

create partition primary
select partition 1
active
format fs=ntfs label="My USB Disk" quick
assign letter=D

Responder2

Encontrei o mesmo problema e, para constar, funcionou após uma reinicialização (não soltava o disco para formatá-lo) e tentei no CMD em vez do Powershell. Isso funcionou:

  1. Execute o CMD
  2. Digite "diskpart" e pressione Enter
  3. Na janela do diskpart, digite “list disk” e pressione Enter
  4. Anote o número do disco do seu dispositivo USB para usar mais tarde
  5. Digite "sel dis 1" alterando o número 1 para qualquer número do seu dispositivo USB na etapa 4. Pressione Enter
  6. Digite "limpar" e pressione Enter
  7. Digite "cre par pri size = 30000" e pressione Enter
  8. Digite "sel par 1" e pressione Enter
  9. Digite "ativo" e pressione Enter
  10. Digite "formato fs = fat32 rápido" e pressione Enter
  11. Digite "atribuir" e pressione Enter
  12. Feche as janelas diskpart e CMD.

Estou tentando preparar um pendrive USB de mais de 50 GB como um dispositivo de inicialização particionado FAT32 de <32 GB.

Responder3

não sei o que fiz, mas funciona.

**

DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
  Disk 2    Online           29 GB    29 GB
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart has encountered an error: The device is not ready.
See the System Event Log for more information.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> active
There is no partition selected.
Please select a partition and try again.
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
* Disk 2    Online           29 GB      0 B
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> active
There is no partition selected.
Please select a partition and try again.
DISKPART> format fs=fat32 quick
There is no volume selected.
Please select a volume and try again.
DISKPART>
C:\WINDOWS\system32>diskpart
Microsoft DiskPart version 10.0.22000.653
Copyright (C) Microsoft Corporation.
On computer: ZMBBY
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
  Disk 2    Online           29 GB    29 GB
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> format fs=fat32 quick
There is no volume selected.
Please select a volume and try again.
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
  Disk 2    Online           29 GB    29 GB
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
Virtual Disk Service error:
The object is not found.
DISKPART>
C:\WINDOWS\system32>diskpart
Microsoft DiskPart version 10.0.22000.653
Copyright (C) Microsoft Corporation.
On computer: ZMBBY
DISKPART> list diskc
Microsoft DiskPart version 10.0.22000.653
DISK        - Display a list of disks. For example, LIST DISK.
PARTITION   - Display a list of partitions on the selected disk.
              For example, LIST PARTITION.
VOLUME      - Display a list of volumes. For example, LIST VOLUME.
VDISK       - Displays a list of virtual disks.
DISKPART> list dick
Microsoft DiskPart version 10.0.22000.653
DISK        - Display a list of disks. For example, LIST DISK.
PARTITION   - Display a list of partitions on the selected disk.
              For example, LIST PARTITION.
VOLUME      - Display a list of volumes. For example, LIST VOLUME.
VDISK       - Displays a list of virtual disks.
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
  Disk 2    Online           29 GB      0 B
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
Virtual Disk Service error:
The object is not found.
DISKPART> active
There is no partition selected.
Please select a partition and try again.
DISKPART> format fs=fat32 quick
There is no volume selected.
Please select a volume and try again.
DISKPART> create partition primary size=30000
No usable free extent could be found. It may be that there is insufficient
free space to create a partition at the specified size and offset. Specify
different size and offset values or don't specify either to create the
maximum sized partition. It may be that the disk is partitioned using the MBR disk
partitioning format and the disk contains either 4 primary partitions, (no
more partitions may be created), or 3 primary partitions and one extended
partition, (only logical drives may be created).
DISKPART> create partition primary
C:\WINDOWS\system32>diskpart
Microsoft DiskPart version 10.0.22000.653
Copyright (C) Microsoft Corporation.
On computer: ZMBBY
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          119 GB  1024 KB        *
  Disk 1    Online          931 GB   300 GB        *
  Disk 2    Online           29 GB      0 B
DISKPART> select disk 2
Disk 2 is now the selected disk.
DISKPART> clean
DiskPart succeeded in cleaning the disk.
DISKPART> create partition primary
DiskPart succeeded in creating the specified partition.
DISKPART> format fs=fat32 quick
    0 percent completed
DiskPart has encountered an error: The request is not supported.
See the System Event Log for more information.
DISKPART> format fs=fat32 quick
  100 percent completed
DiskPart successfully formatted the volume.

**

Responder4

Ei, volume não é nada demais, basta selecionar o drive, no meu caso era o drive H, que é o 8º, então selecionei e continuei!

ei, abaixo está a imagem do meu processo cmd, não deixe de conferir

Espero que ajude:
imagem do processo cmd

informação relacionada