How do I restore important data for image.dd? Photorec will lose file names and will scatter the information











up vote
1
down vote

favorite












A few days ago I was in a middle of copying or cutting folders and data to my external hard drive and it was corrupted.



I have tried to locate the lost information on Test Disk but I have now lost it because it has already been over written. The file is 0. 0. copy and completed.



I have now only have the image.dd file. How can I restore this to it's normal folders and files without losing the names? Many thanks.










share|improve this question






















  • Please, at least clarify what file system type you are talking about. Thank you. :)
    – Andrea Lazzarotto
    Dec 8 at 21:42















up vote
1
down vote

favorite












A few days ago I was in a middle of copying or cutting folders and data to my external hard drive and it was corrupted.



I have tried to locate the lost information on Test Disk but I have now lost it because it has already been over written. The file is 0. 0. copy and completed.



I have now only have the image.dd file. How can I restore this to it's normal folders and files without losing the names? Many thanks.










share|improve this question






















  • Please, at least clarify what file system type you are talking about. Thank you. :)
    – Andrea Lazzarotto
    Dec 8 at 21:42













up vote
1
down vote

favorite









up vote
1
down vote

favorite











A few days ago I was in a middle of copying or cutting folders and data to my external hard drive and it was corrupted.



I have tried to locate the lost information on Test Disk but I have now lost it because it has already been over written. The file is 0. 0. copy and completed.



I have now only have the image.dd file. How can I restore this to it's normal folders and files without losing the names? Many thanks.










share|improve this question













A few days ago I was in a middle of copying or cutting folders and data to my external hard drive and it was corrupted.



I have tried to locate the lost information on Test Disk but I have now lost it because it has already been over written. The file is 0. 0. copy and completed.



I have now only have the image.dd file. How can I restore this to it's normal folders and files without losing the names? Many thanks.







hard-drive backup data-recovery restore dd






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 1 at 15:20









LifeIsATest

124




124












  • Please, at least clarify what file system type you are talking about. Thank you. :)
    – Andrea Lazzarotto
    Dec 8 at 21:42


















  • Please, at least clarify what file system type you are talking about. Thank you. :)
    – Andrea Lazzarotto
    Dec 8 at 21:42
















Please, at least clarify what file system type you are talking about. Thank you. :)
– Andrea Lazzarotto
Dec 8 at 21:42




Please, at least clarify what file system type you are talking about. Thank you. :)
– Andrea Lazzarotto
Dec 8 at 21:42










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Image of a partition



If the image.dd file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.



sudo mkdir /mnt/pt1
sudo mount -o loop image.dd /mnt/pt1
cd /mnt/pt1
ls -l *
...


Image of a whole drive



If the image.dd file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed with kpartx.



In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.



You can do that with dd (simple but risky], or with mkusb, which 'wraps a safety belt around dd' by helping you identify the target drive and giving you a final checkpoint.



In Windows there is Win32DiskImager that can also clone with a final checkpoint.



After restoring you can connect the drive,




  • either while running an operating system, and mount the partition(s), browse and read files there,

  • or boot from the drive, if it a system that can boot your computer, and get into its partition(s), browse and read files there.






share|improve this answer























  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:04










  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:06










  • @JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
    – sudodus
    Dec 2 at 15:08










  • Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
    – Xen2050
    Dec 3 at 10:23










  • @sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
    – LifeIsATest
    Dec 9 at 0:12











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097693%2fhow-do-i-restore-important-data-for-image-dd-photorec-will-lose-file-names-and%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Image of a partition



If the image.dd file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.



sudo mkdir /mnt/pt1
sudo mount -o loop image.dd /mnt/pt1
cd /mnt/pt1
ls -l *
...


Image of a whole drive



If the image.dd file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed with kpartx.



In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.



You can do that with dd (simple but risky], or with mkusb, which 'wraps a safety belt around dd' by helping you identify the target drive and giving you a final checkpoint.



In Windows there is Win32DiskImager that can also clone with a final checkpoint.



After restoring you can connect the drive,




  • either while running an operating system, and mount the partition(s), browse and read files there,

  • or boot from the drive, if it a system that can boot your computer, and get into its partition(s), browse and read files there.






share|improve this answer























  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:04










  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:06










  • @JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
    – sudodus
    Dec 2 at 15:08










  • Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
    – Xen2050
    Dec 3 at 10:23










  • @sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
    – LifeIsATest
    Dec 9 at 0:12















up vote
0
down vote













Image of a partition



If the image.dd file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.



sudo mkdir /mnt/pt1
sudo mount -o loop image.dd /mnt/pt1
cd /mnt/pt1
ls -l *
...


