Rocky Linux bug?

Not sure if this would be called a bug, but it was very unfriendly from a UI perspective.

Running RL 9.2.

I recently added a line to my fstab to automatically mount a CIFS share from a Windows machine. Unfortunately, I made a mistake in the credentials file. On the next boot, RL refused to boot and dumped me into the emergency console. It would be much more friendly if RL said “sorry, couldn’t mount that” and continued on its way. I was lucky enough to figure out what had happened and use the emergency console to delete the line in fstab and the machine then rebooted fine.

I would suggest using _netdev as one of the mount options on any CIFS or NFS mount in fstab. This should help alleviate these issues.

1 Like

Thank you. I read about _netdev and it says that what it does is delay mounting until the network is up.

Will that really fix this issue? If I add _netdev and there is still a credentials file problem will the system boot?

I also read that for CIFS mounts that linux automatically assumes _netdev and nothing is gained by adding it.

Not if it’s automount. Editing fstab is not trivial and typos etc… will cause the boot failure you experienced. I’ve certainly had my boot failures due to editing fstab.
Here’s a script I use to test cifs mounts.

   sudo mount.cifs -o username=$USER,uid=$USER,gid=$USER,credentials=/home/$USER/.samba/.$USER //servername/$share ~/$share

Then if the test is successful then before you edit fstab post your intended fstab entry here first. I always used the “noauto” option for my cifs mounts and then completed them via a script initiated by user login.

1 Like

Your script worked. Thank you. Proposed fstab follows. It is the last entry in the fstab that caused the problem.

/dev/mapper/rl-root / xfs defaults 0 0
UUID=2ecd74b3-8d26-48f7-8957-0ca8bfa4e404 /boot xfs defaults 0 0
UUID=c533acdd-77dc-4a74-b48f-4bd59a5ffbfb /home xfs defaults 0 0
/dev/mapper/rl-swap none swap defaults 0 0
// /mnt/rocky-dd cifs, mfsymlinks,credentials=/etc/win-credentials,file_mode=0755,dir_mode=0755 0 0

This is hard to read, you should use the code block </> to post code.
The first thing I see is there is a comma after cifs which should not be there. I’m not familiar with the mfsymlinks option so will assume you’ve done the research.
Since you are doing a root or universal mount did you adapt my script to reflect your intent? Is the ip a static address for your server? If it is not there is a likely chance of a boot failure if that machine can’t be found.
You don’t want to have an fstab entry for a machine that is not always on or receives an address via dhcp. I don’t know if there is a OK for failure option for cifs mounts. I always had “noauto” as the first option for my cifs mounts and then used a separate script to make the final mount. My mounts are all user, so much easier to script and because of that I nolonger have my mounts in fstab.

Thanks for the response.

Yes, is a static address of the Windows machine.

I think you are right that I’m better off just mounting the filesystem after the machine has booted.

Thanks again for your help.