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 29, 2019 11:47 PM in response to HWTech

Ok sounds good. Do you know a place where I can find out when Debian 10 is officially launched? Also, so I can get more background knowledge about this topic, what exactly is the ""second partition" that you're talking about? I know basically how partitions on a hard drive work, for example, but what is the second partition in the context of the USB installer?


Thanks.

Jun 30, 2019 8:01 AM in response to smmm3

Do you know a place where I can find out when Debian 10 is officially launched?

I believe the official release date is July 6. However, my instructions in the previous post to modify the installer's bootloader won't work as is. You will need to replace "buster" with "debian" from the following line:

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


modified to "debian" here for the fully released stable installer on/after July 6 or for the current stable Debian 9 Stretch installer:

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




what exactly is the ""second partition" that you're talking about? I know basically how partitions on a hard drive work, for example, but what is the second partition in the context of the USB installer?

The .iso image contains the "CD" image in iso9660 format which when "burned" to the USB stick becomes the main partition, but it also puts a "second" ESP style bootloader partition on the USB stick for use with UEFI systems such as a Mac. Usually .iso CD images are read only even when "burned" to a USB stick and this includes the "second" partition, but Linux is able to mount this "second" partition as writable.


Jul 6, 2019 3:23 PM in response to HWTech

Ok so I’m currently in Knoppix on my PC.

Here’s what I’ve done so far:

  1. I plugged in the Debian bootable USB. (Side note: I think that this is still Debian 9 but it doesn’t really matter to me.)
  2. I entered the commands as listed in your post, along with swapping buster for debian.


Here is what that looked like:


I checked the the files in the Debian USB and the bootia.32 was still called bootia.32 as seen in this picture:


What went wrong?

Jul 6, 2019 6:56 PM in response to HWTech

I tried resetting the SMC and PRAM and using a different USB drive but no luck. I don’t have a different external drive to test out. I don’t think there’s much else we can do. It was pretty unlucky for the computer I dug out of the shed to be the one that is extremely difficult to do this with. Anyway, a massive thanks for figuring all this out and being very patient.


I might try to figure this out sometime but with the current circumstances it’s difficult to move forward.

Jul 6, 2019 7:40 PM in response to smmm3

I'm glad you stuck with it as far as you did. I'm sorry you could not re-purpose the laptop as I like to extend an item's usefulness as long as possible. Linux is definitely a good option to re-purpose any outdated computer if a person is willing to take the time to learn something new. I'm glad you tried.


Unfortunately 32bit only systems are getting harder to use mostly because 32bit support is being dropped by most distros. Plus most browsers only support 64bit software although there are a few exceptions, but I expect this won't last for much longer. I was using a 32bit only system until just recently because I can see the writing on the wall. I really liked that laptop, the trackpad & keyboard were much nicer than my "newer" laptop.


I really enjoyed customizing my Debian install for one 32bit system which only had 2GB of RAM. I had to remove a lot of the nice automatic features from the system, but I had the memory footprint down to about 70MB so the web browsers actually ran well with multiple windows & tabs open. I tried to do this about 15 years ago, but I didn't have the experience or the time to finish it since information was more limited back then. I actually like the setup so much, I may even repeat it on another system even though memory is not an issue.

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.