Re: pivot_root. unmount old root
On Sun, 21 Mar 2010 09:38:12 -0400 (EDT), Katharina Haselhorst wrote:
> Since I'm doing a pivot_root before trying to umount the old root there
> are still several processes keeping some files open inside the old root
> subdirs. Init is still running, als well as rc and one shutdown script
> (atm I'm doing the pivot_root just before shutdown, because most
> processes are terminted by the time). If I kill one of these processes,
> the systems gets shut down.
> I don't understand why there is still that shutdown script running,
> because I'm doing a exec chroot. The pivot_root's manual says: "Note
> that exec chroot changes the running executable, which is necessary if
> the old root directory should be unmounted afterwards."
> And the init process is always running, so how does pivot_root handle
> the open files of init?
> I did move the /proc and /dev mountpoints from old-root to the new root
> - might that cause some problems? If I don't do that - lsof or fuser of
> course don't show any open files for old-root, but I'm not able to
> unmount to old-root either.
Maybe it's time to step back and ask a more basic question.
What is it that you are trying to accomplish? I know that you are trying
to do a pivot_root. But *why* are you trying to do a pivot_root?
Why do you think you need to do it? What is the real-world problem
that you are trying to solve?
--
.''`. Stephen Powell <zlinuxman@wowway.com>
: :' :
`. `'`
`-
Reply to: