issue78:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue78:c_c [2013/12/07 12:17] – créée andre_domenech | issue78:c_c [2014/03/17 09:11] (Version actuelle) – [PhotoRec] auntiee | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ** | ||
Towards the end of September, I ended up replacing an old SATA 150 500GB hard drive with a Western Digital Blue 1TB drive. Doing so involved cloning it using Clonezilla, and resizing it using GParted. A few days later, I also ended up fixing an unrecognized external hard drive for a friend using TestDisk & Photorec. Seeing as almost every one of these scenarios was requested in some form during the survey, I decided to spend this month covering these tools. | Towards the end of September, I ended up replacing an old SATA 150 500GB hard drive with a Western Digital Blue 1TB drive. Doing so involved cloning it using Clonezilla, and resizing it using GParted. A few days later, I also ended up fixing an unrecognized external hard drive for a friend using TestDisk & Photorec. Seeing as almost every one of these scenarios was requested in some form during the survey, I decided to spend this month covering these tools. | ||
+ | ** | ||
+ | Vers la fin septembre, j'ai fini par remplacer un vieux disque dur SATA 150 de 500 Go par un Western Digital Blue de 1 To. Faire cela a impliqué de le cloner à l'aide de Clonezilla et de le redimensionner en utilisant GParted. Quelques jours plus tard, j'ai fini aussi de réparer un disque dur externe non reconnu pour un ami en utilisant TestDisk et Photorec. Vu que presque chacun de ces scénarios a été demandé dans quelques formulaires au cours de l' | ||
+ | |||
+ | ===== Cloning ===== | ||
+ | ** | ||
Cloning & Resizing disks | Cloning & Resizing disks | ||
Ligne 14: | Ligne 20: | ||
Replace /dev/sda with the actual device you want to check. It would be best to write down the serial number for later reference. | Replace /dev/sda with the actual device you want to check. It would be best to write down the serial number for later reference. | ||
+ | ** | ||
+ | |||
+ | Clonage et Redimensionnement de disques | ||
+ | |||
+ | Les outils dont vous aurez besoin : | ||
+ | • Clonezilla: http:// | ||
+ | • GParted (liveCD ici: http:// | ||
+ | |||
+ | Étapes : | ||
+ | |||
+ | • Brancher les deux disques sur votre ordinateur (pour les PC de bureau en interne et pour les ordinateurs portables, ça devrait fonctionner pour le deuxième lecteur en externe). | ||
+ | • Assurez-vous que vous pouvez reconnaître les lecteurs correctement (si vous avez deux disques de même taille, notez les numéros de série). Cela peut être fait avec : | ||
+ | |||
+ | sudo hdparm -I /dev/sda | ||
+ | |||
+ | Remplacez /dev/sda par le périphérique réel que vous voulez vérifier. Il serait préférable de noter le numéro de série pour référence ultérieure. | ||
+ | |||
+ | ** | ||
• Once you have the information for both drives, it's time to put the Clonezilla CD in the drive and reboot. | • Once you have the information for both drives, it's time to put the Clonezilla CD in the drive and reboot. | ||
• Once you've booted to Clonezilla (by choosing any of the options in the boot list, though I would recommend the To RAM option), you'll need to work through the following: | • Once you've booted to Clonezilla (by choosing any of the options in the boot list, though I would recommend the To RAM option), you'll need to work through the following: | ||
Ligne 19: | Ligne 43: | ||
2. Keyboard layout. Default is US, and if you're using anything different, you can choose it from the arch list (i.e. German keyboard: Arch List -> QWERTZ -> German (Latin)). If you have a french keyboard: You'll need to choose it from the full list instead of the arch list. This is a bug and won't work otherwise. | 2. Keyboard layout. Default is US, and if you're using anything different, you can choose it from the arch list (i.e. German keyboard: Arch List -> QWERTZ -> German (Latin)). If you have a french keyboard: You'll need to choose it from the full list instead of the arch list. This is a bug and won't work otherwise. | ||
3. Start Clonezilla. | 3. Start Clonezilla. | ||
+ | ** | ||
+ | |||
+ | • Une fois que vous avez l' | ||
+ | • Une fois que vous avez démarré sur Clonezilla (en choisissant n' | ||
+ | 1. Language (Langue) : vous pouvez choisir celui que vous voulez, mais je vais travailler avec les noms et les choix en anglais. | ||
+ | 2. Keyboard Layout (Clavier). Par défaut c'est US et, si vous utilisez quelque chose de différent, vous pouvez le choisir dans la liste Arch (architecture) (c' | ||
+ | 3. Lancez Clonezilla. | ||
+ | |||
+ | ** | ||
4. Here you can choose from two options: Device-Device, | 4. Here you can choose from two options: Device-Device, | ||
5. Choosing beginner is probably the easiest. If, however, you want clonezilla to resize to the target disk's size, you can choose Expert and the -k1 option. However, I recommend doing this via GParted later. | 5. Choosing beginner is probably the easiest. If, however, you want clonezilla to resize to the target disk's size, you can choose Expert and the -k1 option. However, I recommend doing this via GParted later. | ||
Ligne 24: | Ligne 57: | ||
7. Choose source disk – Here you need to find the drive that matches your serial number for the original drive. In my scenario it was the 500GB drive. | 7. Choose source disk – Here you need to find the drive that matches your serial number for the original drive. In my scenario it was the 500GB drive. | ||
8. Choose target disk – Here you need to find the serial number that corresponds to your new drive. | 8. Choose target disk – Here you need to find the serial number that corresponds to your new drive. | ||
+ | ** | ||
+ | |||
+ | 4. Ici, vous pouvez choisir entre deux options : Device-Device ou Device-Image. Si vous sauvegardez/ | ||
+ | 5. Choisir « Beginner » (débutant) est probablement le plus facile. Si, toutefois, vous voulez que Clonezilla redimensionne à la taille du disque cible, sélectionnez « Expert » et l' | ||
+ | 6. Dans le scénario que j'ai décrit, vous devrez choisir soit disk_to_local_disk, | ||
+ | 7. Choisissez le disque source : ici vous devez trouver le lecteur qui correspond à votre numéro de série pour le lecteur d' | ||
+ | 8. Choisissez le disque cible : ici vous devez trouver le numéro de série qui correspond à votre nouveau lecteur. | ||
+ | |||
+ | |||
+ | ** | ||
9. Choose if you need to have the source file system checked – If you're copying a Linux partition and you know it needs to be repaired, you can run the check. However, it's should be fine to skip this step (and therefore cut down the time you need). If it's an NTFS/ | 9. Choose if you need to have the source file system checked – If you're copying a Linux partition and you know it needs to be repaired, you can run the check. However, it's should be fine to skip this step (and therefore cut down the time you need). If it's an NTFS/ | ||
10. Now you'll be dumped to a terminal screen, and it will ask you the following: | 10. Now you'll be dumped to a terminal screen, and it will ask you the following: | ||
Ligne 29: | Ligne 72: | ||
10.2 If you're sure you want to create new partitions on the target drive, type “y” (without the quotes) and hit enter. | 10.2 If you're sure you want to create new partitions on the target drive, type “y” (without the quotes) and hit enter. | ||
10.3 If you want to clone the boot loader (if this is your primary disk), type “y” (without the quotes) and hit enter. | 10.3 If you want to clone the boot loader (if this is your primary disk), type “y” (without the quotes) and hit enter. | ||
+ | ** | ||
+ | |||
+ | 9. Choisissez si vous devez faire vérifier le système de fichier source : si vous copiez une partition Linux, et vous savez qu' | ||
+ | 10. Maintenant vous allez redescendre à un écran de terminal et il vous demandera ce qui suit : | ||
+ | 10.1 Si vous êtes sûr de vouloir continuer, tapez « y » (sans les guillemets) et appuyez sur Entrée. | ||
+ | 10.2 Si vous êtes sûr de vouloir créer de nouvelles partitions sur le disque cible, tapez « y » (sans les guillemets) et appuyez sur Entrée. | ||
+ | 10.3 Si vous voulez cloner le chargeur d' | ||
+ | |||
+ | ** | ||
10.4 Lastly, it will ask once again if you're ready to continue, type “y” (without the quotes) and hit enter. | 10.4 Lastly, it will ask once again if you're ready to continue, type “y” (without the quotes) and hit enter. | ||
11. Now you should be back at a nice Ncurses interface with information on the status of the cloning process. | 11. Now you should be back at a nice Ncurses interface with information on the status of the cloning process. | ||
12. Once the cloning is finished, it will ask if you want to stay in the console (option #1), or if you want to exit/logout (option #2). Most likely you'll want to exit, so hit 2 and then choose an option (poweroff or reboot). | 12. Once the cloning is finished, it will ask if you want to stay in the console (option #1), or if you want to exit/logout (option #2). Most likely you'll want to exit, so hit 2 and then choose an option (poweroff or reboot). | ||
+ | ** | ||
+ | |||
+ | 10.4 Enfin, il vous demandera une fois de plus si vous êtes prêt à continuer, tapez « y » (sans les guillemets) et appuyez sur Entrée. | ||
+ | 11. Maintenant, vous devriez être de retour sur une belle interface Ncurses avec des informations sur l' | ||
+ | 12. Une fois le clonage terminé, il demandera si vous voulez rester dans la console (option #1), ou si vous voulez sortir/ | ||
+ | |||
+ | |||
+ | ===== Resizing ===== | ||
+ | ** | ||
13. I would recommend powering off and removing the old drive, if you plan to get rid of it. Otherwise move on to the GParted steps and reformat the old drive if you want to continue using it. | 13. I would recommend powering off and removing the old drive, if you plan to get rid of it. Otherwise move on to the GParted steps and reformat the old drive if you want to continue using it. | ||
14. If you've moved to a larger drive, you'll want to boot to your GParted CD now. Once the desktop has loaded, you'll need to open the GParted program. Then do the following: | 14. If you've moved to a larger drive, you'll want to boot to your GParted CD now. Once the desktop has loaded, you'll need to open the GParted program. Then do the following: | ||
Ligne 41: | Ligne 102: | ||
sudo blkid | sudo blkid | ||
Take note of the UUID that corresponds to your drive. | Take note of the UUID that corresponds to your drive. | ||
+ | ** | ||
+ | |||
+ | 13. Je recommanderais d' | ||
+ | 14. Si vous avez migré vers un disque plus grand, vous allez maintenant démarrer sur le CD de GParted. Une fois le bureau chargé, vous devrez ouvrir le programme GParted. Puis procédez comme suit : | ||
+ | 14.1 Trouvez le bon disque dans la liste déroulante en haut à droite. | ||
+ | 14.2 Trouvez la partition que vous souhaitez redimensionner, | ||
+ | 14.3 Ajuster la taille de la partition jusqu' | ||
+ | 14.4 Tapez Entrée et attendez la fin du processus. | ||
+ | 14.5 Enfin, prenez note du chemin de périphérique pour le lecteur (par exemple /dev/sda1) et, si vous avez besoin de l' | ||
+ | sudo blkid | ||
+ | Prenez note de l'UUID correspondant à votre lecteur. | ||
+ | |||
+ | ** | ||
14.6 You'll need to adjust your /etc/fstab file as well if you use UUIDs. Device paths should continue working, but, if not, simply jump back to this step. To do so, run the following commands in the terminal: | 14.6 You'll need to adjust your /etc/fstab file as well if you use UUIDs. Device paths should continue working, but, if not, simply jump back to this step. To do so, run the following commands in the terminal: | ||
sudo mount /dev/sda1 /mnt | sudo mount /dev/sda1 /mnt | ||
Ligne 48: | Ligne 122: | ||
14.7 Reboot to your normal GRUB. | 14.7 Reboot to your normal GRUB. | ||
15. Now you're ready to boot to your old system on your new drive. However, you will need to manually edit the GRUB entry in order to point to the new disk, especially if you were using UUIDs. To do so, you need to select the GRUB entry in the menu, and hit the “e” key (for edit). Then use the arrow keys to move to the correct part of the entry (UUID or device path), and replace it with the new information. If you're running legacy GRUB (it will say GRUB 0.9.X at the top), you'll need to hit the “b” key to boot once you've made your changes. In GRUB2, the key is F10. In either case, the keys are listed at the bottom of the menu when editing. | 15. Now you're ready to boot to your old system on your new drive. However, you will need to manually edit the GRUB entry in order to point to the new disk, especially if you were using UUIDs. To do so, you need to select the GRUB entry in the menu, and hit the “e” key (for edit). Then use the arrow keys to move to the correct part of the entry (UUID or device path), and replace it with the new information. If you're running legacy GRUB (it will say GRUB 0.9.X at the top), you'll need to hit the “b” key to boot once you've made your changes. In GRUB2, the key is F10. In either case, the keys are listed at the bottom of the menu when editing. | ||
+ | ** | ||
+ | |||
+ | 14.6 Vous devrez aussi adapter votre fichier /etc/fstab si vous utilisez les UUID. Les chemins d' | ||
+ | sudo mount /dev/sda1 /mnt | ||
+ | sudo nano / | ||
+ | Remplacez les UUID par ceux qui sont corrects selon blkid. Une fois que vous avez terminé, appuyez sur ctrl-x et choisissez d' | ||
+ | sudo umount /mnt | ||
+ | 14.7 Redémarrez avec votre GRUB normal. | ||
+ | 15. Maintenant vous êtes prêt à démarrer votre ancien système sur votre nouveau disque. Toutefois, vous devrez modifier manuellement l' | ||
+ | |||
+ | ** | ||
16. If you've done the last step correctly, your system should boot properly. Once there, you'll need to adjust the GRUB entries correctly in the configuration files to make it permanent. | 16. If you've done the last step correctly, your system should boot properly. Once there, you'll need to adjust the GRUB entries correctly in the configuration files to make it permanent. | ||
16.1 With legacy GRUB, you simply do the following: | 16.1 With legacy GRUB, you simply do the following: | ||
Ligne 58: | Ligne 143: | ||
sudo grub-mkconfig -o / | sudo grub-mkconfig -o / | ||
17. You should be all set! | 17. You should be all set! | ||
+ | ** | ||
+ | 16. Si vous avez exécuté la dernière étape correctement, | ||
+ | 16.1 Avec l' | ||
+ | sudo nano / | ||
+ | Puis trouvez la bonne ligne et ajustez-y les informations comme à l' | ||
+ | 16.2 Pour GRUB2, vous pouvez soit utiliser grub-customizer, | ||
+ | 16.2.1 Pour Ubuntu (et dérivés) : | ||
+ | sudo update-grub | ||
+ | 16.2.2 Pour tout autre système : | ||
+ | sudo grub-mkconfig -o / | ||
+ | 17. Tout devrait être bon ! | ||
+ | |||
+ | ===== TestDisk ===== | ||
+ | ** | ||
TestDisk & Photorec | TestDisk & Photorec | ||
Ligne 72: | Ligne 171: | ||
4. Testdisk will automatically identify the partition table type. Do not choose anything but the default option unless you know exactly what you're doing. | 4. Testdisk will automatically identify the partition table type. Do not choose anything but the default option unless you know exactly what you're doing. | ||
5. Choose Analyse, which will scan the partition table, and then look for partition headers for “lost” partitions. | 5. Choose Analyse, which will scan the partition table, and then look for partition headers for “lost” partitions. | ||
+ | ** | ||
+ | |||
+ | TestDisk et Photorec | ||
+ | |||
+ | Ce dont vous avez besoin : installer Testdisk (ou exécuter un liveCD qui contient TestDisk). Dans Ubuntu, le paquet s' | ||
+ | |||
+ | Quand utiliser TestDisk : Lorsque votre disque n'est pas reconnu comme étant formaté (apparaissant comme « RAW » ou « UNFORMATED » dans GParted), mais que vous n'avez rien fait pour supprimer les partitions. Ou si des partitions logiques ont disparu. | ||
+ | |||
+ | Que faire avant d' | ||
+ | |||
+ | 1. Lancez testdisk depuis un terminal. | ||
+ | 2. On vous posera la question de la création d'un journal, choisir « create ». | ||
+ | 3. Il faudra ensuite choisir le bon disque dans la liste. | ||
+ | 4. TestDisk identifiera automatiquement le type de table de partition. Ne choisissez que l' | ||
+ | 5. Choisissez « Analyse », qui va scanner la table de partition et ensuite chercher des en-têtes de partition pour les partitions « perdues » . | ||
+ | |||
+ | ** | ||
6. It will then show you the current partition structure – double-check here to make sure the partition you're looking for is missing. If it is listed, then this process won't help you and you can quit. If it is actually missing, continue by choosing “Quick Search”. | 6. It will then show you the current partition structure – double-check here to make sure the partition you're looking for is missing. If it is listed, then this process won't help you and you can quit. If it is actually missing, continue by choosing “Quick Search”. | ||
7. Testdisk will ask you a few questions based on the analysis, so answer them as best you can (suggested values are supplied by TestDisk for those who are unsure). | 7. Testdisk will ask you a few questions based on the analysis, so answer them as best you can (suggested values are supplied by TestDisk for those who are unsure). | ||
8. Once the scan is complete, it will show you a list of partitions it found (in green). Select the partition you want to restore (if you want to restore more than one, choose one to start with and complete step 9 for the other partitions as well). | 8. Once the scan is complete, it will show you a list of partitions it found (in green). Select the partition you want to restore (if you want to restore more than one, choose one to start with and complete step 9 for the other partitions as well). | ||
9. Hit the “p” key to list the files on the partition (it should work for most formats, though it failed to do so on the HFS+ partition, claiming it needed to be compiled with that support, though I could find no indication as to the compilation option for this). | 9. Hit the “p” key to list the files on the partition (it should work for most formats, though it failed to do so on the HFS+ partition, claiming it needed to be compiled with that support, though I could find no indication as to the compilation option for this). | ||
+ | ** | ||
+ | |||
+ | 6. Il vous indiquera alors l' | ||
+ | 7. TestDisk va vous poser quelques questions basées sur l' | ||
+ | 8. Une fois l' | ||
+ | 9. Appuyez sur la touche « p » pour lister les fichiers sur la partition (cela devrait fonctionner pour la plupart des formats, même si ca a planté pour la partition HFS+, affirmant qu'il devait être compilé avec cette option, bien que je n'aie pu trouver aucune documentation sur cette option de compilation). | ||
+ | |||
+ | ** | ||
10. If these are the partitions you wanted, and the directories/ | 10. If these are the partitions you wanted, and the directories/ | ||
11. Testdisk will then show you the new table, which you can choose to write to the disk. If, however, something is still missing, you can choose the deeper search option (which works the same as Steps 9 and 10). For damaged files and partitions, you'll need to follow more specific advice, which you can find on the TestDisk wiki in the Further Reading section. | 11. Testdisk will then show you the new table, which you can choose to write to the disk. If, however, something is still missing, you can choose the deeper search option (which works the same as Steps 9 and 10). For damaged files and partitions, you'll need to follow more specific advice, which you can find on the TestDisk wiki in the Further Reading section. | ||
Ligne 81: | Ligne 205: | ||
If this doesn' | If this doesn' | ||
+ | ** | ||
+ | 10. Si ce sont les partitions vous voulez et que les répertoires/ | ||
+ | 11. TestDisk va alors vous montrer la nouvelle table que vous pouvez choisir d' | ||
+ | 12. Une fois que vous avez écrit la table (cela a bien fonctionné pour le lecteur HFS+ et donc devrait fonctionner pour tout), vous devrez peut-être redémarrer pour que le lecteur s' | ||
+ | |||
+ | Si cela ne donne pas de résultats, | ||
+ | |||
+ | ===== PhotoRec ===== | ||
+ | ** | ||
If your hard drive is damaged or has been completely reformatted, | If your hard drive is damaged or has been completely reformatted, | ||
Ligne 91: | Ligne 224: | ||
3.2. Choose “search”. | 3.2. Choose “search”. | ||
4. Select file system type. | 4. Select file system type. | ||
+ | ** | ||
+ | |||
+ | Si votre disque dur est endommagé ou a été complètement reformaté, vous pouvez essayer de récupérer des éléments à l'aide de Photorec. Toutefois, le résultat en est des fichiers nommés par blocs au lieu des noms de fichiers réels (bien que Photorec réussit à restaurer certains noms, il vaut mieux s' | ||
+ | |||
+ | 1. Lancez PhotoRec dans un terminal. | ||
+ | 2. Choisissez votre disque et puis « proceed » (si cela se présente, choisissez la partition brute (raw) /dev/rdisk, car c'est plus rapide). | ||
+ | 3. Mettez en surbrillance la partition que vous souhaitez analyser (ou la totalité du disque), puis : | ||
+ | 3.1. Ouvrez « File Opt » afin de sélectionner quels sont les fichiers à récupérer (pour éviter de récupérer des tonnes de fichiers, qui ne vous intéressent pas). Il existe d' | ||
+ | 3.2. choisissez « search » (recherche) | ||
+ | 4. Choisissez le type de système de fichiers. | ||
+ | |||
+ | ** | ||
5. If your file system is corrupted, you can choose Whole in order to search for files from everywhere. However, if you've only deleted the files and want them back (and TestDisk has failed), you should be fine with the Free option. | 5. If your file system is corrupted, you can choose Whole in order to search for files from everywhere. However, if you've only deleted the files and want them back (and TestDisk has failed), you should be fine with the Free option. | ||
6. Choose the location where the recovered files will be written. | 6. Choose the location where the recovered files will be written. | ||
Ligne 104: | Ligne 249: | ||
Photorec: http:// | Photorec: http:// | ||
+ | ** | ||
+ | |||
+ | 5. Si votre système de fichiers est corrompu, vous pouvez choisir « Whole » (entier) pour rechercher vos fichiers partout. Mais, si vous avez seulement supprimé les fichiers et que vous les voulez à nouveau (et que TestDisk a échoué), ça devrait aller avec l' | ||
+ | 6. Choisissez l' | ||
+ | 7. Patience. PhotoRec les mettra dans des dossiers appelés recup_dir.1, | ||
+ | |||
+ | J' | ||
+ | |||
+ | Pour aller plus loin : | ||
+ | |||
+ | TestDisk : http:// | ||
+ | |||
+ | Clonezilla : http:// | ||
+ | |||
+ | Photorec : http:// | ||
+ |
issue78/c_c.1386415038.txt.gz · Dernière modification : 2013/12/07 12:17 de andre_domenech