You are not logged in.

#1 2021-04-30 15:42:32

ludblom
Member
Registered: 2021-04-30
Posts: 5

How to first mount my system and then my encrypted LUKS partition?

Trying to automatically mount my encrypted hard drive at login. This is how it looks now in /etc/crypttab

Data    UUID=e28506da-xxxx-xxxx-xxxx-8302a74b7e10    none     luks,timeout=180

/etc/fstab

UUID=e28506da-xxxx-xxxx-xxxx-8302a74b7e10      /home/username/Data         ext4          rw,realtime     0 0

and my filesystem

sda
├─sda1      ext4        1.0            xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx              5M        88%  /boot
└─sda2      ext4        1.0            yyyyyy-yyyyy-yyyyy-yyyy-yyyyyyyy                 120G    42%  /
sdb         crypto_LUKS 2              zzzzz-zzzz-zzzzzz-zzzzz-zzzzzzzz
└─Data      ext4        1.0            e28506da-xxxx-xxxx-xxxx-8302a74b7e10

If I leave out the config in /etc/fstab everything works fine, so I believe that I am trying to mount sdb before I have actually mounted my system (sda) and that is what causing the problem, but do not know how to bypass this.

Best regards!

Last edited by ludblom (2021-04-30 15:44:00)

Offline

#2 2021-04-30 15:51:47

ludblom
Member
Registered: 2021-04-30
Posts: 5

Re: How to first mount my system and then my encrypted LUKS partition?

The problem was with the boot order.

UUID=e28506da-xxxx-xxxx-xxxx-8302a74b7e10      /home/username/Data         ext4          rw,realtime     0 0

The last zero indicate the boot order and since I had it at zero it was trying to mount it before the system, hence the problem. Sorry for a stupid question

Last edited by ludblom (2021-04-30 15:52:46)

Offline

Board footer

Powered by FluxBB