View previous topic :: View next topic |
Author |
Message |
jpsollie Guru
Joined: 17 Aug 2013 Posts: 322
|
Posted: Tue Aug 08, 2023 4:50 pm Post subject: data recovery on a buggy DVD drive |
|
|
It took me a while to figure out, but I REALLY consider this useful if you have a buggy DVD drive:
Remember the good old days when you could ask ddrescue to rip a DVD and it simply worked?
These days, some manufacturers even have issues built in into their firmware where the DVD drive shuts down when it reads an illegal sector.
This is a problem when you try to archive scratched DVDs ...
every time it encounters a read error, the drive reports a critical target error and stops.
You then have to cancel the job open the drive door, load the disc again and restart, hoping it will work this time.
Luckily, we're using an OS which allows us to control everything itself, and that's what I'm doing here.
There's a way to scan the disc and use the open/close door as a "reset" method so your drive can continue its job.
this only works for non copy-protected DVDs! if you're trying to rip some old movie using this technique, you're probably out of luck and better buy it, or buy a decent DVD drive.
we start at the beginning of the disc (sector 0):
Code: |
pc # current_sector=0
|
a cd/dvd sector is 2048 bytes, so it is important to set the block size.
we write data into an iso file.
Code: |
pc # dd if=/dev/sr0 of=/tmp/isoimage.iso bs=2048 skip=$current_sector seek=$current_sector status=progress; eject; eject -t;
|
when the drive blocks due to a read error, dd will report an IO error, and quit.
We open and close the door again ...
dd will report how many records ('sectors') it was able to read.
we simply add this amount to current_sector:
Code: |
pc # current_sector=$(($current_sector+amount)); echo $current_sector;
|
and run the dd command again ... again ... and again ... until you think "hey, $current_sector * 2048 is more or less the amount of data on my dvd"
you could automate the current_sector addition and use a loop, but I think it's a bad idea to not give the DVD drive a break ...
I hope this helps someone having a buggy DVD drive and wanting to rescue family pictures with it _________________ The power of Gentoo optimization (not overclocked): [img]https://www.passmark.com/baselines/V10/images/503714802842.png[/img] |
|
Back to top |
|
|
kolibri n00b
Joined: 27 Jul 2023 Posts: 27 Location: Boizenburg, Germany
|
Posted: Tue Aug 08, 2023 5:24 pm Post subject: |
|
|
to ddrescue copy-protected DVDs you just need to trigger dvdbackup (with installed libdvdcss) before attempting to ddrescue it, like this:
Code: | dvdbackup -i ${DEV} -I && ddrescue -d -p -n -N -b 2048 ${DEV} ${OUT}.{iso,map} |
Without the call of dvdbackup you will encounter lots of "bad sectors" but they aren't bad they are just encrypted. With dvdbackup the decryption keys will be loaded inside the drive (firmware) and ddrescue can read them.
dvdbackup has to be called every time the drive is resetted (through eject, reboot etc.) |
|
Back to top |
|
|
jpsollie Guru
Joined: 17 Aug 2013 Posts: 322
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54572 Location: 56N 3W
|
Posted: Tue Aug 08, 2023 6:52 pm Post subject: |
|
|
jpsollie,
If you have several copies of the DVD, damaged in different places, you can recover some tits from them all.
You may eves get it all back. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
jpsollie Guru
Joined: 17 Aug 2013 Posts: 322
|
Posted: Tue Aug 08, 2023 7:10 pm Post subject: |
|
|
NeddySeagoon wrote: | jpsollie,
If you have several copies of the DVD, damaged in different places, you can recover some tits from them all.
You may eves get it all back. |
yes ... or simply buy a decent DVD drive which doesn't stop the motor when a read error occurs :s
the point is: using the technique described above, I was able to completely recover it:
the buggy firmware stops the motor, and when ddrescue would try to read the sector a second time, it fails
so that's why eject the disc and resuming from the point where it failed (simply retrying) saved me the whole 100% of the disc _________________ The power of Gentoo optimization (not overclocked): [img]https://www.passmark.com/baselines/V10/images/503714802842.png[/img] |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2167
|
Posted: Tue Aug 08, 2023 7:26 pm Post subject: |
|
|
I wonder if media-sound/cdparanoia has anything useful here. AFAIR it has lots of error handling. Whether it reads DVDs is an exercise left to the reader _________________ Greybeard |
|
Back to top |
|
|
kolibri n00b
Joined: 27 Jul 2023 Posts: 27 Location: Boizenburg, Germany
|
Posted: Tue Aug 15, 2023 8:56 am Post subject: |
|
|
Goverp wrote: | I wonder if media-sound/cdparanoia has anything useful here. AFAIR it has lots of error handling. Whether it reads DVDs is an exercise left to the reader |
cdparanoia is only for audio CDs, not for data CDs or anything else. |
|
Back to top |
|
|
|