[BusyBox] init pb. (sh: can't access tty; job control turned off)

Paul TOTH tothpaul at free.fr
Fri Dec 20 09:51:03 UTC 2002


I've added some debug message...and found why the inittab won't work

new_init_action()
...
 if (access(cons,R_OK|W_OK)) {
 message(CONSOLE," can't access %s\n",cons);
 return;
}


can't access /dev/tty1
can't access /dev/tty1
...
can't access /dev/tty2
can't access /dev/tty3
can't access /dev/tty4
No more tasks for init -- sleeping forever.

when I ls /dev/tty* -l

crw-rw-rw- 1 root root 5, 0 dec 19 18:13 tty
crw-rw-rw- 1 root root 4, 0 dec 19 18:13 tty0
crw-rw-rw- 1 root root 4, 1 dec 19 18:13 tty1
...

well...now I take some holidays :D

merry christmas !

(thank Vladimir)

Paul TOTH <tothpaul at free.fr>
http://tothpaul.free.fr
Paul TOTH <tothpaul at free.fr>
http://tothpaul.free.fr
----- Original Message -----
From: "Vladimir N. Oleynik" <dzo at simtreas.ru>
To: "Paul TOTH" <tothpaul at free.fr>
Cc: <busybox at busybox.net>
Sent: Friday, December 20, 2002 5:23 PM
Subject: Re: [BusyBox] init pb. (sh: can't access tty; job control turned
off)


> Paul,
>
> > I've changed my linuxrc,
> >
> > losetup("/dev/loop7","/dos/linux/busybox.img"); // (my function)
> > mount("/dev/loop7","/root","ext2",0,0);
> > chroot("/root");
> > chdir("/");
> > execlp("/bin/sh","/sbin/sh",0);
> >
> > now I have a shell but I still have this error (ash.c)
>
> Please check:
>
> ...
> chdir("/");
> pid = fork();
> if(pid<0) {
> Hmm, bla bla
> }
> if(pid == 0) {
> setsid();
> close(2); close(1); close(0);
> open("/dev/tty1", O_RDWR);
> dup(0);
> dup(0);
> execlp(...);
> }
> sleep(1);
> exit(0); // ?? Hmm. May be
>
>
> --w
> vodz
>




More information about the busybox mailing list