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
Question marked as Top-ranking reply

Jun 29, 2019 4:37 PM in response to smmm3

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.



Jun 9, 2019 11:57 AM in response to smmm3

It seems there are several issues making it difficult to boot Linux on the 2006 MacBook using a USB drive. The first major issue is Ubuntu and Linux Mint don't seem to support UEFI booting with their 32bit installers which is required by this MacBook. If you have a working external optical drive then you may be able to boot them.


A second issue is the Mac UEFI implementation is non-standard and very basic and requires the bootloader to have a generic name or to have it "blessed" by OSX before it will show up as a bootable drive. I was able to get the Debian installer to be recognized and booted after installing another bootloader and customizing it, although it doesn't show the first menu due to a video driver issue (may be fixable). If you are able to install Linux in a VM, I could provide you instructions (guidelines) on how to install another bootloader for the Debian installer so it will boot from a USB drive. Just let me know.


While researching for ways to boot the 2006 MacBook, I stumbled across this interesting post about some "security" features Apple implemented in the first Intel Macs due to Apple's paranoia and the new technology. Here is a Linux Mint forum post about the issue.


I haven't had any issues installing Linux to the pure 64bit Macs. The problems here are a mix of issues due to Apple's very poor UEFI implementation on this particular laptop and the Ubuntu & Linux Mint distributions from providing a UEFI bootloader for their installers (probably due to there being very few pure UEFI 32bit systems).


To summarize your options here:


1) Burn the Linux installers to a CD/DVD and use an external optical drive. (Not sure if the MB will boot Ubuntu or Linux Mint from the hard drive since they are not being installed in UEFI mode -- Debian may be Ok).


2) Try modifying the Debian installer (using a VM or another computer booted to Linux) to allow booting the MB to a USB drive.


Edit: I was unable to modify the Ubuntu or Linux Mint installers to boot in UEFI mode. I tried several different methods including booting the .iso image file. I'm not familiar with the modifications Ubuntu has made to their boot process compared to the Debian methods.

Jun 13, 2019 11:45 AM in response to smmm3

Another retro option may be to renew the optical drive inside the early MacBook 13-inch 2006 era

Mac with a workable original idea, and escape the third-world approach to reinventing the wheel.


While a non-Apple system may allow other or newer software of other type, and reuse older Mac

the avenue to replace the failed original optical Combo or Superdrive may work best for this unit.


And while the macbook is open is great time to inspect and replace any suspect cables for they may

be part of the cause of drive failures in most older computing products. ~ And a good cleaning.


(Just my option)


As these are more easily repaired portable Apple products than even older iBook/PowerBook series.

Sources for the optical drive may vary; for awhile even an external USB could work interim. Tray load

DVD/CD RW seemed to be an answer some years ago, when OWC offered external options.


Good luck with your project, to re-purpose and use an older intel-based Mac..!🌻


Jul 6, 2019 12:05 PM in response to smmm3


smmm3 wrote:
I can't find where to download the right iso file from the Knoppix website. Where is the exact location of the Knoppix iso that would work?

It would be best to use Knoppix from another 64bit capable computer. I've encountered issues while running Knoppix in 32bit mode recently and by default it will have the same boot issues on a 2006 MacBook which Debian has. Here is a direct download link for the current 8.2 version from the sonic.net mirror in the US for use on a 64bit computer:

http://mirrors.sonic.net/knoppix/knoppix-dvd/KNOPPIX_V8.2-2018-05-10-EN.iso



If you only want to use the MB 2006 and you have a VM on it, then you can use the Debian .iso image to install a minimal base system (uncheck all items in the software selection stage) as they will be a waste of time and probably your VM won't have enough resources for a GUI. As long as your VM is able to access the USB ports, then you should be able to use my previous instructions to modify the Debian USB installer's bootloader.



smmm3 wrote:
Also the debian 10 usb drive I flashed only contains an efi folder with a boot folder in it that contains the bootia.32 file. Is this an issue?

If you used Etcher to make the USB drive from the .iso image, then it is fine. The "bootia32.efi" file is the one which needs to be renamed.

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

You should be able to continue with the third & forth commands since the first partition is already mounted. I believe it is the "Debian" one in the left pane. I'm concerned that you had issues renaming the file earlier. I'm wondering if Knoppix is not mounting the second partition as writable.


I would like to double check what is mounted. Please type the following two commands and post the results:

sudo  lsblk -f

sudo  mount  |  grep  -i  sdg


FYI, the file we want to modify is on a partition which only has the "EFI partition. If you see other files on the partition besides "EFI" or "efi" then that is the wrong partition.


If Knoppix is mounting the partition as read-only, then the following command may mount it as writable:

sudo  mount  -o remount,rw  /dev/sdg2   /mnt/


Note: I just edited the command and there should be now space between the following "remount,rw".


Assumes the Debian installer is still "sdg".

Jun 12, 2019 1:32 PM in response to HWTech

I think that I'll try the VM method. I'm going to try using VirtualBox 5.2.30 for the VM. Is there a specific Linux distro that would work well for installing in the VM, or does it not matter? After I set up Linux in the VM, I'll need the specific instructions about installing a bootloader for the Debian installer.


Thanks.

Jun 20, 2019 6:55 AM in response to smmm3

@smmm3, I have not forgotten about you. I've been really busy and actually had trouble getting Debian to install. I was able to get the installer to boot, but when I tried to install Debian I encountered several errors. The errors are a mix of Apple issues with this laptop and the other errors are ones which got past the Debian team since there are very few 32bit UEFI booting laptops out there for testing the installer. I did finally manage to install the latest Debian and it ran surprisingly well on the laptop. I just have to write up the steps needed, hopefully so you can understand them.


I just saw a notice the other day which mentions Ubuntu is no longer going to distribute 32bit versions so Debian is the best choice for you as the Ubuntu derivatives are unlikely to take on the extra work necessary.

Jun 28, 2019 4:36 PM in response to smmm3

Recommended Post Installation Configuration for a 2006 MacBook regardless of the Desktop Enviorment selected during the install.



All of these instructions will be entered on the command line so open up a terminal once you log into the Debian desktop. It is much easier to post actual commands than trying to instruct someone using a GUI interface. Don't be afraid of the command line. A user only needs to become familiar with a few basic commands.


You can become more familiar with the Debian specific concepts and best administrative practices by referencing the information included in the links here. There is a ton of information in those links, so just read or skim for the most relevant topics just to get a basic understanding. I will only present the required post installation steps which I think are relevant. You can use the linked documentation to get a better understanding of the commands I am providing here.



1) Enable the Contrib and Non-Free repositories (needed for WiFi drivers)


You will use the command line text editor "nano" to edit a configuration file to enable the extra repositories so that you can access the WiFi drivers.


sudo nano /etc/apt/sources.list



You are going to edit four lines which begin with "deb" and "deb-src". At the end of each of these four lines add a space followed by the following "contrib non-free" so the end of each line appears like:


main  contrib  non-free


The actual lines will look something like the following, but the URLs may be different depending on your region:

# deb cdrom:[Debian GNU/Linux buster-DI-rc1 _Buster_ - Official RC i386 NETINST 20190411-23:13]/ buster main

deb http://deb.debian.org/debian/ buster main contrib non-free
deb-src http://deb.debian.org/debian/ buster main contrib non-free

deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free


Once the modifications have been made, press Ctrl + X, then press "Y" to confirm the changes, then press "Return" to save the file and exit the nano text editor.



Now you must update the list of available packages since you just modified the repositories where all the Debian software is located. You must do this whenever you make changes to the repositories and before installing or updating any software so you always have the latest list and versions.


sudo apt update




2) The default command line utility for managing software on Debian is "apt". I personally prefer using "aptitude" to manage installing/updating/removing software instead of the default "apt" utility. If you run "aptitude" without any options, then it will launch an ncurses GUI interface.


sudo  apt install  aptitude



3) Install WiFi drivers:


There are two WiFi drivers one of which is open source with partial support for the Broadcom BCM4321 chip included on the 2006 MacBook. The other one is an older proprietary Broadcom driver. The open source driver worked well for me and I would suggest trying it first. (If you did not install "aptitude", then use "apt" instead for the following commands.)


sudo  aptitude install  firmware-b43-installer



If you have problems with the open source WiFi driver, then use the following two commands to remove the open source driver and install the proprietary Broadcom driver.


sudo aptitude purge  firmware-b43-installer
sudo aptitude install broadcom-sta-source



Make sure to reboot the computer so it will load the new driver. An network icon should appear either on the menu bar or on the Taskbar depending on the Desktop Environment you chose during the install.


Jun 28, 2019 4:38 PM in response to HWTech

MacBook 2006 Debian Post-Install Setup --- continued



4) Configure the Trackpad (aka Touchpad)


The default trackpad driver (libinput) seems to work fairly well on this MacBook, but it does not contain very many configuration options. It is a newer driver, but it seems to work ok. If you chose Mate or KDE, then you can select and modify the following settings:


Enable "Horizontal two finger scrolling"

Disable "Vertical Edge Scrolling" and "Horizontal Edge Scrolling" since they don't work properly on the MacBook.


By default you can "right-click" items, by using a "two finger tap" to bring up a context menu.


It is possible to disable "Single Tap to Click" if you want, but allow two or three finger taps to activate other features such as a "right-click" context menu.



I normally like to install the older and now unsupported open source "Synaptics" trackpad driver as it contains a lot more configuration options some of which are available in the GUI and others available using the command line interface "synclient". To install the "Synaptics" trackpad driver:


sudo aptitude install xserver-xorg-input-synaptics



This driver includes the "synclient" utility which can disable the "Single Tap to Click" by:


synclient   TabButton1=0


Other touchpad settings can be configured in a similar manner. To do the same with the default "libinput" driver, you may need to install and use "xinput", but I'm not certain.




4) To allow proper functioning of the function keys, the brightness and volume keys you will need to install "pommed".


sudo  aptitude  install  pommed




5) Install the drivers for the Built-in iSight Camera


You will need access to the camera firmware file you retrieved before installing Debian (see my previous post) since the next command will install the tool to utilize the camera firmware. During the install process the tool will ask you for the location of the camera firmware so have it handy.

sudo aptitude install isight-firmware-tools


The next two commands will load the camera driver and set the system to load the camera driver on each boot:

sudo modprobe uvcvideo

sudo echo "uvcvideo" >> /etc/modules


You may need to install an app to utilize the camera. One such app is called "cheese":

sudo aptitude install cheese



These instructions may seem overwhelming, but take your time and you should be Ok.


Good luck.

Jun 28, 2019 9:43 PM in response to HWTech

Alright all of this is super awesome but this being my first foray into Linux there's a couple things that I need clarification on.


  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?


That's all for now, but it's likely more questions will come soon.


A huge thanks for working all of this out!

Jun 28, 2019 10:05 PM in response to HWTech

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?

Jun 29, 2019 12:59 PM in response to smmm3

Update: So I created the RC2 bootable USB drive and when I viewed the USB on my windows PC it showed up as a Debian Installer and everything with the Debian logo and had all of the README files and the fancy stuff. I couldn't rename the bootia32.efi file as the option was greyed out. I plugged the USB into the macbook just to see what would happen and as expected it didn't recognize it. I plugged the USB back into the PC but now it just looked like a normal USB drive and the only file that appeared inside of it was the efi folder. In this efi folder I could rename the bootia32 file. I plugged the USB with the now renamed boot file into the macbook and it wasn't recognized as I expected again. I flashed the USB a second time on my PC to see if I could get it back to the fancy Debian version that happened in the first place, but it was still the normal USB drive with only the efi folder. Do you know what is going on here and the difference between the fancy Debian USB and the normal USB with the efi folder? Does it matter which one I have?

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.