[ubuntu-it] Ecryptfs: montare partizione
Roby Pozzato
roberto a robertopozzato.it
Mer 3 Mar 2010 09:39:23 GMT
Ciao, buona giornata a tutti.
Ho un pc con 9.10 server, su sda ci sono swap, /boot e /, mentre sdc e
sdd compongono il raid1 md0 montato su /var. Swap / e /var sono
criptate fin dall'installazione.
La macchina improvvisamente non si avvia più (errore grub 22), e penso
di tentare la reinstallazione di grub con una live. Per fare questo
devo lavorare in ambiente chroot dell'installazione esistente, però
prima devo accedere alle partizioni criptate, e non mi riesce.
Di seguito i passaggi che ho fatto:
# Un fdisk per vedere le partizioni:
ubuntu a ubuntu:~$ sudo -i
root a ubuntu:~# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x35a135a0
Device Boot Start End Blocks Id System
/dev/sda1 1 243 1951866 83 Linux
/dev/sda2 * 244 304 489982+ 83 Linux
/dev/sda3 305 19457 153846472+ 83 Linux
Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00019a28
Device Boot Start End Blocks Id System
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d932a
Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006c291
Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 fd Linux raid autodetect
# Seguendo le indicazioni di "man ecryptfs" cerco di montare sda3;
# alle domande dò risposte di default, dato che in fase di installazione
# ho lasciato tutto ai valori di default:
root a ubuntu:~# mount -t ecryptfs /dev/sda3 /mnt
Passphrase:
Select cipher:
1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
2) blowfish: blocksize = 16; min keysize = 16; max keysize = 56 (not loaded)
3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 (not loaded)
Selection [aes]: 1
Select key bytes:
1) 16
2) 32
3) 24
Selection [16]: 1
Enable plaintext passthrough (y/n) [n]: n
Enable filename encryption (y/n) [n]: n
Attempting to mount with the following options:
ecryptfs_unlink_sigs
ecryptfs_key_bytes=16
ecryptfs_cipher=aes
ecryptfs_sig=4da0597d82aec964
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.
Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [4da0597d82aec964] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : no
Not adding sig to user sig cache file; continuing with mount.
Error mounting eCryptfs: [-20] Not a directory
Check your system logs; visit <http://launchpad.net/ecryptfs>
# Escludo la possibilità di password errata, avendo fatto più
# tentativi, ed utilizzando la password che fino all'ultimo avvio
# funzionava perfettamente. Vado a guardare il log:
root a ubuntu:~# grep ecryptfs /var/log/syslog
Mar 3 06:51:22 ubuntu mount.ecryptfs: Error initializing key module
[/usr/lib/ecryptfs/libecryptfs_key_mod_gpg.so]; rc = [-22]
Mar 3 06:51:58 ubuntu mount.ecryptfs: Failed to perform eCryptfs
mount: [Not a directory]
Mar 3 06:51:58 ubuntu kernel: [ 905.708304] ecryptfs_read_super:
path_lookup() failed
# E non riesco a capire cosa non va...
# Il file citato esiste:
root a ubuntu:~# ls /usr/lib/ecryptfs
libecryptfs_key_mod_gpg.so libecryptfs_key_mod_passphrase.so
A questo punto sono bloccato, zio google non mi aiuta, e spero in voi. :-)
Grazie anticipate a chi mi dia qualche buona idea, o consigli per
buone letture.
--
Roby
Maggiori informazioni sulla lista
ubuntu-it