I am trying to ddrescue from a .img file which contains image of my disposed HDD.
So here are my lsblk
of entire system right now:
/media/Dummy/Image.img
contains the target image that I want to restore.
/dev/sda/sda1
is the location where I am intending to restore all disk information. But again this is the same place from where I am right now running my operating system. Whatever online guide I have seen so far is basically saying to just perform:
ddrescue -f /media/Dummy/Image.img /dev/sda /media/CentOS6/rescue.logfile
I knew this was impractical, but still I proceeded with that (being virtualized) and crashed my entire system. I am still not sure whether I followed the instruction correctly or not.
I also have created another empty disk space
/media/restores
where now I'm intending to restore the stuffs. But this one also not works.
According to instructions I need to first unmount the target disk, that is umount /media/restores
and then proceed with ddrescue on that target:
ddrescue -f /media/Dummy/Image.img /dev/sda/sda3 /media/CentOS6/rescue.logfile
This says:
ddrescue: Can't open output file: Not a directory.
If I mount /dev/sda/sda3 and do the same thing:
ddrescue -f /media/Dummy/Image.img /dev/sda/sda3 /media/CentOS6/rescue.logfile
or, ddrescue -f /media/Dummy/Image.img /media/restores /media/CentOS6/rescue.logfile
I get the same error message: ddrescue: Can't open output file: Not a directory.
Can anyone help me understand ddrescue and how to do that correctly.