Recover files after Ubuntu Installation
Due to some problems, I tried installing Ubuntu in my machine. But accidentally I installed it in the same partition where my earlier installation was. My data was inside the home directory in the same partition. So all got wiped.
Is there any way to recover the data? I am trying to use Testdisk. It is analyzing the disk for several hours. I am not sure how to use it properly. Is it the right tool? Or should I try any other tool?
data-recovery
add a comment |
Due to some problems, I tried installing Ubuntu in my machine. But accidentally I installed it in the same partition where my earlier installation was. My data was inside the home directory in the same partition. So all got wiped.
Is there any way to recover the data? I am trying to use Testdisk. It is analyzing the disk for several hours. I am not sure how to use it properly. Is it the right tool? Or should I try any other tool?
data-recovery
add a comment |
Due to some problems, I tried installing Ubuntu in my machine. But accidentally I installed it in the same partition where my earlier installation was. My data was inside the home directory in the same partition. So all got wiped.
Is there any way to recover the data? I am trying to use Testdisk. It is analyzing the disk for several hours. I am not sure how to use it properly. Is it the right tool? Or should I try any other tool?
data-recovery
Due to some problems, I tried installing Ubuntu in my machine. But accidentally I installed it in the same partition where my earlier installation was. My data was inside the home directory in the same partition. So all got wiped.
Is there any way to recover the data? I am trying to use Testdisk. It is analyzing the disk for several hours. I am not sure how to use it properly. Is it the right tool? Or should I try any other tool?
data-recovery
data-recovery
asked Mar 14 at 2:13
cryptexcodecryptexcode
1
1
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
TestDisk is a much better tool than PhotoRec. However, the only problem with TestDisk is that it doesn't always recover all the deleted files. So, if you accidentally reformat a partition, TestDisk can recover thousands of files without missing a single file, but if you deleted a file by sending it to the Recycle Bin (Trash), and then emptying the Trash, TestDisk might not be able to recover it for you in all the cases.
So use TestDisk first, and if you recovered all of the deleted files with TestDisk, then great, else you can recover the rest of the files using PhotoRec.
PhotoRec can selectively recover files based on their filetype(s), but PhotoRec / TestDisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
Here are the steps to recover files based on filetype using PhotoRec:
Install Test disk:
sudo apt-get install testdiskLaunch PhotoRec. Open a terminal and launch photorec (as root):
sudo photorecSelect Hard Disk
Select the partition type. If your hard disk has Linux partitions, then select
[Intel]Select filetype option
Move to [File Opt] and press the Enter key. Here you can disable all file types by pressing s key. Use space to toggle the check button. Select filetype(s) to recover.
- Select options
Photorec also has a list of different options. Under normal circumstances, you don’t need to modify them.
- Select partition
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press the Enter key
- Select filesystem type
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise, if you are recovering files from a partition formatted as FAT or NTFS select Other
- Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole
- Select a directory for the recovered files
Select the path where the recovered files will be stored. Then press Y key
Once done, Photorec will show how many files it has recovered.
Note: Another Forum thread [closed], but it might be able to help you: Recovering Data
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125480%2frecover-files-after-ubuntu-installation%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
TestDisk is a much better tool than PhotoRec. However, the only problem with TestDisk is that it doesn't always recover all the deleted files. So, if you accidentally reformat a partition, TestDisk can recover thousands of files without missing a single file, but if you deleted a file by sending it to the Recycle Bin (Trash), and then emptying the Trash, TestDisk might not be able to recover it for you in all the cases.
So use TestDisk first, and if you recovered all of the deleted files with TestDisk, then great, else you can recover the rest of the files using PhotoRec.
PhotoRec can selectively recover files based on their filetype(s), but PhotoRec / TestDisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
Here are the steps to recover files based on filetype using PhotoRec:
Install Test disk:
sudo apt-get install testdiskLaunch PhotoRec. Open a terminal and launch photorec (as root):
sudo photorecSelect Hard Disk
Select the partition type. If your hard disk has Linux partitions, then select
[Intel]Select filetype option
Move to [File Opt] and press the Enter key. Here you can disable all file types by pressing s key. Use space to toggle the check button. Select filetype(s) to recover.
- Select options
Photorec also has a list of different options. Under normal circumstances, you don’t need to modify them.
- Select partition
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press the Enter key
- Select filesystem type
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise, if you are recovering files from a partition formatted as FAT or NTFS select Other
- Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole
- Select a directory for the recovered files
Select the path where the recovered files will be stored. Then press Y key
Once done, Photorec will show how many files it has recovered.
Note: Another Forum thread [closed], but it might be able to help you: Recovering Data
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
add a comment |
TestDisk is a much better tool than PhotoRec. However, the only problem with TestDisk is that it doesn't always recover all the deleted files. So, if you accidentally reformat a partition, TestDisk can recover thousands of files without missing a single file, but if you deleted a file by sending it to the Recycle Bin (Trash), and then emptying the Trash, TestDisk might not be able to recover it for you in all the cases.
So use TestDisk first, and if you recovered all of the deleted files with TestDisk, then great, else you can recover the rest of the files using PhotoRec.
PhotoRec can selectively recover files based on their filetype(s), but PhotoRec / TestDisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
Here are the steps to recover files based on filetype using PhotoRec:
Install Test disk:
sudo apt-get install testdiskLaunch PhotoRec. Open a terminal and launch photorec (as root):
sudo photorecSelect Hard Disk
Select the partition type. If your hard disk has Linux partitions, then select
[Intel]Select filetype option
Move to [File Opt] and press the Enter key. Here you can disable all file types by pressing s key. Use space to toggle the check button. Select filetype(s) to recover.
- Select options
Photorec also has a list of different options. Under normal circumstances, you don’t need to modify them.
- Select partition
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press the Enter key
- Select filesystem type
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise, if you are recovering files from a partition formatted as FAT or NTFS select Other
- Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole
- Select a directory for the recovered files
Select the path where the recovered files will be stored. Then press Y key
Once done, Photorec will show how many files it has recovered.
Note: Another Forum thread [closed], but it might be able to help you: Recovering Data
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
add a comment |
TestDisk is a much better tool than PhotoRec. However, the only problem with TestDisk is that it doesn't always recover all the deleted files. So, if you accidentally reformat a partition, TestDisk can recover thousands of files without missing a single file, but if you deleted a file by sending it to the Recycle Bin (Trash), and then emptying the Trash, TestDisk might not be able to recover it for you in all the cases.
So use TestDisk first, and if you recovered all of the deleted files with TestDisk, then great, else you can recover the rest of the files using PhotoRec.
PhotoRec can selectively recover files based on their filetype(s), but PhotoRec / TestDisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
Here are the steps to recover files based on filetype using PhotoRec:
Install Test disk:
sudo apt-get install testdiskLaunch PhotoRec. Open a terminal and launch photorec (as root):
sudo photorecSelect Hard Disk
Select the partition type. If your hard disk has Linux partitions, then select
[Intel]Select filetype option
Move to [File Opt] and press the Enter key. Here you can disable all file types by pressing s key. Use space to toggle the check button. Select filetype(s) to recover.
- Select options
Photorec also has a list of different options. Under normal circumstances, you don’t need to modify them.
- Select partition
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press the Enter key
- Select filesystem type
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise, if you are recovering files from a partition formatted as FAT or NTFS select Other
- Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole
- Select a directory for the recovered files
Select the path where the recovered files will be stored. Then press Y key
Once done, Photorec will show how many files it has recovered.
Note: Another Forum thread [closed], but it might be able to help you: Recovering Data
TestDisk is a much better tool than PhotoRec. However, the only problem with TestDisk is that it doesn't always recover all the deleted files. So, if you accidentally reformat a partition, TestDisk can recover thousands of files without missing a single file, but if you deleted a file by sending it to the Recycle Bin (Trash), and then emptying the Trash, TestDisk might not be able to recover it for you in all the cases.
So use TestDisk first, and if you recovered all of the deleted files with TestDisk, then great, else you can recover the rest of the files using PhotoRec.
PhotoRec can selectively recover files based on their filetype(s), but PhotoRec / TestDisk can't selectively scan an individual directory for lost files unless you had mounted a whole hard drive partition as this directory. In some cases, the filename is stored in the file itself. PhotoRec tries to recover the filename in this case, but most of the time PhotoRec can't recover the filenames.
Here are the steps to recover files based on filetype using PhotoRec:
Install Test disk:
sudo apt-get install testdiskLaunch PhotoRec. Open a terminal and launch photorec (as root):
sudo photorecSelect Hard Disk
Select the partition type. If your hard disk has Linux partitions, then select
[Intel]Select filetype option
Move to [File Opt] and press the Enter key. Here you can disable all file types by pressing s key. Use space to toggle the check button. Select filetype(s) to recover.
- Select options
Photorec also has a list of different options. Under normal circumstances, you don’t need to modify them.
- Select partition
Move the selector up or down to the partition from which you have removed the file(s). Then select [Search] and press the Enter key
- Select filesystem type
If you are using Linux, it's going to be ext2/ext3/ext4, so the default selection is ext2/ext3. Otherwise, if you are recovering files from a partition formatted as FAT or NTFS select Other
- Select space for analysis.
Select Free if you didn’t write to that partition after removing the particular file, otherwise select Whole
- Select a directory for the recovered files
Select the path where the recovered files will be stored. Then press Y key
Once done, Photorec will show how many files it has recovered.
Note: Another Forum thread [closed], but it might be able to help you: Recovering Data
answered Mar 14 at 4:41
Manu MathurManu Mathur
54129
54129
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
add a comment |
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Thank you so much for taking the time to help me. I ran TestDisc after starting the machine. The analysis took 6/7 hours, but I couldn't proceed from there. I mean I couldn't find anything that can recover the file. It was just showing start and end blocks. Do I need to use it with a bootable USB drive running Ubuntu for trial?
– cryptexcode
Mar 14 at 7:58
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Your welcome @cryptexcode. If the answer helps you, kindly mark it as correct, so that even other users can take help from it.
– Manu Mathur
Mar 14 at 7:59
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Can you please answer the issue in my comment? Thanks.
– cryptexcode
Mar 14 at 8:04
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Yes, the TestDisk surely takes time. For me, it took more than 10 hours in total. The concept with Formatting says: if you accidentally delete data on a partition and then perform new operations on it, then your chances of recovering previously deleted data reduces gradually. Still, if you can try using PhotoRec, maybe you do get something out of it.
– Manu Mathur
Mar 14 at 8:09
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
Thanks. I will try it. Thanks again.
– cryptexcode
Mar 14 at 8:59
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1125480%2frecover-files-after-ubuntu-installation%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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