Contribute
Register

Perfect triple boot system broke by Ubuntu 17.10 upgrade

Status
Not open for further replies.
Joined
Nov 11, 2016
Messages
7
Motherboard
Gigabyte Z390 IAorus Pro WIFI
CPU
i5-9600K
Graphics
Vega 64
Mac
  1. iMac
I had a perfectly working system with OS X Sierra, Windows 10 and Ubuntu 17.04 on three separate SSDs. I use Clover UEFI boot loader can get into any of the OS without problem.

The nightmare started when last week I let Ubuntu upgrade from 17.04 to 17.10. I didn't detach the OS X SSD when the upgrade was happening. After restart, I found grub took over and I can only boot to Windows but not OS X.

At first I thought it was just Ubuntu changing the boot disk order, so I went into my BIOS and change the boot order back to the OS X SSD as the first one. It didn't fix the problem. I was still booting into grub. Then I detached my Ubuntu SSD and Windows SSD. It went straight into grub rescue, and gave me "Unkown filesystem" error.

Then I created a Unibeast USB drive for Sierra in hope it can recognize my OS drive. I can boot into Clover with the USB drive, but in the diskutil I found my OS X SSD partition as marked as Linux!?

I don't understand how Ubuntu upgrade would wipe out a completely unrelated disk? Anybody ran into this problem? I am running out of clues now.
 
Moved to Multi Booting.
 
At first I thought it was just Ubuntu changing the boot disk order, so I went into my BIOS and change the boot order back to the OS X SSD
There is no boot disk order. Add the path to Clover to the boot menu, use efibootmgr from Ubuntu or EasyUEFI for windows, then change the boot order so that Clover is first.
 
There is no boot disk order. Add the path to Clover to the boot menu, use efibootmgr from Ubuntu or EasyUEFI for windows, then change the boot order so that Clover is first.
Incorrect. If the OS's are on 3 separate drives then there is a drive boot order that matters.
I had a perfectly working system with OS X Sierra, Windows 10 and Ubuntu 17.04 on three separate SSDs. I use Clover UEFI boot loader can get into any of the OS without problem.

The nightmare started when last week I let Ubuntu upgrade from 17.04 to 17.10. I didn't detach the OS X SSD when the upgrade was happening. After restart, I found grub took over and I can only boot to Windows but not OS X.

At first I thought it was just Ubuntu changing the boot disk order, so I went into my BIOS and change the boot order back to the OS X SSD as the first one. It didn't fix the problem. I was still booting into grub. Then I detached my Ubuntu SSD and Windows SSD. It went straight into grub rescue, and gave me "Unkown filesystem" error.

Then I created a Unibeast USB drive for Sierra in hope it can recognize my OS drive. I can boot into Clover with the USB drive, but in the diskutil I found my OS X SSD partition as marked as Linux!?

I don't understand how Ubuntu upgrade would wipe out a completely unrelated disk? Anybody ran into this problem? I am running out of clues now.
Use USB to boot to Mac OS desktop - mount EFI partition - is Grubx64efi boot file folder in the EFI folder? Has the EFI folder Clover installed been completely overwritten or is Clover still there?
Probably what happened is the Ubuntu installer installed grub to the drive that the BIOS identified as the boot drive. Which in this case happened to be your Mac OS drive.
To fix:
1. remove Grub from the Mac OS drive - instructions are on the Ubuntu forum: https://help.ubuntu.com/community/Grub2#Improvements .
2. Re-install Clover to the Mac OS drive.
3. Install Grub to the Ubuntu drive.
 
Incorrect. If the OS's are on 3 separate drives then there is a drive boot order that matters
No the device paths are a hard drive + a file path. And it is the file that gets booted, not the disk.

From a bootlog where Clover is installed on a Windows NTFS partition (C: drive), no EFI partition involved - just the device path pointing to the clover executable.
Code:
0:862  0:000  - [07]: Volume: PciRoot(0x0)\Pci(0x1F,0x2)\Sata(0x0,0xFFFF,0x0)\HD(5,GPT,EB68A213-7403-4425-A449-AC57BFB3A8BE,0x21F79800,0x744E800)
0:862  0:000          Result of bootcode detection: bootable Windows (vista,win)
0:863  0:000          This is SelfVolume !!
 
Last edited:
@vulgo @Going Bald thank you for you answer. I have been out for month and just saw them.
I have been trying to remove grub from the mac drive but not quite successful. If I use the usb boot disk to boot from Clover, Clover recognized my mac hard drive as a linux drive and was not able to boot from it.
I read the Grub2 improvement page, but didn't find the instruction to remove. Could you point out the steps please?

Much appreciated!
 
@vulgo @Going Bald thank you for you answer. I have been out for month and just saw them.
I have been trying to remove grub from the mac drive but not quite successful. If I use the usb boot disk to boot from Clover, Clover recognized my mac hard drive as a linux drive and was not able to boot from it.
I read the Grub2 improvement page, but didn't find the instruction to remove. Could you point out the steps please?

Much appreciated!
Are you installing all these legacy or something? Macs/hacks have bootable partitions, there is no 'mac drive' and grub 2/efi won't wouldn't normally install to an HFS+ and cannot install to an APFS partition. Boot from the USB, press F2 at the Clover boot menu and upload the saved preboot.log from flash drive /efi/clover/misc/preboot.log - then we can see what Clover is detecting as bootable linux.
 
Last edited:
Don't know what I did, but now I use the USB drive to boot from Clover and see my macOS disk. See pic.
I can get in but if I don't boot from the USB drive. I cannot boot directly from the disk if I picked it from BIOS. It says this is not a bootable disk and went straight into grub rescure.

I remove the Ubuntu folder from my Mac drive's EFI, but that didn't work.

What puzzled me is if upgrading Ubuntu on a separate disk will not be able to write on to my Mac disk, what stores on Mac disk will lead to grub bootloader?
 

Attachments

  • 06409027-389D-4C6F-B79D-802D039D4B4A.jpeg
    06409027-389D-4C6F-B79D-802D039D4B4A.jpeg
    2.7 MB · Views: 270
  • 67627E06-E7ED-4DA6-AEAE-6AD2F13CB9C2.jpeg
    67627E06-E7ED-4DA6-AEAE-6AD2F13CB9C2.jpeg
    9.7 MB · Views: 185
I managed to get my boot option back by
1. removing the ubuntu folder from clover
2. boot to windows and use EasyUEFI to delete the ubuntu boot option
3. manually add a new boot option to use /EFI/Clover/Cloverx64.efi

It seems ubuntu upgrade would modify the bootx64.efi
 
Don't know what I did, but now I use the USB drive to boot from Clover and see my macOS disk. See pic.
I can get in but if I don't boot from the USB drive. I cannot boot directly from the disk if I picked it from BIOS. It says this is not a bootable disk and went straight into grub rescure.

I remove the Ubuntu folder from my Mac drive's EFI, but that didn't work.

What puzzled me is if upgrading Ubuntu on a separate disk will not be able to write on to my Mac disk, what stores on Mac disk will lead to grub bootloader?
You should understand how EFI booting works. From the UEFI spec
An EFI system partition that is present on a hard disk must contain an EFI defined directory in the root directory. This directory is named EFI. All OS loaders and applications will be stored in subdirectories below EFI. Applications that are loaded by other applications or drivers are not required to be stored in any specific location in the EFI system partition. The choice of the subdirectory name is up to the vendor, but all vendors must pick names that do not collide with any other vendor’s subdirectory name. This applies to system manufacturers, operating system vendors, BIOS vendors, and third party tool vendors, or any other vendor that wishes to install files on an EFI system partition. There must also only be one executable EFI image for each supported processor architecture in each vendor subdirectory. This guarantees that there is only one image that can be loaded from a vendor subdirectory by the EFI Boot Manager. If more than one executable EFI image is present, then the boot behavior for the system will not be deterministic. There may also be an optional vendor subdirectory called BOOT. This directory contains EFI images that aide in recovery if the boot selections for the software installed on the EFI system partition are ever lost. Any additional UEFI-compliant executables must be in subdirectories below the vendor subdirectory.
The above describes the organisation of internal disks i.e. permanent installs, removable disks are expected to be organised differently:
For removable media devices there must be only one UEFI-compliant system partition, and that partition must contain an UEFI-defined directory in the root directory. The directory will be named EFI. All OS loaders and applications will be stored in a subdirectory below EFI called BOOT. There must only be one executable EFI image for each supported processor architecture in the BOOT directory. For removable media to be bootable under EFI, it must be built in accordance with the rules laid out in Section 3.5.1.1. This guarantees that there is only one image that can be automatically loaded from a removable media device by the EFI Boot Manager. Any additional EFI executables must be in directories other than BOOT.
Note that for internal disks the firmware is not supposed to be booting from /efi/boot/bootx64.efi unless there are no boot options in the boot menu, it is a fallback path e.g. after NVRAM failure and the boot menu is erased - if you want to boot Clover you should add an entry to the boot menu (alongside the one that GRUB, Windows etc create) - that points to /efi/clover/cloverx64.efi - the location Clover installs itself to when you run the installer. See post #3.
 
Last edited:
Status
Not open for further replies.
Back
Top