Re: IMPORTANT: SysVinit & umounting

Jerry Peters (gapeters@worldnet.att.net)
Fri, 18 Sep 1998 17:54:59 -0400


]Hi Alex,
I had the same problem and have a simpler fix.
If you do a: cat /proc/1/maps you should see the
problem (with a dynamic init linked against glibc):
4000c000-4000e000 r--p 00000000 08:02 11558 /etc/ld.so.cache
(deleted)
Somewhere in your boot scripts there is an ldconfig command. This
rebuilds ld.so.cache, which init has open, and will never close. When it
is unlinked, it will not be deleted until it closed, which will not
happen before the remount r/o. My solution using a dynamic init,
was to find the ldconfig command and precede it by:
ln -f /etc/ld.so.cache /etc/ld.so.cache.old
this leaves a link to the old ld.so.cache so that there is no delete
pending for the inode.
Caveat: this must only be executed _once_ for each boot. Originally the
ldconfig command was in /etc/init.d/multi on my system, which is run
whenever a switch to multiuser mode is done, so I moved it to
/etc/init.d/boot which is only run once. An alternative would have been
to rm /etc/ld.so.cache.old in /etc/init.d/boot and remove the -f from
ln, thus the link would only succeed the first time. I did this several
days ago & have rebooted multiple times & it's worked perfectly, no more
FS is busy messages from mount.

Jerry
>
> From: Alex Buell <alex.buell@tahallah.demon.co.uk>
> Date: Wed, 16 Sep 1998 08:13:20 -0400 (EDT)
> Subject: IMPORTANT: SysVinit & umounting
>
> Hi guys,
>
> Just a word in your ear-holes: Do you recall someone mentioning a while
> ago that when he shutdown his Linux system, umount could not umount the
> root file system properly (i.e VFS: Could not umount, filesystem busy or
> something to that effect?) Well, I think I know why and have a solution.
>
> Well, I just upgraded my SysVinit to 2.74 (from 2.62) and mount to 2.8b (I
> have a patch for this for glibc-2.0.95 - see later in this e-mail).
>
> Upon starting the shutdown -r now phase, I had a similar problem to the
> above. On closer investigation discovered that SysVinit's init was not a
> static binary, but was a dynamic binary. Recompiling this as a static (add
> - -static to the STATIC macro in the Makefile) fixed this problem, now get
> perfect umounts every time I initiate the shutdown phase.
>

<snip>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/