Closed ghost closed 10 years ago
This should be avoided by the check [[ ! -r $persistence ]]
. Can you, therefore, check if the persistence is readable by paranoid
? it should not, be, so that has-avail-persitence
will output a warning but also return the FOUND
status.
Yes, it is readable from paranoid:
paranoid@freepto:~$ ls -l /dev/sdb2
brw-rw---T 1 root floppy 8, 18 feb 24 23:16 /dev/sdb2
paranoid@freepto:~$ grep floppy /etc/group
floppy:x:25:paranoid
A workaround could be something like that:
if lsblk | grep ${persistence:5} >/dev/null && [ "$UID" -ne 0 ]; then
echo "Not able to check encryption; maybe you should be root?" >&2
echo $persistence
return ${RET_PERSISTENCE_FOUND}
fi
I am confused. Can you post the complete output of
check-persistence -v has-avail-persistence; echo $?
as both root
and paranoid
?
After that, can you manually run modprobe dm_mod
as root, and rerun the previous commands?
Ok, I can confirm the bug: it appears even when dm_mod
is loaded, so I don't know why in debian it rants about /dev/mapper/control
problems.
However, this can be fixed using
udisks --show-info "$persistence" | fgrep 'type:' | grep 'crypto_LUKS'
also added alert about running makepersistence on virtualized environments: https://github.com/vinc3nt/freepto-usb-utils/commit/769b96615deb77b4d9cbf24821dfbcaa20855a77
this is delegated to https://github.com/AvANa-BBS/freepto-usb-utils/issues/8
If Freepto is started in
live
mode, freepto-live-helper correctly recognize thelive
status, but not the existing persistence.paranoid@freepto:~$ check-persistence -v has-avail-persistence /dev/mapper/control: open failed: Permesso negato Failure to communicate with kernel device-mapper driver. Impossibile inizializzare device-mapper. Forse il modulo kernel dm_mod non è caricato. /dev/sdb2 is not an encrypted partition
There is a permission problem with the cryptsetup command executed as "paranoid":
http://github.com/AvANa-BBS/freepto-usb-utils/blob/master/check-persistence#L106
Therefore this check always fails if executed as "paranoid":
paranoid@freepto:~$ sudo check-persistence has-avail-persistence /dev/sdb2