Bug 1184453

Summary: linuxrc: start shell on all kernel consoles
Product: [openSUSE] openSUSE Tumbleweed Reporter: Ludwig Nussel <lnussel>
Component: InstallationAssignee: Steffen Winterfeldt <snwint>
Status: NEW --- QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ludwig Nussel 2021-04-07 16:10:52 UTC
systemd has a nice feature to automatically start an agetty on all consoles, eg if the kernel command line has "console=ttyS0 console=tty0" it would start an agetty on ttyS0. Would be nice if linuxrc had a similar feature to start a shell like it does on tty2. That would make debugging via eg qemu much easier. The installation would run on the display while there's a shell on the serial console. Obviously onl y if linuxrc resp the installation doesn't run on ttyS0.

systemd does that by
- reading the line in /sys/class/tty/console/active
- split by space
- devices starting with "tty" are VCs so skips them
- try open all nonblocking and run isatty. skip if fail
- spawn getty on the rest

The last entry in the line is actually /dev/console. So with this method also the code to figure the console out in linuxrc (auto2_serial_console) could be replaced with using the info from /sys/class/tty/console/active directly.
Comment 1 Steffen Winterfeldt 2021-04-08 07:38:39 UTC
linuxrc runs a shell on tty2,5,6,9. And you get a console directly in
linuxrc with ^C+S.

Having an option to run a shell on an additinal console would be nice
in some cases, though. But I wouldn't do anything automatically.
Comment 2 Ludwig Nussel 2021-04-08 07:49:35 UTC
the point would be to get the shell automatically on secondary consoles while yast starts up on the main one. After the reboot into the running system there would be a getty on the secondary consoles anyway after all as systemd does that.