viernes, octubre 11, 2013

DISKPART en W7


Si te has encontrado con problemas a la hora de borrar particiones ocultas de un disco, esta es la solución.

Realizar copia de seguridad antes de comenzar cualquier acción  con  DISKPART. Un error de selección de partición o disco puede dar al traste en pocos segundos con toda la información de tu equipo.

Normalmente los discos de los equipos con sistema operativo preinstalado suelen traer una o dos particiones OEM, particiones de recuperación del sistema operativo original, que  entre otras cosas pueden ayudar al usuario a crear DVDs de arranque o instalación.

 



Estas particiones pueden estar protegidas y desde el administrador de discos del sistema poco o nada puedes hacer con ellas. Ni borrarlas, ni activarlas, ni asignarles unidad.

La solución es DISKPART

Utilizar con precaución, queda dicho que es extremadamente rápido y devastador si te equivocas, aunque es la única solución para borrar estas particiones sin arrancar  con discos de terceros.

Básicamente
arrancar  Diskpart
seleccionar  disco (SELECT DISK)
seleccionar partición(SELECT PARTITION)
Asegurarse que la partición marcada en foco es la correcta (LIST PARTITION, marcada con un  asterisco)
borrar partición (OVERRIDE para  forzar borrado)



Desde un cmd con permisos de administración:

C:>Diskpart
DISKPART> list disk
  Núm Disco  Estado      Tamaño   Disp     Din  Gpt
  ---------- ----------  -------  -------  ---  ---
  Disco 0    En línea     232 GB  1024 KB
DISKPART> select disk0
Microsoft DiskPart versión 6.1.7601
DISK        - Cambiar el enfoque a un disco. Por ejemplo, SELECT DISK.
PARTITION   - Cambiar el enfoque a una partición.
              Por ejemplo, SELECT PARTITION.
VOLUME      - Cambiar el enfoque a un volumen. Por ejemplo, SELECT VOLUME.
VDISK       - Cambie el foco a un disco virtual. Por ejemplo, SELECT VDISK.
DISKPART> select disk 0
El disco 0 es ahora el disco seleccionado.
DISKPART> select disk 0
El disco 0 es ahora el disco seleccionado.
DISKPART> list partition
  Núm Partición  Tipo              Tamaño   Desplazamiento
  -------------  ----------------  -------  ---------------
  Partición 1    OEM                  9 GB    31 KB
  Partición 2    Principal           49 GB     9 GB
  Partición 3    Principal          173 GB    59 GB
DISKPART> select partition 1
La partición 1 es ahora la partición seleccionada.
DISKPART> list partition
  Núm Partición  Tipo              Tamaño   Desplazamiento
  -------------  ----------------  -------  ---------------
* Partición 1    OEM                  9 GB    31 KB
  Partición 2    Principal           49 GB     9 GB
  Partición 3    Principal          173 GB    59 GB

DISKPART:> DELETE PARTITION OVERRIDE


Otro ejemplo con mas ventanas de ayuda (extraido de  aquí)

C:>Diskpart

Microsoft DiskPart version 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: V131
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
——– ————- ——- ——- — —
Disk 0 Online 298 GB 0 B
Disk 1 Online 7640 MB 0 B
Disk 2 Online 298 GB 285 GB
DISKPART> SELECT DISK 2
Disk 2 is now the selected disk.
DISKPART> LIST PARTITION
Partition ### Type Size Offset
————- —————- ——- ——-
Partition 1 Recovery 13 GB 1024 KB
DISKPART> SELECT PARTITION 1
Partition 1 is now the selected partition.
DISKPART> DETAIL PARTITION
Partition 1
Type : 27
Hidden: Yes
Active: No
Offset in Bytes: 1048576
Volume ### Ltr Label Fs Type Size Status Info
———- — ———– —– ———- ——- ——— ——–
* Volume 5 PQSERVICE NTFS Partition 13 GB Healthy Hidden
DISKPART> INACTIVE
The current partition is already marked inactive. (I didn’t need to do this…)
DISKPART> DELETE PARTITION
Virtual Disk Service error:
Cannot delete a protected partition without the force protected parameter set.  (I eventually had to lookup the override command because I had forgotten how to do it…)
DISKPART> DELETE PARTITION FORCE (wrong)
The arguments specified for this command are not valid.
For more information on the command type: HELP DELETE PARTITION
DISKPART> FORCE DELETE PARTITION (wrong, but since it was not recognized it did list all the options for me…)
Microsoft DiskPart version 6.1.7601
ACTIVE – Mark the selected partition as active.
ADD – Add a mirror to a simple volume.
ASSIGN – Assign a drive letter or mount point to the selected volume.
ATTRIBUTES – Manipulate volume or disk attributes.
ATTACH – Attaches a virtual disk file.
AUTOMOUNT – Enable and disable automatic mounting of basic volumes.
BREAK – Break a mirror set.
CLEAN – Clear the configuration information, or all information, off the
disk.
COMPACT – Attempts to reduce the physical size of the file.
CONVERT – Convert between different disk formats.
CREATE – Create a volume, partition or virtual disk.
DELETE – Delete an object.
DETAIL – Provide details about an object.
DETACH – Detaches a virtual disk file.
EXIT – Exit DiskPart.
EXTEND – Extend a volume.
EXPAND – Expands the maximum size available on a virtual disk.
FILESYSTEMS – Display current and supported file systems on the volume.
FORMAT – Format the volume or partition.
GPT – Assign attributes to the selected GPT partition.
HELP – Display a list of commands.
IMPORT – Import a disk group.
INACTIVE – Mark the selected partition as inactive.
LIST – Display a list of objects.
MERGE – Merges a child disk with its parents.
ONLINE – Online an object that is currently marked as offline.
OFFLINE – Offline an object that is currently marked as online.
RECOVER – Refreshes the state of all disks in the selected pack.
Attempts recovery on disks in the invalid pack, and
resynchronizes mirrored volumes and RAID5 volumes
that have stale plex or parity data.
REM – Does nothing. This is used to comment scripts.
REMOVE – Remove a drive letter or mount point assignment.
REPAIR – Repair a RAID-5 volume with a failed member.
RESCAN – Rescan the computer looking for disks and volumes.
RETAIN – Place a retained partition under a simple volume.
SAN – Display or set the SAN policy for the currently booted OS.
SELECT – Shift the focus to an object.
SETID – Change the partition type.
SHRINK – Reduce the size of the selected volume.
UNIQUEID – Displays or sets the GUID partition table (GPT) identifier or
master boot record (MBR) signature of a disk.
DISKPART> DELETE PARTITION OVERRIDE
DiskPart successfully deleted the selected partition.




Web Site Counter
___ Website Counter eXTReMe Tracker