Find the answer to your Linux question:
Results 1 to 5 of 5
My hard drive failed a few days ago, and a new new hard drive has been put in. The original was a 120GB and this is a 320GB. I am ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3

    Get data from .img file


    My hard drive failed a few days ago, and a new new hard drive has been put in. The original was a 120GB and this is a 320GB. I am using CentOS 5. I used ddrescue to make an image file of the corrupt partition. It worked, successfully; it only said there were 3 errors with a total of around 192kb.

    The actual file is 120GB and I try to mount it with this command:

    Code:
    mount -t ext3 -o loop /hdc2.img /mnt/drive2
    And it gives me this error:

    Code:
    mount: wrong fs type, bad option, bad superblock on /dev/loop0,
           missing codepage or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    I then type in dmesg | tail and it tells me "VFS: Can't find ext3 filesystem on dev loop0."

    I believe I need to repair the disc image for it to work properly.

    I am ultimately trying to get as much data as I can off of the image.

    It would be great if anyone could help me.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    What error message does it throw when you dont specify any filesystem?
    Code:
    mount  -o loop /hdc2.img /mnt/drive2
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    I'm not familiar with ddrescue but I don't think the image file is mountable. I found this link which I think describes pretty much what you're trying to achieve.

  4. #4
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3
    @ devils casper: When I don't specify a filesystem this is what it says:

    Code:
    mount: you must specify the filesystem type
    @ scm: I've already made the image of the hard drive, but I do not want to put it onto another partition, I want to only view/extract data out of it.

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    3
    Well, I used ddrescue to put the image onto a hard drive partition. Worked successfully but the drive wouldn't mount. I tried using fsck.ext3 to repair it but it told me that the magic numbers on the superblocks were incorrect, or something to that extent. So I run this through "mke2fs -n /dev/hdc" and it gives me all of the superblocks and I try to run them through e2fsck, but to no avail.

    I then run "mke2fs /dev/hdc" and it goes through and now I can use fsck.ext3. I run that with the -y parameter as there are a million different inodes and such that are repaired.

    I then mount the /dev/hdc and I only see a folder called lost+found. I open it up and it has a few files with # in front of them and then a few numbers. One of the files is around 4 GB.

    Something has to be corrupt, and I don't know what to do to fix it.

    It would be really great if someone could help me out!

Posting Permissions

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