MacOS – “Still waiting for root device” on a macbook pro mid 2009 with osx 10.11.6

bootmacos

Recently got myself a macbook and wanted to put linux on it.

So I got myself a copy of ubuntu and refind and then:

  • Installed refind in osx recovery mode and shut down.
  • Booted up, selected my ubuntu usb from the menu, waited a bit, made a 60g partition by reducing the main partition and installed ubuntu to the 60g partition.
  • Booted ubuntu fine, did a few updates and after that was all done, rebooted back into osx.

But now, I'm given a stop sign after a few seconds. So I checked what was happening with verbose mode and it's saying "Still waiting for root device" with that message being repeated every 10 seconds or so.

From what I've read online, this message is a bit vague so I'm asking here so see if anyone would know how to properly find out whats wrong. If you want anymore information, ask. I'll gladly provide it


Partition Information

GPT fdisk (gdisk) version 1.0.3

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

Found valid GPT with hybrid MBR; using GPT.

Command (? for help): v

No problems found. 13 free sectors (6.5 KiB) available in 2
segments, the largest of which is 7 (3.5 KiB) in size.

Command (? for help): r

Recovery/transformation command (? for help): o

Disk size is 537234768 sectors (256.2 GiB)
MBR disk identifier: 0x00000000
MBR partitions:

Number  Boot  Start Sector   End Sector   Status      Code
   1                     1       409639   primary     0xEE
   2      *         409640    410011647   primary     0xAF
   3             535965192    537234727   primary     0xAF
   4             410011648    535965191   primary     0x83

Recovery/transformation command (? for help): p
Disk /dev/sda: 537234768 sectors, 256.2 GiB
Model: Crucial_CT275MX3
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 749BC76B-79A9-4FD1-8D24-6148246ED175
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 537234734
Partitions will be aligned on 8-sector boundaries
Total free space is 13 sectors (6.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       410011647   195.3 GiB   AF00  Macintosh HD
   3       535965192       537234727   619.9 MiB   AB00  Recovery HD
   4       410011648       535965191   60.1 GiB    8300

Best Answer

If you want to reinstall you can use dmg2iso to convert dmg on Linux - see this Ask Ubuntu question.

Your partition table looks almost OK. The only thing is that it doesn't have 128MB free space between partitions. See Booting from GPT by the author of rEFInd.

The biggest caveat seems to be following Apple's recommendations for partition sizing and placement. The need for 128 MiB of unpartitioned space after each OS X partition is particularly important; without that space, the OS X installer will refuse to install or upgrade on the partition.

It might let you install to your existing partition but if not you can keep your Linux system by manually resizing partition tables using gdisk ensuring you keep the 128MiB unallocated space as described in the gdisk walkthrough.

For example to shrink partition 2 using gdisk (you will likely lose data in partition 2 as partition will be smaller than current filesystem)

  1. delete it (d2)
  2. create a new one stopping 129MiB before your Linux partition (n)
Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-490234718, default = 409640) or {+-}size{KMGTP}: 409640
Last sector (409640-410011647, default = 410011647) or {+-}size{KMGTP}: -129M 
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): AF00
Changed type of partition to 'Apple HFS/HFS+'

  1. Sort partitions (s)
  2. Recreate hybrid member - go to Recovery menu (r) and make hybrid MBR (h)
Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 2 3 4
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y

Creating entry for GPT partition #2 (MBR partition #2)
Enter an MBR hex code (default AF): AF
Set the bootable flag? (Y/N): Y

Creating entry for GPT partition #3 (MBR partition #3)
Enter an MBR hex code (default 83): 83
Set the bootable flag? (Y/N): N

Creating entry for GPT partition #4 (MBR partition #4)
Enter an MBR hex code (default AF): AF
Set the bootable flag? (Y/N): N

  1. Write changes and exit w

A similar procedure would be required for recovery partition (or you could just delete it).

Alternatively you can delete all partitions, install macOS then make space for Linux using Disk Utility from within macOS.