I want to create a bit-by-bit backup of my DVD and a Blu-ray disc without removing its encryption. Is dd be the best method, and if so, what flags or settings should I use? Also, is comparing the SHA-256 hash of the generated ISO file with the hash of the original disc’s raw data (read from /dev/sr0) the best method for verifying the backup’s integrity?

all 43 comments

sorted by: hot top controversial new old
[–] 12 points 2 days ago* (1 child)

This is silly. You're approaching this with wrong-headed thinking. Just use makemkv.

What you will have if you used hacked firmware to bypass physical anti-copying methods present on BluRay discs to actually get a bit for bit copy of your disc is a useless blob of encrypted data that you have no way of verifying for accuracy (that it was copied correct or that the disc itself didn't have subtle physical damage which gave you something damaged because you can't play it to verify) and which you have no way of using. You'll have no way of ripping it or turning it into usable data in future if your disc does go bad because no one else uses this method so there's no software that will allow you to turn this encrypted blob easily back into a playable movie and to burn it to a new BluRay writable disc would break laws anyway because you're engaging in duplication and secondly all BluRay authoring (burning) programs are built around building and burning unencrypted video files to a disc not around burning an encrypted blob to a disc (often specific sectors containing specific data must be written to specific parts of the disc to make it playable, something no public program will help you with when trying to bit for bit copy in reverse and which blindly bit for bit copying at low level isn't likely to achieve).

Everyone else breaks the encryption and dumps a copy of the disc including the AACS keys and certs to prove ownership and you should do the same rather than thinking you're particularly special or vulnerable. If you're that much an enemy of the state or media companies they'll do you just as much for having the encrypted copies and state you had INTENT to break it (and indeed defeated DRM mechanisms on the drive firmware itself first which may be a violation of law in order to get that copy) if they're trying to make an example out of you because you've pissed them off.

