Bug#960390: x86_64: No serial port output

2020-06-20 Thread Punit Agrawal
Hi Steve,

Here's an updated patch to enable serial console in grub when using
debian-installer on an EFI based system. Sorry it took longer than
anticipated - got pulled into some other things.

The patch has been updated based on your feedback (and some
experimentation). Notably, this version does not touch other
configuration but uses the "--append" option of
terminal_output/terminal_input to add serial port support.

I've tested this on Qemu and it solves the problem I was hitting.
If the changes look OK, do consider including the patch to get wider
coverage / testing in more scenarios.

Thanks,
Punit


0001-x86-grub-efi-Enable-serial-console.patch
Description: Binary data


Bug#960390: x86_64: No serial port output

2020-05-27 Thread Punit Agrawal
On Tue, 26 May 2020 12:20:04 +0100 Steve McIntyre  wrote:
> On Sat, May 23, 2020 at 10:34:36AM +0900, Punit Agrawal wrote:
> >On Sat, May 23, 2020 at 1:54 AM Steve McIntyre  wrote:
> >>
> >> On Sat, May 23, 2020 at 01:15:37AM +0900, Punit Agrawal wrote:
> >
> >[...]
> >
> >> >To avoid needing any workarounds such as those discussed in earlier
> >> >replies, I looked at enabling the installer images to output on the
> >> >serial console by default. The attached simple change to the grub
> >> >configuration gives output on serial as well as connected monitor.
> >> >
> >> >The next issue that needs fixing is to update the kernel command line
> >> >to launch the installer on the serial console.
> >>
> >> I think few people have been bothered by this in the past - all the
> >> server machines I've used for years have had options for redirecting a
> >> VGA console to the serial port. Do you have one that doesn't?
> >
> >Actually, I was installing in "-nographic" VM rather than a server.
> >There are workarounds that allow me to continue earlier in the thread
> >(See #67, #68) but I was hoping to improve things so that it just
> >works.
> >
> >I was just surprised that it isn't possible to use the installer
> >without a VGA monitor (or a redirect on hardware that supports it) -
> >especially coming from arm64. There are a few other use cases that
> >will benefit from the serial support as well.
> >
> >Considering that it looks to be a configuration issue - do you think
> >it's worth enabling? Are there any downsides that I am missing?
>
> Possibly? I spent half an hour looking at things last week, but I
> don't have the time to look at this properly for a while myself. Other
> priorities...

Thanks for taking a look. Appreciate your comments.
>From looking at your feedback below, it seems (as of now) the issue
regarding enabling serial output in d-i grub is -

1. Feasibility (and the required changes)
2. While, not degrading behaviour for existing users

I completely agree and have tried to figure out 1. without regressing
existing other use cases.

> >From your patch, I'm not sure:
>
>  a) you're unconditionally replacing colour choices

This is needed to enable text based grub menu on the serial console.
The display still shows the fancy image based splash / graphical
looking menu from before.

>  b) you're setting up terminal_output only, what about terminal_input?
> (as mentioned in the info pages)
>  c) do you need to have a "serial" command to enable serial ports
> (again, from the info page)?

I had both "serial --unit=0" and "terminal_input console gfxterm" in
an earlier local version of the patch (following the documentation).
But they got dropped in a bid to minimise the changes that add the
missing feature. I am not entirely sure why things work without both
of these to be honest.

But thinking back, it's best to stick to documented use to future
proof against grub updates. I will update the patch adding these back.

>  d) is there any downside on machines without serial?

I did not notice any downsides to the normal (display connected) use
case in my testing.
I tested the following combination of display and serial using Qemu

i. Display only (no serial option passed to Qemu)
ii. Display and Serial connected ("-serial mon:stdio")
iii. Serial only ("-nographic -serial mon:stdio")

I'll post an updated patch (likely later today), adding the left out
configuration ("serial" and "terminal_input").
If it passes initial testing, we should consider merging into nightly
builds to get wider feedback and be quick to revert in case of
regression.



Bug#960390: x86_64: No serial port output

2020-05-26 Thread Steve McIntyre
On Sat, May 23, 2020 at 10:34:36AM +0900, Punit Agrawal wrote:
>On Sat, May 23, 2020 at 1:54 AM Steve McIntyre  wrote:
>>
>> On Sat, May 23, 2020 at 01:15:37AM +0900, Punit Agrawal wrote:
>
>[...]
>
>> >To avoid needing any workarounds such as those discussed in earlier
>> >replies, I looked at enabling the installer images to output on the
>> >serial console by default. The attached simple change to the grub
>> >configuration gives output on serial as well as connected monitor.
>> >
>> >The next issue that needs fixing is to update the kernel command line
>> >to launch the installer on the serial console.
>>
>> I think few people have been bothered by this in the past - all the
>> server machines I've used for years have had options for redirecting a
>> VGA console to the serial port. Do you have one that doesn't?
>
>Actually, I was installing in "-nographic" VM rather than a server.
>There are workarounds that allow me to continue earlier in the thread
>(See #67, #68) but I was hoping to improve things so that it just
>works.
>
>I was just surprised that it isn't possible to use the installer
>without a VGA monitor (or a redirect on hardware that supports it) -
>especially coming from arm64. There are a few other use cases that
>will benefit from the serial support as well.
>
>Considering that it looks to be a configuration issue - do you think
>it's worth enabling? Are there any downsides that I am missing?

Possibly? I spent half an hour looking at things last week, but I
don't have the time to look at this properly for a while myself. Other
priorities...

>From your patch, I'm not sure:

 a) you're unconditionally replacing colour choices
 b) you're setting up terminal_output only, what about terminal_input?
(as mentioned in the info pages)
 c) do you need to have a "serial" command to enable serial ports
(again, from the info page)?
 d) is there any downside on machines without serial?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"We're the technical experts.  We were hired so that management could
 ignore our recommendations and tell us how to do our jobs."  -- Mike Andrews



Bug#960390: x86_64: No serial port output

2020-05-22 Thread Punit Agrawal
On Sat, May 23, 2020 at 1:54 AM Steve McIntyre  wrote:
>
> On Sat, May 23, 2020 at 01:15:37AM +0900, Punit Agrawal wrote:

[...]

> >To avoid needing any workarounds such as those discussed in earlier
> >replies, I looked at enabling the installer images to output on the
> >serial console by default. The attached simple change to the grub
> >configuration gives output on serial as well as connected monitor.
> >
> >The next issue that needs fixing is to update the kernel command line
> >to launch the installer on the serial console.
>
> I think few people have been bothered by this in the past - all the
> server machines I've used for years have had options for redirecting a
> VGA console to the serial port. Do you have one that doesn't?

