# How to run gpg on livecd

## petan

I am giving up on ecrpytfs as it doesn't seem to be supported on Gentoo, and want to try full disk encryption, following https://wiki.gentoo.org/wiki/DM-Crypt_LUKS I can't get this command to work in LiveCD:

```
openssl rand -base64 48 | gpg --symmetric --cipher-algo aes --armor >/path/to/key.gpg
```

What do I need to do to get it working? Errors I get:

gpg-agent: command get_passphrase failed: Inappropriate ioctl for device

----------

## Keruskerfuerst

Try Systemrescue CD.

----------

## khayyam

 *petan wrote:*   

> gpg-agent: command get_passphrase failed: Inappropriate ioctl for device

 

petan ... this is probably pinentry failing due to the GPG_TTY variable being empty (see common problems) ... you should be able to resolve it by setting GPG_TTY

```
# GPG_TTY=$(tty) openssl rand -base64 48 | gpg --symmetric --cipher-algo aes --armor >/path/to/key.gpg
```

... if that isn't the case, and you're using ssh, then see the "SSH hangs while a popping up pinentry was expected" in the above linked "common problems".

best ... khay

----------

