You are not logged in.

#1 2021-05-31 06:18:39

aoaaceai
Member
Registered: 2021-04-21
Posts: 8

[SOLVED] Auto mounting *after* boot time

I have a machine with 2 encrypted disks, mounted at /boot and /.
This is the trimmed layout:

nvme0n1          259:0    0 953.9G  0 disk  
├─nvme0n1p1      259:1    0   260M  0 part  /efi
├─nvme0n1p5      259:5    0   200M  0 part  
│ └─cryptboot    254:4    0   198M  0 crypt /boot
└─nvme0n1p6      259:6    0   256G  0 part  
  └─cryptroot    254:0    0   256G  0 crypt 
    └─linux-root 254:1    0   128G  0 lvm   /

I've put them all in fstab, set up auto decrypting with crypttab and initrd. So the boot process would look like:
1. Machine powers up, grub asks for password to unlock nvme0n1p5
2. Enters grub menu, and initramfs includes a keyfile to unlock nvme0n1p6
3. Auto decrypting nvme0n1p5 with another keyfile in /etc/crypttab
4. auto mounting /boot with fstab
5. Reached target Local File Systems
6. Login prompt

However, decrypting + mounting /boot at boot seems pretty redundant, and takes another 2-3 seconds to finish.
I still want to automount it, but can I move it to Main User Target? I know I can write a simple script to do that, but wondering if there are any tools available already.

Thanks for the help.

Last edited by aoaaceai (2021-06-01 08:56:42)

Offline

#2 2021-05-31 07:05:22

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,484

Re: [SOLVED] Auto mounting *after* boot time

"noauto,x-systemd.automount" ?

Offline

#3 2021-05-31 11:57:41

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Auto mounting *after* boot time

If you add a mount option "nofail" then systemd will do the mounting in the background, the mount won't hold up the start-up for other jobs anymore.

Using "nofail" on a mount, it will still add to the total boot time result you get with "systemd-analyze" but your display manager will already start and work without the mount being available.

Offline

Board footer

Powered by FluxBB