There is more complexity to this than just "what partition I have booted to". The kernel image may be in one partition while the root filesystem may be in another. And your system namespace (the collection of mount points) may be made up of several, depending on what distro you use and the options chosen during install.
But maybe it is sufficient to identify the root filesystem? Even that varies. Here's how I did it on my Ubuntu 10.10 system:
Code:
lorentz/phil /home/phil 1> grep ' / ' /proc/mounts
rootfs / rootfs rw 0 0
/dev/disk/by-uuid/d2ce8eef-bd9e-433d-96a1-f91c1b5aa552 / ext4 rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
lorentz/phil /home/phil 2> ls -dl /dev/disk/by-uuid/d2ce8eef-bd9e-433d-96a1-f91c1b5aa552
lrwxrwxrwx 1 root root 10 Jan 31 16:46 /dev/disk/by-uuid/d2ce8eef-bd9e-433d-96a1-f91c1b5aa552 -> ../../sda3
lorentz/phil /home/phil 3>