I do not see my DVD, I do not know how to access its corrupted data.
What is the way to recover the data with command line?
1 Answer
from this source
get the path of your DVD with
blkid
#example: blkid /dev/sda1: UUID="4ea68146-163e-4ce6-aeda-4cc2d338c2ed" TYPE="ext4" /dev/sdb1: UUID="e1977a53-b9f4-4c96-9251-84af259d06b4" TYPE="swap" /dev/sdb5: UUID="a85b1b95-c5ce-4557-9ca4-503b1a9ddcc8" TYPE="ext4" /dev/sdb6: UUID="c71a7601-04b8-4808-8f7b-ec967ac967ba" TYPE="ext4" /dev/sr0: LABEL="Disc" TYPE="udf"
sda
andsdb
are Hard Disk./dev/sr0
is the DVD
then to acces the DVD content, use
foremost
(Install it withsudo apt-get install foremost
)
List the content of the DVD (even the erased one):sudo foremost -w /dev/sr0 Processing: /dev/sr0 |********************************************|
Result is available with:
sudo cat ~/output/audit.txt | more Foremost version 1.5.7 by Jesse Kornblum, Kris Kendall, and Nick Mikus Audit File Foremost started at Tue Jun 14 23:25:18 2016 Invocation: foremost -w /dev/sr0 Output directory: /home/yourlogon/output Configuration file: /etc/foremost.conf ------------------------------------------------------------------ File: /dev/sr0 Start: Tue Jun 14 23:25:18 2016 Length: 4 GB (4573593600 bytes) Num Name (bs=512) Size File Offset Comment 0: 1152.jpg 2 MB 589824 1: 7168.jpg 2 MB 3670016 2: 13292.jpg 2 MB 6805504 3: 19368.jpg 2 MB 9916416 4: 24808.jpg 2 MB 12701696 5: 30464.jpg 2 MB 15597568 6: 35132.jpg 2 MB 17987584 7: 40868.jpg 2 MB 20924416 8: 46916.jpg 2 MB 24020992 ...
To recover all data
sudo foremost all /dev/sr0 Processing: /dev/sr0 |********************************************|
everything is then available in
~/output/
- And to make files available
sudo chmod -R 777 ~/output/
-
Foremost is a file carver, it should be used as a last resort when the file system is not available. Was this the scenario? I.e. file system corruption? Jun 15, 2016 at 11:25
-
@AndreaLazzarotto, In this case: a friend tried to re-write on the DVD, and his data get corrupted, he could not access his data anymore (on Windows). Loading his DVD, I couldn't see any data too on Ubuntu, so I tried for this process of recovery and it worked.– BorisJun 15, 2016 at 21:07
-
OK but my doubt is... Why not trying with the standard tools like Testdisk first? :-) I am just curious. If the scenario was that of deep corruption maybe it should be stated in the answer. Jun 17, 2016 at 8:55
-
@AndreaLazzarotto , i don't know
testdisk
. Fill free to edit the answer to improve it, or propose your answer to share.– BorisJun 17, 2016 at 17:02