GNU GRUB exit mac os

6,130

Try holding down the Option (or Alt) key as you power on the computer and it sounds its chime. This should bring up the computer's built-in boot manager.

If that fails, and if the computer boots to Ubuntu, you could do one or more of three things:

  • Use efibootmgr -- The efibootmgr tool controls the computer's boot order. Typing sudo efibootmgr shows the entries. There should be an entry for ubuntu, which you can delete with sudo efibootmgr -b #### -B, where #### is the boot number; or you can use -o to set a new boot order, as in sudo efibootmgr -o 80,81,82 to set Boot0080 first, Boot0081 second, and so on. (OS X generally uses 0080 and above for itself.)
  • Delete GRUB -- Ubuntu installs GRUB in the /boot/efi/EFI/ubuntu directory (EFI/ubuntu on the EFI System Partition [ESP]). Deleting this directory, or at least the grubx64.efi and shimx64.efi files it contains, will prevent it from running. The computer should then try the next available boot entry, which should be OS X; or enter an automatic recovery tool.
  • Reset the NVRAM -- See this official Apple page for information on how to reset the computer's NVRAM. I'm not 100% sure of this, but I believe that doing so will reset the boot order options, thus solving your problem. (Note that this should work even without access to Ubuntu.)
Share:
6,130

Related videos on Youtube

T.jan
Author by

T.jan

Updated on September 18, 2022

Comments

  • T.jan
    T.jan over 1 year

    I have a Macbook Air. I installed Ubuntu with dual boot. But I wanted to delete it. I deleted rEFInd. Then I restarted and I got to GNU GRUB. When I write command exit it froze. When I try to access to recovery mode I cannot see anything -- there is no Mac OS X disk. How can I get back to Mac OS?

  • lpacheco
    lpacheco almost 4 years
    How can I do this from macOS? There is no efibootmgr installed and no /boot on Catalina.
  • Rod Smith
    Rod Smith almost 4 years
    @lpacheco, you could use an Ubuntu installation CD in its "try before installing" mode to access efibootmgr. In macOS, you can mount the ESP manually at /Volumes/ESP by typing mkdir /Volumes/ESP followed by sudo mount -t msdos /dev/disk0s1 /Volumes/ESP', with the caveat that this *assumes* the ESP is /dev/disk0s1, as it is on most Macs. To determine that with absolute certainty, you'd need to study the output of diskutil list`.