No GELI on my bread - Cannot mount /dev/md0.eli

I am unable to
Code:
mount /dev/md0.eli

Here is what I have done :
Code:
dd if=/dev/urandom of=geli.vol bs=1M count=1024

DIGITAL-TRAITOR# mdconfig -a -t vnode -f geli.vol -u 0
DIGITAL-TRAITOR# dd if=/dev/urandom of=geli.key bs=56 count=1
1+0 records in
1+0 records out
56 bytes transferred in 0.000068 secs (824144 bytes/sec)
DIGITAL-TRAITOR# ls -l da*
-rw-r--r--  1 root  wheel          56 Oct  5 12:59 geli.key
-rw-r--r--  1 root  wheel  1073741824 Oct  5 12:57 geli.vol


DIGITAL-TRAITOR# geli init -s 4096 -e Blowfish -l 448 -K geli.key  /dev/md0
Enter new passphrase:

DIGITAL-TRAITOR# geli init -s 4096 -e Blowfish -l 448 -K geli.key /dev/md0
Enter new passphrase:
Reenter new passphrase:

Metadata backup can be found in /var/backups/md0.eli and
can be restored with the following command:

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

DIGITAL-TRAITOR#

DIGITAL-TRAITOR# pwd
/root
DIGITAL-TRAITOR# geli attach -d -k geli.key /dev/md0
Enter passphrase:
dgeli: Wrong key for md0.
DIGITAL-TRAITOR# geli attach -d -k geli.key /dev/md0
Enter passphrase:
###########################################
## Perform the below command only once after creation ##
DIGITAL-TRAITOR# newfs -U /dev/md0.eli
/dev/md0.eli: 1024.0MB (2097144 sectors) block size 16384, fragment size 4096
 using 4 cylinder groups of 256.00MB, 16384 blks, 16384 inodes.
 with soft updates
