Page MenuHomeVyOS Platform

Incorrect GRUB configuration parsing
Closed, ResolvedPublicBUG

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)

Related Objects

Mentioned In
1.3.4

Event Timeline

zsdc changed the task status from Open to In progress.Dec 30 2021, 5:21 PM
zsdc added a subscriber: zsdc.
Viacheslav changed the task status from In progress to Needs testing.Jul 12 2022, 7:25 PM
zsdc changed the task status from Needs testing to Backport pending.Aug 24 2022, 8:16 PM