Originally Posted by
grubu
Another question is if it would be possible to tell via the update-grub something like just update grub by rescanning partition (hd0.7) and no other partitions f.e. if you need to update them later?
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.
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:
Code:
sudo chmod -x /etc/grub.d/30_os-prober
or even better (since it retains the keystatus check), add this to /etc/default/grub:
GRUB_DISABLE_OS_PROBER=true
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.
Code:
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
Bookmarks