umount hangs with initramfs as root
Chuck Meade
chuckmeade at mindspring.com
Tue Mar 21 21:30:50 PST 2006
Hi Rob,
Thanks for the info.
> > Busybox umount hangs when I try to reboot, while running on a root
> > fs which is an initramfs. Reboot is configured on my system to
> > "umount -a -r", and the umount of the initramfs root is hanging.
>
> You're using a kernel before 2.6.13, aren't you?
Yes I am working on a few platforms at once, and this particular one is
still at 2.6.11.6. The Busybox version running on it is 1.0.0.
I know they are not very recent, but I was trying to figure out
if the problem with umounting an initramfs is known/fixed, or known
to not work regardless of the version, etc.
> I forgot: the patch to prevent initramfs from being umounted went in around
> then. Before that you could hang your system hard by umounting initramfs.
> (The kernel would go into an endless loop since the mount list is a circular
> doubly linked list with initramfs as the start/end point it searches for.)
>
> Hmmm... Didn't test umount -a with an older kernel.
This is what I mean -- am I correct in interpreting what you wrote above,
that an initramfs simply cannot be umounted?
I have used initrd's in the past, and am testing out using initramfs, as
my embedded rootfs (not just a transitional rootfs). It works great until
I try to reboot, and the umount hangs. Especially for a small embedded
target with limited resources, having the initramfs as the "real" rootfs
has advantages. This umount problem is not one of them though :)
I don't know if this inability to umount the initramfs is a "feature" or
a bug. Since you say that a patch went in to prevent it, maybe it is
desired behavior. But it does not make it easy to umount for rebooting.
I see that you wrote the Linux Documentation/ file on initramfs. So
based on your knowledge of this topic, what do you think is the appropriate
next step here? I am thinking that possibilities include:
1. changing my busybox reboot sequence to not "umount -a -r", just umount
the mounts *under* /
2. possibly changing the reboot sequence to switch_root to some other
directory first, then umounting initramfs and rebooting
3. any other better ideas?
What would you suggest?
> I tweaked umount a bit, but it's possible this specific issue didn't get
> addressed.
>
> What versions of busybox and the kernel are you using? I'll see if I can
> reproduce it. Is this a recent problem, or has busybox been doing it for a
> while?
My versions are not recent so they do reflect any of your recent mount work.
Thanks very much for your thoughts on this,
Chuck
More information about the busybox
mailing list