Re: Bug#926539: rootskel: steal-ctty no longer works on at least sparc64

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Bug#926539: rootskel: steal-ctty no longer works on at least sparc64

John Paul Adrian Glaubitz
On 4/6/19 6:46 PM, John Paul Adrian Glaubitz wrote:
> My suspicion is that the support multiple consoles in parallel [2] introduced
> this particular regression. I haven't done any debugging yet though as I'm
> not sure where to start, I haven't touched the rootskel package before and
> therefore would be interested in any pointers how to debug this.

The problem seems to be the fact that the sparc64 kernel uses different names
for /proc/console and the actual console name:

root@landau:~# cat /proc/consoles
ttyHV0               -W- (EC p  )    4:64
tty0                 -WU (E     )    4:1
root@landau:~# readlink /sys/dev/char/4:64
../../devices/root/f0299a70/f029b788/tty/ttyS0
root@landau:~#

And this is what used to make it work [1]:

            *) # >= 2.6.38
                console_major_minor="$(get-real-console-linux)"
                console_raw="$(readlink "/sys/dev/char/${console_major_minor}")"
                console="${console_raw##*/}"
                ;;

Adrian

> [1] https://salsa.debian.org/installer-team/rootskel/blob/cb7db898f58f14c04b9d60351811cbae71b49a07/src/sbin/reopen-console-linux#L21

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: Bug#926539: rootskel: steal-ctty no longer works on at least sparc64

John Paul Adrian Glaubitz
Hi Ben!

On 4/7/19 1:53 AM, Ben Hutchings wrote:
>> root@landau:~# cat /proc/consoles
>> ttyHV0               -W- (EC p  )    4:64
>> tty0                 -WU (E     )    4:1
>> root@landau:~# readlink /sys/dev/char/4:64
>> ../../devices/root/f0299a70/f029b788/tty/ttyS0
>
> The inconsistent name seems like a kernel bug...

Yes. I'm trying to convince Dave Miller to fix this.

Do you think we could carry a patch in src:linux for the time being?

>> root@landau:~#
>>
>> And this is what used to make it work [1]:
>>
>>    *) # >= 2.6.38
>> console_major_minor="$(get-real-console-linux)"
>> console_raw="$(readlink "/sys/dev/char/${console_major_minor}")"
>> console="${console_raw##*/}"
>> ;;
>
> So maybe rootskel should use that again, but applied to each console's
> char device number.
>
> (Though directly using the symlinks under /dev/char seems cleaner than
> poking in sysfs.)

I agree.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply | Threaded
Open this post in threaded view
|

Re: Bug#926539: rootskel: steal-ctty no longer works on at least sparc64

Ben Hutchings-3
On Tue, 2019-04-16 at 11:47 +0200, John Paul Adrian Glaubitz wrote:

> Hi Ben!
>
> On 4/7/19 1:53 AM, Ben Hutchings wrote:
> > > root@landau:~# cat /proc/consoles
> > > ttyHV0               -W- (EC p  )    4:64
> > > tty0                 -WU (E     )    4:1
> > > root@landau:~# readlink /sys/dev/char/4:64
> > > ../../devices/root/f0299a70/f029b788/tty/ttyS0
> >
> > The inconsistent name seems like a kernel bug...
>
> Yes. I'm trying to convince Dave Miller to fix this.
>
> Do you think we could carry a patch in src:linux for the time being?
[...]

I would rather not do that until it's accepted, as if it that doesn't
happen we either have to switch back or carry it forever.

Ben.

--
Ben Hutchings
Make three consecutive correct guesses and you will be considered
an expert.



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug#926539: rootskel: steal-ctty no longer works on at least sparc64

John Paul Adrian Glaubitz
On 4/16/19 1:16 PM, Ben Hutchings wrote:
>> Do you think we could carry a patch in src:linux for the time being?
> [...]
>
> I would rather not do that until it's accepted, as if it that doesn't
> happen we either have to switch back or carry it forever.

Hmm, okay. Then I don't really have a way of building updated images
now for the time being.

Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [hidden email]
`. `'   Freie Universitaet Berlin - [hidden email]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913