Tiny Core Base > Micro Core

/sbin/autologin directly from /inittab

(1/2) > >>

proposal to replace (in  /etc/inittab) the line

--- Code: ---tty1::respawn:/sbin/getty -nl /sbin/autologin 38400 tty1
--- End code ---


--- Code: ---tty1::respawn:/sbin/autologin
--- End code ---
Is it OK? because anyway in /sbin/autologin we have the getty for tc-user; in year 2022 there are no more ttys (serial terminals); anyway it is about tty not ttyS. Maybe even Qemu ignores it, because core is loaded in RAM.       
FYI: also, in /sbin/autologin, is no need for
--- Code: ---. /etc/init.d/tc-functions
--- End code ---
because it does not use any functions from them.

I believe getty also initializes the tty settings, and so it's necessary. Removing those lines from autologin is probably fine, have you tested it?

Not yet, unfortunately I am on f***king Wind0w$.
But I remember that in the past, from grub command line, kernel  parameter init=/bin/sh get me into a shell prompter. So was not need for tty settings to run a command like /sbin/autologin, straight from sysV init.Plus is about "respawn", after [accidentally] exit from login tc, not before login.
FYI: see also how toybox boot in qemu without getty (http://landley.net/toybox/downloads/binaries/mkroot/latest/)

Job done, I tested by extracting a virgin root64.gz, then I "remaster" it with both modifications/simplifications (which I proposed), and cold re-booted fresh (base + norestore). ALL is OK.I check them (with cat /etc/inittab, cat /sbin/autologin) to see that the modifications are really in place.Then from (already logged tc user) I "exit", and at login prompt I put tc, and voila: I am  back logged.

PS: I used a laptop (so tty1 was not a problem) with AMD64 cpu. But should work on any cpu (I did not tested for arm, pi-core etc).
PS2: The changes are pure theoretically/didactically, because no speed gain. But I like CLEAR, only necessary shell commands./scripts.

I do not take any pride, neither affront, if these are not interesting for tc users. Each on their way.
Regards, and thanks for Tinycore free software.

Thanks, will edit autologin. init=/bin/sh also has some effects that aren't visible easily, but my memory is failing on what exactly they were.


[0] Message Index

[#] Next page

Go to full version