Debugging fstab problems on reboot
After a reboot, some partitions which were mentioned in fstab were not mounted as expected. The format of the line for the partitions which were mounted correctly and those which were not mounted correctly look the same so I am wondering whether some log exists of any problems which prevented the restoration of the missing partitions.
I am not able to see the console during a reboot but need to determine and fix the problem later.
Solution 1:
There's a few things you could try:
- Assuming that they are still not mounted when you can login, does a
mount -a
cause any errors to get printed to your terminal? This will only use information available in the fstab to mount all available mounts, and should provide details of any mounts that are still failing to succeed.- If you get no errors, and still have no mounts, are you sure that you don't have the
noauto
option enabled? - If you get no errors and now have mounts, perhaps there's some segregated mounting happening in your boot sequence and not all of those boot steps are enabled; eg, Gentoo has
localmount
andnetmount
andnfsmount
init scripts for mounting things at boot.
- If you get no errors, and still have no mounts, are you sure that you don't have the
- Is it an ordering issue? ie, trying to mount
/var/lib
before/var/
. You can use the first numeric parameter in the fstab to control which mounts get mounted first. - Failing any of the above, you can try going log diving.
dmesg
, or one of the various logs in/var/log
should be able to help. Your boot sequence should be being logged by default, but because it's dependant on your system logger's configuration it can change a little, even on different versions of the same distribution. The usual culprits are/var/log/messages
andvar/log/kernel
.
Solution 2:
Note that some mount services such as s3 fuse require networking services to be enabled prior to the mount happening, so you may need to create an init.d service to enable the mount and order it accordingly. Credit: https://github.com/s3fs-fuse/s3fs-fuse/issues/412