From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from posta.msw.it (posta.msw.it [156.54.137.237]) by mail.server123.net (Postfix) with ESMTP for ; Thu, 19 Nov 2020 14:06:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by posta.msw.it (Postfix) with ESMTP id 6C0F15200A0 for ; Thu, 19 Nov 2020 14:05:56 +0100 (CET) Received: from posta.msw.it ([127.0.0.1]) by localhost (posta.msw.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37ZWZ3CayVfj for ; Thu, 19 Nov 2020 14:05:41 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 19 Nov 2020 14:05:41 +0100 From: Davide Marchi In-Reply-To: References: Message-ID: Subject: Re: [dm-crypt] Encrypting DVD or CDROM from iso List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de Milan Broz ha scritto: > [..] > The whole problem was that the size of device was wrongly calculated > from the debug: > > # Device size 16777216, offset 16777216. > > This is apparently device size covering only LUKS2 header (default > LUKS2 takes 16MB), > no data at all - then the error is expected. Ok ..but, not shure to have understand correctly :-\ >> [..] >> >> All you need to do here is just to allocate requested size for data + >> 16M for header. >> (I have no idea why the original post tries to do is such complicated >> way.) >> >> Also you do not need to physically write the file, sparse file >> creation is much >> faster here (try sizes in GB), just run (dd can do this using seek=... >> option too) >> truncate disk.img -s 100M >> Right! >> [..] > [..] > > just run "cryptsetup luksFormat disk.img" and "cryptsetup open disk.img > mybackupdisk" > >> [..] >> genisoimage -R -J -joliet-long -graft-points -V $VOL_NAME -o >> /dev/mapper/mybackupdisk $DIR_TO_COPY > This losetup is automatic on luksClose (so not needed) if you remove > explicit loop allocation above. >> # close the device >> cryptsetup luksClose /dev/mapper/mybackupdisk && \ >> losetup -d /dev/loop1 > > This losetup is automatic on luksClose (so not needed) if you remove > explicit loop allocation above. > > Milan > Fine, nevertheless, the problem is still there! Indeed building a DVD (or CDROM) with this procedure, obtain the same block error: > Nov 19 13:56:36 localhost colord-sane: io/hpmud/pp.c 627: unable to > read device-id ret=-1 > Nov 19 13:57:05 localhost kernel: [ 2470.017097] device-mapper: table: > 253:2: len=2093055 not aligned to h/w logical block size 2048 of sr2 > Nov 19 13:57:05 localhost kernel: [ 2470.017099] device-mapper: core: > Cannot calculate initial queue limits > Nov 19 13:57:05 localhost kernel: [ 2470.017102] device-mapper: ioctl: > unable to set up device queue for new table. > Nov 19 13:57:05 localhost gnome-shell[2243]: Unable to mount volume > Volume cifrato da 1,7 GB: Gio.IOErrorEnum: Error unlocking /dev/sr2: > Failed to activate device: Invalid argument What I should do for create an iso aligned to h/w logical block size? :-\ I've try using Gnome Shell automount and manually, same! I'm going out crazy!! :-D Thanks again! Davide