[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [e2fsprogs-1.24] "fsck -A -a" fails on reboot

On 20010907 (Fri) at 2123:05 -0400, Theodore Tso wrote:

> So the right, safe thing for a distribution's boot scripts to do is:
> (a)  Boot the kernel with the root filesystem mounted read-only.
> (b)  Run fsck on the root filesystem.
> (c) Remount the root read-write, and initialize /etc/mtab, and/or 
> 	(especially if the distribution is one that likes to symlink
> 	/etc/mtab to /proc/mounts), mount /proc.
> (e)  Run fsck on the rest of the filesystems
> (f)  Mount the rest of the local filesystems
> If Slackware is doing something else, it's arguably broken.

Probably.  But with Slackware it's trivial to fix:

--- /etc/rc.d/rc.S.orig Thu May 24 07:05:13 2001
+++ /etc/rc.d/rc.S      Sat Sep  8 08:17:33 2001
@@ -26,8 +26,9 @@
 # Check the integrity of all filesystems
+# Root first
 if [ ! $READWRITE = yes ]; then
-  /sbin/fsck -A -t ext2 -a
+  /sbin/fsck -C -t ext2 -a /
   # If there was a failure, drop into single-user mode.
   if [ $? -gt 1 ] ; then
@@ -111,7 +112,13 @@
 # remove /etc/mtab* so that mount will create it with a root entry
+# this will cause e2fsck to complain about the missing mtab so fake
+# a root mount immediately
 /bin/rm -f /etc/mtab* /etc/nologin /etc/shutdownpid
+/sbin/mount -f /
+# check nonroot filesystems
+/sbin/fsck -C -R -A -a
 # mount file systems in fstab (and create an entry for /)
 # but not NFS or SMB because TCP/IP is not yet configured

(One could also invoke the code to drop into single-user mode if the
second fsck fails, which I omit here for brevity's sake.)

<rant>And once fixed, with Slackware, you can reasonably hope that no
(%@)$# mickeymouse highlevel configuration tool will come in during
boot and auto-unfix it!</rant> ;-)

| G r e g  L o u i s          | gpg public key:      |
|   http://www.bgl.nu/~glouis |   finger greg bgl nu |

Header information for this message
(included within the PGP envelope for security reasons):
Subject: Re: [e2fsprogs-1.24] "fsck -A -a" fails on reboot
     To: ext3-users redhat com
     CC: volkerdi slackware com
   From: Greg Louis <glouis dynamicro on ca>

Attachment: pgp00001.pgp
Description: PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]