Recovering from read errors in Linux

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
MrVanx
Posts: 18
Joined: Mon Mar 23, 2015 9:52 pm

Re: Recovering from read errors in Linux

Post by MrVanx »

Rojma wrote:
Mon Jun 29, 2020 3:28 pm
I strongly recommend you only use isoprophl alcohol to clean the disc. For me using alcohol has resolved almost all read issues I have had with disc read issues. Using other methods suggested around the interwebs, such as liquid hand soap, has actually led to more problems for me.
Yes ive got some 99% isopropyl on its way and some microfibre cloths, I wont let this disc beat me :D

Any tips on how to apply it or just dab onto a cloth?
Woodstock
Posts: 10324
Joined: Sun Jul 24, 2011 11:21 pm

Re: Recovering from read errors in Linux

Post by Woodstock »

From the "if you are experiencing errors" topic in the BD section:
Proper disc cleaning:

Center to edge, never circular.

How to clean CD/DVD/Blu-ray disks
MrVanx
Posts: 18
Joined: Mon Mar 23, 2015 9:52 pm

Re: Recovering from read errors in Linux

Post by MrVanx »

Just a quick update (in case it is helpful for others), Ive been re-running step 2 but I increased the number of retries to 2 or more (i'm working on 4 at the moment) and the bad-sector size is reducing slowly every time which is great.

This is the line I use (for reference):

Code: Select all

ddrescue -d -r4 -b2048 /dev/sr0 brimage mapfile
The initial run of step 2 gave me a bad-sector size of 1507KB, I'm now down to 1089KB (the number of bad-areas goes up as explained in the ddrescue manual) I don't think this is important but I eject the disc, close the terminal, put the disc back in and restart a new terminal session each time.

I had another go copying over the files and using the .dat file generated by a non-decrypted backup attempt but the hash check shows up corrupted files again and the title I want to get is still missing from the makemkv screen. I will persist onwards a while longer with ddrescue (It sounds like several days is totally normal for a dodgy disc).
MrVanx
Posts: 18
Joined: Mon Mar 23, 2015 9:52 pm

Re: Recovering from read errors in Linux

Post by MrVanx »

OK TLDR: I succeeded in rescuing the disc!

Long version:
ddrescue zoomed through the remaining 1100 or so Kb on the last attempt a couple of days ago so I thought "Wow!". I ran through the remaining steps and unfortunately makemkv was still unable to rip the titles I needed from this one so I gave up temporarily.

The isopropyl didnt seem to make any difference but I will still use it to clean any discs that I have trouble with later.

My suspicion is that the drive didn't kick up a read error but instead gave garbage data (hence the ton of hash check errors in makemkv?), I kicked myself for not making a backup of the mapfile before I ran that last rescue.

For my linux machine I had actually installed ddrescue-gui so I ran that up with the intention of doing another rescue attempt (from the start), I noticed several presets in the settings..one of which reduced the block read size and was labelled "best recovery" so I ran the disc up with that setting and the whole disc was rescued in just under 40m!?!?! (the previous rescue would take ~16hr).

The next step I took was out of necessity rather than anything else, I am running out of HDD space so instead of copying over the BDMV folder to the location of the .dat file I placed soft links to the three top level folders in the mounted disc image (the image just freshly rescued) so I didnt take up the space.

I ran up makemkv via the dat file and VOILA!!! :D Needless to say im a happy chappy, apologies for the thread hijack but I assume this info will be useful for someone down the line, I will be backing the rescue image, dat file and everything else somewhere safe should I need it again!

I have another disc I haven't been able to rip for ages so I will attempt the same process with that one.

Cheers all!
xr200
Posts: 56
Joined: Tue Nov 10, 2015 3:11 am

Re: Recovering from read errors in Linux

Post by xr200 »

lepathi wrote:
Fri Jun 19, 2020 12:30 pm
Doing this I was able to create an Image of Alita: Battle Angel with "only" 70MB corrupt sectors.

Yet, I am unable to rip the movie with makeMKV due to 342 'HashCheck Errors". Did anybody experience similar and/or has a workaround for me to get that movie ripped?
I'm experiencing the same problem with a different BD. I followed the instructions to the letter, but when I ran makemkv, I got a "hashcheck error".
Just reporting that it's not just you, no suggestions on what to do about it.
hutchinsonhatch
Posts: 1
Joined: Sat Aug 07, 2021 7:44 pm

Re: Recovering from read errors in Linux

Post by hutchinsonhatch »

Code: Select all

ddrescue -n -b2048  /dev/sr0 brimage mapfile
and in a second (and more) steps

Code: Select all

ddrescue -d -r1 -b2048 /dev/sr0 brimage mapfile
is the right way, have patience it needs time...
After the step about mounting the brimage file

Code: Select all

 sudo mount -o loop brimage /mnt
and removing the BDMV folder of the backup e.g.

Code: Select all

rm  -rvf ~/backup/THE_MATRIX/BDMV
I suggest instead of a

Code: Select all

cp -rv /mnt/BDMV ~/backup/THE_MATRIX/
a simple ln -s

Code: Select all

ln -s /mnt/BDMV ~/backup/THE_MATRIX/BDMV
because it is all read-only anyway. And it saves time and space (up to 50GB).
Then of course open the *.dat file and proceed with makemkv.
MovieLuver
Posts: 23
Joined: Sun Nov 14, 2021 7:13 pm

Re: Recovering from read errors in Linux

Post by MovieLuver »

Start a backup, uncheck the decrypt option. Let it run until it gets to the first m2ts file. At that point, it has saved the disc code, which is a file called "discatt.dat". Stop the backup, quit MakeMKV, [...]
Is there a way to do this from the command line, automatically ? Like not having to manually stop the process ?
babypuncher
Posts: 20
Joined: Tue Jan 16, 2018 4:22 am

Re: Recovering from read errors in Linux

Post by babypuncher »

I've tried this with a 4K disc (Onward) and MakeMKV cannot find the volume key, even though it has no trouble decrypting the actual disc.

Does this just not work with 4K discs?
bamfsf
Posts: 1
Joined: Sat Nov 19, 2022 2:50 pm

Re: Recovering from read errors in Linux

Post by bamfsf »

I've tried this with a 4K disc (Onward) and MakeMKV cannot find the volume key, even though it has no trouble decrypting the actual disc.

Does this just not work with 4K discs?
I also had this issue with some 4K discs, but there are a few tweaks I made to my process that helps things work:
  • Don't use an LG drive because their "Jamless Play" feature will often return garbage data instead of indicating that a read failed. I use my ASUS drives for this, though they can behave similar to LG with some firmwares. I think mine have the MK firmware.
  • Always "bless" the disc/drive before running ddrescue using something like

    Code: Select all

    makemkvcon info disc:0
  • Only use the "discatt.dat" file from the backup.

    Mount the completed ddrescue image:

    Code: Select all

    sudo mount -o loop disc.img /mnt/bluray
    In the backup directory:

    Code: Select all

    rm -r AACS BDMV CERTIFICATE
    ln -s /mnt/bluray/AACS "$(pwd)/AACS"
    ln -s /mnt/bluray/BDMV "$(pwd)/BDMV"
    ln -s /mnt/bluray/CERTIFICATE "$(pwd)/CERTIFICATE"
With those changes, I've had success recovering multiple 4K discs with read errors.
nethammer
Posts: 1
Joined: Sat Jun 03, 2023 9:19 am

Re: Recovering from read errors in Linux

Post by nethammer »

Hi Everyone,

I found this thread, trying to recover some Blu-Ray discs I've got which persistently report bad blocks when trying to play or back them up---For example, MakeMKV 1.17.3 fails with bad block errors.

I retrieved the latest version of ddrescue (1.27) and compiled (under Ubuntu Linux). To my amazement, after struggling a while, ddrescue was able to recover the entire Blu-Ray contents, no remaining bad blocks! Fantastic! However, following the procedures found earlier in this thread, MakeMKV doesn't work. It skips all the titles, finally ending with a "Failed to open disc" error.

To diagnose further, I backed up a known-good Blu-Ray (MakeMKV backup, with decrypt video box unchecked) and could read that data using MakeMKV. I also read the raw disc contents with ddrescue. After ddrescue completed, I mounted the resulting ISO file via the loop device and then compared the contents with the files in the MakeMKV backup folder. All files were identical, except for most (but not all) of the .m2ts files in the /BDMV/STREAM folders. Most .m2ts files differ starting at byte 17. What step did I miss? Is this somehow encryption related?

I'm using an LG WH16NS40 drive, flashed with this firmware: HL-DT-ST-BD-RE_WH16NS60-1.02-NM00100-211810291936.bin

Thanks!
Powerkey
Posts: 12
Joined: Mon Jun 29, 2020 6:40 pm

Re: Recovering from read errors in Linux

Post by Powerkey »

If I have 2 identical discs that both have errors on them (presumably not the same errors) can I do step 2 with the second disc?

Also, I am doing this on macOS and the -d option in step 2 is saying "Direct disc access not available." even though I blessed it with makemkvcon first. If I drop the -d option, does that cause the data to be incorrect?
Rojma
Posts: 68
Joined: Tue Jan 07, 2014 12:52 pm

Re: Recovering from read errors in Linux

Post by Rojma »

Powerkey wrote:
Fri Mar 22, 2024 6:03 pm
If I have 2 identical discs that both have errors on them (presumably not the same errors) can I do step 2 with the second disc?

Also, I am doing this on macOS and the -d option in step 2 is saying "Direct disc access not available." even though I blessed it with makemkvcon first. If I drop the -d option, does that cause the data to be incorrect?
Yes on the first question. I've done exactly that to get one good whole disc. Can't comment on the second since I don't have a Mac or tried it on a Mac.
Syer10
Posts: 1
Joined: Tue Oct 29, 2024 1:14 am

Re: Recovering from read errors in Linux

Post by Syer10 »

This thread saved me, and I was able to recover the disk without any loss to the content.

My disk didn't have any visible scratches to me, but it would always have errors around the 47% mark. During ddrescue the same issues happened, 9 sectors and 400kb of data, and it was able to read the rest of the disk. Then it did a reverse pass(reading the disk backwards) and it was able to get all the missing data without even doing the second step of the guide. I copied it to my main windows machine as brimage.img, mounted it, copied the BDMV folder to the extracted MakeMKV backup and it was fully able to run in MakeMKV.

Thanks for the great guide.
Post Reply