10.14 Mojave Erreur de Partition avec boot camp

  • Créateur du sujet Créateur du sujet Ben H
  • Date de début Date de début
c est fait.
Bloc de code:
-bash-3.2# newfs_msdos -F 32 -v EFI /dev/disk0s2 ; diskutil mount disk0s2 ; diskutil list disk0
newfs_msdos: warning: /dev/disk0s2 is not a character device
512 bytes per physical sector
/dev/disk0s2: 403266 sectors in 403266 FAT32 clusters (512 bytes/cluster)
bps=512 spc=1 res=32 nft=2 mid=0xf8 spt=32 hds=32 hid=40 drv=0x80 bsec=409600 bspf=3151 rdcl=2 infs=1 bkbs=6
Volume EFI on disk0s2 mounted
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                 Apple_APFS Container disk2         328.0 GB   disk0s1
   2:                        EFI EFI                     209.7 MB   disk0s2
-bash-3.2#
 
Ça roule. Volume EFI configuré. Passe encore la commande :
Bloc de code:
diskutil repairDisk disk0 ; diskutil list disk0

  • à validation > une demande de confirmation s'affiche => tape y (yes) et revalide
  • la commande lance une réparation totale du disque > dont celle de la table GPT (qui nous importe seule ici) > puis réaffiche la configuration du disque interne

Poste le retour intégral de la commande
 
c est bon.
Bloc de code:
-bash-3.2# diskutil repairDisk disk0 ; diskutil list disk0
Repairing the partition map might erase disk0s1, proceed? (y/N) y
Started partition map repair on disk0
Checking prerequisites
Checking the partition list
Adjusting partition map to fit whole disk as required
Checking for an EFI system partition
Problems were encountered during repair of the partition map
Error: -69790: Couldn't find the target disk for this operation
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s2
   2:                 Apple_APFS Container disk2         328.0 GB   disk0s1
-bash-3.2#
 
Comme tu peux le voir -->
Bloc de code:
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s2
   2:                 Apple_APFS Container disk2         328.0 GB   disk0s1

  • ton disque a récupéré une partition de type EFI > volume EFI > 209,7 Mo > au rang1 des partitions comme requis.

Redémarre (Menu  > Disque de démarrage > Macintoch HD > Redémarrer).

- de retour dans ta session > tu peux retenter la commande de récupération de l'espace libre :​
Bloc de code:
diskutil ap resizeContainer disk1 0b ; diskutil list internal

  • et poster le retour.

Je m'arrête-là pour ce soir. Je reviendrai demain aux nouvelles dans ce fil.
 
ok merci bonne nuit, a demain.
Bloc de code:
Last login: Fri Mar 20 01:10:03 on ttys000
AirdeBENAROUCHE:~ benarouchehichem$ diskutil ap resizeContainer disk1 0b ; diskutil list internal
Started APFS operation
Aligning grow delta to 151 737 229 312 bytes and targeting a new physical store size of 479 737 241 600 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 479 736 213 504 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintoch HD was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 328 000 012 288 to 479 737 241 600 bytes
Modifying partition map
Growing APFS data structures
APFS Container Resize error code is 49157
A problem occurred; undoing all changes
Modifying partition map
Error: -69606: A problem occurred while resizing APFS Container structures
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         328.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +328.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintoch HD            306.2 GB   disk1s1
   2:                APFS Volume Preboot                 44.1 MB    disk1s2
   3:                APFS Volume Recovery                510.4 MB   disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4

AirdeBENAROUCHE:~ benarouchehichem$
 
La restauration de la partition EFI au rang n°1 des partitions => n'a pas débloqué la possibilité de redimensionnement du Conteneur apfs.

- tu n'auras qu'à refaire signe ici quand tu seras de nouveau disponible.​
 
Redémarre via ⌘R en mode secours. Quand tu as l'écran aux 4 Utilitaires macOS -->

- lance l'Utilitaire de disque. Dans le coin gauche supérieur du panneau > presse la pastille : Présentation > Afficher tous les appareils => le Conteneur apfs se trouve affiché.​
- sélectionne-le et fais un S.O.S. dessus.​

Puis redémarre et réouvre ta session. Repasse alors la commande :
Bloc de code:
diskutil ap resizeContainer disk1 0b ; diskutil list internal

  • et poste le retour.
 
ok c est fait.
Bloc de code:
Last login: Fri Mar 20 12:58:41 on ttys000
AirdeBENAROUCHE:~ benarouchehichem$ diskutil ap resizeContainer disk1 0b ; diskutil list internal
Started APFS operation
Aligning grow delta to 151 737 229 312 bytes and targeting a new physical store size of 479 737 241 600 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 479 736 213 504 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintoch HD was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 328 000 012 288 to 479 737 241 600 bytes
Modifying partition map
Growing APFS data structures
APFS Container Resize error code is 49157
A problem occurred; undoing all changes
Modifying partition map
Error: -69606: A problem occurred while resizing APFS Container structures
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         328.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +328.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintoch HD            306.2 GB   disk1s1
   2:                APFS Volume Preboot                 44.1 MB    disk1s2
   3:                APFS Volume Recovery                510.4 MB   disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4

AirdeBENAROUCHE:~ benarouchehichem$
 
Toujours la même erreur. Nouvelle tentative --> passe la commande :
Bloc de code:
diskutil ap resizeContainer disk1 320g jhfs+ Test 0b

  • la commande rétrécit le Conteneur à 320 Go > et crée un volume Test avec tout l'espace libre disponible

