On 12/11/2020 10.36, Milan Broz wrote: > On 11/11/2020 20:16, Carlos E. R. wrote: >> On 10/11/2020 17.22, Davide Marchi wrote: >>> Hi to all, >>> >>> I'm wondering how to create a DVD or CDROM encrypted using dm-crypt. >>> I've followed this tutorial, with no luck: >>> http://www.sourcentral.org/luks/iso9660/ >>> >>> and the DVD or cdrom created cannot be activated: >> >> Hum. I created encrypted DVD years ago with a similar procedure, >> somewhat simpler. Basically, I created an empty file of the same size as >> the CD or DVD, mounted it as a loop device, then I encrypted that loop >> device, and then I formatted the resulting luks device with any >> filesystem type I wished, typically XFS. >> >> This, so far, still works. >> >> Then I just burn that file to DVD. >> >> The final step is to mount and decipher the DVD - and this step failed, >> but it was an XFS error if I remember correctly. > > You cannot switch block size in XFS - if DVD reports 2k block and XFS > was formatted with 4k block device, it will never work. It worked several years ago, I have dozens of DVDs made this way. > This is not a cryptsetup problem but the way how XFS works. > > Try to run lsblk -t and compare reported sector size for DVD device and your > original device. If it is the same, it should work even for XFS. -- Cheers / Saludos, Carlos E. R. (from 15.1 x86_64 at Telcontar)