Solved GELI issue - geli: Wrong key

IPTRACE

Well-Known Member

Reaction score: 24
Messages: 321

First time, I have the following error.

user@hpv3:/root % sudo dd if=/dev/random of=/root/data1.key bs=64 count=1
1+0 records in
1+0 records out
64 bytes transferred in 0.000215 secs (297142 bytes/sec)
user@hpv3:/root % sudo geli init -s 4096 -K /root/da2.key /dev/mfid0p8
Enter new passphrase:
Reenter new passphrase:

Metadata backup for provider /dev/mfid0p8 can be found in /var/backups/mfid0p8.eli
and can be restored with the following command:

# geli restore /var/backups/mfid0p8.eli /dev/mfid0p8

user@hpv3:/root % sudo geli attach -p -k /root/da2.key /dev/mfid0p8
geli: Wrong key for mfid0p8.
geli: There was an error with at least one provider.
user@hpv3:/root %


Any suggestions?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,764
Messages: 39,365

There's a discrepancy with your keys. You're using dd(1) to create the data1.key but the other commands show da2.key. So it looks like you're mixing up keys.
 
OP
IPTRACE

IPTRACE

Well-Known Member

Reaction score: 24
Messages: 321

Anyway, my bad. Key name is one thing, but I missed "-P" during geli init. It should be like this.

sudo geli init -e AES-XTS -l 256 -a HMAC/SHA512 -s 4096 -P -K /root/da2.key /dev/mfid0p8
 
Top