Cloning a hard drive with ddrescue

Discussion in 'Technical Discussion' started by Aerosol, Aug 8, 2015.

  1. Aerosol

    Aerosol

    FML and FU2 Moderator
    10,624
    85
    28
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    I asked this in IRC but I can't keep tabs on an IRC chat on my phone while driving for my job!

    I'm trying to use ddrescue to clone my failing hard drive (/dev/sda) to a new one I just bought (/dev/sdb). This is the ddrescue command I tried to use:

    Code (Text):
    1. ddrescue -r3 -n -f -v /dev/sda /dev/sdb recovery.log
    And it spat out:
    Code (Text):
    1.  
    2. ddrescue: Can't open input file: Permission denied
    I dicked around some more and tried to mount my new hdd with:
    Code (Text):
    1.  
    2. sudo mount -o /dev/sdb /media/3TB
    and got:
    Code (Text):
    1.  
    2. mount: /dev/sdb is write-protected, mounting read-only
    3. mount: wrong fs type, bad option, bad superblock on /dev/sdb,
    4.             missing codepage or helper program, or other error
    I'm not sure why this new hard drive is write-protected. There aren't any jumpers on it or anything. I'm pretty sure I just screwed up somewhere though.
     
  2. Aerosol

    Aerosol

    FML and FU2 Moderator
    10,624
    85
    28
    Not where I want to be.
    Sonic (?): Coming summer of 2055...?
    Yea I did. And I made another super stupid mistake :v

    The HDD is probably still completely shot though. A 999gb errsize on a 1tb HDD isn't a good thing! Gerbil's got me trying something else later so I don't think this needs to be here anymore. Thanks.
     
  3. Lopson

    Lopson

    Member
    It sounds like your filesystem is in an inconsistent state. Have you tried repairing it before mounting? You can do that with fsck or some other filesystem-specific tool (for example, XFS uses xfs_repair).