Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#26 Le 23/07/2015, à 21:51

Bougron

Re : Unable to acces Systeme

Salut Moko138.
Un smartctl en liveusb!.  il n'était pas inutile
En lisant, les autres posts, j'ai de nouveau constaté que des données du D:. ne sont pas sauvées sur un autre disque.
J'ai vu que tu as diagnostiqué que la mécanique meure.

Je propose une piste
     Le disque dur étant démonté,  il faut acheter un adaptateur USB qui va le recevoir afin de pouvoir le lire si possible
   Le nouveau disque interne ayant reçu un OS certainement windows.
    Cet os ayant été installé  avec en plus une partition D: de taille identique à la partition D: du disque abîmé.
   Je propose la solution DDRESCUE qui doit savoir dupliquer une partition, Sinon DD qui sait le faire sans avoir besoin de télécharger un quelconque logiciel
   On fera tout cela avec le CDROM.

Dernière modification par Bougron (Le 23/07/2015, à 21:52)

Hors ligne

#27 Le 23/07/2015, à 23:03

nouya

Re : Unable to acces Systeme

Ca y est dique dur retiré , je tourne juste avec live-cd, Je vous laisse débattre pour récuperer mes données sur la partition windows et attends vos de vos nouvelles.
Merci pour votre aide en tout cas ( Bougron et moko138)

Hors ligne

#28 Le 23/07/2015, à 23:15

moko138

Re : Unable to acces Systeme

Parfait, nouya !

Oui, Bougron, ça me paraît bien ! mais je manque de recul ce soir.

La taille de la partition D: cible doit-elle être strictement identique à la taille du D: source ? De mémoire, j'aurais dit un peu plus grande.
  En ./viewtopic.php?pid=19194841#p19194841, tiramiseb a dit :

S'il y a une erreur de lecture (problème matériel), dd abandonne alors que ddrescue réessaye.

  En ./viewtopic.php?pid=4093301#p4093301, rmy a dit :

Avant toute chose il faut commencer par une image disque avec ddrescue (paquet gddrescue sous ubuntu).

  Tu le vois, Bougron, j'ai des connaissances livresques mais pas d'expérience personnelle en ce domaine.
  C'est pourquoi je te laisse mener et propose que si nous ne parvenons pas à lever un doute, nous sollicitions les lumières de tiramiseb.


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#29 Le 24/07/2015, à 08:34

Bougron

Re : Unable to acces Systeme

Bonjour.
Pour la taille de la partition  de D:
   Elle n'a pas le droit d'être plus petite!
        Elle peut être plus grande.
       J'ai mis identique car elle peut être agrandie ultérieurement.
          Si elle est 10 fois plus grande (si arrivée d'un gros disque), je crois que DD va finir de remplir  avec des zéros (ce qui me semble  une perte de temps).

Je ne suis pas d'accord avec la citation tiramiseb.
      Dans une discussion ou j'avais conseillé DD pour dupliquer,  Le disque a scratché pendant cette opération et pourtant  j'avais été prévenu que c'était très long et que le disque était bruyant,   J'avais dis il faut continuer...... C'est à cette occasion de j'ai découvert ddrescue
       explication! Ces deux outils travaillent en lisant des secteurs de 512 octets (voir 4096)
               =>Il faudra penser à regarder la taille physique du secteur d'écriture, mais vu la taille du disque c'est très certainement 512
     Lorsqu'un secteur est illisible
                   DD insiste comme tout le mode, ( Je ne sais plus combien de fois) avant de le déclarer illisible.
                  DDrescue, mémorise immédiatement et passe au secteur suivant.
                                  Lorsque le disque a été entièrement lu, il fera un second passage pour tenter de lire ceux  qu'il n'a pas pu lire au premier passage.

https://doc.ubuntu-fr.org/ddrescue a écrit :

                                 ddrescue intègre un certain nombre d'options intéressantes pour traiter des cas de supports partiellement endommagés, dont "l'état de santé est stable". Les principales sont citées ci-dessous, mais il y en a d'autres à envisager, consultez le man avant d'agir :
Option -n

sudo ddrescue <source> <cible> <log> -n

permet de s'occuper en priorité des zones non endommagées et de revenir traiter celles-ci après.
Option -T

sudo ddrescue <source> <cible> <log> -T

permet de reprendre une copie qui a été interrompue du fait de la disparition du matériel (déconnexion brutale, matériel instable qui "disparaît"). En fait, reprend toutes les zones qui n'ont pas encore été explorées. Dans le cas général, pour interrompre une copie il faut utiliser Ctrl+C et reprendre avec la même ligne que celle utilisée pour lancer la première copie, avec le fichier de log bien sûr.
Option -r

sudo ddrescue <source> <cible> <log> -r1

Reprend la copie en se concentrant sur les zones considérées comme erronées en première lecture : le chiffre derrière r est un paramètre qui spécifie combien de tentative d'accès doivent être effectuées à chaque erreur rencontrée.

Pour la solution rmy, c'est ce que nous faisons avec une adaptation
   On sait malheureusement que la partition C: même si elle est entièrement dupliquée ne sera pas en état  de faire repartir le windows.
     et comme la mécanique est malade, inutile de lui faire récupérer cette partition, on sait la recréer de toute pièce.
              En fait, je suis parti du principe qu'il n'y avait aucune donnée utilisateur dedans. Ce qui n'est peut-être pas vrai.
            dans ce cas, on dupliquera aussi cette partition C: seulement après avoir dupliqué la partition D:

J'ai juste une interrogation DDrescue sait-il dupliquer des partitions? L'exemple de codif fournit est succinct et je ne l'ai pas installé.

Dernière modification par Bougron (Le 24/07/2015, à 08:39)

Hors ligne

#30 Le 24/07/2015, à 10:14

moko138

Re : Unable to acces Systeme

Bougron a écrit :

DDrescue sait-il dupliquer des partitions?

À ce que je sache, il fait une image de la partition, du moins de ce qu'il arrive à lire dedans :

man ddrescue a écrit :

ddrescue - data recovery tool 
GNU ddrescue. Copies data from one file or block device to another,]


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#31 Le 24/07/2015, à 13:04

Bougron

Re : Unable to acces Systeme

Bonjour moko138.
Pour un peu, je téléchargerais ddrescue pour avoir plus de détail car la commande man ddrescue n'a pas  d'exemple concret

Si tu peux jeter un coup d'oeil sur le document que je viens de faire  https://forum.ubuntu-fr.org/viewtopic.p … #p20255491
C'est un cas totalement classique de  changement de format de table  de partition.
Il est totalement possible que tu aies déjà cela dans tes archives. mais au cas ou .....


Un exemple de ddrescue que je fais en copier/coller sans avoir analysé

Example 2: Rescue an ext2 partition in /dev/hda2 to /dev/hdb2.
Note: you need to create the hdb2 partition with fdisk first. hdb2
should be of appropriate type and size.

     ddrescue -f -n /dev/hda2 /dev/hdb2 logfile
     ddrescue -d -f -r3 /dev/hda2 /dev/hdb2 logfile
     e2fsck -v -f /dev/hdb2
     mount -t ext2 -o ro /dev/hdb2 /mnt
       (read rescued files from /mnt)

En clair à part la vérification fsdk  ça devrait coller.   Mais attention à l'ordre des disques, il ne fait pas copier le bon sur le mauvais!
    dans notre contexte, cela sera plutôt  l'inverse  et il faudra trouver où mettre le logfile
                 => Je propose la création d'une partition au format EXT4 dans le disque neuf.
   partition qu'il faudra monter.
      comme on sera  probablement en liveCD, Je propose déjà le début des commandes. Si tu peux y jeter un coup d'oeil
                                sudo   setxkbmap fr
                                sudo  mkdir /mnt/SUIVI
                                sudo chmod 777 /mnt/SUIVI
                                sudo  mount   -t  ext4     /dev/sda3     /mnt/SUIVI   
                                ## je pars du principe que le journal sera dans la troisième partition de nouveau disque et qu'il sera formaté en EXT4
                              sudo  ddrescue        -f    -n         /dev/sdb2      /dev/sda1     /mnt/SUIVI/logfile
                              sudo  ddrescue  -d  -f    -r3        /dev/sdb2      /dev/sda1      /mnt/SUIVI/logfile
                              ## visualiser le passage
                              ddrescuelog     -t   /mnt/SUIVI/logfile
                              ## éventuellement suprimer le fichier
                              ddrescuelog   -d    /mnt/SUIVI/logfile   

Je pense que la première commande copie tout ce qui peut se lire rapidement
et que la seconde commande copie avec 3 tentatives
pour un peu je dirais une 3eme commande avec 99 tentatives???
A noter qu'il existe un outil de suivi de la progression.
Dans ce contexte , je ne propose pas de  l'installer.

L'exclusivité des infos.


/usr/share/info/ddrescue.info.gz
File: ddrescue.info,  Node: Top,  Next: Introduction,  Up: (dir)

GNU ddrescue Manual
*******************

This manual is for GNU ddrescue (version 1.19, 3 October 2014).

* Menu:

* Introduction::          Purpose and features of GNU ddrescue
* Basic concepts::        Blocks, clusters, devices, files, sectors, etc
* Important advice::      Read this or risk losing your data
* Algorithm::             How ddrescue recovers the data
* Invoking ddrescue::     Command line interface
* Logfile structure::     Detailed format of the logfile
* Examples::              A small tutorial with examples
* Direct disc access::    Bypassing the kernel cache
* Fill mode::             Selectively overwriting the output file
* Generate mode::         Generating an approximate logfile
* Ddrescuelog::           Tool for ddrescue logfiles
* Invoking ddrescuelog::  Command line interface
* Problems::              Reporting bugs
* Concept index::         Index of concepts


   Copyright (C) 2004-2014 Antonio Diaz Diaz.

   This manual is free documentation: you have unlimited permission to
copy, distribute and modify it.

File: ddrescue.info,  Node: Introduction,  Next: Basic concepts,  Prev: Top,  Up: Top

1 Introduction
**************

GNU ddrescue is a data recovery tool. It copies data from one file or
block device (hard disc, cdrom, etc) to another, trying to rescue the
good parts first in case of read errors.

   The basic operation of ddrescue is fully automatic. That is, you
don't have to wait for an error, stop the program, read the log,
restart it from a new position, etc.

   If you use the logfile feature of ddrescue, the data is rescued very
efficiently, (only the needed blocks are read). Also you can interrupt
the rescue at any time and resume it later at the same point.

   Ddrescue does not write zeros to the output when it finds bad
sectors in the input, and does not truncate the output file if not
asked to. So, every time you run it on the same output file, it tries
to fill in the gaps without wiping out the data already rescued.

   Automatic merging of backups: If you have two or more damaged copies
of a file, cdrom, etc, and run ddrescue on all of them, one at a time,
with the same output file, you will probably obtain a complete and
error-free file. This is so because the probability of having the same
area damaged in all copies is low (if the errors are randomly located).
Using the logfile, only the needed blocks are read from the second and
successive copies.

   Ddrescue recommends lzip for compression of backups because the lzip
format is designed for long-term data archiving and provides data
recovery capabilities which nicely complement those of ddrescue.
(Ddrescue fills unreadable sectors with data from other copies, while
lziprecover corrects corrupt sectors with data from other copies). If
the cause of file corruption is damaged media, the combination ddrescue
+ lziprecover is the best option for recovering data from multiple
damaged copies. *Note lziprecover-example::, for an example.

   Recordable CD and DVD media keep their data only for a finite time
(typically for many years). After that time, data loss develops slowly
with read errors growing from the outer media region towards the inside.
Just make two (or more) copies of every important CD/DVD you burn so
that you can later recover them with ddrescue.

   Because ddrescue needs to read and write at random places, it only
works on seekable (random access) input and output files.

   If your system supports it, ddrescue can use direct disc access to
read the input file, bypassing the kernel cache.

   Ddrescue also features a "fill mode" able to selectively overwrite
parts of the output file, which has a number of interesting uses like
wiping data, marking bad areas or even, in some cases, "repair" damaged
sectors.

   One of the great strengths of ddrescue is that it is
interface-agnostic, and so can be used for any kind of device supported
by your kernel (ATA, SATA, SCSI, old MFM drives, floppy discs, or even
flash media cards like SD).

File: ddrescue.info,  Node: Basic concepts,  Next: Important advice,  Prev: Introduction,  Up: Top

2 Basic concepts
****************

Block
     Any amount of data. A block is described by its starting position
     and its size. The starting position (or beginning position) is the
     lowest position in the block. The end of the block is its starting
     position plus its size.

Cluster
     Group of consecutive sectors read or written in one go.

Device
     Piece of hardware containing data. Hard disc drives, cdrom drives,
     USB pendrives, are devices. /dev/hda, /dev/sdb, are device names.

File
     Files are named units of data which are stored by the operating
     system for you to retrieve later by name. Devices and partitions
     are accessed by means of their associated file names.

Partition
     Every part in which a device is divided. A partition normally
     contains a file system. /dev/hda1, /dev/sdb3, are partition names.

Recoverable formats
     As ddrescue uses standard library functions to read data from the
     device being rescued, only mountable device formats can be rescued
     with ddrescue. DVDs can be mounted and they can be rescued,
     "compact disc digital audio" CDs can't, "video CDs"[1] maybe.
     [1] http://en.wikipedia.org/wiki/Video_CD

Rescue domain
     Block or set of blocks to be acted upon (rescued, listed, etc).
     You can define it with the options '--input-position', '--size' and
     '--domain-logfile'. The rescue domain defaults to the whole input
     file or logfile.

     The amount of data rescued, number of errors, etc, shown by
     ddrescue may vary or even become zero if you limit the rescue
     domain. Don't worry, they have not disappeared; they are simply
     out of the specified rescue domain.

Sector
     Hardware block. Smallest accessible amount of data on a device.


File: ddrescue.info,  Node: Important advice,  Next: Algorithm,  Prev: Basic concepts,  Up: Top

3 Using ddrescue safely
***********************

Ddrescue is like any other power tool. You need to understand what it
does, and you need to understand some things about the machines it does
those things to, in order to use it safely.

   Always use a logfile unless you know you won't need it. Without a
logfile, ddrescue can't resume a rescue, only reinitiate it.

   Never try to rescue a r/w mounted partition. The resulting copy may
be useless.

   Never try to repair a file system on a drive with I/O errors; you
will probably lose even more data.

   If you use a device or a partition as destination, any data stored
there will be overwritten.

   Some systems may change device names on reboot (eg. udev enabled
systems). If you reboot, check the device names before restarting
ddrescue.

   If you interrupt the rescue and then reboot, any partially copied
partitions should be hidden before allowing them to be touched by any
operating system that tries to mount and "fix" the partitions it sees.

File: ddrescue.info,  Node: Algorithm,  Next: Invoking ddrescue,  Prev: Important advice,  Up: Top

4 Algorithm
***********

GNU ddrescue is not a derivative of dd, nor is related to dd in any way
except in that both can be used for copying data from one device to
another. The key difference is that ddrescue uses a sophisticated
algorithm to copy data from failing drives causing them as little
additional damage as possible.

   Ddrescue manages efficiently the status of the rescue in progress and
tries to rescue the good parts first, scheduling reads inside bad (or
slow) areas for later. This maximizes the amount of data that can be
finally recovered from a failing drive.

   The standard dd utility can be used to save data from a failing
drive, but it reads the data sequentially, which may wear out the drive
without rescuing anything if the errors are at the beginning of the
drive.

   Other programs read the data sequentially but switch to small size
reads when they find errors. This is a bad idea because it means
spending more time at error areas, damaging the surface, the heads and
the drive mechanics, instead of getting out of them as fast as
possible. This behavior reduces the chances of rescuing the remaining
good data.

   The algorithm of ddrescue is as follows (the user may interrupt the
process at any point, but be aware that a bad drive can block ddrescue
for a long time until the kernel gives up):

   1) Optionally read a logfile describing the status of a multi-part or
previously interrupted rescue. If no logfile is specified or is empty or
does not exist, mark all the rescue domain as non-tried.

   2) (First phase; Copying) Read the non-tried parts of the input file,
marking the failed blocks as non-trimmed and skipping beyond them. Skip
also beyond slow areas. The skipped areas are tried later in two
additional passes (before trimming), reversing the direction after each
pass until all the rescue domain is tried. The third pass is a sweeping
pass, with skipping disabled. (The purpose is to delimit large errors
fast, keep the logfile small, and produce good starting points for
trimming). Only non-tried areas are read in large blocks. Trimming,
scraping and retrying are done sector by sector. Each sector is tried at
most two times; the first in this step as part of a large block read,
the second in one of the steps below as a single sector read.

   3) (Second phase; Trimming) Trimming is done in one pass. For each
non-trimmed block, read forwards one sector at a time from the leading
edge of the block until a bad sector is found. Then read backwards one
sector at a time from the trailing edge of the block until a bad sector
is found. Then mark the bad sectors found (if any) as bad-sector, and
mark the rest of the block as non-scraped without trying to read it.

   4) (Third phase; Scraping) Scrape together the data not recovered by
the copying or trimming phases. Scraping is done in one pass. Each
non-scraped block is read forwards, one sector at a time. Any bad
sectors found are marked as bad-sector.

   5) (Fourth phase; Retrying) Optionally try to read again the bad
sectors until the specified number of retry passes is reached. The
direction is reversed after each pass. Every bad sector is tried only
once in each pass. Ddrescue can't know if a bad sector is unrecoverable
or if it will be eventually read after some retries.

   6) Optionally write a logfile for later use.


   The total error size ('errsize') is sum of the sizes of all the
non-trimmed, non-scraped and bad-sector blocks. It increases during the
copying phase and may decrease during trimming, scraping and retrying.
Note that as ddrescue scrapes or retries the failed blocks, the good
data found may divide them into smaller blocks, decreasing the total
error size but increasing the number of errors.

   The logfile is periodically saved to disc, as well as when ddrescue
finishes or is interrupted. So in case of a crash you can resume the
rescue with little recopying. The interval between saves varies from 30
seconds to 5 minutes depending on logfile size (larger logfiles are
saved at longer intervals).

   Also, the same logfile can be used for multiple commands that copy
different areas of the input file, and for multiple recovery attempts
over different subsets. See this example:

Rescue the most important part of the disc first.
     ddrescue -i0 -s50MiB /dev/hdc hdimage logfile
     ddrescue -i0 -s1MiB -d -r3 /dev/hdc hdimage logfile

Then rescue some key disc areas.
     ddrescue -i30GiB -s10GiB /dev/hdc hdimage logfile
     ddrescue -i230GiB -s5GiB /dev/hdc hdimage logfile

Now rescue the rest (does not recopy what is already done).
     ddrescue /dev/hdc hdimage logfile
     ddrescue -d -r3 /dev/hdc hdimage logfile

File: ddrescue.info,  Node: Invoking ddrescue,  Next: Logfile structure,  Prev: Algorithm,  Up: Top

5 Invoking ddrescue
*******************

The format for running ddrescue is:

     ddrescue [OPTIONS] INFILE OUTFILE [LOGFILE]

   ddrescue supports the following options:

'-h'
'--help'
     Print an informative help message describing the options and exit.

'-V'
'--version'
     Print the version number of ddrescue on the standard output and
     exit.

'-a BYTES'
'--min-read-rate=BYTES'
     Minimum read rate of good non-tried areas, in bytes per second. If
     the read rate falls below this value, ddrescue will skip ahead a
     variable amount depending on rate and error histories. The skipped
     blocks are tried in additional passes (before trimming) where the
     minimum read rate is divided by ten before each pass, until there
     are no more non-tried blocks left.

     If BYTES is 0 (auto), the minimum read rate is recalculated for
     each block as (average_rate / 10). Values above device capabilities
     are ignored.

'-A'
'--try-again'
     Mark all non-trimmed and non-scraped blocks inside the rescue
     domain as non-tried before beginning the rescue. Try this if the
     drive stops responding and ddrescue immediately starts scraping
     failed blocks when restarted. If '--retrim' is also specified,
     mark all failed blocks inside the rescue domain as non-tried.

'-b BYTES'
'--sector-size=BYTES'
     Sector (hardware block) size of input device in bytes (usually 512
     for hard discs and 3.5" floppies, 1024 for 5.25" floppies, and
     2048 for cdroms). Defaults to 512.

'-B'
'--binary-prefixes'
     Show units with binary prefixes (powers of 1024).
     SI prefixes (powers of 1000) are used by default. (See table
     below).

'-c SECTORS'
'--cluster-size=SECTORS'
     Number of sectors to copy at a time. Defaults to
     64 KiB / sector_size.  Try smaller values for slow drives. The
     number of sectors per track (18 or 9) is a good value for floppies.

