My second hard disk is not automatically mounted on startup. I have installed CL on a SSD disk but my data is on a big hard drive. Every time I have to mount it manually by clicking on the disk in file manager and it then asks for authentication.
I saw that there is no fstab file and i tried to make one but then the system wouldn’t start up at all with the error “Cannot open access to console, the rout account is locked. See sulogin(8) man page for more details.”
Is there an easy way to automatically mount my second drive during startup?
fstab is the way to do this. If your system didn’t boot after editing fstab there may have been a syntax error in the file.
the GNOME Disks utility can automatically create the fstab file with proper syntax/boot options for auto-mounting. Keep in mind that you’ll have to launch the utility with sudo so that it has permissions to write that file.
A mount unit would be more reliable. But indeed an entry in /etc/fstab should just work. I assume that OP made a syntax error in theirs, but it’s surprising this brought the system into a non-bootable state, a mount unit may have prevented that.
Yeah, a mount unit is my personal preference too. I remember reading this from man systemd.mount which is why I still promote fstab.
Mount units may either be configured via unit files, or via /etc/fstab (see fstab(5) for details). Mounts listed in /etc/fstab will be converted into native units dynamically at boot and when the configuration of the system manager is reloaded. In general, configuring mount points through /etc/fstab is the preferred approach.