Being able to specify a partition exclusion is in the works and may have already been incorporated in Grub 1.99 - I've seen the patch but don't know if it has been incorporated yet. It isn't in any of the current Ubuntu releases.
Originally Posted by grubu
In my "Tweaks" thread I have several sections which describe how to hide various partitions. A much easier method, at least until it becomes available directly through Grub 2, is via the Grub-Customizer app. Links to both are in my signature line.
Another option if you only want it to scan only the OS's partition (and no others) is to disable os-prober's script:
or even better (since it retains the keystatus check), add this to /etc/default/grub:
sudo chmod -x /etc/grub.d/30_os-prober
If you wanted to disable grub from updating itself on any specific installation you can use the "dkpg-divert" command, but this is getting into more advanced territory and users need to weigh (and/or research) the advantages/disadvantages of this method. If doing this, I strongly suggest having a reliable custom grub menu available first.
dpkg-divert --rename --add /usr/sbin/update-grub # changes name to update-grub.distrib
ln -s /bin/true /usr/sbin/update-grub # runs /bin/true as update-grub so no errors generated