Passe la commande. On vérifie ici si un redimentionnement par rétrécissement est possible.
 
c est fait, merci.
Bloc de code:
Last login: Fri Mar 20 12:58:58 on ttys001
AirdeBENAROUCHE:~ benarouchehichem$ diskutil ap resizeContainer disk1 320g jhfs+ Test 0b
Started APFS operation
Aligning shrink delta to 8 000 012 288 bytes and targeting a new physical store size of 320 000 000 000 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 319 035 539 456 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintoch HD was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 328 000 012 288 to 320 000 000 000 bytes
Shrinking APFS data structures
APFS Container Resize error code is 49186
Error: -69501: Unable to resize APFS Container structures due to APFS Snapshot presence (perhaps caused by Time Machine)
AirdeBENAROUCHE:~ benarouchehichem$
 
L'erreur cette fois-ci est imputée à la présence d'un snapshot (instantané archivant un état passé du volume) => qui verrouille tous les blocs porteurs des écritures des fichiers imagés.

- le problème étant : qu'aucun snapshot n'est attesté à la vérification de l'apfs.​

Passe la commande :
Bloc de code:
tmutil listlocalsnapshots /

  • qui liste les snapshots associés au volume démarré

Est-ce que tu as eu un retour ?
 
voila
Bloc de code:
Last login: Fri Mar 20 15:30:21 on ttys000
AirdeBENAROUCHE:~ benarouchehichem$ tmutil listlocalsnapshots /
com.apple.TimeMachine.2020-03-19-011803 (dataless)
AirdeBENAROUCHE:~ benarouchehichem$
 
Tiens ! --> il y a un snapshot (qui n'apparaissait pas à la vérification).

- passe la commande :​
Bloc de code:
sudo tmutil deletelocalsnapshots 2020-03-19-011803

  • qui supprime le snapshot

Poste le retour.
 
c est fait.
Bloc de code:
Last login: Fri Mar 20 15:40:16 on ttys001
AirdeBENAROUCHE:~ benarouchehichem$ sudo tmutil deletelocalsnapshots 2020-03-19-011803
Password:
Deleted local snapshot '2020-03-19-011803'
AirdeBENAROUCHE:~ benarouchehichem$
 
Le snapshot a bien été supprimé. 1ère fois que l'apfs répond positivement à une commande :hilarious:

- repasse la commande de rétrécissement / création d'un volume Test) :​
Bloc de code:
diskutil ap resizeContainer disk1 320g jhfs+ Test 0b

  • et poste le retour.
 
ok c est fait.
Bloc de code:
Last login: Fri Mar 20 15:56:58 on ttys000
AirdeBENAROUCHE:~ benarouchehichem$ diskutil ap resizeContainer disk1 320g jhfs+ Test 0b
Started APFS operation
Aligning shrink delta to 8 000 012 288 bytes and targeting a new physical store size of 320 000 000 000 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 318 968 430 592 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode
Performing fsck_apfs -n -x -l -S /dev/disk0s2
Checking the container superblock
Checking the EFI jumpstart record
Checking the space manager
Checking the space manager free queue trees
Checking the object map
Checking volume
Checking the APFS volume superblock
The volume Macintoch HD was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Preboot was formatted by hfs_convert (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume Recovery was formatted by diskmanagementd (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Checking volume
Checking the APFS volume superblock
The volume VM was formatted by apfs.util (945.260.7) and last modified by apfs_kext (945.275.8)
Checking the object map
Checking the snapshot metadata tree
Checking the snapshot metadata
Checking the extent ref tree
Checking the fsroot tree
Verifying allocated space
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Shrinking APFS Physical Store disk0s2 from 328 000 012 288 to 320 000 000 000 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Initialized /dev/rdisk0s3 as a 149 GB case-insensitive HFS Plus volume with a 16384k journal
Mounting disk
1 new disk created or changed due to APFS operation
Disk from APFS operation: disk0s3
Finished APFS operation
AirdeBENAROUCHE:~ benarouchehichem$
 
Ça a fonctionné. Passe une commande :
Bloc de code:
diskutil list

  • et poste le retour => qu'on voie ça.
 
ok voila .
Bloc de code:
Last login: Fri Mar 20 16:04:02 on ttys001
AirdeBENAROUCHE:~ benarouchehichem$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *479.9 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         320.0 GB   disk0s2
   3:                  Apple_HFS Test                    159.6 GB   disk0s3

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +320.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintoch HD            305.7 GB   disk1s1
   2:                APFS Volume Preboot                 44.1 MB    disk1s2
   3:                APFS Volume Recovery                510.4 MB   disk1s3
   4:                APFS Volume VM                      2.1 GB     disk1s4

AirdeBENAROUCHE:~ benarouchehichem$
 
Parfait : un volume Test de 159 Go a bien été créé.

- alors : s'il y a eu déblocage dans le sens "aller" > pourquoi ça ne marcherait pas aussi dans le sens "retour" ?​

Passe la commande :
Bloc de code:
diskutil eraseVolume free null disk0s3 ; diskutil ap resizeContainer disk1 0b ; diskutil list

  • la commande supprime la partition Test > récupère son espace au Conteneur apfs > ré-affiche la configuration des disques

Poste le retour intégral de la commande.