cttyhack/tty/initramfs problem (take a number)

Ersin Akinci ersin.akinci at gmail.com
Sat Dec 5 01:01:27 UTC 2009

> Create /dev/tty1. Should look like this:

Aren't the ttys supposed to be created by devpts under /dev/pts?  How
do I get it to do that?

On 12/4/09, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Saturday 05 December 2009 00:28, Ersin Akinci wrote:
>> I have a question about getting a shell started up, which will no
>> doubt sound familiar and similar to the 100 other e-mails like this,
>> yet after reading everything I'm still not sure what to do.
>> Basically, I'm trying to bring up a single user shell on a minimal
>> initramfs without having to bother with init, inittab, getty, or any
>> of that.  Running /bin/sh at the end of my init script results in no
>> job control, as everyone knows.  Instead, you're supposed to run the
>> shell on a normal tty, but with Unix98 pty control there are no fixed
>> tty device nodes in /dev.  These are generated on the fly, but I don't
>> know how.
> Where exactly do you want shell prompt to appear?
>> I think that getty does so (can someone please confirm this?),
> No, it does not.
>> but
>> again, I don't want to use getty or any login tools.  Actually, I
>> wouldn't mind using getty so long as I don't have to deal with any of
>> the login/user stuff (i.e., if I could bypass login altogether).  I
>> tried using cttyhack /bin/sh, but that gives me "can't open
>> '/dev/tty1': No such file or directory".
> Aha. You are running it on Linux virtual ttys.
>> What should I do?
> Create /dev/tty1. Should look like this:
> # ls -l /dev/tty1
> crw-rw----    1 root     root       4,   1 Dec  4 20:26 /dev/tty1
> --
> vda



Ersin Y. Akinci -- http://www.ersinakinci.com

More information about the busybox mailing list