agama-project / agama

A service-based Linux installer
https://agama-project.github.io/
GNU General Public License v2.0
143 stars 43 forks source link

Could not umount `/mnt/run` after the installation (systemd creds) #1679

Open imobachgs opened 1 month ago

imobachgs commented 1 month ago

If you log in through an Agama console after the packages installation starts, Agama will not be able to unmount the /mnt file system once the installation is finished.

It seems related to systemd's credentials system (I might be wrong). If you log in before the packages installation starts, /mnt is not mounted yet and systemd creates /run/credentials/getty@tty1.service:

tmpfs on /run/credentials/getty@tty1.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)

However, if you do it while Agama is installing the packages, you get the mount point twice:

tmpfs on /mnt/run/credentials/getty@tty2.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
tmpfs on /run/credentials/getty@tty2.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)

Hence, at the end of the installation, Agama is unable to umount the /mnt/run file system.