[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fixing the missing serial console after installation issue



John Paul Adrian Glaubitz, on dim. 01 oct. 2017 12:49:25 +0200, wrote:
> On 10/01/2017 12:33 PM, Samuel Thibault wrote:
> >> Yes, I'm aware of that and that's what people usually use to enable the serial
> >> console post installation. However, it's most likely not what we would want to
> >> use as adding it to the kernel command line assumes that you know what type
> >> of bootloader is being used and you would have to add case-matching for the
> >> various bootloader types.
> > 
> > Well, debian-installer already needs to know about that, to be able to
> > pass to the installed system the parameters which were given to boot the
> > installer itself.
> 
> But is that information available in finish-installation.d/90console?

The point is: it doesn't need to be.  We need 90console for non-systemd
systems because sysvinit etc. are not able to automatically get the
console configuration from the kernel commande line.  Systemd, however,
is, and thus doesn't need anything in 90console.

> >> Please be aware that I am not talking about just fixing the serial console issue
> >> on SPARC machines but on all architectures supported by Debian. Hence, I want
> >> to use a generic and robust solution, not a quick hack.
> > 
> > Well, your solution is somehow a "quick hack": enabling serial console
> > automatically already works "for all archs", there is just something
> > which doesn't happen to work in your case, and AIUI it's writing on the
> > installed system the kernel parameters which were passed to boot d-i.
> 
> Are you sure that's the case?

Yes.

> The code to enable the serial console for systemd systems is
> definitely missing.

Yes, on purpose: it doesn't need to be.

> It's there for upstart and sysvinit but not for systemd. By default,
> systemd does not start a serial getty unless you pass console=ttyS0 on
> the kernel command line or enable the service explicitly.

Yes, that's on purpose: it has to be there on the command line for
kernel messages to get printed on ttyS0 anyway.

> Are you getting a serial console enabled by default on a fresh systemd
> installation?

What do you mean by "serial console enabled by default"?  Perhaps that's
where there is misunderstanding.

> > Or is there really no way on your system for d-i to be able to write
> > down the parameters to be passed to the kernel for the installed system?
> 
> Well, I have just adopted this particular script for systemd and effectively
> used the same mechanism as for sysvinit and upstart. Would you have preferred
> a completely different mechanism?

I don't "prefer" something, I'm just saying how things are currently
supposed to work: somehow the kernel for d-i has console=ttyS0 on its
command line so that d-i gets its output on ttyS0, and d-i normally
copies what is passed to its kernel command line into the installed
system, so that the installed system behaves just like d-i behaved,
which is normally what the user expects.

> There is nothing special about sparc64 in this regard.

Perhaps that "enabled by default" thing.

Samuel


Reply to: