During boot, some/many mount points in /etc/fstab are not mounted.
The /etc/mtab file contains these mount points - my understanding is that the system believes the filesystems are already mounted.
Modifying my /etc/rc.d/init.d/mountfs script (taken from LFS) with the line
grep -v root /proc/mounts > /etc/mtab
before the call to (I added the v and # to get some output - the system claims already mounted)
mount -av -O no_netdev # > /dev/null
allows the system to appropriately mount the filesystems.
However, in this case, the filesystems are not correctly unmounted on shutdown (by the same script taking the stop argument). The error on shutdown relates to the root filesystem.
df returns output which shows the state of my filesystems, so is easy to check. mount outputs all of the expected mountpoints, even if they are not mounted (ie, without the modification to /etc/rc.d/init.d/mountfs)
Issuing commands such as mount /mountpoint/in/fstab successfully mounts the point, even if it is already in /etc/mtab (presumably this is because mount -a checks mtab, and mount <specific point> does not?)
What's going wrong?
My /etc/fstab:
# device mount-point fs-type options dump fsck-order
# Core mount points
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
/dev/sda8 swap swap pri=1 0 0
/dev/sda9 / ext4 defaults 1 1
/dev/sda10 /home ext4 defaults 0 2
# Additional mount points
/dev/sda6 /mnt/Ubuntu ext4 defaults 0 0
/dev/sda11 /sources ext4 defaults 0 0
# Network mounts
//software.blah.blah/path /mnt/Licensed cifs credentials=/home/<user>/.smbpasswd,ro,_netdev 0 0