[BusyBox] 1.00-pre1 problem: can't umount oldroot after pivot_root&chroot
Yang Xiaopeng
yxp at hanwang.com.cn
Mon Jul 28 08:32:32 UTC 2003
Erik Andersen wrote:
>ok. And /proc is mounted? I did not see you unmounting it
>and mounting it within the new root...
>
> -Erik
>
>--
>Erik B. Andersen http://codepoet-consulting.com/
>--This message was written using 73% post-consumer electrons--
>
>
>
Old /proc is unmounted when init restart, before executing my scripts,
all user processes are also killed in that step. When my scripts run,
proc filesystem is remounted to /tmp/proc before pivot_root&chroot to /tmp.
after chroot, its real mount point should be /proc in the new root.
Here is the output of `mount` just after pivot_root&chroot to /tmp:
/dev/root on /old_root type cramfs (rw)
none on / type tmpfs (rw)
none on /proc type proc (rw)
and the `ps` output:
PID Uid VmSize Stat Command
1 root 616 S /bin/sh sbin/flash.sh
2 root SW [keventd]
3 root SWN [ksoftirqd_CPU0]
4 root SW [kswapd]
5 root SW [bdflush]
6 root SW [kupdated]
7 root SW [keyd]
8 root RW [ledtimed]
9 root SW [mtdblockd]
10 root Z [khubd]
181 root 676 R ps
I'm sure that no user process use old root now, but when run "umount
/old_root", it says:
umount: /old_root: Device or resource busy
I have tried to remount /proc within the new root *after* chroot, but
get the same result.
More information about the busybox
mailing list