Thanks for the reply curaga! The /init script does exist. Here's the 'ls' output from the image:
# ls -al
drwxrwxr-x 3 root root 4096 Oct 10 09:07 bin
drwxrwxr-x 7 root staff 4096 Oct 10 09:07 dev
drwxrwxr-t 7 root root 4096 Oct 10 09:07 etc
drwxrwxr-x 4 root root 4096 Oct 10 09:07 home
-rwxr-xr-x 1 root root 496 Oct 10 09:07 init
drwxrwxr-x 4 root root 4096 Oct 10 09:07 lib
lrwxrwxrwx 1 root root 11 Oct 10 09:07 linuxrc -> bin/busybox
drwxrwxr-x 2 root staff 4096 Oct 10 09:07 mnt
drwxrwxr-x 2 root root 4096 Oct 10 09:07 opt
drwxrwxr-x 2 root staff 4096 Oct 10 09:07 proc
drwxrwxr-x 1 root root 12 Oct 10 09:07 run
drwxrwxr-x 2 root root 4096 Oct 10 09:07 sbin
drwxrwxr-x 1 root root 12 Oct 10 09:07 sys
drwxrwxrwt 2 root staff 4096 Oct 10 09:07 tmp
drwxrwxr-x 7 root root 4096 Oct 10 09:07 usr
drwxrwxr-x 8 root root 4096 Oct 10 09:07 var
# cat init
#!/bin/sh
mount proc
grep -qw multivt /proc/cmdline && sed -i s/^#tty/tty/ /etc/inittab
if ! grep -qw noembed /proc/cmdline; then
inodes=`grep MemFree /proc/meminfo | awk '{print $2/3}' | cut -d. -f1`
mount / -o remount,size=90%,nr_inodes=$inodes
umount proc
exec /sbin/init
fi
umount proc
if mount -t tmpfs -o size=90% tmpfs /mnt; then
if tar -C / --exclude=mnt -cf - . | tar -C /mnt/ -xf - ; then
mkdir /mnt/mnt
exec /sbin/switch_root mnt /sbin/init
fi
fi
exec /sbin/init
# ls -al sbin/init
lrwxrwxrwx 1 root root 14 Oct 10 09:07 sbin/init -> ../bin/busybox
# bin/busybox
BusyBox v1.20.2 (Ubuntu 1:1.20.0-8.1ubuntu1) multi-call binary.
Copyright (C) 1998-2011 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, adjtimex, ar, arp, arping, ash, awk, basename, blockdev, brctl, bunzip2, bzcat, bzip2, cal, cat, chgrp, chmod, chown, chroot, chvt, clear, cmp, cp, cpio, crond, crontab, cttyhack, cut, date, dc, dd, deallocvt, depmod, df,
diff, dirname, dmesg, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, env, expand, expr, false, fdisk, fgrep, find, fold, free, freeramdisk, ftpget, ftpput, getopt, getty, grep, groups,
gunzip, gzip, halt, head, hexdump, hostid, hostname, httpd, hwclock, id, ifconfig, ifdown, ifup, init, insmod, ionice, ip, ipcalc, kill, killall, klogd, last, less, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, ls, lsmod, lzcat, lzma, md5sum, mdev, microcom, mkdir, mkfifo, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mt, mv, nameif, nc, netstat, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pivot_root,
poweroff, printf, ps, pwd, rdate, readlink, realpath, reboot, renice, reset, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed, seq, setkeycodes, setsid, sh, sha1sum, sha256sum, sha512sum, sleep, sort,
start-stop-daemon, stat, static-sh, strings, stty, su, sulogin, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, taskset, tee, telnet, telnetd, test, tftp, time, timeout, top, touch, tr, traceroute,
traceroute6, true, tty, tunctl, udhcpc, udhcpd, umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, watch, watchdog, wc, wget, which, who, whoami, xargs, xz,
xzcat, yes, zcat
As you can see, /init is there, /sbin/init is there, busybox has been compiled with the 'init' applet. Any other ideas?
Thanks,
Dave
[EDIT]: Added code tags. Rich