Duplicate Manjaro entries in Grub menu and Linux kernel v4


I have helped a couple of persons with a problem, where they had a duplicate Manjaro entries in Grub menu. I discovered that the problem lies in os-prober. os-prober should only list other operating systems that are not the current system. But for them it was also giving the current OS and thus update-grub was adding two times the current Manjaro (the one that update-grub finds by itself and the one os-prober is feeding update-grub)

So with the help of one of the users, I began to debug and finally could trace the problem (forum post about the matter bellow). So it seems that os-prober reads /proc/mounts to identify what root filesystem is mounted, but in the affected systems that line is presented this way:

rootfs /dev/nvme0n1p6 / ext4 rw,noatime 0 0

And os-prober is expecting a line that starts with /dev/. A “normal” line looks like:

/dev/nvme0n1p6 / ext4 rw,noatime 0 0

Still more strange this only happens when using a different name space (os-prober change to a new NS at the beginning). This can be test with os-prober’s tool newns:

sudo /usr/lib/os-prober/newns bash
cat /proc/mounts

I think this is related to the kernel. Both persons use linux419 kernel.
I also think that this is happening only from the last update, but I’m not sure of that.

Is here anyone that can give some light to this? I know this only affects very few people and it’s not a big issue, but should this be reported as a bug to os-prober or to kernel maintainers? Thanks!

PS: I can’t post links. The forum post with the user is the one with the name: “After installing Manjaro XFCE, there are two options for boot in my UEFi. One is UEFI OS and another one is my SSD. Which one should I choose?”

1 Like

Looks like you managed to find the problem!!! Congrats!!!

I can sort of confirm that. I had the problem under 4.19 and it was gone as soon as I switched the kernel to 5.8.