'-C'
'--complete-only'
     Limit rescue domain to the blocks listed in the LOGFILE. Do not
     read new data beyond LOGFILE limits. This is useful when reading
     from devices of undefined size (like raw devices), when the drive
     returns an incorrect size, or when reading from a partial copy. It
     can only be used after a first rescue attempt, possibly limited
     with the '--size' option, has produced a complete LOGFILE.

'-d'
'--direct'
     Use direct disc access to read from INFILE, bypassing the kernel
     cache. (Open the file with the O_DIRECT flag). Use it only on
     devices or partitions, not on regular files. Sector size must be
     correctly set for this to work. Not all systems support this.

     If your system does not support direct disc access, ddrescue will
     warn you. If the sector size is not correctly set, all reads will
     result in errors, and no data will be rescued.

'-D'
'--synchronous'
     Use synchronous writes for OUTFILE. (Issue a fsync call after
     every write). May be useful when forcing the drive to remap its bad
     sectors.

'-e [+]N'
'--max-errors=[+]N'
     Maximum number of error areas allowed before giving up. Defaults to
     infinity. If N is preceded by '+' the number refers to new error
     areas found in this run, not counting those already annotated in
     the LOGFILE.

'-E BYTES'
'--max-error-rate=BYTES'
     Maximum rate of errors allowed before giving up, in bytes per
     second.  Defaults to infinity. The rate being measured is that of
     actually failed reads, so the rescue may finish because of this
     rate being exceeded even if the total error size (errsize) does
     not change because the areas being tried are already marked as
     errors.

'-f'
'--force'
     Force overwrite of OUTFILE. Needed when OUTFILE is not a regular
     file, but a device or partition. This option is just a safeguard
     to prevent the inadvertent destruction of partitions, and is
     ignored for regular files.

'-F TYPES'
'--fill-mode=TYPES'
     Fill the blocks in OUTFILE specified as any of TYPES in LOGFILE,
     with data read from INFILE. TYPES contains one or more of the
     status characters defined in the chapter Logfile structure (*note
     Logfile structure::). See the chapter Fill mode (*note Fill
     mode::) for a complete description of the fill mode.

'-G'
'--generate-mode'
     Generate an approximate LOGFILE from the INFILE and OUTFILE of the
     original rescue run. Note that you must keep the original offset
     between '--input-position' and '--output-position' of the original
     rescue run. See the chapter Generate mode (*note Generate mode::)
     for a complete description of the generate mode.

'-H FILE'
'--test-mode=FILE'
     Builds a map of good/bad blocks using the logfile FILE and uses it
     to simulate read errors in INFILE. The blocks marked as finished
     in FILE will be read normally. All other block types will be
     considered read errors without even trying to read them from
     INFILE. This mode is an aid in improving the algorithm of ddrescue
     and is also useful to verify that ddrescue produces accurate
     results in presence of read errors.

'-i BYTES'
'--input-position=BYTES'
     Starting position of the rescue domain in INFILE, in bytes.
     Defaults to 0. This is not the point from which ddrescue starts
     copying.  (For example, if you pass the '--reverse' option to
     ddrescue, it starts copying from the end of the rescue domain). In
     fill mode it refers to a position in the INFILE of the original
     rescue run. See the chapter Fill mode (*note Fill mode::) for
     details.

'-I'
'--verify-input-size'
     Compare the size of INFILE with the size calculated from the list
     of blocks contained in the LOGFILE, and exit with status 1 if they
     differ. This is not enabled by default because the size of some
     devices can't be known in advance and because the size derived
     from the LOGFILE may be incomplete, for example after doing a
     partial rescue.

'-K [INITIAL][,MAX]'
'--skip-size=[INITIAL][,MAX]'
     Set limits to skip size during the copying phase. At least one of
     INITIAL or MAX must be specified. INITIAL is the size to skip on
     the first read error or slow read, in bytes. MAX is the maximum
     size to skip. The values given will be rounded to the next
     multiple of sector size. The skip size will be doubled for each
     read error or slow read until it reaches MAX or, if MAX is
     omitted, 1% of the size of INFILE or 1 GiB (whichever is smaller),
     and will be reset to INITIAL when good data is found. Valid values
     range from 64 KiB to 1 GiB. INITIAL defaults to 64 KiB. An INITIAL
     value of 0 disables skipping entirely.

     If ddrescue is having difficulties skipping away from a large area
     with scattered errors, or if the device has large error areas at
     regular intervals, you can increase the initial skip size with
     this option.  Inversely, if ddrescue is skipping too much, leaving
     large non-tried areas behind each error (which will be read later
     in the usually slower backwards direction), you can reduce the
     maximum skip size, or disable skipping.

     '--skip-size' is independent from '--cluster-size'. The size to
     skip is calculated from the end of the block that just failed.

'-L'
'--loose-domain'
     Accept an incomplete synthetic (user fabricated) domain logfile or
     test-mode logfile and fill the gaps in the list of data blocks with
     non-tried blocks. The blocks in the logfile must be strictly
     ascending and non-overlapping, but they do not need to be
     contiguous. This option allows making quick edits to a logfile
     without all the size calculations involved in making all data
     blocks contiguous again.

'-m FILE'
'--domain-logfile=FILE'
     Restrict the rescue domain to the blocks marked as finished in the
     logfile FILE. This is useful for merging partially recovered
     images of backups, or if the destination drive fails during the
     rescue.

'-M'
'--retrim'
     Mark all failed blocks inside the rescue domain as non-trimmed
     before beginning the rescue. The effect is similar to
     '--retry-passes=1', but the bad sectors are tried in a different
     order, making perhaps possible to rescue some of them.

'-n'
'--no-scrape'
     Skip the scraping phase. Avoids spending a lot of time trying to
     rescue the most difficult parts of the file.

'-N'
'--no-trim'
     Skip the trimming phase. Specially useful in the first parts of a
     multi-part rescue.

'-o BYTES'
'--output-position=BYTES'
     Starting position of the image of the rescue domain in OUTFILE, in
     bytes. Defaults to '--input-position'. The bytes below BYTES
     aren't touched if they exist and truncation is not requested. Else
     they are set to 0.

'-O'
'--reopen-on-error'
     Close INFILE and then reopen it after every read error and, if
     '--min-read-rate' is set, after every slow read encountered both
     during the copying phase. Use this option if you notice a
     permanent drop in transfer rate after finding read errors or slow
     areas. But be warned that most probably the slowing-down is
     intentionally caused by the kernel in an attempt to increase the
     probability of reading data from the device.

'-p'
'--preallocate'
     Preallocate space on disc for OUTFILE. Only space for regular
     files can be preallocated. If preallocation succeeds, rescue will
     not fail due to lack of free space on disc. If ddrescue can't
     determine the size to preallocate, you may need to specify it with
     some combination of the '--input-position', '--output-position',
     '--size', and '--domain-logfile' options.

'-P[LINES]'
'--data-preview[=LINES]'
     Show LINES lines of the latest data read in '16-byte hex + ASCII'
     format. Valid values for LINES range from 1 to 32. If LINES is
     omitted, a default value of 3 is used.

'-q'
'--quiet'
     Quiet operation. Suppress all messages.

'-r N'
'--retry-passes=N'
     Exit after given number of retry passes. Defaults to 0. -1 means
     infinity. Every bad sector is tried only once in each pass. To
     retry bad sectors detected on a previous run, you must specify a
     non-zero number of retry passes.

'-R'
'--reverse'
     Reverse the direction of all passes (copying, trimming, scraping
     and retrying). Every pass that is normally run forwards will now
     be run backwards, and vice versa. '--reverse' does not modify the
     size of the blocks copied during each phase, just the order in
     which they are tried.

'-s BYTES'
'--size=BYTES'
     Maximum size of the rescue domain, in bytes. It limits the amount
     of input data to be copied. If ddrescue can't determine the size
     of the input device, you may need to specify it with this option.
     Note that this option does not specify the size of the resulting
     OUTFILE.  For example, the following command creates an OUTFILE
     300 bytes long, but only writes data on the last 200 bytes:

          ddrescue -i 100 -s 200 infile outfile logfile

'-S'
'--sparse'
     Use sparse writes for OUTFILE. (The blocks of zeros are not
     actually allocated on disc). May save a lot of disc space in some
     cases.  Not all systems support this. Only regular files can be
     sparse.

'-t'
'--truncate'
     Truncate OUTFILE to zero size before writing to it. Only works for
     regular files, not for drives or partitions.

'-T INTERVAL'
'--timeout=INTERVAL'
     Maximum time since last successful read allowed before giving up.
     Defaults to infinity. INTERVAL is a rational number (like 1.5 or
     1/2) optionally followed by one of 's', 'm', 'h' or 'd', meaning
     seconds, minutes, hours and days respectively. If no unit is
     specified, it defaults to seconds.

'-u'
'--unidirectional'
     Run all passes in the same direction. Forwards by default, or
     backwards if the option '--reverse' is also given.

'-v'
'--verbose'
     Verbose mode. Further -v's (up to 4) increase the verbosity level.

'-w'
'--ignore-write-errors'
     Make fill mode ignore write errors. This is useful to avoid
     ddrescue exiting because of new errors developing while wiping the
     good sectors of a failing drive. Fill mode normally writes to
     OUTFILE one cluster at a time. With this option, after the first
     write error is found in an area, the rest of that area is filled
     sector by sector.

'-x BYTES'
'--extend-outfile=BYTES'
     Extend the size of OUTFILE to make it at least BYTES long.  If the
     size of OUTFILE is already equal or longer than BYTES then this
     option does nothing. Use this option to guarantee a minimum size
     for OUTFILE. Only regular files can be extended.

'-X'
'--exit-on-error'
     Exit after the first read error is encountered during the copying
     phase.  This is similar but different to '--timeout=0', which
     waits until the screen status is refreshed (at least 1 second). If
     there is at least one successful read per second, '--timeout=0'
     does not make ddrescue to exit.

     This is also similar but different to '--max-errors=+0', which
     exits when a new error area is found. If the read errors are
     adjacent to existing error areas, no new error areas are produced
     (just enlarged), and '--max-errors=+0' does not make ddrescue to
     exit.

'-1 FILE'
'--log-rates=FILE'
     Log rates and error sizes every second in FILE. If FILE already
     exists, it will be overwritten. Every time the screen is updated
     with new details, some of those details (time, input position,
     current and average rates, number of errors and error size) are
     written to FILE in a format usable by plotting utilities like
     gnuplot. This allows a posterior analysis of the drive to see if
     it has any weak zones (areas where the transfer rate drops well
     below the sustained average).

'-2 FILE'
'--log-reads=FILE'
     Log all read operations in FILE. If FILE already exists, it will
     be overwritten. Every read attempt and its result (position, size,
     copied size and error size) is written to FILE. (The position
     written is always the beginning of the block tried, even if reading
     backwards). A line is also written at the beginning of each phase
     (copying, trimming, scraping and retrying). Finally, a line with a
     time mark is written every second (unless the read takes more
     time). Use this option with caution because FILE may become very
     large very quickly. Use lzip to compress FILE if you need to store
     or transmit it.

'--ask'
     Ask for user confirmation before starting the copy. If the first
     letter of the answer is 'y', ddrescue starts copying. Else it
     exits with status 1.
     If they can be obtained, ddrescue shows the model and serial
     number of the input and output devices. Else it shows the size in
     bytes of the corresponding file or device.

'--cpass=N[,N]'
     Select what pass(es) to run during the copying phase. Valid values
     for N range from 0 to 3. '--cpass=0' skips the copying phase
     entirely. To run only the given pass(es), specify also '--no-trim'
     and '--no-scrape'.

'--pause=INTERVAL'
     Time to wait between passes. Defaults to 0. INTERVAL is formatted
     as in the option '--timeout' above.


   Numbers given as arguments to options (positions, sizes, rates, etc)
may be expressed as decimal, hexadecimal or octal values (using the same
syntax as integer constants in C++), and may be followed by a multiplier
and an optional 'B' for "byte".

   Table of SI and binary prefixes (unit multipliers):

Prefix   Value                     |   Prefix   Value
                                   |   s        sectors
k        kilobyte  (10^3 = 1000)   |   Ki       kibibyte (2^10 = 1024)
M        megabyte  (10^6)          |   Mi       mebibyte (2^20)
G        gigabyte  (10^9)          |   Gi       gibibyte (2^30)
T        terabyte  (10^12)         |   Ti       tebibyte (2^40)
P        petabyte  (10^15)         |   Pi       pebibyte (2^50)
E        exabyte   (10^18)         |   Ei       exbibyte (2^60)
Z        zettabyte (10^21)         |   Zi       zebibyte (2^70)
Y        yottabyte (10^24)         |   Yi       yobibyte (2^80)


   Exit status: 0 for a normal exit, 1 for environmental problems (file
not found, invalid flags, I/O errors, etc), 2 to indicate a corrupt or
invalid input file, 3 for an internal consistency error (eg, bug) which
caused ddrescue to panic.

   If ddrescue is interrupted by a signal, it updates the logfile and
then terminates by raising the signal received.

File: ddrescue.info,  Node: Logfile structure,  Next: Examples,  Prev: Invoking ddrescue,  Up: Top

6 Logfile structure
*******************

The logfile is a text file easy to read and edit. It is formed by three
parts, the heading comments, the status line, and the list of data
blocks. Any line beginning with '#' is a comment line.

   The heading comments contain the version of ddrescue or ddrescuelog
that created the logfile, the command line used, and the time when the
program started. If the logfile was created by ddrescue it will also
contain the current time when the logfile was saved and a copy of the
status message from the screen describing the operation being performed
(copying, trimming, finished, etc). They are intended as information for
the user.

   The first non-comment line is the status line. It contains a
non-negative integer and a status character. The integer is the position
being tried in the input file. (The beginning of the block being tried
in a forward pass or the end of the block in a backward pass). The
status character is one of these:

Character   Meaning
'?'         copying non-tried blocks
'*'         trimming non-trimmed blocks
'/'         scraping non-scraped blocks
'-'         retrying bad sectors
'F'         filling specified blocks
'G'         generating approximate logfile
'+'         finished

   The blocks in the list of data blocks must be contiguous and
non-overlapping.

   Every line in the list of data blocks describes a block of data. It
contains 2 non-negative integers and a status character. The first
integer is the starting position of the block in the input file, the
second integer is the size (in bytes) of the block. The status character
is one of these:

Character   Meaning
'?'         non-tried block
'*'         failed block non-trimmed
'/'         failed block non-scraped
'-'         failed block bad-sector(s)
'+'         finished block

And here is an example logfile:

     # Rescue Logfile. Created by GNU ddrescue version 1.19
     # Command line: ddrescue -d -c18 /dev/fd0 fdimage logfile
     # Start time:   2014-05-03 09:37:44
     # Current time: 2014-05-03 09:38:19
     # Copying non-tried blocks... Pass 1 (forwards)
     # current_pos  current_status
     0x00120000     ?
     #      pos        size  status
     0x00000000  0x00117000  +
     0x00117000  0x00000200  -
     0x00117200  0x00001000  /
     0x00118200  0x00007E00  *
     0x00120000  0x00048000  ?

   If you edit the file, you may use decimal, hexadecimal or octal
values, using the same syntax as integer constants in C++.

   NOTE: Logfiles generated by a version of ddrescue prior to 1.6 lack
the status line. If you want to use an old logfile with ddrescue 1.6 or
later, you will have to insert a line like '0 +' at the beginning of
the logfile.

File: ddrescue.info,  Node: Examples,  Next: Direct disc access,  Prev: Logfile structure,  Up: Top

7 A small tutorial with examples
********************************

This tutorial is for those already able to use the dd command. If you
don't know what dd is, better search the net for some introductory
material about dd and GNU ddrescue first.

   A failing drive tends to develop more and more errors as time passes.
Because of this, you should rescue the data from a drive as soon as you
notice the first error. Be diligent because every time a physically
damaged drive powers up and is able to output some data, it may be the
very last time that it ever will.

   You should make a copy of the failing drive with ddrescue, and then
try to repair the copy. If your data is really important, use the first
copy as a master for a second copy, and try to repair the second copy.
If something goes wrong, you have the master intact to try again.

   If you are trying to rescue a whole partition, first repair the copy
with e2fsck or some other tool appropriate for the type of partition you
are trying to rescue, then mount the repaired copy somewhere and try to
recover the files in it.

   If the drive is so damaged that the file system in the rescued
partition can't be repaired or mounted, you will have to browse the
rescued data with an hex editor and extract the desired parts by hand
or use a file recovery tool like photorec.

   If the partition table is damaged, you may try to rescue the whole
disc, then try to repair the partition table and the partitions on the
copy.

   If the damaged drive is not listed in /dev, then you cannot rescue
it.  At least not with ddrescue.


Example 1: Rescue a whole disc with two ext2 partitions in /dev/hda to
/dev/hdb.
Note: you do not need to partition /dev/hdb beforehand, but if the
partition table on /dev/hda is damaged, you'll need to recreate it
somehow on /dev/hdb.

     ddrescue -f -n /dev/hda /dev/hdb logfile
     ddrescue -d -f -r3 /dev/hda /dev/hdb logfile
     fdisk /dev/hdb
     e2fsck -v -f /dev/hdb1
     e2fsck -v -f /dev/hdb2


Example 2: Rescue an ext2 partition in /dev/hda2 to /dev/hdb2.
Note: you need to create the hdb2 partition with fdisk first. hdb2
should be of appropriate type and size.

     ddrescue -f -n /dev/hda2 /dev/hdb2 logfile
     ddrescue -d -f -r3 /dev/hda2 /dev/hdb2 logfile
     e2fsck -v -f /dev/hdb2
     mount -t ext2 -o ro /dev/hdb2 /mnt
       (read rescued files from /mnt)


Example 3: Rescue a CD-ROM in /dev/cdrom.

     ddrescue -n -b2048 /dev/cdrom cdimage logfile
     ddrescue -d -b2048 /dev/cdrom cdimage logfile
       (if errsize is zero, cdimage now contains a complete image of the
        CD-ROM and you can write it to a blank CD-ROM)


Example 4: Rescue a CD-ROM in /dev/cdrom from two copies.

     ddrescue -n -b2048 /dev/cdrom cdimage logfile
     ddrescue -d -b2048 /dev/cdrom cdimage logfile
       (insert second copy in the CD drive)
     ddrescue -d -r1 -b2048 /dev/cdrom cdimage logfile
       (if errsize is zero, cdimage now contains a complete image of the
        CD-ROM and you can write it to a blank CD-ROM)


Example 5: Merge the partially recovered images of 3 identical DVDs
using their logfiles as domain logfiles.

     ddrescue -m logfile1 dvdimage1 dvdimage logfile
     ddrescue -m logfile2 dvdimage2 dvdimage logfile
     ddrescue -m logfile3 dvdimage3 dvdimage logfile
       (if errsize is zero, dvdimage now contains a complete image of the DVD
        and you can write it to a blank DVD)


Example 6: Rescue a lzip compressed backup from two copies on CD-ROM
with error-checked merging of copies (*Note lziprecover manual:
(lziprecover)Top, for details about lziprecover).

     ddrescue -b2048 /dev/cdrom cdimage1 logfile1
     mount -t iso9660 -o loop,ro cdimage1 /mnt/cdimage
     cp /mnt/cdimage/backup.tar.lz rescued1.tar.lz
     umount /mnt/cdimage
       (insert second copy in the CD drive)
     ddrescue -b2048 /dev/cdrom cdimage2 logfile2
     mount -t iso9660 -o loop,ro cdimage2 /mnt/cdimage
     cp /mnt/cdimage/backup.tar.lz rescued2.tar.lz
     umount /mnt/cdimage
     lziprecover -m -v -o backup.tar.lz rescued1.tar.lz rescued2.tar.lz


Example 7: While rescuing the whole drive /dev/hda to /dev/hdb, /dev/hda
freezes up at position 12345678.

     ddrescue -f /dev/hda /dev/hdb logfile       <-- /dev/hda freezes here
       (restart /dev/hda or reboot computer)
       (restart copy at a safe distance from the troubled sector)
     ddrescue -f -i 12350000 /dev/hda /dev/hdb logfile
       (copy backwards down to the troubled sector)
     ddrescue -f -R /dev/hda /dev/hdb logfile


Example 8: While rescuing the whole drive /dev/hda to /dev/hdb, /dev/hdb
fails and you have to rescue data to a third drive, /dev/hdc.

     ddrescue -f -n /dev/hda /dev/hdb logfile1     <-- /dev/hdb fails here
     ddrescue -f -m logfile1 /dev/hdb /dev/hdc logfile2
     ddrescue -f -n /dev/hda /dev/hdc logfile2
     ddrescue -d -f -r3 /dev/hda /dev/hdc logfile2


Example 9: While rescuing the whole drive /dev/hda to /dev/hdb, /dev/hda
stops responding and disappears from /dev.

     ddrescue -f -n /dev/hda /dev/hdb logfile      <-- /dev/hda fails here
       (restart /dev/hda or reboot computer as many times as needed)
     ddrescue -f -n -A /dev/hda /dev/hdb logfile
     ddrescue -d -f -r3 /dev/hda /dev/hdb logfile

File: ddrescue.info,  Node: Direct disc access,  Next: Fill mode,  Prev: Examples,  Up: Top

8 Direct disc access
********************

If you notice that the positions and sizes in the logfile are ALWAYS
multiples of the sector size, maybe your kernel is caching the disc
accesses and grouping them. In this case you may want to use direct disc
access or a raw device to bypass the kernel cache and rescue more of
your data.

   NOTE! Sector size must be correctly set with the '--sector-size'
option for this to work. Only whole sectors can be read; both
'--input-position' and '--size' must be a multiple of sector size.

   Try the '--direct' option first. If direct disc access is not
available in your system, try raw devices. Read your system
documentation to find how to bind a raw device to a regular block
device. Some OSs provide raw access through special device names, like
/dev/rdisk.

   Ddrescue aligns its I/O buffer to the sector size so that it can be
used for direct disc access or to read from raw devices. For efficiency
reasons, also aligns it to the memory page size if page size is a
multiple of sector size. On some systems, ddrescue can't determine the
size of a raw device, so an explicit '--size' or '--complete-only'
option may be needed.

   Using direct disc access, or reading from a raw device, may be
slower or faster than normal cached reading depending on your OS and
hardware. In case it is slower you may want to make a first pass using
normal cached reads and use direct disc access, or a raw device, only
to recover the good sectors inside the failed blocks.


Example 1: using direct disc access.

     ddrescue -f -n /dev/hdb1 /dev/hdc1 logfile
     ddrescue -d -f -r3 /dev/hdb1 /dev/hdc1 logfile
     e2fsck -v -f /dev/hdc1
     mount -t ext2 -o ro /dev/hdc1 /mnt


Example 2: using a raw device.

     raw /dev/raw/raw1 /dev/hdb1
     ddrescue -f -n /dev/hdb1 /dev/hdc1 logfile
     ddrescue -C -f -r3 /dev/raw/raw1 /dev/hdc1 logfile
     raw /dev/raw/raw1 0 0
     e2fsck -v -f /dev/hdc1
     mount -t ext2 -o ro /dev/hdc1 /mnt

File: ddrescue.info,  Node: Fill mode,  Next: Generate mode,  Prev: Direct disc access,  Up: Top

9 Fill mode
***********

When ddrescue is invoked with the '--fill-mode' option it operates in
"fill mode", which is different from the default "rescue mode". That
is, if you use the '--fill-mode' option, ddrescue does not rescue
anything. It only fills with data read from the input file the blocks of
the output file whose status character from the logfile coincides with
one of the type characters specified as argument to the '--fill-mode'
option.

   In fill mode the input file may have any size. If it is too small,
the data will be duplicated as many times as necessary to fill the input
buffer. If it is too big, only the data needed to fill the input buffer
will be read. Then the same data will be written to every cluster or
sector to be filled.

   Note that in fill mode the input file is always read from position
0. If you specify a '--input-position', it refers to the original input
file from which the logfile was built, and is only used to calculate the
offset between input and output positions.

   Note also that when filling the input file of the original rescue run
you should set '--input-position' and '--output-position' to identical
values, whereas when filling the output file of the original rescue run
you should keep the original offset between '--input-position' and
'--output-position'.

   The '--fill-mode' option implies the '--complete-only' option.

   In fill mode the logfile is updated to allow resumability when
interrupted or in case of a crash, but as nothing is being rescued the
logfile is not destroyed. The status line is the only part of the
logfile that is modified.


The fill mode has a number of uses. See the following examples:

Example 1: Mark parts of the rescued copy to allow finding them when
examined in an hex editor. For example, the following command line fills
all blocks marked as '-' (bad-sector) with copies of the string
'BAD SECTOR ':

     printf "BAD SECTOR " > tmpfile
     ddrescue --fill-mode=- tmpfile outfile logfile

Example 2: Wipe only the good sectors, leaving the bad sectors alone.
This way, the drive will still test bad (i.e., with unreadable sectors).
This is the fastest way of wiping a failing drive, and is specially
useful when sending the drive back to the manufacturer for warranty
replacement.

     ddrescue --fill-mode=+ --force /dev/zero bad_drive logfile

Example 3: Force the drive to remap the bad sectors, making it usable
again. If the drive has only a few bad sectors, and they are not caused
by drive age, you can probably just rewrite those sectors, and the drive
will reallocate them automatically to new "spare" sectors that it keeps
for just this purpose. WARNING! This may not work on your drive.

     ddrescue --fill-mode=- --force --synchronous /dev/zero bad_drive logfile


Fill mode can also help you to figure out, independently of the file
system used, what files are partially or entirely in the bad areas of
the disc. Just follow these steps:

   1) Copy the damaged drive with ddrescue until finished. Do not use
sparse writes. This yields a logfile with only finished ('+') and
bad-sector ('-') blocks.

   2) Fill the bad-sector blocks of the copied drive or image file with
a string not present in any file, for example "DEADBEEF".

   3) Mount the copied drive (or the image file, via loopback device).

   4) Grep for the fill string in all the files. Those files containing
the string reside (at least partially) in damaged disc areas. Note that
if all the damaged areas are in unused space, grep will not find the
string in any file, which means that no files are damaged.

   5) Unmount the copied drive or image file.

   6) Optionally fill the bad-sector blocks of the copied drive or image
file with zeros to restore the disc image.

Example 4: Figure out what files are in the bad areas of the disc.

     ddrescue -b2048 /dev/cdrom cdimage logfile
     printf "DEADBEEF" > tmpfile
     ddrescue --fill-mode=- tmpfile cdimage logfile
     rm tmpfile
     mount -t iso9660 -o loop,ro cdimage /mnt/cdimage
     find /mnt/cdimage -type f -exec grep -l "DEADBEEF" '{}' ';'
     umount /mnt/cdimage
     ddrescue --fill-mode=- /dev/zero cdimage logfile

File: ddrescue.info,  Node: Generate mode,  Next: Ddrescuelog,  Prev: Fill mode,  Up: Top

10 Generate mode
****************

NOTE: When ddrescue is invoked with the '--generate-mode' option it
operates in "generate mode", which is different from the default "rescue
mode". That is, if you use the '--generate-mode' option, ddrescue does
not rescue anything. It only tries to generate a logfile for later use.

   So you didn't read the tutorial and started ddrescue without a
logfile.  Now, two days later, your computer crashed and you can't know
how much data ddrescue managed to save. And even worse, you can't
resume the rescue; you have to restart it from the very beginning.

   Or maybe you started copying a drive with 'dd conv=noerror,sync' and
are now in the same situation described above.  In this case, note that
you can't use a copy made by dd unless it was invoked with the 'sync'
conversion argument.

   Don't despair (yet). Ddrescue can in some cases generate an
approximate logfile, from the input file and the (partial) copy, that
is almost as good as an exact logfile. It makes this by simply assuming
that sectors containing all zeros were not rescued.

   However, if the destination of the copy was a drive or a partition,
(or an existing regular file and truncation was not requested), most
probably you will need to restart ddrescue from the very beginning.
(This time with a logfile, of course). The reason is that old data may
be present in the drive that have not been overwritten yet, and may be
thus non-tried but non-zero.

   For example, if you first tried one of these commands:
     ddrescue infile outfile
     or
     dd if=infile of=outfile conv=noerror,sync

   then you can generate an approximate logfile with this command:
     ddrescue --generate-mode infile outfile logfile

Note that you must keep the original offset between '--input-position'
and '--output-position' of the original rescue run.

File: ddrescue.info,  Node: Ddrescuelog,  Next: Invoking ddrescuelog,  Prev: Generate mode,  Up: Top

11 Ddrescuelog
**************

Ddrescuelog is a tool that manipulates ddrescue logfiles, shows logfile
contents, converts logfiles to/from other formats, compares logfiles,
tests rescue status, and can delete a logfile if the rescue is done.
Ddrescuelog operations can be restricted to one or several parts of the
logfile if the domain setting options are used.

   When performing logic operations (AND, OR, XOR) on logfiles of
different extension, only the blocks present in both files are
processed.

   Here are some examples of how to use ddrescuelog, alone or in
combination with other tools.


Example 1: Delete the logfile if the rescue is finished (all data is
recovered without errors left).

     ddrescue -f /dev/hda /dev/hdb logfile
     ddrescuelog -d logfile


Example 2: Rescue two ext2 partitions in /dev/hda to /dev/hdb and
repair the file systems using badblock lists generated with
ddrescuelog. File system block size is 4096.
Note: you do need to partition /dev/hdb beforehand.

     fdisk /dev/hdb                                <-- partition /deb/hdb
     ddrescue -f /dev/hda1 /dev/hdb1 logfile1
     ddrescue -f /dev/hda2 /dev/hdb2 logfile2
     ddrescuelog -l- -b4096 logfile1 > badblocks1
     ddrescuelog -l- -b4096 logfile2 > badblocks2
     e2fsck -v -f -L badblocks1 /dev/hdb1
     e2fsck -v -f -L badblocks2 /dev/hdb2


Example 3: Rescue a whole disc with two ext2 partitions in /dev/hda to
/dev/hdb and repair the file systems using badblock lists generated with
ddrescuelog. Disc sector size is 512, file system block size is 4096.
Arguments to options '-i' and '-s' are the starting positions and sizes
of the partitions being rescued.
Note: you do not need to partition /dev/hdb beforehand, but if the
partition table on /dev/hda is damaged, you'll need to recreate it
somehow on /dev/hdb.

     ddrescue -f /dev/hda /dev/hdb logfile
     fdisk /dev/hdb                                <-- get partition sizes
     ddrescuelog -l- -b512 -i63b -o0 -s9767457b -b4096 logfile > badblocks1
     ddrescuelog -l- -b512 -i9767520b -o0 -s128520b -b4096 logfile > badblocks2
     e2fsck -v -f -L badblocks1 /dev/hdb1
     e2fsck -v -f -L badblocks2 /dev/hdb2

File: ddrescue.info,  Node: Invoking ddrescuelog,  Next: Problems,  Prev: Ddrescuelog,  Up: Top

12 Invoking ddrescuelog
***********************

The format for running ddrescuelog is:

     ddrescuelog [OPTIONS] LOGFILE

   Ddrescuelog supports the following options:

'-h'
'--help'
     Print an informative help message describing the options and exit.

