I just acquired a macbook air. I dual-booted mac os with Ubuntu. It is my first time multiple-booting on a mac. I triple-booted with another Ubuntu. Ater removing the third distro, I experience some issues with grub.First of all, I made my partitions as follow:$ lsblksda  sda1  200M    /boot/efi  sda2  47.3GB              # Mac os  sda3  620MB               # Mac rescue  sda4  2GB                 # Swap partition  sda5  50GB                # Ubuntu 1  sda6  50GB                # Ubuntu 2  sda10 100GB               # ext4 file systemI did an install of Ubuntu on sda5. Once finished, it directly boots with Ubuntu which is great. I later installed another ubuntu on sda6 as I would like to test using other ditros and I want to check if I could do that easily. Note that the Ubuntu version is the exact same I installed on another partition. Once the second Ubuntu installed, I reboot and I have the grub screen asking me to chose between the two Ubuntus. Neat. Then, having no use for the second ubuntu, I simply erased sda6 using gdisk:$ gdisk /dev/sda> d  # delete partition> 6  # delete partition 6> w  # write changes> Y  # confirmation of writing changes.> q  # quit gdisk$ lsblksda  sda1  200M    /boot/efi  sda2  47.3GB              # Mac os  sda3  620MB               # Mac rescue  sda4  2GB                 # Swap partition  sda5  50GB                # Ubuntu 1  sda10 100GB               # ext4 file systemNow on reboot, I get the grub command line on black screen. I have to specify the disk where my ubuntu is located. I followed some indications in this thread to boot on Ubuntu:  https://askubuntu.com/questions/159846/tried-to-boot-ubuntu-but-the-grub-rescue-shows-up-instead  and tried doing the following:grub> ls (hd2,gpt5)  # That's my Ubuntu partitiongrub> root=(hd2,gpt5)grub> configfile /boot/grub/grub.cfgNow I succesfully booted in Ubuntu. After logging in, I followed the instrutions on updating grub:$ sudo update-grubAlas when rebooting, the grub screen pops up again. So updating grub did not do the trick. I also tried to do with grub 2 in case:$ sudo update-grub2It does not change anything.I also tried to reinstall the second version of Ubuntu on sda6. Same scheme, when I reboot, I am asked to chose between the two Ubuntu versions in the grub menu, so it kind of solves the issue. But as soon as I remove the second Ubuntu partition, the first one won't boot directly unless I specify it in the grub command line screen.I don't know if this might be useful, but here is my fstab:$ cat /etc/fstab# /etc/fstab: static file system information.## Use 'blkid' to print the universally unique identifier for a# device; this may be used with UUID= as a more robust way to name devices# that works even if disks are added and removed. See fstab(5).## <file system> <mount point>   <type>  <options>       <dump>  <pass># / was on /dev/sda2 during installationUUID=85ab4560-729a-4f7d-91d9-69af89ea1219 /               ext4    errors=remount-ro 0       1# /boot/efi was on /dev/sda1 during installationUUID=DAC6-DEC2  /boot/efi       vfat    defaults        0       1# swap was on /dev/sda4 during installationUUID=9c76739a-5996-43d8-a14e-fe690c06870f none            swap    sw              0       0What can I do to solve this issue? Is it a matter of EFI? Why removing the second Ubuntu partition makes the first one unrecognized to grub? Note that I would like to find a clean solution, so I would like to avoid reinstalling Ubuntu to solve it.
Grub menu on reboot after removing another distro partition
ubuntu;osx;dual boot;grub;uefi
I solved my issue by getting hints from this thread: https://superuser.com/questions/376470/how-to-reinstall-grub2-efiI did not need to use a live installation, I just booted into my ubuntu session through the grub window. I then reinstalled grub:$ apt-get install --reinstall grub-efi-amd64This also did an update-grub automatically. It works and updated the grub.cfg file in /boot/efi/EFI/ubuntu/grub.cfg, updating the right partition to boot ubuntu from: $ cat /boot/efi/EFI/ubuntu/grub.cfg search.fs_uuid 17441147-6b9d-45fe-bccd-bed2451f43f8 root hd0,gpt5 set prefix=($root)'/boot/grub'configfile $prefix/grub.cfgPreviously, running $ update-grubwould not update neither the uuid nor the partition, old partition was the latest ubuntu's, named hd0,gpt6. So it seems reinstalling grub was necessary.