I have a linux dual boot installed with rEFInd, which I want to delete.

enter image description here

I tried to just delete the disk partition, but that throws an error.

MediaKit reports partition (map) too small. If you recently grew your whole-disk, you should run whole-disk repair.

First Aid completes without any errors.

From this other post, I figured my best option would be to run qparted on my linux dual boot to fix the disk partition.

However, after installing 10.13.4 update, my mac decided to auto-boot into the latest OS X, disabling my dual-boot. I can't even log into linux anymore.

Running diskutil list gives the following result:

/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         210.0 GB   disk0s2
   3:                  Apple_HFS Recovery HD             650.0 MB   disk0s3
   4:           Linux Filesystem                         40.0 GB    disk0s4
   5:                 Linux Swap                         133.2 MB   disk0s5

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +210.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            193.4 GB   disk1s1
   2:                APFS Volume Preboot                 21.9 MB    disk1s2
   3:                APFS Volume Recovery                517.9 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +2.0 TB     disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Time Machine Backups    2.0 TB     disk2s2

I had this issue before, and the solution was to change the priority of the boot loader, but I have forgotten how to do it...

I looked at the rEFInd documentation, and I have followed the instructions:

$ sudo mountesp
- The ESP has been identified as /dev/disk0s1; attempting to mount it....
- The ESP is mounted at /Volumes/ESP

$ sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
- mount: realpath /Volumes/ESP: No such file or directory

This is weird, because mountesp just told me that that directory exists...

  • 1
    Great edits! I've purged the comments - let's see if we can get some answers / ideas.
    – bmike
    Jun 2, 2018 at 14:17
  • 1
    Is there a reason you have another Apple HFS Recovery partition at disk0s3? You can probably get rid of that (just a random suggestion since you have disk1s3). Also most Mac OS updates will rebless the Mac OS partition. You can easily rebless refind using this command "sudo bless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/efi/refind/refind_x64.efi --shortform" Check this website from Refind: rodsbooks.com/refind/bootcoup.html. The way I would do it is 1. Run the mountesp command. 2 Then run the above command. That should fix your refind boot. Oct 1, 2019 at 14:50
  • 1
    If you decide to repartition your whole disk using the Linux OS, you could run into the issue of crapping out your Mac OS. It will not boot, you can lose data. I would suggest continue repartitioning your drive with Mac OS. Usually what I have seen is you need to remove the previous partition (disk0s3) and then you can remove partition disk0s4, and then disk0s5, so basically removing volumes 1 by 1. Oct 1, 2019 at 14:54
  • 1
    Also, I am assuming you installed refind to your EFI partition, so the above commands should work. Otherwise if you installed refind to another different partition, then you will need to repoint the location of the refind_x64.efi file for the rebless command above Oct 1, 2019 at 15:06
  • 1
    @chrisdahfuh Thanks, some time ago I needed to wipe the entire system and got my data back from a backup, so the partition is gone already. Nonetheless, this help is much appreciated. I think the system failure had something to do with the partition. Script kiddies should refrain from messing with their OS I guess is the lesson
    – Narusan
    Oct 3, 2019 at 11:07


You must log in to answer this question.

Browse other questions tagged .