'-V'
'--version'
     Print the version number of ddrescuelog on the standard output and
     exit.

'-a OLD_TYPES,NEW_TYPES'
'--change-types=OLD_TYPES,NEW_TYPES'
     Change the status of every block in the rescue domain from one
     type in OLD_TYPES to the corresponding type in NEW_TYPES, much like
     the 'tr' command does, and write the resulting logfile to standard
     output. OLD_TYPES and NEW_TYPES are strings of block status
     characters as defined in the chapter Logfile structure (*note
     Logfile structure::). Blocks whose status is not in OLD_TYPES are
     left unchanged. If NEW_TYPES is shorter than OLD_TYPES the last
     type of NEW_TYPES is repeated as many times as necessary.

'-b BYTES'
'--block-size=BYTES'
     Block size used by ddrescuelog. Depending on the requested
     operation it may be the sector size of the input device, the block
     size of the rescued file system, etc. Defaults to 512.

'-B'
'--binary-prefixes'
     Show units with binary prefixes (powers of 1024).
     SI prefixes (powers of 1000) are used by default. (See table above,
     *note Invoking ddrescue::).

'-c[TYPE1TYPE2]'
'--create-logfile[=TYPE1TYPE2]'
     Create a logfile from a list of block numbers read from standard
     input.  Only blocks included in the rescue domain will be added to
     LOGFILE.

     TYPE1 and TYPE2 are block status characters as defined in the
     chapter Logfile structure (*note Logfile structure::). TYPE1 sets
     the type for blocks included in the list, while TYPE2 sets the
     type for the rest of the logfile. If not specified, TYPE1 defaults
     to '+' and TYPE2 defaults to '-'.

'-C[TYPE]'
'--complete-logfile[=TYPE]'
     Complete a synthetic (user fabricated) LOGFILE by filling the gaps
     with blocks of type TYPE, and write the completed logfile to
     standard output. TYPE is one of the block status characters
     defined in the chapter Logfile structure (*note Logfile
     structure::). If TYPE is not specified, the gaps are filled with
     non-tried blocks.  All gaps in the logfile are filled. Domain
     options are ignored.

'-d'
'--delete-if-done'
     Delete the given LOGFILE if all the blocks in the rescue domain
     have been successfuly recovered. The exit status is 0 if LOGFILE
     could be deleted, 1 otherwise.

'-D'
'--done-status'
     Test if all the blocks in the rescue domain have been successfuly
     recovered. The exit status is 0 if all tested blocks are finished,
     1 otherwise.

'-f'
'--force'
     Force overwrite of LOGFILE.

'-i BYTES'
'--input-position=BYTES'
     Starting position of the rescue domain, in bytes. Defaults to 0. It
     refers to a position in the original input file.

'-l TYPES'
'--list-blocks=TYPES'
     Print on standard output the block numbers of the blocks specified
     as any of TYPES in LOGFILE and included in the rescue domain.
     TYPES contains one or more of the block status characters defined
     in the chapter Logfile structure (*note Logfile structure::).

     The list format is one block number per line in decimal, like the
     output of the badblocks program, so that it can be used as input
     for e2fsck or other similar filesystem repairing tool.

'-L'
'--loose-domain'
     Accept an incomplete synthetic (user fabricated) domain logfile or
     compare-as-domain logfile and fill the gaps in the list of data
     blocks with non-tried blocks. The blocks in the logfile must be
     strictly ascending and non-overlapping, but they do not need to be
     contiguous.  This option allows making quick edits to a logfile
     without all the size calculations involved in making all data
     blocks contiguous again.

'-m FILE'
'--domain-logfile=FILE'
     Restrict the rescue domain to the blocks marked as finished in the
     logfile FILE.

'-n'
'--invert-logfile'
     Invert the types of the blocks in LOGFILE which are included in
     the rescue domain, and write the resulting logfile to standard
     output.  Finished blocks ('+') are changed to bad-sector ('-'), all
     other types are changed to finished. '--invert-logfile' is
     equivalent to '--change-types=?*/-+,++++-'

'-o BYTES'
'--output-position=BYTES'
     Starting position of the image of the rescue domain in the output
     file, in bytes. Is used by the '--list-blocks' option. Defaults to
     '--input-position'.

'-p FILE'
'--compare-logfile=FILE'
     Compare the types of the blocks included in the rescue domain. The
     exit status is 0 if all tested blocks are the same in both FILE and
     LOGFILE, 1 otherwise.

'-P FILE'
'--compare-as-domain=FILE'
     Compare only the blocks marked as finished in the rescue domain.
     The exit status is 0 if all tested blocks are the same in both FILE
     and LOGFILE, 1 otherwise. Two files comparing equal with this
     option are equivalent when used as domain logfiles.

'-q'
'--quiet'
     Quiet operation. Suppress all messages.

'-s BYTES'
'--size=BYTES'
     Maximum size of the rescue domain, in bytes. It refers to a size
     in the original input file.

'-t'
'--show-status'
     Print a summary of LOGFILE contents on the standard output. The
     summary can be restricted to one or several parts of LOGFILE if
     the domain setting options are used.

'-v'
'--verbose'
     Verbose mode. Further -v's (up to 4) increase the verbosity level.

'-x FILE'
'--xor-logfile=FILE'
     Perform a logical XOR (exclusive OR) operation between the finished
     blocks in FILE and those in LOGFILE, and write the resulting
     logfile to standard output. In other words, in the resulting
     logfile a block is only shown as finished if it was finished in
     either of the two input logfiles but not in both.

'-y FILE'
'--and-logfile=FILE'
     Perform a logical AND operation between the finished blocks in
     FILE and those in LOGFILE, and write the resulting logfile to
     standard output. In other words, in the resulting logfile a block
     is only shown as finished if it was finished in both input
     logfiles.

'-z FILE'
'--or-logfile=FILE'
     Perform a logical OR operation between the finished blocks in FILE
     and those in LOGFILE, and write the resulting logfile to standard
     output. In other words, in the resulting logfile a block is shown
     as finished if it was finished in either of the two input logfiles.


   Exit status: 0 for a normal exit, 1 for environmental problems (file
not found, invalid flags, I/O errors, etc), 2 to indicate a corrupt or
invalid input file, 3 for an internal consistency error (eg, bug) which
caused ddrescuelog to panic.

File: ddrescue.info,  Node: Problems,  Next: Concept index,  Prev: Invoking ddrescuelog,  Up: Top

13 Reporting bugs
*****************

There are probably bugs in ddrescue. There are certainly errors and
omissions in this manual. If you report them, they will get fixed. If
you don't, no one will ever know about them and they will remain unfixed
for all eternity, if not longer.

   If you find a bug in GNU ddrescue, please send electronic mail to
<bug-ddrescue@gnu.org>. Include the version number, which you can find
by running 'ddrescue --version'.

File: ddrescue.info,  Node: Concept index,  Prev: Problems,  Up: Top

Concept index
*************


* Menu:

* algorithm:                             Algorithm.             (line 6)
* basic concepts:                        Basic concepts.        (line 6)
* bugs:                                  Problems.              (line 6)
* ddrescuelog:                           Ddrescuelog.           (line 6)
* direct disc access:                    Direct disc access.    (line 6)
* examples:                              Examples.              (line 6)
* fill Mode:                             Fill mode.             (line 6)
* generate Mode:                         Generate mode.         (line 6)
* getting help:                          Problems.              (line 6)
* introduction:                          Introduction.          (line 6)
* invoking ddrescue:                     Invoking ddrescue.     (line 6)
* invoking ddrescuelog:                  Invoking ddrescuelog.  (line 6)
* logfile structure:                     Logfile structure.     (line 6)
* options:                               Invoking ddrescue.     (line 6)
* raw devices:                           Direct disc access.    (line 6)
* usage:                                 Invoking ddrescue.     (line 6)
* using ddrescue safely:                 Important advice.      (line 6)
* version:                               Invoking ddrescue.     (line 6)

Voici un passage su un disque non abîmé  . If n'y a donc eu que le pass 1

bougron@15-4:~$ sudo umount /dev/sdb3
bougron@15-4:~$ ddrescue -f -n /dev/sda24 /dev/sdb3 Ddrescue.log
ddrescue: Can't open input file: Permission denied
bougron@15-4:~$ sudo ddrescue -f -n /dev/sda24 /dev/sdb3 Ddrescue.log
GNU ddrescue 1.19
Press Ctrl-C to interrupt
rescued:     2147 MB,  errsize:       0 B,  current rate:   93650 kB/s
   ipos:     2147 MB,   errors:       0,    average rate:    7456 kB/s
   opos:     2147 MB, run time:    4.80 m,  successful read:       0 s ago
Finished  

évidemment le second passage est instantané.

bougron@15-4:~$ sudo ddrescue   -d  -f    -r3    /dev/sda24 /dev/sdb3 Ddrescue.log
GNU ddrescue 1.19
Press Ctrl-C to interrupt
Initial status (read from logfile)
rescued:     2147 MB,  errsize:       0 B,  errors:       0

Current status
rescued:     2147 MB,  errsize:       0 B,  current rate:        0 B/s
   ipos:         0 B,   errors:       0,    average rate:        0 B/s
   opos:         0 B, run time:       0 s,  successful read:       0 s ago
Finished
bougron@15-4:~$

Il semble que cela se soit bien passé

bougron@15-4:~$ ddrescuelog -t Ddrescue.log

   current pos:     2147 MB,  current status: finished
logfile extent:     2147 MB,  in     1 area(s)
       rescued:     2147 MB,  in     1 area(s)  (100%)
     non-tried:         0 B,  in     0 area(s)  (  0%)

       errsize:         0 B,  errors:        0  (  0%)
   non-trimmed:         0 B,  in     0 area(s)  (  0%)
   non-scraped:         0 B,  in     0 area(s)  (  0%)
    bad-sector:         0 B,  in     0 area(s)  (  0%)
bougron@15-4:~$ 

Dernière modification par Bougron (Le 24/07/2015, à 16:23)

Hors ligne

#32 Le 24/07/2015, à 21:13

nouya

Re : Unable to acces Systeme

