I recently switched to Linux (Zorin OS) and I selected "use ZFS and encrypt" during installation. Now before I can log in it asks me "please unlock disk keystore-rpool" and I have to type in the encryption password it before I'm able to get to the login screen.

Is there a way to do this automatically like with Windows or MacOS? Zorin has biometric login which is nice but this defeats the purpose especially because the encryption password is long and tedious to type in.

Also might TPM have anything to do with this?

EDIT: Based on the responses I have to assume some of you guys live in windowless underground bunkers sealed off with concrete because door locks "aren't secure against battering rams". Normal people don't need perfect encryption they just want to add an extra hurdle or two for the crackhead who steals the PC. I assumed Linux had a system similar to what Windows or MacOS has been doing for a decade but I am apparently wrong.

  • carzian@lemmy.ml
    ·
    9 months ago

    It's disappointing to see so many commentors arguing against you wanting to do this. Windows has it through bitlocker which is secured via the TPM as you know. Yes it can be bypassed, but it's all about your threat level and effort into mitigating it.

    I am currently using a TPM on my opensuse tumbleweed machine to auto unencrypt my drive during boot. What you want to do is possible, but not widely supported (yet). Unfortunately, the best I can do is point you to the section in the opensuse wiki that worked for me.

    https://en.opensuse.org/SDB:Encrypted_root_file_system

    If you scroll down on that page you'll see the section about TPM support. I don't know how well it will play with your OS. As always, back up all your files before messing with hard drive encryption. Best of luck!

    • Jediwan@lemy.lol
      hexagon
      ·
      edit-2
      9 months ago

      Thanks, Zorin is based on Ubuntu so I have to assume it will be up to date with stuff like TPM which is 15 years old. The data on the page you linked is pretty advanced for me but I'll give it a shot. Appreciate you addressing my question.

      • carzian@lemmy.ml
        ·
        9 months ago

        Ubuntu isn't really on the cutting edge, so I'm not sure how well its going to work. Opensuse tumbleweed is running pretty much the latest everything, so its possible youll need to wait until the next Ubuntu lts

  • GolfNovemberUniform@lemmy.ml
    ·
    edit-2
    9 months ago

    Afaik you can't. Disk encryption requires entering the password every time and it asks for it BEFORE the OS is started so you can't use biometric login either

    • Jediwan@lemy.lol
      hexagon
      ·
      edit-2
      9 months ago

      That's not technically true as enabling bitlocker on windows and filevault on Mac don't require two different passwords.

      • GolfNovemberUniform@lemmy.ml
        ·
        9 months ago

        Sorry idk much about Windows and Mac. But what you said sounds like their encryption systems aren't full disk encryption, they somehow found a way to store the password for login or they just disable the login password completely when the encryption is enabled

  • Saff@lemmy.ml
    ·
    9 months ago

    Instead of encrypting the entire drive, encrypt the home folder. That way it’s unlocked when you sign in.

  • VHS [he/him]
    ·
    edit-2
    9 months ago

    What it sounds like you want is only your home folder encrypted, where it decrypts seamlessly upon login. It sounds like you have encrypted OS root, which is more secure but necessarily requires a password before the system gets to the login screen.

    Other than reinstalling your system, you do have the option of either making your decryption password shorter, and/or enabling auto-login after boot (if you're the computer's only user), so you'd only have to type one password instead of two.

    • Jediwan@lemy.lol
      hexagon
      ·
      edit-2
      9 months ago

      Auto-Login makes the most sense I didn't consider that. I'll just have to be careful not to log out without shutting down.

    • Bitrot@lemmy.sdf.org
      ·
      edit-2
      9 months ago

      Or you can do full disk encryption and store the encryption info in the TPM and lock it down against various PCRs such that changes to the boot order or firmware prevent the drive unlocking without a secondary decryption key, just like Windows and Macs do.

      It’s a built in feature of systemd, among other tools.

      • VHS [he/him]
        ·
        9 months ago

        I'm not familiar with exactly what you mean, does it not require a password to boot that way? I have full-disk encryption on my laptop but not with TPM, grub just prompts me for a password before the kernel boots

        • Bitrot@lemmy.sdf.org
          ·
          9 months ago

          Correct. The decryption key is stored in the TPM and unsealed when specific criteria match (for example, booted from the correct drive, to the correct kernel file). Figuring out the correct values to tie it to is probably the worst part for a user, if you do it wrong it might just unseal because your EFI firmware binary hasn’t changed, which isn’t all that useful if someone is trying to break in with a live image.

  • umami_wasabi@lemmy.ml
    ·
    edit-2
    9 months ago

    If you want some more convenience but don't want to give up security, you can use hardware tokens like Nitrokey with GPG.

    The process would be generate a random file using dd and /dev/urandom. Set this as the key for FDE. Encrypt it using your GPG and store it on /boot. Have a helper script to ask you plugin your Nitrokey and (optional) pin to decrypt the keyfile to have root decrypted. I had read this on some blog for dm-crypt so you will need to research and adopt to your setup.

  • zkrzsz [he/him]
    ·
    9 months ago

    https://askubuntu.com/questions/1414617/configure-ubuntu-22-04-zfs-for-automatic-luks-unlock-on-boot-via-usb-drive

    This is done via storing the unlock key in USB drive and need the USB plugged to auto unlock, see if it helps.

  • Bisexual_Cookie [comrade/them, any]
    ·
    edit-2
    9 months ago

    as others have pointed out, you can use systemd-cryptenroll to add your tpm as a way to unlock the disk at boot, security of this should be fine if secureboot is enabled (for this to work it will need to be anyway) and a password is set for the uefi. See the archwiki entry for setup info (command is as simple as systemd-cryptenroll --tpm2-device=auto /dev/rootdrive, also the device needs to be encrypted with luks2, no idea if zorin uses that by default but you can convert luks1 to luks2 {backup ur headers first!})

  • Random Dent@lemmy.ml
    ·
    9 months ago

    Not sure if this works with drive encryption since it comes before the OS, but could this maybe be done with a YubiKey or something like that?

    That way, you can plug it in and not worry about typing the password every time, but then it's also secure if someone takes your PC? As long as you remove the key when it's off of course.

    • Bitrot@lemmy.sdf.org
      ·
      9 months ago

      Yes, systemd-cryptenroll supports Yubikey as well as generic FIDO2 tokens (and the TPM on most distros).

  • Bitrot@lemmy.sdf.org
    ·
    edit-2
    9 months ago

    Fedora has a good write up using Clevis, I am not sure how well Ubuntu supports it as they traditionally have been against using the TPM for security reasons. https://fedoramagazine.org/automatically-decrypt-your-disk-using-tpm2/

    systemd-cryptenroll can do it very quick and easy, it’s literally about two minutes work, but Ubuntu patches out the TPM support.

    Ubuntu will soon have TPM-backed full disk encryption as a standard option in the installer. Their implementation is designed to defeat most of the security implications that the naysayers bring up, except the login process is still a potential vulnerability. What you are asking about is not so far fetched as some of the comments would lead you to believe: https://ubuntu.com/blog/tpm-backed-full-disk-encryption-is-coming-to-ubuntu