umount on shutdown
I have a couple of entries in my fstab file, which automatically mounts other filesystems on start-up, but what I need to know is how to have them automatically umount on shutdown/reboot.
I have always had problems with having to run fsck every now and again, but as I have not had to reboot very often, this has generally not been too much of an issue, but as I am playing around with another distro' and compiling kernels etc, I am now rebooting quite often, and noticing that one or more of my filesystems are not being unmounted, well at least I don't think they are. All help appreciated... |
Some dists have problems, with umounting the swap partition!
I have solved the problem by placing a shell-script in /etc/init.d/umount.sh ---------------------------------------------------------- #! /bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin case "`uname -r`" in 1.*|2.[01].*) FORCE="" ;; *) FORCE="-f" ;; esac umount -ttmpfs $FORCE -a -r echo -n "Deactivating swap... " swapoff -a echo "done." # We leave /proc mounted. echo -n "Unmounting local filesystems... " umount -tnoproc $FORCE -a -r echo "done." mount -n -o remount,ro / : exit 0 ---------------------------------------------------------- Hope this solved you problem! |
All times are GMT -5. The time now is 02:04 PM. |