ash: Can't access tty problems (initramfs)

Denis Vlasenko vda.linux at googlemail.com
Thu May 17 16:28:00 PDT 2007


On Thursday 17 May 2007 18:28, Dallas Clement wrote:
> I'm getting the infamous "Can't access tty; job control turned off"
> message when I try to invoke the ash shell during my initial bootup.
> 
> I'm using busybox 1.5.0.  I also understand that ash requires a
> controlling tty rather than the console.  Though, I don't understand all
> the reasons.
> 
> If I don't define a console however, I get a kernel panic from
> initramfs.

Boot with init=/bin/ash, and you will get "Can't access tty" message.
That's because fd# 0,1,2 are opened to /dev/console.
Now execute this in ash:

# exec /bin/ash </dev/tty1 >/dev/tty1 2>&1

This one will work ok, because fds are opened to /dev/tty0,
which can be a controlling tty.

Basically that's it. If you want ctty, open some device different from
/dev/console

--
vda


More information about the busybox mailing list