Kernel updates and the replacing of config.txt and cmdline.txt

I could be wrong on the critera, but it seems that if you have a modified config.txt and/or cmdline.txt and you then perform a kernel update that switches branches (ex. rc to mainline), the files are replaced with the default version. Other kernel updates leave the existing files untouched.

Is this intentional? I would much prefer a .pacnew, than to change the files. I test kernels often and sometimes forget to replace the files before rebooting. The default files are not always usable, ex. nfsroot, usb quirks, or expect to have an overlayfs in place. But worse, is a successful boot and not realizing you are running on the incorrect configuration.

Edit: The update does notify of the file change, so it is my fault for not resolving the issue. I would just rather not have an issue to resolve.

That’s 2 different use cases.

This is because you are switching out the package itself.
So all the files that belong to the previous package, gets uninstalled, since you are removing the package, and the files from the new package gets placed instead.

On other devices, we have started moving to using boot files generated by the package, instead of boot files provided by the package. This means that the files are no longer owned by a package and therefore not removed/changed by a package update/uninstall.
@darksky is thinking about doing the same for Raspberry Pi devices.

2 Likes