8 votos

¿Cómo examinar los discos y sus particiones a través de la terminal?

Estoy tratando de examinar mi configuración para prepararme para un arranque triple y me gustaría saber cómo examinar completamente mi disco duro antes de asegurarme de que sé todo lo útil para que el proyecto lo conozca.

17voto

Ben Puntos 171

Examinar con

  • lista de disquetes
  • diskutil info /dev/disk0 (disk0s1 etc.)
  • sudo gpt -r mostrar disco0
  • fdisk /dev/disk0 (hacer/cambiar la partición con MBR)
  • sudo gdisk -l /dev/disk0 (hacer/cambiar la partición con GUID)
  • refit Inspector de Partición / gptsync

diskutil es el programa de OS X para obtener información y cambiar las particiones.

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.0 TB     disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS iMac HD                 4.0 TB     disk0s2
BVs-iMac-3:~ bvimac$ 

gpt es el programa OS X especializado para G UID p artition t ables (en contraste con el MBR)

$ sudo gpt -r show disk0
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640  7812237856      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  7812647496     1389639         
  7814037135          32         Sec GPT table
  7814037167           1         Sec GPT header

fdisk es un programa para varios sistemas operativos que manipula las tablas de partición del registro de arranque maestro.

$ sudo fdisk /dev/disk0
Disk: /dev/disk0    geometry: 219051/255/63 [3519069872 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
-----------------------------------------------------------------------

 1: EE 1023 254  63 - 1023 254  63 [         1 - 4294967294] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused 

gdisk es un programa para varios sistemas operativos que minipula las tablas de partición GUID (como gpt, pero no sólo OS X). Puede ser descargado aquí .

$ sudo gdisk -l /dev/disk0
GPT fdisk (gdisk) version 1.0.1

Warning: Devices opened with shared lock will not have their
partition table automatically reloaded!
Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/disk0: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 5782184C-C4EA-47D2-9039-F1564F7735F3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 8-sector boundaries
Total free space is 1389645 sectors (678.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640      7812647495   3.6 TiB     AF00  iMac HD

diskutil para obtener más información sobre el disco entero0 y sus subsiguientes particiones disk0s1 y disk0s2.

$ diskutil info /dev/disk0
   Device Identifier:        disk0
   Device Node:              /dev/disk0
   Part of Whole:            disk0
   Device / Media Name:      ST4000DX001-1CE168 Media

   Volume Name:              Not applicable (no file system)

   Mounted:                  Not applicable (no file system)

   File System:              None

   Content (IOContent):      GUID_partition_scheme
   OS Can Be Installed:      No
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               4.0 TB (4000787030016 Bytes) (exactly 7814037168 512-Byte-Units)
   Volume Free Space:        Not applicable (no file system)
   Device Block Size:        512 Bytes

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no file system)
   Ejectable:                No

   Whole:                    Yes
   Internal:                 Yes
   Solid State:              No
   OS 9 Drivers:             No
   Low Level Format:         Not supported

$ diskutil info /dev/disk0s1
   Device Identifier:        disk0s1
   Device Node:              /dev/disk0s1
   Part of Whole:            disk0
   Device / Media Name:      EFI System Partition

   Volume Name:              Not applicable (no file system)

   Mounted:                  Not applicable (no file system)

   File System:              None

   Partition Type:           EFI
   OS Can Be Installed:      No
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified

   Total Size:               209.7 MB (209715200 Bytes) (exactly 409600 512-Byte-Units)
   Volume Free Space:        Not applicable (no file system)
   Device Block Size:        512 Bytes

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no file system)
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes
   Solid State:              No

$ diskutil info /dev/disk0s2
   Device Identifier:        disk0s2
   Device Node:              /dev/disk0s2
   Part of Whole:            disk0
   Device / Media Name:      iMac HD

   Volume Name:              iMac HD
   Escaped with Unicode:     iMac%FF%FE%20%00HD

   Mounted:                  Yes
   Mount Point:              /
   Escaped with Unicode:     /

   File System Personality:  Journaled HFS+
   Type (Bundle):            hfs
   Name (User Visible):      Mac OS Extended (Journaled)
   Journal:                  Journal size 311296 KB at offset 0x3a3c000
   Owners:                   Enabled

   Partition Type:           Apple_HFS
   OS Can Be Installed:      Yes
   Media Type:               Generic
   Protocol:                 SATA
   SMART Status:             Verified
   Volume UUID:              1819AB9E-CACA-3408-8F03-B3ADBEEABC5B

   Total Size:               4.0 TB (3999865782272 Bytes) (exactly 7812237856 512-Byte-Units)
   Volume Free Space:        3.8 TB (3820305375232 Bytes) (exactly 7461533936 512-Byte-Units)
   Device Block Size:        512 Bytes

   Read-Only Media:          No
   Read-Only Volume:         No
   Ejectable:                No

   Whole:                    No
   Internal:                 Yes
   Solid State:              No

refit es un gestor de arranque (que actualmente ya no se mantiene) que viene con una herramienta, que se llama gptsync o Inspector de Partición . Su salida se ve así:

*** Report for internal hard disk ***

Current GPT partition table:
 #      Start LBA      End LBA  Type
 1             40       409639  EFI System (FAT)
 2         409640     98749479  Mac OS X HFS+
 3       98749480    100019015  Mac OS X Boot
 4      156317696    234440703  Basic Data

Current MBR partition table:
 # A    Start LBA      End LBA  Type
 1              1       409639  ee  EFI Protective
 2         409640     98749479  af  Mac OS X HFS+
 3       98749480    100019015  ab  Mac OS X Boot
 4      156317696    234440703  0c  FAT32 (LBA)

MBR contents:
 Boot Code: Unknown, but bootable

Partition at LBA 40:
 Boot Code: None (Non-system disk message)
 File System: FAT32
 Listed in GPT as partition 1, type EFI System (FAT)

Partition at LBA 409640:
 Boot Code: None
 File System: HFS Extended (HFS+)
 Listed in GPT as partition 2, type Mac OS X HFS+
 Listed in MBR as partition 2, type af  Mac OS X HFS+

Partition at LBA 98749480:
 Boot Code: None
 File System: HFS Extended (HFS+)
 Listed in GPT as partition 3, type Mac OS X Boot
 Listed in MBR as partition 3, type ab  Mac OS X Boot

Partition at LBA 156317696:
 Boot Code: None
 File System: Unknown
 Listed in GPT as partition 4, type Basic Data
 Listed in MBR as partition 4, type 0c  FAT32 (LBA)

0 votos

¿Qué diferencia hay entre "*" y "+" y nada que preceda al tamaño en la salida de "diskutil list"?

AppleAyuda.com

AppleAyuda es una comunidad de usuarios de los productos de Apple en la que puedes resolver tus problemas y dudas.
Puedes consultar las preguntas de otros usuarios, hacer tus propias preguntas o resolver las de los demás.

Powered by:

X