Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42

Thread: How To Limit ddrescue to a Partition?

  1. #31
    Join Date
    Aug 2007
    Beans
    66

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by pmi2 View Post
    @bardo2: Any idea how gparted editor can see the partition, and @ the same time, the OP said ddrescue does not work using /dev/sda4 as a source? Have you ever come across that? (I have not)
    that is weird, ain't it!? But, gparted knows the partition is bad, as shown in the image in my OP.

  2. #32
    Join Date
    Aug 2007
    Beans
    66

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by pmi2 View Post
    Good question. Meaning using ddrescue to produce a .img file of a "good" (error-free) partition? I think so, but I honestly don't remember if I ever compared the exact size down to the byte.

    If nobody else has the answer, I can give that a shot later today after working hours. Should be an interesting test. I can try a 60Gb partition from one HD, to a second, larger drive.
    That would be awesome!
    I may have misunderstood, but i think your previous test was based on comparing sizes, right?

    thx

  3. #33
    Join Date
    Mar 2015
    Location
    europe
    Beans
    Hidden!
    Distro
    Ubuntu Gnome

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by johny why View Post
    i think you are misunderstanding what this thread is about. Thanks for you comments, but they do not address the topic of this thread.

    best
    Oh, ok, let me apologize. You may be correct (i may be involved in too many of those simultaneously and some confusion could be possible).

    So, since i missed some relevant parts apparently, i am out. Sorry for having disturbed unintentionally.

    Good luck to all of you.

  4. #34
    Join Date
    Feb 2015
    Beans
    121
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by johny why View Post
    that is weird, ain't it!? But, gparted knows the partition is bad, as shown in the image in my OP.
    Yes, the partition definitely is bad, however it does not explain why running ddrescue the most common way did not work for you (per your second post in this thread). You said that using /dev/sda4 did not work. Despite that, gparted finds the partition name, start, and end. All that should be needed for ddrescue to attempt a recovery. If gparted can find it, so should ddrescue.

    Quote Originally Posted by johny why View Post
    That would be awesome!
    ...i think your previous test was based on comparing sizes, right?...
    Yes it was, but the number of bytes was set by the arguments of the command, and it was a small part of a whole partition, to save time.

    I meant comparing the size of /dev/sda4 (for example), to the size of an output file from something like

    ddrescue /dev/sda4 <recoveredfile>.img <recoveredfile>.log

    This would be the most common way to recover one out of several partitions.

  5. #35
    Join Date
    Feb 2015
    Beans
    121
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How To Limit ddrescue to a Partition?

    I ran ddrescue, partition as source, image file as destination, and the image file is exactly the same size as the partition. Exact meaning same number of bytes.

    peter@Flattop:~$ sudo ddrescue /dev/sda6 /media/Archive/Backup/recovered.img /media/Archive/Backup/recovered.log

    GNU ddrescue 1.17
    Press Ctrl-C to interrupt
    rescued: 60393 MB, errsize: 0 B, current rate: 30081 kB/s
    ipos: 60393 MB, errors: 0, average rate: 47072 kB/s
    opos: 60393 MB, time since last successful read: 0 s
    Finished

    peter@Flattop:~$ ls -l /media/Archive/Backup/recovered.img
    -rw-rw-rw- 1 root root 60393783296 Mar 25 23:32 /media/Archive/Backup/recovered.img
    It took about 23 minutes for a 60Gb partition with no errors. i would say try it again. Reboot, make sure the source partition is not mounted, and don't even try to access it before you run ddrescue. It may take a very long time with retries if there are many errors.

  6. #36
    Join Date
    May 2010
    Location
    uk
    Beans
    9,299
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How To Limit ddrescue to a Partition?

    Hi

    I have not read all this thread so i don't know if this information is redundant or not but i may as well put it out there...

    If you want to know the start, end and size of your partitions in bytes then use parted.

    Code:
    sudo parted /dev/sda "unit B print"
    Change sda if required. Here's mine.

    Code:
    matthew-laptop:/home/matthew:6 % sudo parted /dev/sda "unit B print"
    Model: ATA ST320LT012-9WS14 (scsi)
    Disk /dev/sda: 320072933376B
    Sector size (logical/physical): 512B/4096B
    Partition Table: gpt
    
    Number  Start          End            Size           File system     Name  Flags
     1      1048576B       10485759999B   10484711424B   ext4
     2      10485760000B   316236890111B  305751130112B  ext4
     3      316236890112B  320072581119B  3835691008B    linux-swap(v1)
    
    matthew-laptop:/home/matthew:6 %
    You can then plug these values into ddrescue to recovery the partition and then try to mount it as a loop device. However i suspect it will not mount. Still it is a much better idea to try data recovery on an image.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  7. #37
    Join Date
    Feb 2015
    Beans
    121
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: How To Limit ddrescue to a Partition?

    ...You can then plug these values into ddrescue to recovery the partition...
    I believe the thread started with a question on how exactly to do that with ddrescue, once you have the start and end of the partition. The final goal was to copy some data from the image file, assuming it could be mounted, or copied to another disk. All this assuming that you could only use the abosolute start and end as ddrescue arguments, when using /dev/sda4/ did not work.

    In other words, finding the start and end was not the problem, the q. was how best to make use of it.

  8. #38
    Join Date
    May 2010
    Location
    uk
    Beans
    9,299
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How To Limit ddrescue to a Partition?

    Hi

    Quote Originally Posted by pmi2 View Post
    I believe the thread started with a question on how exactly to do that with ddrescue, once you have the start and end of the partition. The final goal was to copy some data from the image file, assuming it could be mounted, or copied to another disk. All this assuming that you could only use the abosolute start and end as ddrescue arguments, when using /dev/sda4/ did not work.

    In other words, finding the start and end was not the problem, the q. was how best to make use of it.
    I was replying to the other thread the OP opened on this topic and, as i said, i did not read all this thread.

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  9. #39
    Join Date
    Aug 2007
    Beans
    66

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by matt_symes View Post
    If you want to know the start, end and size of your partitions in bytes then use parted.

    Code:
    sudo parted /dev/sda "unit B print"
    hey Matt

    i tried this, and got:
    Code:
    # parted /dev/sdc "unit B print"
    Warning: /dev/sdc contains GPT signatures, indicating that it has a GPT table.
    However, it does not have a valid fake msdos partition table, as it should.
    Perhaps it was corrupted -- possibly by a program that doesn't understand GPT
    partition tables.  Or perhaps you deleted the GPT table, and are now using an
    msdos partition table.  Is this a GPT partition table?
    Yes/No?
    i hit ctrl-C there, and got:

    Code:
    Model: Apricorn  (scsi)
    Disk /dev/sdc: 320072933376B
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    Number  Start          End            Size           File system  Name                          Flags
     1      1048576B       315621375B     314572800B     fat32        EFI system partition          boot
     2      315621376B     1259339775B    943718400B     ntfs         Basic data partition          hidden, diag
     3      1259339776B    1393557503B    134217728B                  Microsoft reserved partition  msftres
     4      1393557504B    298587258879B  297193701376B  ntfs         Basic data partition
     5      298587258880B  320072581119B  21485322240B   ntfs         Basic data partition          hidden, diag
    does this tell us anything new about the drive?
    i want to recover the big one, #4 (and #5 if i can)
    btw, what's "unit B print"?
    Last edited by johny why; March 29th, 2015 at 07:34 PM.

  10. #40
    Join Date
    Aug 2007
    Beans
    66

    Re: How To Limit ddrescue to a Partition?

    Quote Originally Posted by pmi2 View Post
    i would say try it again. Reboot, make sure the source partition is not mounted, and don't even try to access it before you run ddrescue.
    Didn't work. ddrescue says no such file or device.

Page 4 of 5 FirstFirst ... 2345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •