modified for working with update-grub under Ubuntu