You are not logged in.

#1 2019-12-08 20:36:27

drossbox
Member
Registered: 2019-12-04
Posts: 22

Long boot times due to a Luks encrypted drive being mounted.

My boot times have increased massively since encrypting my second HDD with Luks. Systemd-analyze blame is returning:

 7.356s systemd-cryptsetup@HDD.service                                          
3.108s apparmor.service                                                        
1.166s mnt-swap.swap                                                           
1.151s systemd-logind.service                                                  
1.109s optimus-manager.service                                                 
 930ms dev-mapper-luks_root.device                                             
 820ms fwupd.service                                                           
 599ms lvm2-monitor.service                                                    
 532ms bolt.service                                                            
 325ms systemd-localed.service                                                 
 294ms upower.service                                                          
 242ms tlp.service                                                             
 218ms boot-efi.mount                                                          
 212ms systemd-udevd.service                                                   
 197ms systemd-journald.service                                                
 181ms systemd-hostnamed.service                                               
 173ms systemd-machined.service                                                
  92ms systemd-journal-flush.service                                           
  82ms udisks2.service                                                         
  79ms systemd-udev-trigger.service                                            
  79ms accounts-daemon.service                                                 
  68ms HDD.mount                                                               
  62ms polkit.service 

As you can see, systemd-cryptsetup@HDD.service is taking a big chunk of this. I didn't want the boot process to wait for the mount, so I changed my /etc/fstab entry to:

 /dev/mapper/HDD      /HDD                 ext4    nofail,noauto,x-systemd.automount        0 0  

I also changed my /etc/crypttab entry to: 

 HDD  /dev/sda2       /root/lukskey noauto 

According to the fstab section of the wiki, shouldn't using noauto and x-systemd.automount mean that the system won't mount them until I try to access the HDD? Why is it still showing up in systemd-analyze blame?

Offline

Board footer

Powered by FluxBB