ash: Can't access tty problems (initramfs)
Hamish Moffatt
hamish at cloud.net.au
Thu May 17 23:59:55 UTC 2007
On Fri, May 18, 2007 at 01:28:00AM +0200, Denis Vlasenko wrote:
> 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
I got the controlling tty errors as a result of the following in
inittab:
::askfirst:-/bin/sh
Do you mean that this is wrong? (According to the documentation, it is an
implicit rule if inittab is missing.)
Hamish
--
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>
More information about the busybox
mailing list