Image of a whole drive



If the image.dd file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed with kpartx.



In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.



You can do that with dd (simple but risky], or with mkusb, which 'wraps a safety belt around dd' by helping you identify the target drive and giving you a final checkpoint.



In Windows there is Win32DiskImager that can also clone with a final checkpoint.



After restoring you can connect the drive,




  • either while running an operating system, and mount the partition(s), browse and read files there,

  • or boot from the drive, if it a system that can boot your computer, and get into its partition(s), browse and read files there.






share|improve this answer























  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:04










  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:06










  • @JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
    – sudodus
    Dec 2 at 15:08










  • Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
    – Xen2050
    Dec 3 at 10:23










  • @sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
    – LifeIsATest
    Dec 9 at 0:12













up vote
0
down vote










up vote
0
down vote









Image of a partition



If the image.dd file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.



sudo mkdir /mnt/pt1
sudo mount -o loop image.dd /mnt/pt1
cd /mnt/pt1
ls -l *
...


Image of a whole drive



If the image.dd file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed with kpartx.



In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.



You can do that with dd (simple but risky], or with mkusb, which 'wraps a safety belt around dd' by helping you identify the target drive and giving you a final checkpoint.



In Windows there is Win32DiskImager that can also clone with a final checkpoint.



After restoring you can connect the drive,




  • either while running an operating system, and mount the partition(s), browse and read files there,

  • or boot from the drive, if it a system that can boot your computer, and get into its partition(s), browse and read files there.






share|improve this answer














Image of a partition



If the image.dd file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.



sudo mkdir /mnt/pt1
sudo mount -o loop image.dd /mnt/pt1
cd /mnt/pt1
ls -l *
...


Image of a whole drive



If the image.dd file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed with kpartx.



In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.



You can do that with dd (simple but risky], or with mkusb, which 'wraps a safety belt around dd' by helping you identify the target drive and giving you a final checkpoint.



In Windows there is Win32DiskImager that can also clone with a final checkpoint.



After restoring you can connect the drive,




  • either while running an operating system, and mount the partition(s), browse and read files there,

  • or boot from the drive, if it a system that can boot your computer, and get into its partition(s), browse and read files there.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 1 at 16:13

























answered Dec 1 at 16:07









sudodus

22.3k32872




22.3k32872












  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:04










  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:06










  • @JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
    – sudodus
    Dec 2 at 15:08










  • Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
    – Xen2050
    Dec 3 at 10:23










  • @sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
    – LifeIsATest
    Dec 9 at 0:12


















  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:04










  • Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
    – LifeIsATest
    Dec 2 at 14:06










  • @JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
    – sudodus
    Dec 2 at 15:08










  • Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
    – Xen2050
    Dec 3 at 10:23










  • @sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
    – LifeIsATest
    Dec 9 at 0:12
















Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
– LifeIsATest
Dec 2 at 14:04




Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
– LifeIsATest
Dec 2 at 14:04












Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
– LifeIsATest
Dec 2 at 14:06




Thank you very much. Don't know where to start but I try. Do you have any further videos that I can do it? I use linux instead of microsoft. Thank you again.
– LifeIsATest
Dec 2 at 14:06












@JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
– sudodus
Dec 2 at 15:08




@JonA, Did you create the image file image.dd? In that case you should know, if it is an image of a partition or of the whole drive. If you don't know, you can test, if you get something useful when trying to mount the image file. Otherwise you can restore from the image file to a drive according to the details in my answer. Good luck :-)
– sudodus
Dec 2 at 15:08












Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
– Xen2050
Dec 3 at 10:23




Mount probably doesn't need the "-o loop", it's man page says "The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known for libblkid". And could ask file what it thinks of the image, it says this about an image containing the first few megs of an MBR device (like /dev/sda): "DOS/MBR boot sector; partition 1 : ID=0x83...; partition 2 :...", and strangely just this about a partition image (like /dev/sda1): "DOS/MBR boot sector" (but I think that disk might be weird). Or could ask gparted or fdisk...
– Xen2050
Dec 3 at 10:23












@sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
– LifeIsATest
Dec 9 at 0:12




@sudodus I tried to sudo mount ~/home/*username*/Desktop/image.dd /media/disk -t ext3 -o loop still doesnt work. It says. "mount: /media/disk: failed to setup loop device for /home/jonnzen/home/*username*/Desktop/image.dd."
– LifeIsATest
Dec 9 at 0:12


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097693%2fhow-do-i-restore-important-data-for-image-dd-photorec-will-lose-file-names-and%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Ellipse (mathématiques)

Quarter-circle Tiles

Mont Emei