Encrypting DVD or CDROM from iso
A message that is not in the archive (sent off-list or not yet received): [email protected]
Milan Broz ha scritto:
Quoted 7 lines
[..]
The whole problem was that the size of device was wrongly calculated
from the debug:Quoted 1 line
# 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 :-\
Quoted 9 lines
Quoted 9 lines
[..]
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!
Quoted 8 lines
Quoted 1 line
[..]
[..]
just run "cryptsetup luksFormat disk.img" and "cryptsetup open disk.img mybackupdisk"
Quoted 3 lines
[..]
genisoimage -R -J -joliet-long -graft-points -V $VOL_NAME -o/dev/mapper/mybackupdisk$DIR_TO_COPY
Quoted 9 lines
This losetup is automatic on luksClose (so not needed) if you remove explicit loop allocation above.
Quoted 3 lines
# close the device cryptsetup luksClose /dev/mapper/mybackupdisk && \ losetup -d /dev/loop1This 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:
Quoted 5 lines
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