Path: utzoo!telly!attcan!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: Recurring problem in root filesystem Message-ID: <1990Sep04.122238.20207@virtech.uucp> Date: 4 Sep 90 12:22:38 GMT References: <1990Aug31.134539.749@aucs.uucp> <1990Sep02.232056.9063@pilikia.pegasus.com> <4010@auspex.auspex.com> <15590:Sep402:41:0190@kramden.acf.nyu.edu> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 41 In article <15590:Sep402:41:0190@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <4010@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >> >Try running fsck on the *unmounted* root filesystem, >> Try unmounting the root filesystem first. Good luck.... > >Wait a minute. Can't you chroot() to another filesystem, then remount >the original root below the new one? I haven't tested this but it seems >like it should work on an otherwise unused system. You can't remount root because you can't unmount root because your chrooted environment is below the real root file system and therefore makes the root file system busy. chroot() does not make any file system changes it only places acts as a starting point for pathname resolution in namei() or lookupname() (the kernel routines that resolve pathnames) when the first character of the file name is '/'. The problem is that fscking a mounted file system is that fsck may find things that are wrong when they aren't really wrong and may fix things that get written over if the kernel syncs before you reboot. Fscking root is yet another chicken and egg problem. (although some late system V.3s allow root to be fscked and remounted without rebooting if there is little or no damage to the root fs). This problem is usually resolved by one of the following: a: boot off another device (different partition or different media) fsck the real root and then reboot b: fsck root, reboot no sync, fsck root, if still problems reboot no sync and try try again One of the big reasons for continuing to have problems on your root partition is that it cannot be unmounted due to some other problem in the system (like you have another file system that is not being unmounted (but it too would have fsck problems) or a process that gets stuck in never-never land because of a bug in a device driver, etc) -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170