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

Bug#769406: Serial console not set up after serial install



I've just run headlong into this 10 years later.

I have a script that creates a VM thusly:
virt-install --name ${vm_name} --memory ${mem_size} \
 --disk "size=${disk_size},pool=${disk_pool},discard=unmap" \
 --machine q35 \
--location http://ftp.us.debian.org/debian/dists/${suite}/main/installer-amd64/ \
 --os-variant name=debiantesting \
 --network network=ovs-net,target=ve0-${vm_name} \
 --graphics none --extra-args="console=ttyS0 netcfg/hostname=${vm_name}" \
 --console pty \
 --initrd-inject preseed.cfg

Under both bookworm and trixie, the install completes successfully over the serial console.

In bookworm it seems systemd was being overly smart and starting a getty on the serial port when it saw one, as there is no other apparent configuration to start it. Under trixie this behavior is no longer present, so I get no way to log into the installed system. (I can't be certain this is the case as I have not been able to locate a relevant changelog entry in systemd.) However, since grub does get configured, I can edit the kernel command line manually on boot and append "console=ttyS0". systemd sees this kernel argument and starts the getty.

So it seems like the simplest way to fix this in the current environment is to have the code that sets up the grub serial arguments also go ahead and tack on a matching "console=" to GRUB_CMDLINE_LINUX.


Reply to: