Why does /proc/partitions have sr0 and fd0 in it?

From: David F.
Date: Sun Sep 29 2019 - 15:55:02 EST


Hi,

I was updating some tools such as udev, mdadm, lvm, and came across a
hang and messages about unable to read fd0 which wasn't occurring with
the old tools, but using same kernel. So I've found that in the old
version the /proc/partitions didn't have fd0 whereas now it does. But
both have sr0 in it. So that leads me to who populates the
/proc/partitions, from the limited info you can find searching the
Internet, it looks like the kernel. But obviously not since same
kernel used with different results.

The difference is the old system udev used the old debian
create_static_nodes and didn't use devtmpfs, the new udev (eudev),
uses devtmpfs and the create_static_nodes is a bash function instead
of separate binary. I wonder if that has something to do with it.

But since cd and floppy devices aren't partitioned traditionally
(technically any block device could be but it would be non-standard)
why are they in the /proc/partitions file (also the device, e.g. sda,
is in there and it's not a partition). So is it not partitions but
just block devices? If so, maybe /proc/partitions should be a
symlink to a new /proc/blockdevices, so everyone is clear what
actually goes in there (leave the old name just for backwards
compatibility) ?

Is there any docs on all this?

Thanks!