Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2010 18:56:09 +0000 (GMT)
From:      Olav Gjerde <olavgjerde@yahoo.no>
To:        freebsd-geom@freebsd.org
Subject:   How to unlock a md0 device with GELI during boot?
Message-ID:  <837076.74458.qm@web28208.mail.ukl.yahoo.com>

next in thread | raw e-mail | index | archive | help

I'm trying to unlock a geli encrypted file which contains multiple GELI keys to unlock several hard drives. The reason for this is that I want to unlock all the harddrives without typing the password for each harddrive for each reboot.

I've created a small file with dd, used mdconfig to create a md0 device, used geli init on the md0 device, attached it and finally I created an ufs filesystem on the /dev/md0.eli device
So far everything works fine.

For the boot process I added this line in /etc/rc.conf
mdconfig_md0="-t vnode -f /boot/geli.img"
This successfully created the md0 device.

I've also added this below the mdconfig line in rc.conf
geli_devices="md0"
geli_md0_flags="-k /boot/geli.key"

If I reboot I get the following error message during the boot:
Creating md0 device (vnode)
fsck: Could not determine filesystem type.
Fsck failed on /dev/md0 not mounting the filesystem.

But file works fine when I after the boot do this:
geli attach -k /boot/geli.key md0

Is it possible to geli to unlock the md0 device during the boot process?
Are there any other alternatives for my problem?

-- Olav






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?837076.74458.qm>