# Le disque de démarrage ne peut être ni partitionné, ni restauré en une seule partition.



## Raphludi (29 Mars 2019)

Bonsoir à tous,

J'ai installé windows 10 sur mon mac pour quelques projets, mais suite à des imbécilités de ma part, j'ai installé un gros virus qui mange tout mon CPU donc impossible de le supprimer manuellement. J'ai donc décidé de supprimer la partie bootcamp windows de mon mac et rester complètement sur macOS.

Après quelques recherches sur internet j'ai compris qu'il fallait que je passe par l'assistant bootcamp pour supprimer Windows. Mais dès lors que je lance l'assistant, je reçois le message suivant : "
*Le disque de démarrage ne peut être ni partitionné, ni restauré en une seule partition. "*

Le problème c'est que je ne suis vraiment pas bon avec macOS, et je recherche donc de l'aide de votre part, car à vrai dire je suis assez désespéré...

J'ai remarqué qu'avec quelques lignes de commandes à insérer dans la console, je pouvais réinitialiser l'assistant (si j'ai bien compris) mais je n'ai absolument aucune idée de quoi écrire et j'ai un peur de faire une fausse manip...

J'ai entré la ligne de code dans le terminal :

```
diskutil list
```

Et voici, ce qui m'est renvoyé:


```
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         360.0 GB   disk0s2
   3:       Microsoft Basic Data BOOTCAMP                139.6 GB   disk0s3
   4:           Windows Recovery                         492.8 MB   disk0s4

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +360.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            116.4 GB   disk1s1
   2:                APFS Volume Preboot                 46.2 MB    disk1s2
   3:                APFS Volume Recovery                512.4 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
```


Je vous remercie d'avance à tous <3


----------



## macomaniac (30 Mars 2019)

Bonjour *Raphludi
*
Passe la commande (copier-coller - copie-la bien jusqu'au *list* final) :

```
diskutil eraseVolume free null disk0s3 ; diskutil eraseVolume free null disk0s4 ; diskutil ap resizeContainer disk1 0b ; diskutil list
```


cette commande concaténée : *a)* supprime les 2 partitions Windows > *b)* récupère leur espace au *Conteneur apfs* et à sa partition de base *disk0s2* > *c)* réaffiche le tableau des disques

Poste l'ensemble de l'affichage retourné par la commande.


----------



## Raphludi (30 Mars 2019)

Bonjour *macomaniac* et merci infiniment de votre réponse !

J'ai donc copy-paste la commande dans mon terminal et voici ce qui m'a été renvoyé (c'est assez long) :


```
Started erase on disk0s3 BOOTCAMP
Unmounting disk
Finished erase on disk0
Started erase on disk0s4
Unmounting disk
Finished erase on disk0
Started APFS operation
Aligning grow delta to 140 067 799 040 bytes and targeting a new physical store size of 500 068 036 608 bytes
Determined the maximum size for the targeted physical store of this APFS Container to be 500 067 006 464 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 Macintosh HD was formatted by hfs_convert (748.21.6) and last modified by apfs_kext (945.200.129)
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 newfs_apfs (748.21.6) and last modified by apfs_kext (945.200.129)
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 newfs_apfs (748.21.6) and last modified by apfs_kext (945.200.129)
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 newfs_apfs (748.21.6) and last modified by apfs_kext (945.200.129)
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
```

La suite au prochain comm ^^


----------



## Raphludi (30 Mars 2019)

Voici la suite, beaucoup de warnings : 


```
warning: Overallocation Detected on Main device: (460673+4) bitmap address (10d57)
warning: Overallocation Detected on Main device: (485726+27) bitmap address (10d57)
warning: Overallocation Detected on Main device: (566077+1) bitmap address (1087d)
warning: Overallocation Detected on Main device: (566864+2) bitmap address (1087d)
warning: Overallocation Detected on Main device: (567132+4) bitmap address (1087d)
warning: Overallocation Detected on Main device: (567176+4) bitmap address (1087d)
warning: Overallocation Detected on Main device: (567219+4) bitmap address (1087d)
warning: Overallocation Detected on Main device: (567262+4) bitmap address (1087d)
warning: Overallocation Detected on Main device: (567306+4) bitmap address (1087d)
warning: Overallocation Detected on Main device: (736547+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736553+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736557+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736559+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736561+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736564+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736567+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736584+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736586+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736590+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736594+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736600+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736608+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736611+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736615+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736618+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736624+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736630+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736633+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736642+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736651+3) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736655+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736658+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736661+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736668+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736670+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736673+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736676+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736680+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736688+4) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736694+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736701+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736709+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736713+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736720+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736728+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736735+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736741+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736744+1) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736746+2) bitmap address (11e89)
warning: Overallocation Detected on Main device: (736749+2) bitmap address (11e89)
too many warnings generated; suppressing subsequent ones
Performing deferred repairs
The volume /dev/disk0s2 appears to be OK
Storage system check exit code is 0
Growing APFS Physical Store disk0s2 from 360 000 237 568 to 500 068 036 608 bytes
Modifying partition map
Growing APFS data structures
Finished APFS operation
```

Et la toute fin (diskutil list):


----------



## Raphludi (30 Mars 2019)

```
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +500.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            116.7 GB   disk1s1
   2:                APFS Volume Preboot                 46.2 MB    disk1s2
   3:                APFS Volume Recovery                512.4 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
```

Voila ! Désolé pour la longueur, j'ai essayé d'envoyer l'intégralité de la réponse du terminal.


----------



## macomaniac (30 Mars 2019)

Tu as bien récupéré l'espace des partitions Windows -->

```
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         500.1 GB   disk0s2
```


ce > malgré une erreur du *spaceman* : le gestionnaire de l'allocation d'espace de l'*apfs*

=> problème résolu !


----------



## Raphludi (30 Mars 2019)

Je vous remercie de tout mon coeur et vous souhaite le meilleur pour la suite ! Encore merci !!


----------