Actually, I was installing in "-nographic" VM rather than a server.
There are workarounds that allow me to continue earlier in the thread
(See #67, #68) but I was hoping to improve things so that it just
works.

I was just surprised that it isn't possible to use the installer
without a VGA monitor (or a redirect on hardware that supports it) -
especially coming from arm64. There are a few other use cases that
will benefit from the serial support as well.

Considering that it looks to be a configuration issue - do you think
it's worth enabling? Are there any downsides that I am missing?



Bug#960390: x86_64: No serial port output

2020-05-22 Thread Steve McIntyre
On Sat, May 23, 2020 at 01:15:37AM +0900, Punit Agrawal wrote:
>tags 960390 + patch
>
>On Wed, 13 May 2020 14:14:54 +0200 john doe  wrote:
>
>[...]
>
>> I also'd like to point out that instead of modifying grub at the install
>> prompt, pressing the escape key and typing at the boot prompt the below
>> works for me (pressing the 'escape' key instead of the 'tab' key):
>>
>>
>> boot: install console=ttyS0,115200n8 DEBIAN_FRONTEND=text vga=none
>>
>>
>>  From Buster onwords, /etc/default/grub does not need to be modified at
>> all after installation.
>>
>>
>> What transpired in this thread is that modifying grub at installation
>> time is not reflected at run time.
>
>Although that is also an issue, it's not the first issue the user
>encounters. As mentioned by Bjorn and Geert, for users wanting to
>install Debian on a headless machine there is no easy answer.
>
>To avoid needing any workarounds such as those discussed in earlier
>replies, I looked at enabling the installer images to output on the
>serial console by default. The attached simple change to the grub
>configuration gives output on serial as well as connected monitor.
>
>The next issue that needs fixing is to update the kernel command line
>to launch the installer on the serial console.

I think few people have been bothered by this in the past - all the
server machines I've used for years have had options for redirecting a
VGA console to the serial port. Do you have one that doesn't?

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
"I suspect most samba developers are already technically insane... Of
 course, since many of them are Australians, you can't tell." -- Linus Torvalds



Bug#960390: x86_64: No serial port output

2020-05-22 Thread Punit Agrawal
tags 960390 + patch

On Wed, 13 May 2020 14:14:54 +0200 john doe  wrote:

[...]

> I also'd like to point out that instead of modifying grub at the install
> prompt, pressing the escape key and typing at the boot prompt the below
> works for me (pressing the 'escape' key instead of the 'tab' key):
>
>
> boot: install console=ttyS0,115200n8 DEBIAN_FRONTEND=text vga=none
>
>
>  From Buster onwords, /etc/default/grub does not need to be modified at
> all after installation.
>
>
> What transpired in this thread is that modifying grub at installation
> time is not reflected at run time.

Although that is also an issue, it's not the first issue the user
encounters. As mentioned by Bjorn and Geert, for users wanting to
install Debian on a headless machine there is no easy answer.

To avoid needing any workarounds such as those discussed in earlier
replies, I looked at enabling the installer images to output on the
serial console by default. The attached simple change to the grub
configuration gives output on serial as well as connected monitor.

The next issue that needs fixing is to update the kernel command line
to launch the installer on the serial console.


0001-x86-grub-efi-Enable-serial-console.patch
Description: Binary data


Bug#960390: x86_64: No serial port output

2020-05-13 Thread john doe

On 5/13/2020 12:28 PM, Alper Nebi Yasak wrote:

On 13/05/2020 03:43, Punit Agrawal wrote:

Incidentally, this does not work if '-m 1024' is missing. Kernel boot
fails to find 'init'. I suspect that the Qemu default RAM configuration
is not sufficient to unpack the initrd.


Thanks, that's it. I haven't noticed it the first time around because I
normally run virtual machines with virt-manager... The default RAM is
128MiB and the messages also say "Initramfs unpacking failed: write error".


Based on this, updated version of Alper's instructions now launch the DI
without the need to extract the kernel / initrd.

 $ qemu-system-x86_64 -cdrom *.iso -nographic -vga none -m 1024

 Edit the 'Install' option (by removing 'quiet' and 'vga=788') into:

 /install.amd/vmlinuz initrd=/install.amd/initrd.gz --- console=ttyS0


(BTW, we need console=ttyS0 here because /proc/consoles only has tty0.
The exact opposite happens on arm64 VMs: there /proc/consoles only has
ttyAMA0 so debian-installer only launches on the serial console and not
on the graphics window.)



I also'd like to point out that instead of modifying grub at the install
prompt, pressing the escape key and typing at the boot prompt the below
works for me (pressing the 'escape' key instead of the 'tab' key):


boot: install console=ttyS0,115200n8 DEBIAN_FRONTEND=text vga=none


From Buster onwords, /etc/default/grub does not need to be modified at
all after installation.


What transpired in this thread is that modifying grub at installation
time is not reflected at run time.

--
John Doe



Bug#960390: x86_64: No serial port output

2020-05-13 Thread Alper Nebi Yasak

On 13/05/2020 03:43, Punit Agrawal wrote:

Incidentally, this does not work if '-m 1024' is missing. Kernel boot
fails to find 'init'. I suspect that the Qemu default RAM configuration
is not sufficient to unpack the initrd.


Thanks, that's it. I haven't noticed it the first time around because I 
normally run virtual machines with virt-manager... The default RAM is 
128MiB and the messages also say "Initramfs unpacking failed: write error".



Based on this, updated version of Alper's instructions now launch the DI
without the need to extract the kernel / initrd.

 $ qemu-system-x86_64 -cdrom *.iso -nographic -vga none -m 1024

 Edit the 'Install' option (by removing 'quiet' and 'vga=788') into:

 /install.amd/vmlinuz initrd=/install.amd/initrd.gz --- console=ttyS0


(BTW, we need console=ttyS0 here because /proc/consoles only has tty0. 
The exact opposite happens on arm64 VMs: there /proc/consoles only has 
ttyAMA0 so debian-installer only launches on the serial console and not 
on the graphics window.)




Bug#960390: x86_64: No serial port output

2020-05-12 Thread Punit Agrawal
[ cc'ing Alper ]

john doe  writes:

[...]

> The below command get me directly to the language selection screen which
> I belaeve is what you want?:
>
> qemu-system-x86_64 -drive file=debian.img,format=raw -m 1024 -boot d
> -nographic -cdrom debian-bullseye-DI-alpha2-amd64-netinst.iso -kernel
> vmlinuz  -append "console=ttyS0,115200n8 DEBIAN_FRONTEND=text" -initrd
> initrd.gz

Thanks for the qemu command line. Using the extracted kernel and initrd,
this was able to launch the installer in text mode.

Incidentally, this does not work if '-m 1024' is missing. Kernel boot
fails to find 'init'. I suspect that the Qemu default RAM configuration
is not sufficient to unpack the initrd.

Based on this, updated version of Alper's instructions now launch the DI
without the need to extract the kernel / initrd.

$ qemu-system-x86_64 -cdrom *.iso -nographic -vga none -m 1024

Edit the 'Install' option (by removing 'quiet' and 'vga=788') into:

/install.amd/vmlinuz initrd=/install.amd/initrd.gz --- console=ttyS0



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Punit Agrawal
Alper Nebi Yasak  writes:

> On 12/05/2020 13:02, Punit Agrawal wrote:
>> The above parameters do not launch the installer from the iso here. I am
>> not quite sure what the right arguments are. I wonder if
>> "root=" to the kernel will do the trick. Will give that a
>> try.
>
> When I try:
>
> $ qemu-system-x86_64 -cdrom *.iso -nographic -vga none
>
> My terminal turns into a GRUB boot menu, where I can edit the
> 'Install' option (by removing 'quiet' and 'vga=788') into:
>
> /install.amd/vmlinuz initrd=/install.amd/initrd.gz --- console=ttyS0
>
> Which gets me booting kernel messages, can you try that?

Following the above steps, the VM picks up the DI kernel and I can see
the kernel boot logs on the console.

> (Booting still fails with a "Failed to execute /init (error -2)" in my
> case, but that'd be a separate bug if it's not a problem with my
> setup.)

I see the failure to find init as well.



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Bjørn Mork
Geert Stappers  writes:

> Virtual Machines (Qemu, KVM, Xen, ... ) and OCI containters ( "Docker
> images") are the new serial port only computers.
>
> In other words: There are many servers without video hardware.

(Un)fortunately, depending how you look at it, running a remote qemu
machine with full desktop access is easy. You'll just add

 -vnc localhost:$displaynum

and then connect to it from a remote client over ssh using

 vncviewer -via $vmhost :$displaynum

I definitely agree wrt the usefulness of serial console, but I don't
think virtual machines are going to increase the demand much.  Getting
full desktop access in qemu is so much easier than any "Lights Out" or
other remote "keyboard, video and mouse" solution I've tried on bare
metal.


Bjørn



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Geert Stappers
On Tue, May 12, 2020 at 04:20:58PM +0200, Bjørn Mork wrote:
> 
> The lack of serial console support is a very long standing bug in the
> Debian installer.  See for example https://bugs.debian.org/309223
> opened 15 years ago, and closed 10 years ago without any attempt to fix
> the problem.

   :-(


> The bug has been carefully forward ported from syslinux to grub, keeping
> the intended(?) non-working default.
> 
> I believe most users have given up.  After all, you rarely need to
> install Debian more than once one a system. And you easily live with
> having to modify the installer slightly.

Virtual Machines (Qemu, KVM, Xen, ... ) and OCI containters ( "Docker
images") are the new serial port only computers.

In other words: There are many servers without video hardware.


Regards
Geert Stappers

Yes, I should provide patches ...
-- 
Silence is hard to parse



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Bjørn Mork
john doe  writes:

> Unless I'm missing something, it does work for me with something like:
>
> -nographic -cdrom *.iso -kernel  kernel-path -append
> "console=ttyS0,115200n8 ..."
>
>
> '-serial' might also be needed.

Try repeating that when installing on bare metal without a monitor.

The lack of serial console support is a very long standing bug in the
Debian installer.  See for example https://bugs.debian.org/309223
opened 15 years ago, and closed 10 years ago without any attempt to fix
the problem.

The bug has been carefully forward ported from syslinux to grub, keeping
the intended(?) non-working default.

I believe most users have given up.  After all, you rarely need to
install Debian more than once one a system. And you easily live with
having to modify the installer slightly.


Bjørn



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Alper Nebi Yasak

On 12/05/2020 13:02, Punit Agrawal wrote:

The above parameters do not launch the installer from the iso here. I am
not quite sure what the right arguments are. I wonder if
"root=" to the kernel will do the trick. Will give that a
try.


When I try:

$ qemu-system-x86_64 -cdrom *.iso -nographic -vga none

My terminal turns into a GRUB boot menu, where I can edit the 'Install' 
option (by removing 'quiet' and 'vga=788') into:


/install.amd/vmlinuz initrd=/install.amd/initrd.gz --- console=ttyS0

Which gets me booting kernel messages, can you try that?

(Booting still fails with a "Failed to execute /init (error -2)" in my 
case, but that'd be a separate bug if it's not a problem with my setup.)




Bug#960390: x86_64: No serial port output

2020-05-12 Thread john doe

On 5/12/2020 12:02 PM, Punit Agrawal wrote:

john doe  writes:


On 5/12/2020 11:36 AM, Punit Agrawal wrote:

john doe  writes:


[...]


This does not start the Debian installer. The issue reported is that the
grub shipping with DI does not output to serial console and hence can't
be used with "-nographic". It's maybe that the same issue is faced when
installing on hardware with no display but I have not confirmed this.

The aim is to be able to install debian in a VM using the iso images


That is exactly what I'm doing! :)


Thanks for clarifying. Sorry I misunderstood your reply.


-nographic -cdrom *.iso -kernel  kernel-path -append
"console=ttyS0,115200n8 ..."



Okay, you want something working out of the box but note that what you
want is already possible if you use the proper arguments.


The above parameters do not launch the installer from the iso here. I am
not quite sure what the right arguments are. I wonder if
"root=" to the kernel will do the trick. Will give that a
try.


I did get what you were complaning about, I was simply providing a
workaround to get you going.


I worked around this by using the graphical install and enabling serial
output in the installed image but I think this can be made to work
out-of-box and we shouldn't need a workaround. Fingers crossed.



The below command get me directly to the language selection screen which
I belaeve is what you want?:

qemu-system-x86_64 -drive file=debian.img,format=raw -m 1024 -boot d
-nographic -cdrom debian-bullseye-DI-alpha2-amd64-netinst.iso -kernel
vmlinuz  -append "console=ttyS0,115200n8 DEBIAN_FRONTEND=text" -initrd
initrd.gz

I extract all files ('vmlinuxz','initrd.gz') from the iso but they can
also be found online.

--
John Doe



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Punit Agrawal
john doe  writes:

> On 5/12/2020 11:36 AM, Punit Agrawal wrote:
>> john doe  writes:

[...]

>> This does not start the Debian installer. The issue reported is that the
>> grub shipping with DI does not output to serial console and hence can't
>> be used with "-nographic". It's maybe that the same issue is faced when
>> installing on hardware with no display but I have not confirmed this.
>>
>> The aim is to be able to install debian in a VM using the iso images
>
> That is exactly what I'm doing! :)

Thanks for clarifying. Sorry I misunderstood your reply.

>>> -nographic -cdrom *.iso -kernel  kernel-path -append
>>> "console=ttyS0,115200n8 ..."

> Okay, you want something working out of the box but note that what you
> want is already possible if you use the proper arguments.

The above parameters do not launch the installer from the iso here. I am
not quite sure what the right arguments are. I wonder if
"root=" to the kernel will do the trick. Will give that a
try.

> I did get what you were complaning about, I was simply providing a
> workaround to get you going.

I worked around this by using the graphical install and enabling serial
output in the installed image but I think this can be made to work
out-of-box and we shouldn't need a workaround. Fingers crossed.



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Punit Agrawal
john doe  writes:

> On 5/12/2020 11:01 AM, Colin Watson wrote:

[...]

> Unless I'm missing something, it does work for me with something like:
>
> -nographic -cdrom *.iso -kernel  kernel-path -append
> "console=ttyS0,115200n8 ..."

This does not start the Debian installer. The issue reported is that the
grub shipping with DI does not output to serial console and hence can't
be used with "-nographic". It's maybe that the same issue is faced when
installing on hardware with no display but I have not confirmed this.

The aim is to be able to install debian in a VM using the iso images
(e.g. [0]) without requiring graphical UI. This is already possible when
using arm64 and armhf DI images but seems to be missing some
configuration in the installer for x86_64.

Hope this clarifies the report.

[0] 
https://cdimage.debian.org/cdimage/bullseye_di_alpha2/amd64/iso-cd/debian-bullseye-DI-alpha2-amd64-netinst.iso



Bug#960390: x86_64: No serial port output

2020-05-12 Thread john doe

On 5/12/2020 11:36 AM, Punit Agrawal wrote:

john doe  writes:


On 5/12/2020 11:01 AM, Colin Watson wrote:


[...]


Unless I'm missing something, it does work for me with something like:

-nographic -cdrom *.iso -kernel  kernel-path -append
"console=ttyS0,115200n8 ..."


This does not start the Debian installer. The issue reported is that the
grub shipping with DI does not output to serial console and hence can't
be used with "-nographic". It's maybe that the same issue is faced when
installing on hardware with no display but I have not confirmed this.

The aim is to be able to install debian in a VM using the iso images


That is exactly what I'm doing! :)


(e.g. [0]) without requiring graphical UI. This is already possible when
using arm64 and armhf DI images but seems to be missing some
configuration in the installer for x86_64.



Okay, you want something working out of the box but note that what you
want is already possible if you use the proper arguments.


Hope this clarifies the report.



I did get what you were complaning about, I was simply providing a
workaround to get you going.


[0] 
https://cdimage.debian.org/cdimage/bullseye_di_alpha2/amd64/iso-cd/debian-bullseye-DI-alpha2-amd64-netinst.iso



Again it is working if you specify the kernel boot parameter that Debian
requires.

--
John Doe



Bug#960390: x86_64: No serial port output

2020-05-12 Thread john doe

On 5/12/2020 11:01 AM, Colin Watson wrote:

Control: reassign -1 debian-installer

On Tue, May 12, 2020 at 05:32:51PM +0900, Punit Agrawal wrote:

Package: grub2

Grub does not output to serial port when running in a VM launched using
Qemu when run as part of the Debian Installer. This prevents
installation of Debian in a VM when running without a GUI. In this
specific instance, I was trying to install Debian in a VM over ssh.

To reproduce the problem, run

 $ qemu-system-x86_64 -cdrom debian-10.3.0-amd64-netinst.iso -nographic

The BIOS / Firmware outputs to the serial port but no further progress
is seen on the serial console. Dropping the `-nographic` shows that
Debian Installer is launched in a graphical window waiting for input.

Once installed without `-nographic`, the following changes to
/etc/default/grub and running `sudo update-grub` enabled serial output.

 GRUB_TERMINAL=console
 GRUB_SERIAL_COMMAND="serial --speed=11520 --unit=0 --word=8 --parity=no 
--stop=1

The behaviour was seen on both Buster and Bullseye based Debian
Installer images on x86_64. It was also consistent for both legacy and
UEFI firmware.


The installer supplies its own GRUB configuration for the installer
images themselves; and its "grub-installer" component then has code to
at least attempt to configure the installed system's GRUB to use serial
output if the installer itself was using serial output.  So I think
either way this is something that would need to be fixed in the
installer.  Reassigning there.


Unless I'm missing something, it does work for me with something like:

-nographic -cdrom *.iso -kernel  kernel-path -append
"console=ttyS0,115200n8 ..."


'-serial' might also be needed.

--
John Doe



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Colin Watson
Control: reassign -1 debian-installer

On Tue, May 12, 2020 at 05:32:51PM +0900, Punit Agrawal wrote:
> Package: grub2
> 
> Grub does not output to serial port when running in a VM launched using
> Qemu when run as part of the Debian Installer. This prevents
> installation of Debian in a VM when running without a GUI. In this
> specific instance, I was trying to install Debian in a VM over ssh.
> 
> To reproduce the problem, run
> 
> $ qemu-system-x86_64 -cdrom debian-10.3.0-amd64-netinst.iso -nographic
> 
> The BIOS / Firmware outputs to the serial port but no further progress
> is seen on the serial console. Dropping the `-nographic` shows that
> Debian Installer is launched in a graphical window waiting for input.
> 
> Once installed without `-nographic`, the following changes to
> /etc/default/grub and running `sudo update-grub` enabled serial output.
> 
> GRUB_TERMINAL=console
> GRUB_SERIAL_COMMAND="serial --speed=11520 --unit=0 --word=8 --parity=no 
> --stop=1
> 
> The behaviour was seen on both Buster and Bullseye based Debian
> Installer images on x86_64. It was also consistent for both legacy and
> UEFI firmware.

The installer supplies its own GRUB configuration for the installer
images themselves; and its "grub-installer" component then has code to
at least attempt to configure the installed system's GRUB to use serial
output if the installer itself was using serial output.  So I think
either way this is something that would need to be fixed in the
installer.  Reassigning there.

-- 
Colin Watson   [cjwat...@debian.org]



Bug#960390: x86_64: No serial port output

2020-05-12 Thread Punit Agrawal
Package: grub2

Grub does not output to serial port when running in a VM launched using
Qemu when run as part of the Debian Installer. This prevents
installation of Debian in a VM when running without a GUI. In this
specific instance, I was trying to install Debian in a VM over ssh.

To reproduce the problem, run

$ qemu-system-x86_64 -cdrom debian-10.3.0-amd64-netinst.iso -nographic

The BIOS / Firmware outputs to the serial port but no further progress
is seen on the serial console. Dropping the `-nographic` shows that
Debian Installer is launched in a graphical window waiting for input.

Once installed without `-nographic`, the following changes to
/etc/default/grub and running `sudo update-grub` enabled serial output.

GRUB_TERMINAL=console
GRUB_SERIAL_COMMAND="serial --speed=11520 --unit=0 --word=8 --parity=no 
--stop=1

The behaviour was seen on both Buster and Bullseye based Debian
Installer images on x86_64. It was also consistent for both legacy and
UEFI firmware.

Let me know if you need additional information.

Thanks.