lsdrv icon indicating copy to clipboard operation
lsdrv copied to clipboard

/proc/mounts exposes /dev/root instread of real device and it is not always available

Open EricV2 opened this issue 10 years ago • 3 comments

I think that if you do not use initrd, it is not created. mount command gives the real device

tri-yann4:/tmp# cat /proc/mounts /dev/root / ext4 rw,noatime,nodiratime,discard,errors=remount-ro,data=ordered 0 0 ... mount /dev/sdb10 on / type ext4 (rw,noatime,nodiratime,discard,errors=remount-ro,data=ordered)

findmnt -n -o SOURCE / /dev/sdb10

EricV2 avatar Feb 07 '16 16:02 EricV2

I've seen mount show multiple roots when /dev/root is present. Could you provide some details of distro and version you are using?

pturmel avatar Feb 08 '16 17:02 pturmel

I'm using debian, unstable. Just I have no initrd because I build my own kernels for the nas

EricV avatar Feb 08 '16 22:02 EricV

Note that the script barks and fails because it does not find /dev/root (which indeed does not exist). So I have to manually create the link. I was more thinking of a fallback if /dev/root does not exist...

EricV2 avatar Feb 10 '16 08:02 EricV2