Grub doesn't show both Ubuntu installations

I the os-prober utility wasn't executable. I had to run this:

sudo chmod +x /etc/init.d/30_os-prober

and then

sudo update-grub2