Re: Problems with Step 4

From: Guillermo <gdiazhartusch_at_gmail.com>
Date: Wed, 28 Jun 2017 21:58:15 -0300

Hi,

2017-06-27 16:51 GMT-03:00 Daniel GSJ:
>
> Once stage 2 is reached, the computer hangs in the same way than when
> executing *agetty* in an active console tty, and doesn't login neither.
>
> My o.s. is build with Linux-from-scratch, and is running SystemV, so it is
> a pretty simple system.
>
> I've tried different possibilities like:
>
> #!/bin/sh
>
> exec setsid /sbin/agetty tty5 linux
>
> or
>
> #!/bin/sh
>
> exec chpst -P /sbin/agetty tty5 linux

'chpst -P' from the runit package and setsid from the util-linux
package do the same thing. And this works on my Gentoo machine (using
a minimal setup with almost nothing else running, for testing
purposes). Of course, I have to press CTRL + Alt + F5 to get a login
prompt, otherwise I just see the kernel's and runit's messages. You do
not provide enough context about your problem, e.g. you do not say
where your /etc/runit/1 comes from (did you write it yourself? did you
copy one from somewhere? official instructions from
www.linuxfromscratch.org only mention sysvinit or systemd, so it is
not from there), how you know the stage 2 is reached, what you see on
the console when everything hangs, ...

/root/scan/getty-tty1:
total 8
-rw-r--r-- 1 root root 0 Jun 28 20:11 down
-rwxr-xr-x 1 root root 48 Jun 28 20:03 run
drwx------ 2 root root 4096 Jun 28 20:07 supervise

/root/scan/getty-tty5:
total 8
-rwxr-xr-x 1 root root 48 Jun 28 20:03 run
drwx------ 2 root root 4096 Jun 28 20:09 supervise

/root/scan/getty-tty1/run:
#!/bin/sh
exec chpst -P /sbin/agetty tty1 linux

/root/scan/getty-tty5/run:
#!/bin/sh
exec chpst -P /sbin/agetty tty5 linux

  PID PPID PGRP COMMAND
    1 0 1 runit
  674 1 674 runsvdir -P /root/scan log: ....................
  675 674 675 \_ runsv getty-tty1
  676 674 676 \_ runsv getty-tty5
  677 676 677 \_ /bin/login --
  682 677 682 \_ -bash
  685 682 685 \_ ps axf -o pid,ppid,pgrp,args

And after doing 'sv up ./scan/getty-tty1' and CTRL + Alt + F1, I can
log on tty1 too:

  PID PPID PGRP COMMAND
    1 0 1 runit
  674 1 674 runsvdir -P /root/scan log: ....................
  675 674 675 \_ runsv getty-tty1
  687 675 687 | \_ /bin/login --
  693 687 693 | \_ -bash
  694 693 694 | \_ ps axf -o pid,ppid,pgrp,args
  676 674 676 \_ runsv getty-tty5
  691 676 691 \_ /sbin/agetty tty5 linux

G.
Received on Thu Jun 29 2017 - 00:58:15 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC