Ok. Time to explain a little bit…
The thing is that os-prober wants to bypass the current system, the system that is mounted right now, and for that it creates a list from /proc/mount with all the lines that start with /dev/
(because in mount there are also a lot of internal virtual devices). In the main loop it checks every physical device against the list that was created to bypass or ignore the root file system (the one that is mounted in /).
This should work, but if you watch carefully the content of the /proc/mount that you sent, you’ll see that the root file system looks like this:
rootfs /dev/nvme0n1p6 / ext4 rw,noatime 0 0
The problem here is that the line doesn’t start with the string /dev/
, that is what os-prober is expecting. So the list doesn’t contain nvme0n1p6
and when later checks the physical device, doesn’t notice that this is the current system and has to ignore it. Os-prober thinks that is just another system in your computer and add it to the output.
Compare the line with my system’s /proc/mounts:
/dev/nvme0n1p5 on / type ext4 (rw,noatime)
In my system, the entry gets to the list and the partition is later recognized as the root file system and thus ignored.
But to make this more unusual, the different entry in mounts only shows up when a new name space has been called with the tool newns.
I have tried to find out why this inconsistency, but haven’t succeed. So probably I’m going to open a thread to try to get some attention from the devs.
Probably this is all long and boring, but the tl; dr is that probably you can’t do nothing and you have to wait to os-prober get patched (that can take long and I don’t know even will it happen). For now, as a temporary solution, you can undo the modification to /usr/lib/os-prober/newns
and add the line OS_PROBER_NEWNS=1
to /etc/environment
PS: I see you are using kernel 4. That is somehow a possible cause for the “malfunction”