On disk `/tmp/vmlinuz-hack/vmlinuz-6.12-x86_64` masked by tmpfs

I got sick of seeing the warning in my system log about /tmp not being empty when tmpfs overlays it and decided to go investigate.

So after bind mounting root to another folder with sudo mount --bind / /newfolder

I found a single file /tmp/vmlinuz-hack/vmlinuz-6.12-x86_64

What the heck is that doing there and why does it have the sus folder name of vmlinuz-hack?

The timestamp is the date I installed Manjaro but I have neither the original installation media nor the original 6.12 kernel files so I can’t check if it matches the original kernel to compare to.

1 Like

I vaguely recall an issue with grub, btrfs and kernel.

I don’t know - it could be remnants - in any case remove it.

Some tools do not transfer empty directories. A common workaround is to place an empty file in the directory to ensure it gets included. :footprints:

With /tmp, it is not unusual to carry out operations within a specifically named subdirectory. The advantage here is that there is no need to clean up afterwards; /tmp gets wiped clean upon booting anyway because it is a tmpfs.

However, there are situations where /tmp is just a standard directory within the root filesystem (/). I suspect that—during installation—someone simply didn’t consider that the file would actually end up on the disk and would therefore need to be cleaned up. :footprints:

Contrary to popular belief, the word “hack” does not imply anything malicious. In the world of software, it usually refers to a quick & dirty modification and/or workaround for a problem that would take too much effort to solve properly within a given timeframe.

If the timestamp on the file corresponds to when you installed Manjaro, then it may just as well have been some lazy workaround by the calamares developers for something they didn’t have the time (or willingness) to fix properly at the time.

Or, if you updated your system that day by way of pamac — as most would do — then it may have been such a quick & dirty trick applied by pamac for working around one of its own shortcomings, or it may even simply be an artifact of mhwd-kernel and how that gets invoked from within calamares during system installation.

In the end, it could even be a leftover from a previously installed distribution that does not use a tmpfs for /tmp if you forgot to reformat your root filesystem. I have seen such artifacts in other distributions as well.

I’m pretty confident it’s fine and was an artefact from the initial install. It’s just weird though, and I full grasp the meaning of hack - you just don’t usually see it used in a release environment/distro for the simple reason that people would freak out (or simply find it rather odd).

Besides that, I like to know how things work and I just want to know :thinking: :owl:

3 Likes