5

I made an image of my NTFS partition before I formatted, but now it won't mount. I'm pretty sure I've mounted this image before.

root@z:/var/backup# mkdir Storage-disk
root@z:/var/backup# mount Storage-disk.img Storage-disk
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read vcn 0x2: Input/output error
Failed to mount '/var/backup/Storage-disk.img': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.

I've tried running ntfsfix on the image, but no dice.

root@z:/var/backup# ntfsfix Storage-disk.img
Mounting volume... pread: Input/output error
Failed to calculate number of free MFTs: Input/output error.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
pread: Input/output error
Failed to calculate number of free MFTs: Input/output error.
Remount failed: Input/output error.

Needless to say, I really want this backup to work :-( Please help!

Update: ntfsmount says this:

root@z:/var/backup# ntfsmount Storage-disk.img Storage-disk
pread: Input/output error
Failed to calculate number of free MFTs: Input/output error.
Failed to mount '/var/backup/Storage-disk.img': Input/output error.
NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
made to NTFS by this software.
Mount failed.

How do I run chkdsk /f on an image? Do I have to create a partition and write the image on it? How do I do that?

Zanna
  • 70,465

2 Answers2

3

Have you tried running a scandisk in windows? That's how I've always fixed faulty partitions.

  • Thanks, but how do I make a partition of it so Windows can scan it? – Markus Hedlund Oct 03 '10 at 22:38
  • @Znarkus: You could try to move it to a partition from which you can access it in Windows and using something like DaemonTools to mount the image. – Bobby Oct 21 '10 at 20:19
  • NICE! Installed a nifty application (evaluation) called Mount Image Pro. It could mount the partitions images without any problem :-) – Markus Hedlund Nov 21 '10 at 14:38
  • Hm. But I can't seem to access some of the files. How do I mount a dd image with Daemon tools, or do you have any other suggestion? – Markus Hedlund Nov 21 '10 at 15:14
1

This could also be due to an error in the filesystem containing the image (basically the device on which storage-disk.img is stored). Did you try checking that device with fsck ?

If that is successful, the following are the options :

  1. Make a copy (using cp or ntfsclone) and try to mount it with force option
  2. Use TestDisk
  3. Repair via ChkDsk by running windows on VM.
koushik
  • 5,072
  • I now ran xfs_check, but it didn't detect any errors on the partition storage-disk.img is stored. – Markus Hedlund Oct 03 '10 at 23:22
  • In that case there are 2 options
    1. If you cannot run windows in a VM, then you can try to make a copy of the image and try to force-mount it.

    2. If you can run windows in a VM, try to use chkdsk to repair it.

    Let me know which is easier for you, I will expand my answer.

    – koushik Oct 04 '10 at 07:28
  • Do I need a Windows VM? I've got plenty of Windows machines around. If I can't get something like Daemon tools to work, I was thinking of dd the image back to a "real" partition on a disk. Do you know how to do that, or do you have any other suggestions? – Markus Hedlund Nov 21 '10 at 15:17