CodeAsm / teeny-linux

An tiny linux kernel with initramfs for Qemu based on Mitch Galgs linux tutorials.
6 stars 1 forks source link

kernel crash after exiting first shell #1

Closed CodeAsm closed 2 years ago

CodeAsm commented 3 years ago

When either using a login required or nologin required shell is exited, the kernel tries to terminate the init program snippet from /init

...
/usr/bin/setsid /bin/cttyhack $LOGINREQUIRED
exec $LOGINREQUIRED

where we replace $LOGINREQUIRED depending on the choice of the builder, we might need to do 2 things, optionaly enable the login (as done using /bin/login) and upon termination or logout from /bin/sh, revert back to login without a kernel crash. possibly fix the kernel crash/panic by a loop or init trick used in other distros.

possibly reboot and Ctr+Alt+Dell options can be dealt with aswell, but prio for exit problems

CodeAsm commented 2 years ago

potentially the following will fix this:

while [ 1 ]; do
    /usr/bin/setsid /bin/cttyhack $LOGINREQUIRED
done