--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: busybox-static: busybox will not exec /sbin/init
- From: Vincent Beffara <beffara@ml.kva.se>
- Date: Sun, 10 Feb 2002 15:32:55 +0100
- Message-id: <E16Zv2H-0005ix-00@elbereth>
Package: busybox-static
Version: 1:0.60.2-3.1
Severity: normal
I'm trying to build a boot CD using initrd and busybox as a shell. The
initrd contains :
> cd initrd.mnt; find . -type f
./bin/ls
./bin/busybox
./bin/sh
./bin/echo
./bin/mount
./bin/umount
./bin/sleep
./bin/pivot_root
./linuxrc
(where all the executables are links to busybox).
Here is the file /linuxrc :
----------------------------------------------------------
#!/bin/sh
PATH=/bin
mount -t iso9660 -o ro /dev/cdroms/cdrom0 /newroot
cd newroot
pivot_root . initrd
mount -t proc proc /proc
mount -t devfs devfs /dev
mount -t tmpfs tmpfs /tmp
tar zxf tmp.tar.gz
/sbin/depmod -a
exec /sbin/init
-----------------------------------------------------------
I boot using 'init=/linuxrc' so that linuxrc gets PID 1.
/sbin/init is a real file in the new root fs - but busybox will not use
it, it will instead switch to its own version of init, hence not
recognize /etc/inittab.
Workaround : rename /sbin/init as /sbin/realinit, replace the last line
of /linuxrc by 'exec /sbin/realinit', and it works as expected.
-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux elbereth 2.4.17 #1 Wed Feb 6 14:28:26 CET 2002 i686
Locale: LANG=C, LC_CTYPE=C
--- End Message ---