On Tue, Apr 27, 2021 at 03:34:15PM +0200, Christian Borntraeger wrote: > That is OK. I will try to test it then on LPAR and find someone that will test > it on z/VM. Please remove the cc stable as I want to have this tested for > a while. Hopefully it only affects the ttysclp0 console, which is not the > default console for z/VM and LPAR. We would at least need to change the > device driver and commands documentation. Anything else?
It would be great if someone can check if the debian-installer is also broken on LPAR due to console name mismatch. I have update and tested the patch for rootskel (also attached here for review): https://salsa.debian.org/installer-team/rootskel/-/merge_requests/2/diffs -- Valentin
>From bbe911902ce1f3001efb8dac3302d17a332e3f87 Mon Sep 17 00:00:00 2001 From: Valentin Vidic <vvi...@debian.org> Date: Sun, 17 May 2020 14:39:18 +0200 Subject: [PATCH] Try to find console device by major,minor numbers Console name does not match device name on qemu-system-s390x: ttyS1 -W- (EC p ) 4:65 crw--w---- 1 root root 4, 65 May 17 12:18 ttysclp0 --- src/sbin/reopen-console-linux | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/sbin/reopen-console-linux b/src/sbin/reopen-console-linux index 13b15a3..074c680 100755 --- a/src/sbin/reopen-console-linux +++ b/src/sbin/reopen-console-linux @@ -63,18 +63,30 @@ preferred= # for which no device file exists kernelconsoles="$(cat /proc/consoles)" -for cons in $(echo "$kernelconsoles" | sed -n -r -e 's/(^.*) .*\((.*)\).*$/\1/p' ) +for cons in $(echo "$kernelconsoles" | sed -n -r -e 's/(^.*) .*\((.*)\).*$/\1/p') do log "Looking at console $cons from /proc/consoles" - status=$(echo "$kernelconsoles" | grep $cons | sed -n -r -e 's/(^.*) *.*\((.*)\).*$/\2/p' ) - if [ -e "/dev/$cons" ] && [ $(echo "$status" | grep -o 'E') ]; then - consoles="${consoles:+$consoles$NL}$cons" - log " Adding $cons to possible consoles list" + device="$cons" + if [ ! -e "/dev/$device" ]; then + # Console device does not exist, try to find it by major:minor numbers + # ttyS1 -W- (EC p ) 4:65 + majorminor=$(echo "$kernelconsoles" | grep $cons | sed -n -r -e 's/.* ([0-9]+:[0-9]+)$/\1/p') + if [ "$majorminor" ] && [ -e "/sys/dev/char/$majorminor" ]; then + device=$(readlink "/sys/dev/char/$majorminor") + device=${device##*/} + fi fi - # 'C' console is 'most prefered'. - if [ $(echo "$status" | grep -o 'C') ]; then - preferred="$cons" - log " $cons is preferred" + status=$(echo "$kernelconsoles" | grep $cons | sed -n -r -e 's/(^.*) *.*\((.*)\).*$/\2/p' ) + if [ -e "/dev/$device" ]; then + if [ $(echo "$status" | grep -o 'E') ]; then + consoles="${consoles:+$consoles$NL}$device" + log " Adding $cons (/dev/$device) to possible consoles list" + fi + # 'C' console is 'most prefered'. + if [ $(echo "$status" | grep -o 'C') ]; then + preferred="$device" + log " $cons (/dev/$device) is preferred" + fi fi done -- 2.20.1