Old days are gone since it was simple to just view the menu.lst
file... :)
How could I detect installations on partitions from command line in a fully-loaded system?
Look at /boot/grub2/grub.cfg
(on a BIOS system) or /boot/EFI/<distro>/grub.cfg
(on UEFI systems). On many systems, /etc/grub2.cfg
is a symlink to one of the above.
You'll see menuentry
for each menu entry followed by some module loading and then linux
and initrd
lines. The latter two tell you where the kernel and initrd are located.
You could also use os-prober
to scan disks for bootable partitions.