Solved GEOM_ELI Failed to authenticate

How I can avoid the Message

Code:
GEOM_ELI: Device da1p2.eli created.
GEOM_ELI: Encryption: AES-XTS 128
GEOM_ELI:     Crypto: software
GEOM_ELI: da1p1.eli: Failed to authenticate 16384 bytes of data at offset 20997357568.
GEOM_ELI: da1p1.eli: Failed to authenticate 4096 bytes of data at offset 20997607424.
GEOM_ELI: da1p1.eli: Failed to authenticate 4096 bytes of data at offset 20997607424.
GEOM_ELI: da1p1.eli: Failed to authenticate 16384 bytes of data at offset 20997357568.
GEOM_ELI: da1p1.eli: Failed to authenticate 4096 bytes of data at offset 20997607424.
GEOM_ELI: da1p1.eli: Failed to authenticate 4096 bytes of data at offset 20997607424.


I installed a full disk encryption with Geli. But I get some errors at boot time.
 
From the geli(8) man page:
It is recommended to write to the whole provider before first use, in order to make sure that all sectors and their corresponding checksums are properly initialized into a consistent state. One can safely ignore data authentication errors that occur immediately after the first time a provider is attached and before it is initialized in this way.
When you create a new GELI container you can use dd(1) for the initialization, writing directly to the provider like dd if=/dev/zero of=/dev/da1p2.eli bs=1m* dd if=/dev/random of=/dev/da1p2.eli bs=1m. Since you already installed your system, you probably don't want to do that as it would overwrite all your files. If you have a simple filesystem in the container you can instead try creating a file to fill the remainder of that filesystem, which you can then remove once the authentication hashes have been calculated. Try something like dd if=/dev/zero of=fillerfile bs=1m && rm fillerfile* dd if=/dev/random of=fillerfile bs=1m && rm fillerfile.

* Updated to suggest use of /dev/random to avoid the risk of a known-plaintext attack on the encrypted container.
 
Last edited:
dd if=/dev/zero of=fillerfile bs=1m && rm fillerfile
Thanks, this works well!!

Also I notice that the Speed of writing the output of /dev/zero and /dev/random are equals. Both of them are pass to the encrypt process at moment of write on the HDD so you can use any of then to do this process.
 
From a security perspective, filling the container with random data is a better choice to avoid a potential known-plaintext attack. I've updated my earlier post for anyone reading this in the future.
 
Back
Top