Lately (last week or so,) when I boot my machine (Debian Testing,) after either a poweroff (via shutdown -h) or reboot (via shutdown -r,) it consistently complains that the root filesystem was not cleanly unmounted, and insists on fscking that filesystem. After the reboot forced by fsck, the machine starts up just fine.
Browsing the init scripts in /etc/rc0.d/ and /etc/rc6.d/, I can't find any sign of anything attempting to unmount the root filesystem. Does anyone have any ideas where this should be happening, please?
On 12-Oct-05 Dan Hatton wrote:
Lately (last week or so,) when I boot my machine (Debian Testing,) after either a poweroff (via shutdown -h) or reboot (via shutdown -r,) it consistently complains that the root filesystem was not cleanly unmounted, and insists on fscking that filesystem. After the reboot forced by fsck, the machine starts up just fine.
Browsing the init scripts in /etc/rc0.d/ and /etc/rc6.d/, I can't find any sign of anything attempting to unmount the root filesystem. Does anyone have any ideas where this should be happening, please?
There should be a script like
/etc/rc.d/rc6.d/S01reboot
(at least there is on my RH9 system). This looks after both reboot and shutdown. Therein the unmounting is done towards the end of the file, following the comment lines
# Unmount file systems, killing processes if we have to. # Unmount loopback stuff first
You could always try (with care!) planting a few "echo" debug-trace comments in the file, so that you can check its progress on screen. But in any case, when you reboot or shutdown you should always see the message "Unmounting file systems" just before the message "Halting system..." or "Please stand by while rebooting the system..."
These come from within that file, and if you don't see these then something is wrong.
Hoping this helps, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 12-Oct-05 Time: 23:28:54 ------------------------------ XFMail ------------------------------
On 10/12/05, Ted Harding Ted.Harding@nessie.mcc.ac.uk wrote:
On 12-Oct-05 Dan Hatton wrote:
Lately (last week or so,) when I boot my machine (Debian Testing,) after either a poweroff (via shutdown -h) or reboot (via shutdown -r,) it consistently complains that the root filesystem was not cleanly unmounted, and insists on fscking that filesystem. After the reboot forced by fsck, the machine starts up just fine.
You could always try (with care!) planting a few "echo" debug-trace comments in the file, so that you can check its progress on screen. But in any case, when you reboot or shutdown you should always see the message "Unmounting file systems" just before the message "Halting system..." or "Please stand by while rebooting the system..."
Another strategy is to re-mount root as read-only before the end.
As you are running Debian Testing, there is a chance the shutdown scripts have been broken in a recent update.
Tim.
On Thu, 13 Oct 2005, Tim Green wrote:
On 12-Oct-05 Dan Hatton wrote:
Lately (last week or so,) when I boot my machine (Debian Testing,) after either a poweroff (via shutdown -h) or reboot (via shutdown -r,) it consistently complains that the root filesystem was not cleanly unmounted, and insists on fscking that filesystem. After the reboot forced by fsck, the machine starts up just fine.
Another strategy is to re-mount root as read-only before the end.
Ah, yes; this is what my system was trying to do, but unfortunately never got round to it, because the relevant script (S60umountroot) came after K99reboot or K99halt (neither of which unmounts anything) in the run_parts sequence; S60umountroot also has all its action in its "stop" subroutine, which presumably means that, whatever the run order, it wouldn't have worked while it was named with an "S." Renaming the symlink from "S60umountroot" to "K98umountroot" got things working right again.
On Thu, 13 Oct 2005, Dan Hatton wrote:
On Thu, 13 Oct 2005, Tim Green wrote:
Another strategy is to re-mount root as read-only before the end.
Ah, yes; this is what my system was trying to do, but unfortunately never got round to it, because the relevant script (S60umountroot) came after K99reboot or K99halt (neither of which unmounts anything) in the run_parts sequence; S60umountroot also has all its action in its "stop" subroutine, which presumably means that, whatever the run order, it wouldn't have worked while it was named with an "S." Renaming the symlink from "S60umountroot" to "K98umountroot" got things working right again.
However, I'm perturbed to find that an apt-get update/apt-get install yesterday deleted my nice shiny new symlink, leaving my system once again unable to shut down properly. I've re-created the symlink manually, but would be interested to know if anyone can think of a more permanent solution.