Re: Feature request: exec self for NOMMU.

From: Rob Landley
Date: Wed Dec 27 2006 - 00:47:01 EST

On Tuesday 26 December 2006 11:24 pm, Denis Vlasenko wrote:
> busybox needs it in order to spawn, for example, gzip/bzip2 helper
> for tar. We know that our own executable has this function.
> How to execute _our own executable_? exec("/proc/self/exe")
> works only if /proc is mounted. I can imagine that some embedded
> people want to be able to not rely on that.

Actually, we added CONFIG_BUSYBOX_EXEC_PATH so you could feed it a different
path to the busybox executable if you haven't got proc. It's still a hack,
and it still breaks when you chroot, but you can use the standalone shell
without /proc.

Why do people chroot? To do system recovery using busybox with the standalone
shell and built-in commands. They chroot into the damaged root partition to
run some of the commands in there (shared library paths get a bit twitchy
without the chroot), but they want to use the built-in busybox commands for
most of it because PAM and selinux can get screwed up by passing birds,
brightly colored wallpaper or large flowers, and when they do they interfere
with everything.

*shrug* This was a bigger deal a few years ago, before the invention of the
knoppix CD...

"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at