How to change grub settings properly in VyOS?

Normally one would alter /etc/default/grub file and then run something like “grub-install /dev/sda” but I guess this isnt the case with VyOS?

Mainly because the /boot/grub/grub.cfg is generated by /opt/vyatta/sbin/vyatta-grub-setup.

So how do I properly alter grub of VyOS to include lets say “fsck.mode=force” for all boot options except the maintenance modes?

It seems that as a workaround one can manually edit /boot/grub/grub.cfg however that change needs to be re-done next time a system image is added.

Verified by adding “mitigations=off” for this lab environment (and later running “lscpu” to verify that “mitigations=off” had the desired effect).

However adding “fsck.mode=force” didnt work at all.

Neither did “sudo touch /forcefsck”.

Altering the partition itself by “sudo tune2fs -c 1 /dev/sda1” changes max mount count to 1 (so that fsck should be run each boot) but it doesnt.

Doing “tune2fs -l /dev/sda1” still says:

Last checked: Sun Jul 2 19:58:46 2023

So ehm, how am I expected to perform a fsck on the root partition in VyOS (without booting some other live linux system on a cd/dvd/usb-drive)?

Added this feature request regarding append bootstring and altering timeout for grub in VyOS: ⚓ T5432 Add grub-settings to system section in VyOS config-mode


Hi @Apachez! We appreciation for your contribution to the VyOS community by creating the feature request regarding the append bootstring and altering timeout for Grub in VyOS. This will help us address specific needs and make improvements that benefit the entire community.

Once again, thank you for valuable contribution.