Page MenuHomeVyOS Platform

Incorrect GRUB configuration parsing
Closed, InvalidPublicBUG

Description

In some cases (for example, in builds for some platforms, after boot config customization, etc.), a boot string does not fit an expected structure. For example, the next item has a console type of "serial":

linux /boot/1.3.0/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/1.3.0 console=ttyS0

However, the parser thinks that this is "kvm" because it expects to see the next string for "serial":

linux /boot/1.3.0/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/1.3.0 console=tty0 console=ttyS0

See the details here: https://github.com/vyos/vyatta-op/blob/3b99caf65d3392c88600066a93fc0b29b767c84c/scripts/vyatta-boot-image.pl#L105-L109

Also, it has a problem with "default boot" and "running image" marks in the images list. For example, if we booted with the KVM console and the default entry has a serial console, we will not see any images with "default boot" in the list, because the parses interpret each boot item as a unique version and drop items with another type of console than a current one in the output.

vyos@vyos:~$ show system image
The system currently has the following image(s) installed:

   1: 1.3.0 (default boot)

vyos@vyos:~$

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3.0
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

RyVolodya removed a subscriber: RyVolodya.
Viacheslav changed the subtype of this task from "Task" to "Bug".Dec 28 2021, 7:15 PM