How to install Linux on MacBook with broken optical drive

I have a 2006 white MacBook (10.6.8) that I'd like to install a version of Linux on. However, the optical drive on this computer is broken. As far as I know this computer can only boot from a disc and not a USB drive.

Is there a way to get a version of Linux running on this computer without using the optical drive, and if so, how?


Thanks.

Posted on Jun 6, 2019 3:24 PM

Reply
Question marked as Top-ranking reply

Posted on Jun 29, 2019 4:37 PM

1.The RC2 installer is installed and used on the PC that is making the bootable USB drive, correct? (as opposed to being installed on the macbook which doesn't really make sense.)
2.Just to make sure, this is Debian 10?
3.When you talk about naming the bootloader and mounting the second partition, is that porcess done in the RC2 installer?

I suggested using the soon to be released Debian 10 Buster since it will be only another week or two before it officially launches. You may as well start with the most current version so you don't have to worry about upgrading later. Most of the previous instructions can be applied when using the current stable verision Debian 9 Stretch, although my instructions later in this post for modifying the bootloader is specific to the Debian 10 Buster installer.


The issue I've run into is about mounting the second partition and renaming the bootloader. I don't really know what/how to mount the second partition and when I go into EFI/boot I'm unable to rename the bootia32.efi file (I'm on Windows).

I was afraid that you would not be able to mount the second partition on the Debian installer as writable using Windows. If you have a 64bit Windows PC, then the easiest way to edit the bootloader on second partition of the installer is to create another bootable USB stick containing Knoppix Linux. Use Etcher to create a bootable Knoppix USB drive. If you are comfortable and familiar with VMs then that is also an option if you can pass the USB stick to the VM. It seems only Linux is able to mount this second partition on the USB installer as writable. You need one USB stick with Knoppix and another USB stick containing the Debian installer you created using Etcher.


To modify the Debian installer's bootloader, follow these instructions:


Boot to the Knoppix USB drive and when you reach the Knoppix desktop, launch a terminal (the black icon on the taskbar near the "Start" menu). Insert your Debian USB installer. To simplify the process, of identifying and renaming the bootloader on the installer, just enter the following commands exactly as written. You may copy & paste them is you wish, but please note the lxterminal app uses Shift + Ctrl + V to paste items. Press return at the end of each line to activate the command.

id=$(sudo lsblk -fl | grep -i buster | awk '{print $1}' | head -n 1)

sudo  mount /dev/"$id"2  /mnt/

sudo  mv  /mnt/efi/boot/bootia32.efi  /mnt/efi/boot/boot.efi

sudo  umount /dev/"$id"{1..2}


Note: The above lines use some lowercase "L"s and some "ones" which can sometimes be hard to distinguish. The three lowercase "L"s are in "lsblk -fl" and the ones are in "{print $1}" and "head -n 1".


If all the commands completed successfully, you may now shutdown Knoppix and try booting your MacBook with the modified Debian installer.



When you say, "When asked to create a root password, just continue past without a password so the "root" user account is locked like it is with OSX. There is absolutely no need to have a separate root account.", what do you mean by this? Does Debain use the pre-existing root user from OSX? Also, having the root account locked seems disadvantageous to me. Is that true, or is it not that important?

During the install process, the installer will ask you to provide a root password. If you leave the root password blank, then the root account will be locked. This is the preferred method since it makes the system more secure and keeps a user from accidentally making a huge mistake with a command which can destroy a system. If root access or privileges are needed, the system will automatically elevate your main administrator account by asking for your password. If you need to launch an application with root privileges, then you can do so from your normal user account by using "sudo". See the post here which may explain it a little better. OSX is configured in a similar manner.



smmm3 wrote:

So if that means that the USB that I was using is screwed up I do have another I can use.

If you used Etcher to create the Debian installer you should be Ok. It is possible the manipulations somehow modified the USB stick. If in doubt use Etcher to recreated the USB stick again.



44 replies

Jun 6, 2019 10:15 PM in response to smmm3

You can create a bootable Linux USB drive using Etcher (available for Mac/Windows/Linux). You will then Option Boot the Linux installer and select the orange icon labeled "EFI".


FYI, I believe the 2006 MacBook is 32bit. Ubuntu or Linux Mint are good choices for a new Linux user and I believe they still support 32bit systems, although I do not know if newer releases will still support 32bit. I know Debian supports 32bit systems for at least the next two years, but it will require extra work to install the "non-free" WiFi drivers. Debian does provide the drivers, but you need to enable support for them first. I also find Debian uses a bit less memory and seems faster than the other distributions (at least many years ago when I switched). If you want to use the MacBook's built-in camera, you will need to retrieve the camera firmware from OSX before you erase the drive.


Since your MacBook will have limited memory, the choice of Desktop Environment is critical to minimize the impact on memory. Mate is probably a good middle ground for looks & memory. Other choices are LXDE and XFCE. I've had some success with KDE on low memory systems, but the previous choices are probably better for this laptop. Debian allows you to choose the Desktop Environment during the install. Linux Mint appears to have separate installers for each Desktop Environment included on their download page. For Ubuntu, you need to download the version you want (Ubuntu-Mate for Mate, Lubuntu for LXDE, Xubuntu for XFCE, and Kubuntu for KDE). I would suggest a little research prior to installing to see which one you like best. Do NOT install the default Ubuntu which uses the Gnome Desktop Environment which won't work well on this laptop. It has been a while since I tried the Cinnamon Desktop Environment, but I seem to recall it used more memory than the others.


You may have limited options for a current web browser as most browsers have dropped 32bit Linux support. I believe Vivaldi (based on Chromium) still supports a 32bit version and possibly Firefox which is usually included by default. FYI, web browsers use a lot of memory so don't expect to use more than a couple tabs at one time if you have 2GB or less of memory.


Whatever distribution you choose, make sure to read their documentation so you have a basic understanding of how their particular distribution works. You will need to learn the basics of Linux, but you should be able to do so a little at a time. Information about problems for Debian, Ubuntu and Linux Mint is easily found most of the time. Remember every operating system has a learning curve when you first switch.


Good luck.

Jun 28, 2019 3:51 PM in response to smmm3

It seems some of the problems I had installing Debian to the 2006 MacBook were due to the drive I was using for the installer and also the MacBook itself since my MacBook is now non-functional. Make sure to use a USB flash drive and if you have issues then try using another one as not all flash drives are bootable on a Mac. The Debian installer works correctly, but needs one slight modification to boot on a MacBook which I will explain shortly.


The Debian installer by default does not have the necessary drivers to allow for installation using WiFi, so connect your MacBook directly to your router using an Ethernet cable. You will also need to use an USB mouse since the trackpad is not functional in the current installer. If you don't have a USB mouse, then you will use the arrow keys, Tab, Return, Esc, and Space keys to navigate the installer.



If you are going to dual boot OSX and Linux, then make sure to shrink your Apple partition using the Apple tools before attempting to install Linux.


If you want to use the built-in iSight camera, then you need to retrieve the camera firmware from your current OSX installation and save it somewhere else if you are going to use the whole drive for Linux. The camera firmware should be located on your OSX drive here:

/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport


To create a bootable 32bit Debian 10 (aka Buster) USB installer you need to download the RC2 (Release Candidate) installer from here. In a few weeks the official installer for Debian 10 Buster will be released and can be downloaded from here (select the i386 link under "Small CDs or USB sticks").


Create a bootable USB installer by using Etcher (Mac/Windows/Linux).


In order to boot this installer on a Mac you must rename the bootloader so that the Apple firmware will recognize it. After creating the bootable Debian USB installer you must first mount the second partition of the installer and rename the bootloader located on the second partition at /EFI/boot/bootia32.efi to /EFI/boot/boot.efi. The Apple firmware will only recognize an unblessed bootloader located and named "/boot/boot.efi". Unfortunately OSX/macOS is unable to mount this partition read/write so it must be done using Linux (you can boot a Linux LiveCD/USB for this step). It might be possible to do this with Windows, but I haven't tried it as I don't use Windows.