In practice no media company is likely to go after someone breaking the encryption while retaining the discs and keeping the copies only for themselves. There's simply no incentive to harassing paying customers in that way if you're not uploading the contents or hosting a for-profit Plex or Jellyfin server of the contents or burning bootleg copies of the films. You'd have to go around publicly bragging in your own name about breaking the encryption and pretty much dare them to get you for them to know or care enough to do anything about it short of you otherwise breaking the law as I outlined above.

  • source
  • hideshow 1 child comment
  • [–] 9 points 3 days ago* (4 children)

    Blueray have anti-copying built into non-data areas, plus Cinavia DRM on the content most of the time. This means your 1-to-1 copies won't play.

    If you are hoping to make a playable bluray, use one of the tools that reads past both and creates a non-drm image.

    Depending on where you live, this likely breaks copywrite, but isn't illegal.

  • source
  • hideshow 4 child comments
  • [–] [S] 0 points 2 days ago (3 children)

    I know it won’t work with DRM, but my main goal is just to back it up as close to the original as I can. If the disc breaks later, I can burn it to a DVD or Blu-ray and get everything back up and running.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 8 points 2 days ago (1 child)

    I can burn it to a DVD or Blu-ray and get everything back up and running

    If it was possible to copy it bit by bit and just burn it as is, pirates wouldn't have bothered to remove it.

    CSS was specifically designed to fight 1:1 copies, at the time it was conceived, ripping movies to DivX/MP4/h264 wasn't a thing

    The DRM on discs works because they have data in areas that only a glass master in a $5M disc replicator can create

    Not to mention that ONE quad layer BD-R for the 4k blu-rays costs $25 - at that point is better to buy two physical copies and hold them in different places for backup

  • source
  • parent
  • hideshow 1 child comment
  • [–] 15 points 3 days ago (3 children)

    I'd recommend ddrescue over dd for optical media backups only because if you've got bad blocks it will try them again at a different speed/angle

  • source
  • hideshow 3 child comments
  • [–] [S] 3 points 3 days ago (2 children)

    Does ddrescue still check every sector even if there are no bad blocks? I’m worried it might just copy sectors without verifying, which could mean the backup isn’t a perfect copy.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 days ago (1 child)

    There's no such thing as a bit-for-bit copy of anything, you are always deciding what to copy and what not to copy. When you copy a file you might or might not copy the last modified time.

    Optical disks use error-checking codes. You usually don't want to copy those. Even on a non-encrypted disk you don't want to copy a scratch on your disk onto a new disk with a scratch, you want to decode it and then encode it again to one with the scratch patched over. And it would make your file bigger for no reason when copying to a medium that can't scratch.

    ISO format is designed for computer disks. It doesn't work for audio disks or other types of things you can put on a CD. ISO has the bitstream as a computer reads the filesystem, which is already after several layers of decoding. Audio CDs don't use that decoding so they can fit more data, so they just can't fit in an ISO file.

    Encryption is like this too. If you could just copy an encrypted disk as an ISO and it would still work, that'd be shitty encryption so they wouldn't bother with it. They use tricks to put data outside of the normal copied areas. A really old form of copy protection was to mess up the lower layers - write a sector that would look so scratched it was unreadable, and if you can read it, it must be a copied disk. Or write the same sector several times, so the drive will find a different version of it depending on where it started from. The PS1 wrote the track a bit wobbly, like the CD writer was drunk, but not so wobbly the PS1 couldn't read it, then used the shape of the wobble to encode a signature that said it was a genuine disk. Don't ask me how Bluray DRM works, I don't know it, but it must be using similar kinds of tricks. Storing data in the disk's barcode was another trick some consoles did.

  • source
  • hideshow 1 child comment
  • [–] 6 points 3 days ago (1 child)

    I would look at the tools that the preservation groups use for doing this. The optical media layouts are funky and IIRC using dd on the block device is not enough to archive a bit-for-bit copy. There are details about the track layout and so on that need to be recorded separately. This is why formats like BIN/CUE exist.

    eg. https://wiki.redump.info/Redump#Technical_Questions

  • source
  • hideshow 1 child comment
  • [–] 8 points 3 days ago (21 children)

    Just curious, but why?

    Can you elaborate on what you are trying to achieve?

  • source
  • hideshow 21 child comments
  • [–] [S] 9 points 3 days ago* (last edited 3 days ago) (7 children)

    @Sxan@piefed.zip nailed the main point. I’m making a legal backup copy of the content to store on DVD/Blu-ray discs in case something goes wrong or the disk get corrupted

  • source
  • parent
  • hideshow 7 child comments
  • [–] 3 points 3 days ago* (last edited 3 days ago)

    Creating a (usable) backup of a soon failing data carrier should be legal either way. Yeah, a lot of countries have stupid laws there, but as long as you don't share the data on the internet, you should be fine.

    Also to note: to legally watch a DVD, you require either Windows or MacOS, with a supported (proprietary) player software, in most jurisdictions. So, there, no legal DVD for Linux (or Haiku, Android), laws are stupid. And instead of cracking it on each watch, better to just do it once.

  • source
  • parent
  • [–] 2 points 3 days ago (2 children)

    there is no legal issue with ripping your own dvd and using it on a jellyfin server or even making dvd copies.

    the only restriction is you cant distribute or sell access to them

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 days ago* (1 child)

    In Belgium at least it is illegal to circumvent copy protection. This isn't even exclusive to the US, so I'm not sure where you got that idea from. So it is perfectly legal here to rip a cd from the public library but not necessarily for a Blu-Ray you bought

    Edit: dvd's can have copy protection so in that case it would depend on the specific dvd

  • source
  • parent
  • hideshow 1 child comment
  • [–] 3 points 3 days ago (5 children)

    Maybe some kind of hyper-legality? Not "cracking" the code to rip and convert it?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 2 points 3 days ago (4 children)

    If so this is clever. In the wild event they get into some sort of trouble with copying, they have a bit-for-bit copy proving they own/owned the BluRay instead of a ripped copy.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 7 points 3 days ago (2 children)

    How would it prove they owned it vs. "they had it in their possession long enough to make a bit for bit copy"?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 days ago

    But what is the point. You have to break the MA to watch it. If you even can. You can't make 1 to 1 copy because if you could we wouldn't have had to break the encyprion.

  • source
  • parent
  • [–] 1 point 2 days ago*

    A digital or physical copy of a receipt. But then how would they know the receipt is theirs? Well, they don't. There are a subset of users who have bit for but copies. I think if they came into some legal trouble having that vs a rip would be better since the data is in tact the same way it was when purchased. Can I easily be called a backup.

    I'm not your lawyer and I'm definitely not a lawyer anyway. Just playing Devis Advocate.

  • source
  • parent
  • [+] -9 points 3 days ago (5 children)

    Not OP, but DVD and BlueRays have a shelf life of 3-5 years. Þey will probably be fine for 10, maybe longer, but mass market products tend to be printed wiþout concern for longevity. I've had CDs delaminate; storage conditions definitely play a factor.

    Þere is a BD-compatible archival standard called alternatively M-DISC or BDXL which uses different materials and processes and is guarateed for 100 year, with a reasonable expectation of usability wiþin a millenium.

    So: OP could be wanting backups in case of accident or loss; or þey want to migrate media from 5y DVD to 100y M-DISC; or maybe every 5y þey reclone þeir entire library, buying þemselves anoþer guaranteed 5ys. Lots of reasons.

    Why not strip þe DRM? Scared of the US paramilitary enforcing capitalism? Or þey believe þey'll have perpetual access to it and it's too hard. I dunno.

    Lots of reasons.

  • source
  • parent
  • hideshow 5 child comments
  • [–] 8 points 3 days ago* (2 children)

    I have CDs from the 80s they are perfectly fine. I think people bought super cheap R/W at some point and found them crappy, but a factory CD/DVD last a very long time

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 3 days ago (2 children)

    ddrescue can do a really good job. But for blueray you'll need a patched firmware.

  • source
  • hideshow 2 child comments
  • [–] 2 points 3 days ago* (last edited 3 days ago) (2 children)

    dd is neither the best nor a suitable method (dd is a scalpel not a shovel, use cp or cat). But optical media are tricky either way, with purposedly placed reading errors and stuff. redumper was made for a disc preservation initiative. Does a good job so far for me, but best to use old SATA drives with it. Those between 2010 and 2015 (pre-DRM-crackdown) also don't need libredrive.

  • source
  • hideshow 2 child comments
  • Optical media don't even have a bitstream. When you dd from something other than a CD-ROM, it's not clear what you're getting. You might just get an error saying it's not a CD-ROM. Different kinds of CDs use completely different encoding layers in between "the bitstream" and the actual pattern of dots engraved on the disk. Obviously a CD-ROM has "a bitstream" because it's designed purely for computer use and the computer wants to see it as a bitstream, but for other kinds it's not so clear.

    You can't fast-forward or rewind an audio CD in a CD player is that the CD player has no idea which sector it's on. At most it can just count how many seconds of audio it's played so far. It just keeps the laser locked on to the spiral, and keeps playing as long as the data keeps coming. And there's some kind of skip code for tracks so you can skip to a track number, but only for tracks. If it accidentally skipped over a bit of audio it would have absolutely no way to know, that's why programs like cdparanoia employ so many heuristics to know they got it right. A CD-ROM by contrast has a sector number on every sector, because that's non-negotiable for computers.

  • source
  • parent