Closed pwFoo closed 4 years ago
I think that is not really what a service manager provides normally. It manages services you do not want to interact with directly. Getty is a somewhat special exception but it does all the work to get interactive itself. So just starting a shell in a service file isn't really supported. I think your goal should be to get getty running. I haven't done this my-self so I am afraid I can't be of too much help in that regard
Hi @KillingSpark , thanks for your help! I have created an working initrd which boots in qemu, but I can't change to the tty getty / login is running, because rustysd stays in foreground / active tty. Any hint how to get it work?
[...]
[2020-02-01][08:52:14][rustysd::services::fork_parent][TRACE] [FORK_PARENT] service getty.service doesnt notify
[getty.service][STDERR] EXECV: "/sbin/agetty" ["agetty", "--autologin", "root", "--skip-login", "--keep-baud", "tty1"]
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Activate id: 3
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Lock unit: 3
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Locked unit: 3
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Lock status for: getty.target
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Locked status for: getty.target
[2020-02-01][08:52:14][rustysd::units::units][TRACE] Reached target getty.target
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Activate id: 1
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Lock unit: 1
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Locked unit: 1
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Lock status for: default.target
[2020-02-01][08:52:14][rustysd::units::activate][TRACE] Locked status for: default.target
[2020-02-01][08:52:14][rustysd::units::units][TRACE] Reached target default.target
login[223]: root login on 'tty1'
@KillingSpark
You're right! The important part isn't to start a shell directly, but boot should end in the started shell.
Maybe change terminal by chvt
? command after starting getty? I'll test it...
How about starting agetty not on tty1 but on any other tty and switching to that with ctrl+alt+f3 for example?
I have to admit that I am not very informed about how these issues are handled with other init systems
If you do get this running that would be very cool to know thought! Please keep me updated if you make progress :)
I think it was a qemu / console (tty1, ttyS0, ttyAMA0) problem...
Bootet on hardware tty1 works fine without chvt
! :)
I'll try to build a minimal system with just systemd (-> rustysd) and podman (docker replacement, supports and generate systemd units!). Build system used will be linuxkit.
@KillingSpark Thanks for sharing your awesome project! I really like systemd alternatives for simple use cases 👍
Hi, it looks like ExecStart a shell by /bin/sh isn't supported yet? I think some not supported options would be needed to do that? Some of the following options?
With issue #15 I try to start a minimal rustysd environment with an interactive shell in the end of the boot process.
Is that possible with rustysd?