You are not logged in.

#1 2013-03-19 08:58:33

Wilco
Member
Registered: 2008-11-09
Posts: 440

Systemd automount luks partition in background

A bit of a technical story for systemd experts.

Systemd causes a few seconds delay on boot when it automounts all fstab entries and one of those entries is an encrypted volume. The problem is when I mount a data partition which is really not important, i.e. it can wait until the system is completely booted. I can fix this by using noauto in crypttab and fstab or I can use a rc.local script to mount the partition manually. But how can I tell systemd this partition is not important and mounting this partition should never delay booting? Is it even possible with systemd?

/etc/crypttab:

data /dev/... /root/data.key

/etc/fstab

/dev/mapper/data      /mnt/data   ext4        rw,relatime  0 0

Offline

#2 2013-03-19 09:44:56

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,496

Re: Systemd automount luks partition in background

Have you tried the "noauto" like described in the systemd wiki?


The painting in my profile is "Eros" by Paul Klee. He is credited in the lower left, but that got blurry during the downscale.

Offline

#3 2013-03-19 11:24:33

aesiris
Member
Registered: 2012-02-25
Posts: 97

Re: Systemd automount luks partition in background

Have a look at systemd.automount: man systemd.automount

It should suffice to add x-systemd.automount in fstab instead of noauto, then it will be mounted only the first time that something tries to access /mnt/data

Offline

#4 2013-03-20 08:04:23

Wilco
Member
Registered: 2008-11-09
Posts: 440

Re: Systemd automount luks partition in background

Thanks aesiris, I've tried this but it's the same. When I don't mount the encrypted data partition on boot the system goes from text mode to X within 2 seconds. If I do mount the data partition the console goes from text mode to framebuffer (not sure how to call it but when you got a higher resolution text console) and then to X. Guess what I want is not possible with systemd.

Offline

Board footer

Powered by FluxBB