I was having Ubuntu installed along with MacOS Catalina. I need windows for project work so I decided to create a partition and flash windows in it... Doing this I messed up and there was showing no option to boot into MacOS. Right now I can log in into Ubuntu with no problem so is there any way, by which I can boot into MacOS located at disk0s2? Disk0s1 is EFI I have access to /EFI/EFI from Ubuntu I can see 4 folders there... Apple, Boot, Microsoft, Ubuntu. What should I do? P.s.: I have a blank partition of 50GB and in external hard disk I have a 5.5GB ISO file of old version of MacOS file.

Edit No.1

derek@derek-MacBookPro:~$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 490234752 sectors, 233.8 GiB
Model: APPLE SSD SM0256
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): F3A656EC-6327-4E3B-B8D4-24D7C90F18DD
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 490234718
Partitions will be aligned on 8-sector boundaries
Total free space is 105470093 sectors (50.3 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       294970071   140.5 GiB   FFFF  MacOSX
   3       400439296       490233855   42.8 GiB    8300

Edit No. 2 result of sudo efibootmgr -v

derek@derek-MacBookPro:~$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0002,0001,0000,0080
Boot0000* ubuntu    HD(1,GPT,ba591477-7a5b-4314-95e2-3ea359d0b28c,0x28,0x64000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Linux HD(1,GPT,ba591477-7a5b-4314-95e2-3ea359d0b28c,0x28,0x64000)/File(\EFI\ubuntu\grub.efi)FFFF.0000.0080...............
Boot0002* Linux HD(1,GPT,ba591477-7a5b-4314-95e2-3ea359d0b28c,0x28,0x64000)/File(\EFI\ubuntu\grub.efi)
Boot0080*   PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/Sata(0,0,0)/HD(1,GPT,ba591477-7a5b-4314-95e2-3ea359d0b28c,0x28,0x64000)/File(\EFI\BOOT\BOOTX64.efi)
BootFFFF*   PciRoot(0x0)/Pci(0x1c,0x4)/Pci(0x0,0x0)/Sata(0,0,0)/HD(1,GPT,ba591477-7a5b-4314-95e2-3ea359d0b28c,0x28,0x64000)/File(\EFI\BOOT\BOOTX64.efi)

Edit No.3 : Output of sudo sgdisk -i 2 /dev/sda

derek@derek-MacBookPro:~$ sudo sgdisk -i 2 /dev/sda
Partition unique GUID: 4D99D8DA-F7FF-451F-B9F2-074010EBF442
First sector: 409640 (at 200.0 MiB)
Last sector: 294970071 (at 140.7 GiB)
Partition size: 294560432 sectors (140.5 GiB)
Attribute flags: 0000000000000000
Partition name: 'MacOSX'

Edit No 4: sudo sgdisk -t 2:7C3457EF-0000-11AA-AA11-00306543ECAC /dev/sda

derek@derek-MacBookPro:~$ sudo sgdisk -t 2:7C3457EF-0000-11AA-AA11-00306543ECAC /dev/sda
[sudo] password for derek: 
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
  • 1
    Can you log in to Ubuntu and post the output from the command sudo gdisk -l /dev/sda? Nov 16, 2019 at 6:15
  • (number, start(sector), end(sector), size,code, name { 1,40,409639, 200.0MiB , EF00, EFI System Partition} {2, 409640,294970071, 140.5GiB , FFFF, MacOSX} {3, 400439296,490233855, 42.8GiB, 8300 } Nov 16, 2019 at 7:13
  • 1
    Boot into Ubuntu and run sudo gdisk -l /dev/sda and sudo efibootmgr -v. Please edit your question, adding the output of these commands there rather than in a comment, where it is extremely difficult to read.
    – Jivan Pal
    Nov 16, 2019 at 7:51
  • 1
    @JivanPal ok I updated, what should I do next? Nov 16, 2019 at 13:56
  • Since you are not using the current version of gdisk, could you add the output from the command sudo sgdisk -i 2 /dev/sda. Nov 16, 2019 at 14:38

1 Answer 1


Enter the following command. This will change the MacOS Catalina partition back to an APFS container.

sudo sgdisk -t 2:7C3457EF-0000-11AA-AA11-00306543ECAC /dev/sda

Next, you will need to reboot. Immediately after rebooting, hold down the option key until the Startup Manager appears. Hold down the control key before selecting macOS from the Startup Manager choices.

  • please checkthe result and let me know whether i should boot now? Nov 16, 2019 at 16:32
  • I assume, when you reboot, you will immediately hold down the option key until the Startup Manager appears. Next, hold down the control key and select macOS. Let me know if MacOS does not appear. Nov 16, 2019 at 16:36
  • Yes it worked for me!!! Thank you so much! Nov 16, 2019 at 16:40
  • 1
    @SwapnilSaste klanomath is trolling 😉 For more info, see here (§ Partition Type GUIDs)
    – Jivan Pal
    Nov 16, 2019 at 18:30
  • 1
    @JivanPal thanks for the article , that article satisfied my curiosity😊 Nov 16, 2019 at 18:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .