Ubuntu: Installing ubuntu on Mid-2007 macbook



Question:

Background

I was given an old mid-2007 white macbook for me to play with and I thought I would like to dual boot ubuntu on it. The CD drive is broken. The CPU is 64 bit.

What I've done so far:

  • I downloaded ubuntu 16.04 LTS as an iso and converted it to an img. (I used hdiutil convert -format UDRW path/to/ubuntu.iso -o path/to/ubuntu.img to do this)

  • I installed rEFInd on the mac.

  • Partitioned the usb drive to be OSX Journaled with a GUID partition manager

  • Thanks to Rod Smith I ran ioreg -l -p IODeviceTree | grep firmware-abi which returned <"EFI32">

Here's where it gets interesting

Once I use sudo dd if="path/to/ubuntu.img" of="/dev/rdiskN" the usb drive switches from the GUID partition scheme to the Apple partition manager. This makes my usb drive unbootable because OSX doesn't recognize it and the rEFInd fails to boot it giving me lots of "not found from LocatDevicePath".

How can I fix this and what do I need to do?


Thanks in advance!


Solution:1

First, that computer is old enough that I'm not 100% sure of its CPU and EFI bit depths. These are critical details to know so that you download the correct Ubuntu version and use the correct installation procedure. In brief, most modern computers have 64-bit CPUs and 64-bit EFIs, so installing a 64-bit Ubuntu on them is appropriate. The first generation of Intel-based Macs, though, used 32-bit EFIs, mostly (or maybe exclusively) with 32-bit CPUs. These would require a 32-bit Ubuntu -- but 32-bit Ubuntu images don't support booting in EFI mode, which complicates things. A further complication is that some early Macs (mostly the first iteration of modifications after that first 32-bit generation) used 64-bit CPUs but 32-bit EFIs. These can use a 32-bit Ubuntu installed in EFI mode by jumping through some hoops, or a 64-bit Ubuntu installed in BIOS mode by jumping through fewer hoops, or a 64-bit Ubuntu installed in EFI mode by jumping through other hoops. In brief, they're a real complicated mess to explain.

All that said, when I Googled "macbook 2007 specs," I got this page, which suggests your machine likely has a 64-bit CPU and a 64-bit EFI. If this is correct, it makes things much easier. To be sure, please run the following command in an OS X Terminal window:

ioreg -l -p IODeviceTree | grep firmware-abi  

This should return either EFI32 or EFI64. If it's the former, STOP! You're in for a wild ride, and you'll need to do more digging and make decisions about what set of compromises to make. If the preceding command returns EFI64, proceed....

You say you converted the .iso file you downloaded to an .img file, but you don't say how you did this. In most cases, this is an unnecessary step and is more likely to create problems than to solve them. Broadly speaking, there are two ways to write an Ubuntu installation .iso file to a USB flash drive:

  • Using dd -- You can use the dd program to write the .iso file to a USB flash drive. This works because Ubuntu's .iso files use a Frankenstein's monster sort of format, which can be read as either an optical disc ISO-9660 filesystem or as a partition table and related filesystem structures for a hard disk. Most (but not all) computers can read this format just fine when written to a USB flash drive, via a command like sudo dd if=image.iso of=/dev/disk2. That will transfer image.iso to the (OS X) /dev/disk2; change both filenames as necessary for your system.
  • Using a transfer tool -- Programs like UNetbootin (available for Linux, OS X, and Windows) and Rufus (Windows only, the last I checked) can read the .iso file and create a bootable USB flash drive. Most of these tools create images that can boot in either BIOS/CSM/legacy mode or in EFI mode, but there are exceptions and system-to-system quirks when booting from such images. Thus, I can't promise that any given program will work for you; however, Rufus generally has the best reputation of these programs, so if you have access to a Windows system, you may want to try it first.

In practice, you may need to try two or more tools for creating a bootable USB flash drive; you'll just have to try one after another until something works.

rEFInd should detect the disk as bootable once it's been properly prepared. There are a few caveats, though:

  • You may need to hit the Esc key to get rEFInd to detect the external disk. This is because external disks are sometimes slow to register themselves with the firmware, so they don't show up immediately in rEFInd's menu. Hitting Esc causes rEFInd to do a new scan for bootable devices, thus working around this glitch.
  • You may see two entries for your external medium, one for booting in BIOS/CSM/legacy mode and one for booting in EFI mode. I recommend installing in EFI mode if possible, so you should use the EFI-mode boot entry. This entry is likely to be described as booting the "fallback loader," and is likely to have a generic icon, not a Linux or Ubuntu icon. The BIOS boot loader, by contrast, is likely to have a Linux icon and a description that includes the word "legacy" in it.
  • Booting external media in BIOS/CSM/legacy mode on Macs is a hit-or-miss proposition. It might work fine, or rEFInd might throw up an error. If rEFInd fails, you could hold down the Alt (or Option) key while starting up the computer. That should bring up the firmware's built-in boot manager, which might (or might not) do a better job of booting the USB drive in BIOS mode. This difficulty is one of the reasons I favor doing an EFI-mode installation (but there are other reasons, too).
  • If you'll be using rEFInd, you may want to boot the Ubuntu installer in its "try before installing" mode, launch a Terminal, and type ubiquity -b. This will cause the installer to set up Ubuntu without installing GRUB, which is redundant. If you boot straight into the installer, GRUB will be installed, which may take over the boot process. In some cases GRUB may be unable to launch OS X. This problem can be overcome, but avoiding it entirely may simplify things. OTOH, if you must boot Ubuntu in BIOS mode for some reason, you'll need GRUB, so you should ensure that it is installed.

This information should be enough to get you started, provided the information I found that suggests your machine has a 64-bit EFI is correct.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »