- 2015-05-31 : correction d'une faute d'orthographe et du nom de la partition.
Comment réparer Mac OSX, façon ninja ?
⌚ 2015-02-16 > Aucun commentaireVotre Macbook Pro ne veut plus démarrer. Un petit Mac triste (sad Mac) apparaît à l'écran, mais rien de plus.
Il se peut que le système de fichiers soit endommagé. Et c'est le cas pour cette fois-ci.
Démontez le disque dur pour le brancher sur un adaptateur, lui-même connecté à une machine sous GNU/Linux. Dans notre cas, le disque dur a été cloné dans le fichier sda2.raw à l'aide de l'utilitaire ddrescue.
Le bourbier
Commençons par analyser le système de fichiers et tenter de réparer les éventuelles erreurs :$ fsck.hfsplus -fy sda2.raw
sda2.raw
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Invalid key length
(4, 29228)
Volume check failed.
Le fichier catalogue ne semble pas correspondre aux nombres de fichiers et dossiers présents en réalité. Il est corrompu.Il existe une option pour réparer ce fameux catalogue :
$ fsck.hfsplus -rc -d sda2.raw
sda2.raw
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Rebuilding Catalog B-tree.
Invalid key length
(4, 2660)
Invalid node structure
(4, 28241)
Invalid key length
(4, 29228)
Rechecking volume.
Volume check failed.
Comme le processus est assez complexe, il faut relancer une seconde fois la commande de réparation du catalogue, afin de tout remettre en ordre comme il faut :
$ fsck.hfsplus -rc -d sda2.raw
sda2.raw
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Rebuilding Catalog B-tree.
The volume Macintosh HD could not be repaired.
On voit bien que le catalogue a été réparé avec succès. C'est une bonne chose.Qu'en est-il de l'analyse du système de fichiers maintenant ?
$ fsck.hfsplus -fy sda2.raw
sda2.raw
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Missing thread record (id = 98845898)
Incorrect number of thread records
(4, 25980)
Incorrect number of thread records
(4, 25980)
Checking multi-linked files.
Checking Catalog hierarchy.
Invalid directory item count
(It should be 4 instead of 12)
Missing thread record (id = 98845885)
Invalid directory item count
(It should be 0 instead of 12)
Missing thread record (id = 98845898)
Invalid directory item count
(It should be 2343 instead of 2367)
Checking Extended Attributes file.
Incorrect number of Extended Attributes
(8, 21403)
Checking volume bitmap.
Volume Bit Map needs minor repair
Checking volume information.
Invalid volume free block count
(It should be 46193475 instead of 25200078)
Volume Header needs minor repair
(2, 0)
Repairing volume.
Rechecking volume.
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking multi-linked files.
Checking Catalog hierarchy.
Checking Extended Attributes file.
Checking volume bitmap.
Checking volume information.
The volume Macintosh HD was repaired successfully.
Hop, une deuxième vérification, ça ne fait de mal à personne :
$ fsck.hfs -fy sda2.raw
sda2.raw
Checking HFS Plus volume.
Checking Extents Overflow file.
Checking Catalog file.
Checking multi-linked files.
Checking Catalog hierarchy.
Checking Extended Attributes file.
Checking volume bitmap.
Checking volume information.
The volume Macintosh HD appears to be OK.
Yeah ! C'est bon, le système de fichier a été réparé !Restitution
Il suffit ensuite de cloner le fichier sain sur le disque dur contenant le système de fichiers endommagé (ici /dev/sda2):$ ddrescue -f sda2.raw /dev/sda2 restore-sda2.log
Historique
☕ Aucun commentaire
Flux RSS des commentaires de cet article
Derniers commentaires, vous aussi, apportez votre savoir et questionnez.
Bonjour mes chers, au fait j'ai un souci avec mon dolibarr …
Bonjour mes chers, au fait j'ai un souci avec mon dolibarr …
Bonsoir , j’ai le même problème et j’aimerais savoir combi…
Use this PST to MBOX Converter Software and Convert PST to …
If you want to Export PST file to thunderbird then you shou…