super-block backups (for fsck -b #) at:
 160, 524448, 1048736, 1573024
###########################################
DIGITAL-TRAITOR#
DIGITAL-TRAITOR#  mount /dev/md0.eli /mnt
mount: /dev/md0.eli : No such file or directory

What's wrong in the above ?
x(
 
I did enter a wrong password once and it said :
Code:
dgeli: Wrong key for md0.

After that I entered it correctly and it didn't indicate any error, as we can see above.
 
:)
It worked ! APACHEED I don't know if anybody got this Poor Joke
I can mount and dismount, attach and detatch my drives.
Thanks
 
I have the same issue.
Creating memory disk and attach encrypted file success:
Code:
# mdconfig -l -v
md0     vnode    5120M  /1/crypted.disk
# geli status
   Name  Status  Components
md0.eli  ACTIVE  md0

Code:
Aug 15 20:33:15 kernel: GEOM_ELI: Device md0.eli created.
Aug 15 20:33:15 kernel: GEOM_ELI: Encryption: AES-XTS 128
Aug 15 20:33:15 kernel: GEOM_ELI:     Crypto: software
But when I try to mount /dev/md0.eli device I've got:

Code:
# mount /dev/md0.eli /mnt
mount: /dev/md0.eli: No such file or directory
#

Code:
FreeBSD 12.0-STABLE FreeBSD 12.0-STABLE #0 r346594M: Wed Apr 24 09:50:11 EEST 2019     root@localhost:/usr/obj/usr/src/i386.i386/sys/GENERIC  i386
This encrypted very important for me.
Any ideas?
 
I have the same issue.
Creating memory disk and attach encrypted file success:
Code:
# mdconfig -l -v
md0     vnode    5120M  /1/crypted.disk
# geli status
   Name  Status  Components
md0.eli  ACTIVE  md0

Code:
Aug 15 20:33:15 kernel: GEOM_ELI: Device md0.eli created.
Aug 15 20:33:15 kernel: GEOM_ELI: Encryption: AES-XTS 128
Aug 15 20:33:15 kernel: GEOM_ELI:     Crypto: software
But when I try to mount /dev/md0.eli device I've got:

Code:
# mount /dev/md0.eli /mnt
mount: /dev/md0.eli: No such file or directory
#

Code:
FreeBSD 12.0-STABLE FreeBSD 12.0-STABLE #0 r346594M: Wed Apr 24 09:50:11 EEST 2019     root@localhost:/usr/obj/usr/src/i386.i386/sys/GENERIC  i386
This encrypted very important for me.
Any ideas?
Hi khuman

I wrote a guide on how to create encrypted geli containers on the Forum

Heres my notes about the steps on creating a encrypted gei container on github
and i also wrote a script called ossuary to automate mounting and unmounting the geli container
 
Hi khuman

I wrote a guide on how to create encrypted geli containers on the Forum

Heres my notes about the steps on creating a encrypted gei container on github
and i also wrote a script called ossuary to automate mounting and unmounting the geli container
You made great job. Interesting script and HowTo.
I used this algorithm already many years. And today happened this inexplicable situation. And I can't find solution for fixing. No warning or error information in stdout or log
 
When having problems first have a look what you have with ls -l /dev/md*. If you have tried several times mdconfig without the -u option you might have something other than md0.
From what you posted above I do not see any geli attach [-d] /dev/md<unit>.
After that and having entered your passphrase you can mount /dev/md<unit>.eli.
 
Was this issue resolved?

I'm getting a similar error (no such file or directory error) trying to mount a GELI encrypted drive after doing this successfully:

geli attach /dev/driveXpY
Enter passphrase:

GELI status.command shows it to be active with '.eli' extension
However it won't mount




mount /dev/driveXpY.eli /mnt/
mount: /dev/driveXpY.eli no such file or directory
 
A small script to test geli on zfs, maybe you find it usefull,
cat test_geli
Code:
#!/usr/local/bin/zsh -v
kldload geom_eli.ko
zfs create -V 5G ZT/private
zfs set volmode=full ZT/private
dd if=/dev/random of=mykey bs=64 count=1
/bin/ls /dev/zvol/ZT/private
geli init -s 4096 -K ./mykey /dev/zvol/ZT/private 
/bin/ls /dev/zvol/ZT/private
geli attach -k ./mykey /dev/zvol/ZT/private 
zpool create gelipool /dev/zvol/ZT/private.eli 
zpool export gelipool
geli detach /dev/zvol/ZT/private.eli 
zfs destroy ZT/private
 
A small script to test geli on ufs,
cat test_geli_ufs
Code:
#!/usr/local/bin/zsh -v
kldload geom_eli.ko
dd if=/dev/zero of=./private bs=1G count=5
mdconfig -u md10 -a -t vnode ./private
dd if=/dev/random of=mykey bs=64 count=1
geli init -s 4096 -K ./mykey /dev/md10 
geli attach -k ./mykey /dev/md10
newfs -O 2 -U -j /dev/md10.eli
mkdir /mnt/md10
mount /dev/md10.eli /mnt/md10
touch /mnt/md10/test
umount /mnt/md10
geli detach /dev/md10.eli
mdconfig -du md10
rm ./private
 
A small script to test geli on ufs,
cat test_geli_ufs
Code:
#!/usr/local/bin/zsh -v
kldload geom_eli.ko
dd if=/dev/zero of=./private bs=1G count=5
mdconfig -u md10 -a -t vnode ./private
dd if=/dev/random of=mykey bs=64 count=1
geli init -s 4096 -K ./mykey /dev/md10
geli attach -k ./mykey /dev/md10
newfs -O 2 -U -j /dev/md10.eli
mkdir /mnt/md10
mount /dev/md10.eli /mnt/md10
touch /mnt/md10/test
umount /mnt/md10
geli detach /dev/md10.eli
mdconfig -du md10
rm ./private
Thanks. So basically I'm on a live cd - Freebsd 13.1- RELEASE. Guessing that comes with zfs loaded modules? 'Zfs list' command says "no datasets available"

When I try to do kldload geom_eli.ko it says the module is already loaded. Not sure why it won't mount the drive specially after 'geli attach' seems to work normally 🤔
 
Back
Top