On 27-Feb-2019 12:01, David Mathog wrote:
This:

  https://busybox.net/FAQ.html#job_control

suggests this might work with /dev/console (what tty shows)

  setsid cttyhack sh

Unfortunately that does not work either.  Same result, There is a
prompt but input
is ignored.

Reduced /init in the initrd.img to just:

#!/bin/busybox sh
mount -t devtmpfs none /dev
mount -t proc none /proc
mkdir -p /sys
mount -t sysfs none /sys
echo 0 > /proc/sys/kernel/printk
echo "tty, sleep 5"
tty
sleep 5
setsid /bin/cttyhack /bin/sh

And it emits

tty, sleep 5
/dev/console
/ #

and then ignores all keyboard input. This was through a KVM, but it does the same thing with the USB keyboard plugged straight into it.

The only active programs on this system are busybox, mount, and the kernel. Not sure what starts "init" but it is probably the kernel itself. So there is no place before init to use something other than /dev/console, and /dev/console
will not accept input after any of these:

exec /binsh
exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
setsid /bin/cttyhack /bin/sh

This is really frustrating! Perhaps there is some kernel parameter for 3.10.108 kernels which needs to be set (or unset)??? These are built into the kernel, seems like they should be enough

CONFIG_HID=y
CONFIG_HID_GENERIC=y
CONFIG_USB_HID=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB=y


Thanks,

David Mathog
[email protected]
Manager, Sequence Analysis Facility, Biology Division, Caltech
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to