Option Boot the modified USB installer and select the orange icon labeled "EFI". When asked about installing non-free drivers, just select "No".


When you get to the step for partitioning the drive, select to use the whole drive and all files in one partition. If you are planning to dual boot, then select to use the free space.


When asked to create a root password, just continue past without a password so the "root" user account is locked like it is with OSX. There is absolutely no need to have a separate root account.


At the software selection stage, I would recommend selecting either "Mate" or "KDE" for the Desktop Environment (aka GUI interface) since they both provide a Touchpad configuration utility whereas LXDE and XFCE don't have a touchpad GUI interface built in. I would also suggest making sure the "Print Server", "Laptop", and "Debian Desktop Environment" are all selected as well.



When the installation process finishes and before restarting the laptop, I would suggest you rename the bootloader by moving to Virtual Terminal #2 by pressing and holding the Control + Alt keys followed by pressing the Fn + F2 keys (while still holding the Ctrl + Alt keys). You should be presented with a black terminal screen where you are asked to press "Enter" or "Return" to enter it.


In Virtual Terminal #2, execute the following commands to rename the bootloader:

cp -vr  /target/boot/efi/EFI/debian  /target/boot/efi/EFI/boot

cp  -v  /target/boot/efi/EFI/boot/bootia32.efi  /target/boot/efi/EFI/boot/boot.efi



Now go back to Virtual Terminal #5 where the GUI installer is located (press and hold Ctrl + Alt, followed by pressing Fn + F5 ) and allow the installer to finish and reboot the laptop.



While running Debian on the 2006 Macbook, I had trouble performing a warm reboot. The only way I could perform a warm reboot was by sitting at the GRUB bootloader menu for 2-5 minutes by pressing the down arrow, followed by the up arrow to stop the automatic boot timer. After 2 to 5 minutes I would then press "Return" to select the first option. I'm assuming the issue was with my MacBook as I've never seen this behavior on any other Mac.


I'll post some post-install instructions for installing the WiFi drivers and a few other customizations you may need.

Jul 6, 2019 4:22 PM in response to smmm3

Ok, that is odd since in my testing it should be on the second partition.


Repeat the steps, but this time we will modify the bootloader on the first partition on the USB installer. To do so requires replacing the second command in those instructions with this one which will mount the first partition on the USB installer:


sudo  mount  /dev/"$id"1  /mnt/


All three of the other commands should be used as written and in the same order, but with the above substitution. Note the one character difference in the modified line changing the "2" to a "1" (one).


In theory you should be able to click on the "sdg1" item in the left pane of the file explorer. Navigate to the "bootia32.efi" in the right pane and rename the file in the right pane. You can try clicking the unmount/eject in the left pane for both partitions, but if it won't unmount, then run the last command again to unmount all the partitions on the USB installer (assuming you ran all the previous commands before) or use the following command assuming the next time you try the drive is still identified as "sdg" in the URL bar in the file explorer or modify accordingly:

sudo  umount  /dev/sdg{1..2}


FYI, technically there are two bootloaders, but one is on the read-only partition which would be used when booting from a CD. We need the other partition which contains the bootloader used on drives when booting a UEFI system.

Jul 6, 2019 5:51 PM in response to smmm3

Now that you know what to do, why not use Etcher to recreate the USB drive and try modifying it again.


There is always a possibility the USB stick you are using isn't compatible for booting a Mac. Macs can be very picky about the USB sticks used for booting.


If you try another USB stick(s) and still have problems, then try resetting the SMC and PRAM on the MacBook. Maybe there is just something wrong with these 2006 MacBooks. Of all the Apple products these first gen Intel Macs are the most problematic ones to install a non-Apple OS.


You could try creating the installer onto an external drive connected with a USB to SATA Adapter/dock/enclosure to see if it will boot. However, the Debian installer will complain at several points because of it, but at least you can confirm if the USB stick is at fault.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to install Linux on MacBook with broken optical drive

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.