[Bug 1255] New: Standalone shell hush can no longer exec applets

bugzilla at busybox.net bugzilla at busybox.net
Wed Mar 10 20:31:57 UTC 2010


https://bugs.busybox.net/show_bug.cgi?id=1255

           Summary: Standalone shell hush can no longer exec applets
           Product: Busybox
           Version: 1.16.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at busybox.net
        ReportedBy: grifsim at gmail.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


I have been using "exec switch_root /mnt/new_root /sbin/init" from an initramfs
successfully with hush / busybox 1.15.3 and earlier versions.  But this command
stopped working when I upgraded to 1.16.0 today...

   sh: can't execute 'switch_root': No such file or directory
   Kernel panic - not syncing: Attempted to kill init!

Simple workarounds are to use ash instead of hush or not to use the standalone
shell mode.

This issue was introduced with the following commit:

http://git.busybox.net/busybox/commit/?id=3ef4f77620a9f5f9a7c1247e29ea9c14e07b8a30


Steps to reproduce:

* Compile latest busybox using...

CONFIG_HUSH=y
CONFIG_FEATURE_SH_STANDALONE=y
CONFIG_INSTALL_APPLET_DONT=y

* start hush and exec an applet, e.g. hush itself...

$ busybox hush -c 'exec hush'
hush: can't execute 'hush': No such file or directory


The expected result is the same result as with either of these:

$ busybox hush -c 'exec busybox hush'
$ busybox ash -c 'exec hush'


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list