Bonsoir bougron et moko ,
je lis vos message ,(c'est un peu du charabia pour moi , je ne comprends pas tout ) mais je vois que vous parlez du disque d: , celui ci j'ai reussi a recuperer mes données qui se trouve dessus (grace a ubuntu) , par contre sur le lecteur c: j'ai seulement quelques fichiers plus ou moins important (voir tres important pour certains) a recuperer.
Je ne sais pas ou vous en etes de votre discussion mais j'ai bon espoir smile

Hors ligne

#33 Le 24/07/2015, à 21:30

moko138

Re : Unable to acces Systeme

Bougron a écrit :

Si tu peux jeter un coup d'oeil sur le document que je viens de faire  https://forum.ubuntu-fr.org/viewtopic.p … #p20255491

J'avais déjà vu... et admiré !

Pour la suite de ton message (gddrescue), je la relirai à tête reposée.

/!\ Tu seras indisponible de quand à quand, si ce n'est pas indiscret ?


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#34 Le 24/07/2015, à 21:38

Bougron

Re : Unable to acces Systeme

Bonsoir.
C'est parfait pour la solution que tu as utilisée . On aurait du/pu y penser

Attendons donc tranquillement que ton nouveau disque arrive. que tu mettes en route windows.
Que dans ce disque tu fasses une nouvelle partition de taille équivalente  la partition C: de ton disque défaillant.
Et la procédure restera la même.
Cependant, une nouveauté, tu pourras  faire la fameuse commande fsck -f /dev/sdb1 ???  qui t'a été proposée, elle est peut-être capable de remettre cette partition  en état.


Je serais dans la campagne  profonde toute la semaine prochaine sans connexion internet et encore une semaine 2eme quinzaine d'août.

Dernière modification par Bougron (Le 24/07/2015, à 21:42)

Hors ligne

#35 Le 24/07/2015, à 22:00

moko138

Re : Unable to acces Systeme

Merci !

...fsck : sur la copie ! (C'est évident pour toi, Bougron, mais pas pour tout le monde).


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#36 Le 24/07/2015, à 22:27

nouya

Re : Unable to acces Systeme

Merci a vous ,

donc pour résumer et si j'ai compris , il faut que je fasse une image de mon disque fatigué (comment ? svp ), et lorsque j'ai acheté mon nouveau disque dur je copie l'image dessus (désolé mais comment encore une fois ? je la grave sur un cd et l'installe sur le disque dur ? ) ....
Je ne suis pas sur mais quelq'un peut il me résumer ce que je dois faire dans l'ordre et les commandes ou autres que je dois faire , svp

Merci encore a vous 2 bonne soirée et bonne vacance !!!!

Dernière modification par nouya (Le 24/07/2015, à 22:31)

Hors ligne

#37 Le 24/07/2015, à 23:58

Bougron

Re : Unable to acces Systeme

nouya a écrit :

Bonsoir bougron et moko ,
je lis vos message ,(c'est un peu du charabia pour moi , je ne comprends pas tout ) mais je vois que vous parlez du disque d: , celui ci j'ai reussi a recuperer mes données qui se trouve dessus (grace a ubuntu) , par contre sur le lecteur c: j'ai seulement quelques fichiers plus ou moins important (voir tres important pour certains) a recuperer.
Je ne sais pas ou vous en etes de votre discussion mais j'ai bon espoir smile

La suite..
Lorsque j'ai vu que tu avais récupéré les données du disque D: grace à ubuntu, J'ai pensé la chose suivante..
              A)  Monter le disque neuf dans l'ordinateur.
              B)   Installer windows dans ce disque
              C)    depuis windows faire la commande    fsck   CHKDSK sur la partition 'pourrie'
                                                                Je sais , c'est ce qui n'est pas recommandé. Mais
                                                                            Ce n'est peut-être pas la mécanique qui est pourrie mais la surface disque ce disque.
                                                                           Si cette commande réussi , La partition redevient accessible et les données sont récupérables avec la même logique que cela a été fait pour D:
 
Je ne crois pas trop à cette solution. Mais elle a fonctionné pour le D:

Je ne sais pas exactement comment tu as fais  pour récupérer le contenu du D: un autre ordinateur fonctionnant sous windows ? sous Ubuntu ?
Toujours est-il qu'il faut que sur un autre disque,  tu fabriques une partition NTFS  de taille  au moins égale à  C:  soit 75 Go

Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type     File system  Flags
1      8225kB  75.0GB  75.0GB  primary  ntfs         boot
2      75.0GB  250GB   175GB   primary  ntfs

après, il faut copier  la partition abîmée  sur la partition neuve
                Soit tu le fais avec windows, il  y a certainement  des outils. Mais je ne les connais pas.
                                        en fait je ne connais que testdisk qui ne me semble pas actuellement approprié.
                Soit tu le fais avec ubuntu. Pour cela trois outils
                       a) clonezilla   => il ne peut pas fonctionner car il exige  que la structure de la partition soit sans défaut
                                   et lorsqu'il constatera cela
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       28
  il verra que ce n'est pas zéro, il te demandera de faire un FSCK via windows.
                      b)   La commande native dd qui va dupliquer"'bêtement".
                      c)  le logiciel DDRESCUE qu'il faut installer  mais qui duplique ce qu'il peut.

Maintenant que c''est dupliqué sur la partition neuve,  les bêtises  ont aussi été dupliquées donc
            Il faut faire une commande fsck CHKDSK sur cette partition neuve.
Il y a un choix à faire, Seul toi  peut faire ce choix.
Voila des données du problème..
J'ai essayé d'être le plus clair possible, 

Pour la suite c'est de la codif et cela n'a pas trop  d'importance.
La  commande de base  pour une duplication  du premier bloc au dernier est

sudo          dd     if=/dev/sd"le C abimé"    of=/dev/sd"le C neuf"     conv=notrunc,noerror

Les commandes de base pour une duplication de ce qui peut être lu est

sudo  ddrescue        -f    -n         /dev/sd"le C abimé"         /dev/sd"le C neuf"      journal
sudo  ddrescue   -d   -f    -r3        /dev/sd"le C abimé"         /dev/sd"le C neuf"      journal

Si ces commandes snt lancées avec le live CD,
                   pour dd          il n'y a rien a faire
                   pour dd rescue,   le logiciel devra être installé . Cela ressemblera à smartctl

A noter que si le FSCK windows ne réussi pas à "réparer", Cela sera le moment d'utiliser 'tesdisk". Dans ce contexte, Impossible de dire les répertoires qui seront récupérés
            A pire il existe photorec qui te récupérera des morceaux de fichiers.

Dernière modification par Bougron (Le 26/07/2015, à 14:05)

Hors ligne

#38 Le 25/07/2015, à 00:32

Bougron

Re : Unable to acces Systeme

moko138 a écrit :

Merci !

...fsck : sur la copie ! (C'est évident pour toi, Bougron, mais pas pour tout le monde).

Bonsoir
Mais non justement, ce n'est si évident que cela.
Le sauvetage du D:  vient d'être fait, Si sa durée avait été anormalement longue, elle serait encore en cours.
Je me  rappelle d'une discussion  que je vais retrouver ou le E2FSCK  avait duré près d'une semaine.
               et  d'une  autre dans laquelle le  disque avaiit laché totalement pendant la copie  via DD
Je ne sais pas ce qu'il y a de mieux
Tout simplement parce que je ne sais pas analyser..

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 00 02 11 79 62 e0 00      00:01:04.400  READ DMA EXT
  25 00 02 11 79 62 e0 00      00:01:00.200  READ DMA EXT
  25 00 02 11 79 62 e0 00      00:00:56.000  READ DMA EXT
  25 00 02 11 79 62 e0 00      00:00:51.700  READ DMA EXT
  25 00 02 11 79 62 e0 00      00:00:47.500  READ DMA EXT

A part comprendre que c'est de la lecture.
Au mieux il  y avait ung rain de poussière qui a fini par changer de place!!!!!!

Dernière modification par Bougron (Le 25/07/2015, à 00:47)

Hors ligne

#39 Le 25/07/2015, à 06:56

moko138

Re : Unable to acces Systeme

Bougron a écrit :

Je me  rappelle d'une discussion  que je vais retrouver ou le E2FSCK  avait duré près d'une semaine.

Oui, parce que nous avions rajouté l'option -c, recherche des badblocks :
./viewtopic.php?pid=19572541#p19572541
  Fais, comme je l'ai fait, sur un de tes disques en état moyen, la comparaison du temps passé sans et avec l'option -c, tu seras édifié !
----

Bougron a écrit :

Je me  rappelle d'une discussion (...) et  d'une  autre dans laquelle le  disque avait lâché totalement pendant la copie  via DD

Raison de plus pour préférer à dd gddrescue qui commence par copier tout ce qui est lisible sans difficulté !

===

Bougron a écrit :

moko138 a écrit :

...fsck : sur la copie ! (C'est évident pour toi, Bougron, mais pas pour tout le monde).

Mais non justement, ce n'est si évident que cela.
Le sauvetage du D:  vient d'être fait, Si sa durée avait été anormalement longue, elle serait encore en cours.

  Mais, si j'ai bien suivi, il n'y a eu ni dd ni gddrescue ni même fsck (*). C'est l'explorateur de fichiers qui a permis la copie du contenu de D:


                    Il reste à traiter C:.
  De mon point de vue, le choix actuel semble être entre
- gddrescue puis chkdsk sur la copie, méthode lourde mais moins incertaine,
- chkdsk sur l'original, effectué par un autre windows, sain celui-là ; solution plus rapide mais plus risquée : si le disque lâche définitivement, il n'y aura pas d'autre solution que le coûteux passage en salle blanche.
  Et surtout, de mon point de vue, c'est la mécanique, usée, qui est devenue imprécise. Dans ces conditions, aucune correction de l'original n'est possible.


(*) fsck sur du ntfs est à éviter chaque fois que chkdsk est possible :

man ntfsfix a écrit :

ntfsfix is a utility that fixes some common NTFS problems.  ntfsfix is NOT a Linux version of chkdsk.
  It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

  You may run ntfsfix on an NTFS volume if you think it was damaged by Windows or some other way and it cannot be mounted.

                                  Traduction :
(...)  Vous pouvez exécuter ntfsfix sur un volume ntfs
SI il a été, selon vous, endommagé par Windows ou par autre chose
ET qu'il ne peut être monté [par Windows ni vérifié par lui].

Dernière modification par moko138 (Le 25/07/2015, à 07:48)


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#40 Le 25/07/2015, à 20:17

nouya

Re : Unable to acces Systeme

Ok merci a vous ,

effectivement moko138 , Mais, si j'ai bien suivi, il n'y a eu ni dd ni gddrescue ni même fsck (*). C'est l'explorateur de fichiers qui a permis la copie du contenu de D:

donc pour une copie j'utilise gddrescue?
Impossible a installer ?
ubuntu@ubuntu:~$ sudo apt-get install gddrescue
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
E: Impossible de trouver le paquet gddrescue
apres puis je faire la copie sur mon disque dur externe et ensuite copier sur le nouveau disque quand je l'aurai acheté???

Merci encore a vous

Hors ligne

#41 Le 25/07/2015, à 21:53

Bougron

Re : Unable to acces Systeme

nouya a écrit :

Ok merci a vous ,

effectivement moko138 , Mais, si j'ai bien suivi, il n'y a eu ni dd ni gddrescue ni même fsck (*). C'est l'explorateur de fichiers qui a permis la copie du contenu de D:

donc pour une copie j'utilise gddrescue?
Impossible a installer ?
ubuntu@ubuntu:~$ sudo apt-get install gddrescue
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
E: Impossible de trouver le paquet gddrescue
apres puis je faire la copie sur mon disque dur externe et ensuite copier sur le nouveau disque quand je l'aurai acheté???

Merci encore a vous

Bonsoir,
Pour ton problème j'ai une piste. Je pense  que ton CD.ROM a été fait avec la version 15.04.
Je viens d'essayer à l'instant  une live USB 15.04, Et j'ai le même problème que toi, l''explication  est au paragraphe 1.2 de la documentation https://doc.ubuntu-fr.org/ddrescuecitre

La version  n'est plus disponible.
   Il  reste donc à se rabattre sur DD. qui n'a pas besoin d'être installé.
Avec DD tu feras la copie  sur le disque  externe.
Lorsque tu auras ton nouveau disque, Tu l'installes dans le micro, tu installes windows.
puis tu lances la commandes windows qui permet de réparer le disque externe.
  puis tu peux alors regarder les  répertoires personnels  de cette vieille partition C:

Dernière modification par Bougron (Le 25/07/2015, à 21:56)

Hors ligne

#42 Le 25/07/2015, à 22:41

nouya

Re : Unable to acces Systeme

OK , merci bougron , derniere question faut il que je partitionne mon disque dur externe sachant que j'ai des fichiers dessus ?
Si oui , ca ne risque pas de me supprimer les fichiers ?

Pour info et en cherchant un peu , j'ai reussit a installé gddrescue il me semble , en activant dans system setting, logiciels & mise a jour : j'ai coché la case  logiciel libre et open source maintenu par la communauté (universe).

vais donc essayé avec gddrescue avant dd....et une fois que j'aurais eu une réponse concernant la copie sur mon disque externe.

Dernière modification par nouya (Le 25/07/2015, à 22:47)

Hors ligne

#43 Le 26/07/2015, à 00:44

Bougron

Re : Unable to acces Systeme

Bonsoir.
Ton disque  abîmé  a deux partitions  une de 75 Go qui n'a pas été récupérée et  une de 175 Go dont  tu as déjà récupéré les  données pour les mettre dans le disque externe.
  Cela veut dire que ton disque externe  est déjà partitionné mais qu'il n'a qu'une seule partition.
       Il  faut donc  créer une seconde  partition    en rétrécissant la partition présente de 75 Go en espérant que ton disque externe dépasse 250 Go.
        Pour cela, tu fais en live cdrom.     IL faut lancer Gparted  Il est présent sur le cd-rom.
      il va trouver ce disque externe et te montrer une seule partition.
       Tu prendras l'onglet partition
         Tu te positionnes sur la partition,
          puis avec un clic droit, tu fais l'action "démonter"  (cette ligne est un ajout)
          puis après  c'est l'option redimensionner/déplacer
                    tu devrais voir quelque chose du style
                             espace avant     0 Mo
                             espace partition  999999 Mo
                             espace après      0 Mo
     tu va modifier 'espace partition' pour mettre la nouvelle valeur qui sera 999999 - 75 * 1024   (je te laisse faire le calcul car je ne connais pas ce qui sera affiché à la place de 999999)
     dans cette action, l'espace livre après sera  76800  (75*1024)
     tu valides
      Il va falloir maintenant que tu fasses l'action.
                  Attention, elle est risquée et  elle va durer longtemps car je pense que ton disque externe est relié  en USB2. Donc cela va 8 fois moins vite.
                   Et ta partition actuelle fait  plus de 250 Go. Je pense que  tu en as pour trois  ou quatre heures sinon plus..
    Si tu l'arrêtes, ou si elle s'arrête  le contenu sera irrécupérable, il faudra partir de nouveau du vieux disque.
   Pour lancer: Cela sera dans l'onglet 'édition"  option "appliquer toutes les opérations".


C'est parfait qu tu aies trouver comment récupérer l'application gddrescue. Pour savoir si c'est la bonne,
              Tu peux toujours recommencer et lorsqu'elle sera opérationnelle faire la commande suivante et regarder le résultat.
    Voici ce que cela donne en version 15.04

bougron@15-4:~$ ddrescue -V
GNU ddrescue 1.19
Copyright (C) 2014 Antonio Diaz Diaz.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
bougron@15-4:~$ 


ll y a juste un problème qui me gène, C'est qu'elle ne soit  plus présente dans la logithèque ubuntu.
              Une erreur ponctuelle ??

              Supprimée à cause d'un dysfonctionnement?
                                               Mineur ?   grave ?

             Fausse information dans la doc ?
           Manipulation nécessaire lorsqu'on est en cd-live ===> il fait mettre le nouveau fournisseur du logiciel

Dernière modification par Bougron (Le 26/07/2015, à 14:11)

Hors ligne

#44 Le 26/07/2015, à 01:42

Bougron

Re : Unable to acces Systeme

nouya a écrit :

Pour info et en cherchant un peu , j'ai réussi a installer gddrescue il me semble , en activant dans system setting, logiciels & mise a jour : j'ai coché la case  logiciel libre et open source maintenu par la communauté (universe).

vais donc essayé avec gddrescue avant dd....

Bravo pour cette action de recherche.
J'ai relancé en live USB , J'ai fais ton action,
Effectivement la seconde option  n''est pas cochée alors qu'elle l'est  dans la version installée.
J'ai donc regardé le téléchargement se faire.
C'est bien l'iso AMD qui descend, Elle est référencée 1.19-1

la commande ddrescue -V indique bien version 1.9 et info ddrescue ressemble sacrément à ce que j'avais en mémoire.
C'est bien la même version.

A noter que je viens d'installer la version gddrescue pour ubuntu 14.04.2  Dans ce contexte, c'est bien de ubuntu que cela provient
Réception de : 1 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe gddrescue amd64 1.17-1 [85,9 kB]

Dernière modification par Bougron (Le 26/07/2015, à 01:52)

Hors ligne

#45 Le 26/07/2015, à 01:48

moko138

Re : Unable to acces Systeme

nouya, fais attention : le début de ton message de 20h17, qui t'attribue ma question et n'y répond pas, est incompréhensible !


Bougron a écrit :
nouya a écrit :

pour une copie j'utilise gddrescue?
(...)

ubuntu@ubuntu:~$ sudo apt-get install gddrescue
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
E: Impossible de trouver le paquet gddrescue

Pour ton problème j'ai une piste. Je pense  que ton CD.ROM a été fait avec la version 15.04.
Je viens d'essayer à l'instant  une live USB 15.04, Et j'ai le même problème que toi, l''explication  est au paragraphe 1.2 de la documentation https://doc.ubuntu-fr.org/ddrescue
La version  n'est plus disponible.

La Doc est plus ambigüe :

doc.ubuntu-fr.org/ddrescue a écrit :

[EDIT UBUNTU 15.04 du 17.05.2015]
Le paquet n'est plus présent dans les dépôts

[EDIT UBUNTU 15.04 du 17.05.2015]
Il existe le paquet gddrescue et le paquet gddrescue:i386 dans les dépôts

Le créateur de testdisk a écrit :

La meilleure solution, autrement dit la plus rapide et la plus efficace, semble être le 'ddrescue' d'Antonio Diaz (http://savannah.gnu.org/projects/ddrescue/)

ce que nous connaissons, dans Ubuntu, sous le nom de "gddrescue".
Si c'était pour moi, je me fierais au savoir-faire de Christophe Grenier.

De toute façon, il y a plusieurs contournements :
Comme il n'y a pas besoin de 15.04 live, il suffit de faire une clef persistante en 14.04 ou en 12.04, puis

sudo apt-get install gddrescue

Ou encore, pour ceux qui tiendraient à une version récente, sur le site du créateur, il y a une rc3 de cette semaine !

ddrescue-1.20-rc3.tar.lz    22-Jul-2015 15:35     72K

  Mais bon, tu as réussi, nouya, très bien ! smile
Ton ubuntu live :
est-elle une 15.04 ?
est-elle bien persistante ?


Bougron,

La Doc a écrit :

...installer le paquet gddrescue présent dans le dépôt Ubuntu Universe.

nouya a écrit :

j'ai réussi a installer gddrescue (...) en activant (...) universe.


%NOINDEX%
Un utilitaire précieux : ncdu
Photo, mini-tutoriel :  À la découverte de dcraw

Hors ligne

#46 Le 26/07/2015, à 13:28

nouya

Re : Unable to acces Systeme

Je suis en live-cd, je n'arrive pas a partionner mon disque avec gparted, je vois bien mon disque dur mais impossible de choisir l'option redimmensionner/deplacer dans gparted, est ce parce que je suis en liv-cd?
Sinon je vais voir un ami qui a windows7 car il me semble que l'on peut partitionner un disque externe depuis windows.
En ce qui concerne le disque externe ca devrait renter sans souci , c'est un disque 1To
Une fois partitionné, j'utilise cette commande si j'ai bien compris (bien evidemment en respectant le nom de mes disques)
Les commandes de base pour une duplication de ce qui peut être lu est

sudo  ddrescue        -f    -n         /dev/sdsd"le C abimé"         /dev/sd"le C neuf"      journal
sudo  ddrescue   -d   -f    -r3        /dev/sdsd"le C abimé"         /dev/sd"le C neuf"      journal

Je vous tiens au courant de l'avancement ......

Hors ligne

#47 Le 26/07/2015, à 13:49

Bougron

Re : Unable to acces Systeme

Bonjour
Non ce n'est pas lié au fait que tu es en live CD.
C'est simplement que tu as du consulter le disque ou qu'il a été monté automatiquement
    Dans Gparted, positionné sur la partition, Tu fais un clic Droit, et tu choisis l'option 'démonter'.
    Après cela doit marcher.


Ajout, Lorsque cette duplication sera terminée, La commande de contrôle CHKDSK pourra se faire avec le windows 7  de ton ami.

Dernière modification par Bougron (Le 26/07/2015, à 14:17)

Hors ligne