Return to site

Download Unbuntu Terminal For Macbook Pro

broken image


It is generally easier to install Linux on a PC that's about 2-3 years old. I had a Macbook Air 2012 and I managed to get Linux installed, but when I upgraded to a 2015 Macbook Pro Retina, it took a lot of work to get Linux (Ubuntu) to work. If your PC or Mac is a few years old you will have much better luck. Installing Ubuntu on my 2009 MacBook Pro. I had an old 17-inch MacBook Pro from 2009 (college) lying around and I figured it'd be a fun challenge to install Linux on it. I had never installed or even used Linux before (to my knowledge). Download a Linux distribution file and save it to your Downloads folder. The file will have an '.iso' extension. Click here if you want to download Ubuntu. Open Parallels Desktop and choose File. Installing Ubuntu on my 2009 MacBook Pro. I had an old 17-inch MacBook Pro from 2009 (college) lying around and I figured it'd be a fun challenge to install Linux on it. I had never installed or even used Linux before (to my knowledge).

I had an old 17 inch MacBook Pro from 2009 (college) lying around and I figured it'd be a fun challenge to install Linux on it. I had never installed or even used Linux before (to my knowledge). I also, confusingly, hadn't found a clean, step-by-step guide for doing this, so I promised I'd write my process out as thoroughly but simply as I could once I got it done.

I now realize, I think, that the reason the process of installing even a popular Linux distribution on a common (if old) model computer isn't written out or easily findable is that the process is a bit different for everyone, depending on the distro, the version, and the hardware you're starting with. Note that I didn't want to partition my hard drive to allow myself to dual-boot either in OS X or Ubuntu– I was going for a full replacement, and thus would and did lose all the files on applications I had on the old Mac.

But regardless, here is the process I took.

About This Mac

How I Got Ubuntu 16 Installed

Again, note, this worked for me and my machine but may not for you. For example I believe I had to do steps 4, 5, 8, 9, 10, and 11 only because I have a MBP with an Intel chip.

Also, WARNING, this procedure completely wiped my OS X and all the files and applications on that installation, as I intended. There are ways to dual-boot both, but I wasn't interested in that as Mavericks was running super slow on this computer. Furthermore I think all the data I had on my USB stick is lost due to it being formatted in a certain way at some point in the procedure.

UPDATE (February 2017): Before moving ahead, you may want to consider the following. A helpful commenter, Brian Moran, writes that, when installing Ubuntu on an older Mac with a NVIDIA graphics card, it may be better to 'boot in ‘Legacy BIOS mode', not in ‘EFI' mode':

Terminal

Apparently what is happening is that both the open source and Nvidia drivers are buggy when doing an 'EFI Install' on Mac machines. If full graphics performance is desired, a 'Legacy BIOS Install' is needed.

From the forum post that the commenter cites, which is concerned with a MacBook Air 3,2:

The core problem with the [generic] installation is this. The graphic driver that Ubuntu installs by default (Nouveau) has bugs with the MacBook Air 3 graphic processor, the nvidia GeForce 320M (G320M). You can do a default install, it will boot normally, but you'll soon see little glitches here and there and the computer will normally crash after a few minutes of use (especially when transparency or shadow effects are used, it seems). The problem exists with Raring and I expect it arises with Precise (though see ‘‘alternative solutions' below).

To avoid that, you need to install the proprietary nvidia driver. But here is the catch: the driver requires the computer to boot in 'Legacy BIOS mode', not in 'EFI' mode (see here or here). If you install the nvidia drivers while Ubuntu is in EFI mode, you'll get a blank/black screen at the beginning of the boot. (If you got to that stage, see the ‘‘recovery for nvidia drivers EFI crash'' below). On a PC you can force Ubuntu to install in BIOS Legacy mode by selecting that mode in the computer BIOS. But on a Mac you can't (easily) do that, and if you install from a USB key by default you will be in EFI mode.

So summing up, if you do a default installation of Ubuntu from a USB on a MacBook Air 3,1 or 3,2, you'll either have buggy graphics and random crashes, or you'll install the nvdida drivers and have a blank/black screen at startup.

For the record, I followed the procedure detailed below with my MackBook Pro 3,1 and while I now believe that my nvidia card is NOT being used, basic computing (web browser, document editing coding, simple games) are working just fine. Not being a gamer I don't know much about graphics cards, but for what it's worth I believe my MacBook Pro has a G84M [GeForce 8600M GT] card, which is not the same model listed in the forum post the commenter cites.

But if I were starting over I might instead consider the procedure outlined in the forum post the commenter links to in hopes of even better performance. End of February 2017 update.

Alright, with all that said here's what I think I would do if I were starting fresh, knowing what I know now:

What I Did to Install Ubuntu

  1. Get a USB drive with at least 2 GB of storage. Know that it's going to get wiped, so move important files off it first. Then use the MacOS Disk Utility to format the USB stick as DOS FAT32.
  2. I'd follow this guide to download Ubuntu 16.04 LTS and get it onto the USB stick, using UNetbootin.
  3. As described in the final step in that guide, when you restart, hold down the option key on your Mac. In the resulting menu, select the 'EFI' device as the device to boot from.
  4. You'll be confronted with a text-only menu that's from a piece of software called GNU GRUB. Key down so your cursor is on 'Install Ubuntu', but instead of pressing enter, press e to edit the commands before booting.
  5. This opens an options file in a basic text editor. Find the line that has ro quiet splash in it and make that bit of the line read ro nomodeset quiet splash. Then press either F10 or Ctrl-X to boot (read the text at the bottom of the screen to be sure of the key(s) to press).
  6. If presented with a choice in GRUB (a text menu) with an option to install Ubuntu, choose that option.
  7. You should be then presented with a nice GUI (not text only) Ubuntu installer, or maybe an icon that says Install Ubuntu. Double click the icon if you see it. Go through everything, decide whether or not to connect your Wifi to download updates, decide whether or not to encrypt your home folder, and then choose restart.
  8. We now need to boot Ubuntu in recovery mode. To do this, as the computer is starting up again after restart, right after you hear the Apple/Mac start-up sound, hold the SHIFT key. Repeat step #3 above if you're presented with the EFI option. Once you're at a text-only menu, press e and add nomodeset to the line of code discussed above. Then press the key(s) to boot. Ubuntu should boot up– though the display may be screwy. In either case, we're not done yet.
  9. Now we need to make that nomodeset setting permanent. Open terminal (ctrl+option+t) and run sudo nano /etc/default/grub. (Reference)
  10. In that file, add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT as seen below:
Pro
  1. Save this text file by hitting Ctrl+O, then exit nano with Ctrl+X, then, back in Terminal, run: sudo update-grub
  2. Restart the computer (the menu for which is in the top-right corner of Ubuntu 16).

I think that would do it. I don't think I needed rEFInd. And apparently the warning on UNetbootin that I could run the device on Macs was not accurate.

For completeness sake, here is the actual process I went through over three days.

Attempt #1: Ubuntu 16.04

Download Unbuntu Terminal For Macbook Pro

I found this guide which involved downloading and using the UNetbootin USB installer.

I believe I successfully downloaded the Ubuntu 16.04 ISO and UNetbootin. I then installed UNetbootin (by dragging it into Application) and then I used UNetbootin as described in the tutorial. However at step 7 when I restarted my Mac and held the option key I was presented with a menu to try or install Ubuntu. Every time I selected 'install' it just went to a black screen. I waited minutes but no installation screen appeared. I then held down the power button and the computer rebooted in OS X, back to square one.

I will say that after using UNetbootin to load the USB stick the program warned the device could only boot the new OS on PCs, not on Macs. I chose to ignore that warning and try anyway, but as I reported above, it didn't work.

Upon further research I believe the Ubuntu 16.04 may not work on Intel-based MBPs made circa 2009. One page, https://help.ubuntu.com/community/MacBookPro, seemed to encourage those with MBPs this old should instead opt for Ubuntu 14.04.

I didn't want to run an old version of a distro I wasn't particualrly excited about if I could find a distro that I could run the lastest version of. Plus I couldn't quite figure out how to download an (official) copy of version 14.04.

Attempt #2: Mint 18 ('Sarah') Cinnamon 64-bit

I understand that the other distro well-reviewed for beginners is Mint. And I saw that Mint 18 was itself got good reviews.

So I headed over to their download page and chose 'Cinnamon 64-bit' and downloaded it via a torrent.

The only tutorial that I found for installing Linux Mint via USB seemed strange and brief. Thus my current plan is to try to use UNetbootin again, following the Ubuntu guide but with Mint this time rather than Ubuntu 16.04.

However, as before, after using UNetbootin it told me the device could only boot the new OS on PCs, not on Macs.

When I restarted my Mac and held down the option key, I got a similar menu as when I tried Ubuntu, but eventually came to a dark black screen. I waited a few minutes, and then forced the computer to shut down by holding down the power button.

Attempt #3: Back to Ubuntu 16.04 by a different method

I followed the instructions presented here, which I was optimistic about it because it avoided using UNetbootin, along with the potentially helpful warning:

UNetbootin for Mac OS X can be used to automate the process of extracting the Ubuntu ISO file to USB, and making the USB drive bootable. The resulting USB drive, however, can be booted on PCs only.

Which mirrors the warning UNetbootin gave me.

However the method described in the link above failed in the same way the others did– I restarted, held down the option key, chose the EFI boot, chose to install Ubuntu, and then was met with a black screen. For the first time I thought to check the light on my USB stick to see if it was at least thinking but it was off.

Attempt #4: Using rEFInd Boot Manager

From here I found an article about installing Debian (a more advanced distro of Linux).

That let me to believe rEFInd was something I needed to install first.

However this program (I admittedly didn't take the time to figure out what it actually does) did not seem to help. Afterward, and before my next attempt, I bypassed rEFInd by going to System Preferences > Start Up Disk, selecting my hard drive and hitting the restart button. Thus I do not think I actually needed to install rEFInd to successfully get Ubuntu installed, however I'm not 100% of this, since the rEFInd uninstall instructions for OS X recommend bypassing rEFInd rather than actually uninstalling it.

Attempt #5: Having bypassed rEFInd, I replace quiet splash with nomodeset

Big success!

Somewhere else I remember seeing someone recommend turning on an option called nomodeset in GNU GRUB, but for some reason didn't think I had that option in the menu that I kept getting. Turns out, as described here, when you get to the GRUB menu you hit the e key. Then you add nomodeset as a parameter in one of the lines of code in the text file that opens. Removing quiet splash seems to just present more text as output– the nomodeset solved the problem.

After maybe 40 seconds I was presented with an Ubuntu desktop and a shortcut icon to an Ubuntu installer. I double-clicked the installer and followed the wizard.

I connected to my wifi network and told it to download updates as it installed to make things quicker. The only hard choice was whether to encrypt my home folder (which I believe you can't do later). I decided not to based on this answer as I was worried about the performance hit on decrypting on a machine with 2GB memory. Then I just waited for Ubuntu 16.04.1 LTS to install.

After installation it asked me to restart. I clicked yes. I then got an ugly error message that said something like 'remove the installation device and hit enter'. I still had the USB stick in, unsure when I was to remove it. I pulled it out and hit enter. The computer then restarted, making the familiar Mac start-up sound and presenting the familiar Mac gray, but then it switched to a purple Ubuntu-like color and stayed there for a minute.

Setting nomodeset permanently

When I came back from that restart it was stuck on a purple screen. I figured I needed to set nomodeset permanently on. I needed to get back to the GRUB screen, which I figured out from somewhere:

  1. Switch on your computer.
  2. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
  3. Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.)

Then, to set nomodeset to be on permanently, I followed this Ask Ubuntu answer that reads:

I saved that file and ran sudo update-grub as instructed. I then restarted my computer once again and I think that's when things went smoothly for the first time.

(FYI a similar process to the one described above seems to be given here but with some other stuff as well, if you need more help at this stage.)

Initial Thoughts

Woohoo! It seems snappier that OS X 10.9, but it's not a speed demon like my 2012 MacBook Air with 8 GB of memory.

But the desktop and dock are familiar enough to me. It comes with Firefox, Libre Office, a basic text editor, and a link to Amazon.com(?) in the dock that's on the left by default. I got terminal Vim and RVM running with a few Google-able tweaks from the OS X installation process. Remapping caps lock to control was one line in Terminal (setxkbmap -option caps:ctrl_modifer), however that did not persist when restarted. I followed this AskUbuntu answer and went to Startup Applications > Add > and entered setxkbmap -option caps:ctrl_modifer. It seems to persist on restart now.

I was able to install git by running sudo apt install git. Similarly I was able to install KeePassX by running sudo apt-get install keepassx (I'm not 100% in the difference between apt and apt-get here but that's what I saw on the internet help sites I found). I also installed a fresh version of vim but I forget what line I ran in terminal.

To run a general update and upgrade, I run sudo apt update && sudo apt upgrade, which seems to work.

We'll see how much I use this old computer going forward, and what for. Instant download mac os lion install for macbook air bootable usb.

Update: Just found this website that aims to teach Linux for beginners, which I might checkout. There's also this series of YouTube videos: Ubuntu Beginners Guide that looks nice, is Ubuntu-specific, and is, as of this writing, only one month old.

Switching to Lubuntu

To avoid the high memory usage of Ubuntu's Unity desktop environment, I installed Ubuntu's LXDE desktop environment (called Lubuntu). I had a gist that Unity was a bit of a memory hog compared to other desktop environments. I also spotted this Reddit post that compares some lightweight distros in terms of RAM consumption and Lubuntu did well.

To install Lubuntu, I ran sudo apt-get install lubuntu-desktop (I learned this from a helpful user in the Ubuntu Riot.im channel). The size of the installation was about 340 mb.

After installing the Lubuntu desktop environment, you want to run the software updater, restart the computer (logging out is not enough), and at the login screen choose Lubuntu (or LXDE… that's another option and I'm not sure what the difference is).

You can check how much RAM you have available by running free -m in the terminal. Thanks to this site, I knew to look for the value under 'available' to get an accurate estimate of how many megabytes of my memory were 'free'. With my terminal and Firefox running on Lubuntu, I have about 1187 MB RAM of my 2 GB available, as opposed to Ubuntu, which generally only left about 700 or 800 MB available when I was running a couple of programs (not a very scientific test, I know).

Plus I can always switch back to regular Ubuntu via the login screen.

Lubuntu is pretty snappy! I did want to disable my touchpad from clicking, which I did by doing this:

How to disable tap to click persistently in Lubuntu

  1. Open ~/.config/lxsession/lubuntu/autostart or possibly ~/.config/lxsession/LXDE/autostart (not sure which)
  2. To disable tap touchpad to click, add synclient MaxTapTime=0

You can find other settings to set here, like enabling two-finger horizontal scroll (synclient HorizTwoFingerScroll=1).

Installing an application launcher for Lubuntu

On macOS I make frequent use of Alfred as an application launcher. Ubuntu's Unity desktop environment sort of had something like that, which you can initiate by pressing the command key on its own at any time. But I couldn't find something similar in LXDE– the application menu (similar to the Start menu in Windows) was just not fast enough for me coming from macOS + Alfred).

So I found this askubuntu answer that recommends installing an application called Synapse by running sudo apt-get install synapse. By default the launcher is invoked by hitting ctrl + space, but I changed it to alt+Enter by launching Synapse and clicking on the not-super-obvious round button on the right side of the pop-up display and clicking 'Preferences'. Works great!

My attempt to make the Gnome terminal the default

The default Terminal in Lubuntu (think it's called LXTerminal) didn't support true color in Vim, so I looked for other options. I had gotten used to the terminal in regular Ubuntu (which I'm pretty sure is the Gnome Terminal), so I figured I could switch that in on Lubuntu. Oddly it's not in the main menu of applications, but I figured out a way to set it as the 'default' terminal:

  1. menu > Preferences > Default applications LXSession
  2. Launching applications > Terminal manager > More > write in 'gnome-terminal' for 'Manual setting'

This seems to have worked– but only way I know how to launch Gnome Terminal is with the standard launch-terminal shortcut of option + control + t.

But note that if you're a Vim user the only way I could get a version of Vim with system clipboard support was to install Neovim and then install xsel by running something like sudo apt-get install xsel. Restart your Gnome Terminal and you should be good to go.

More Lubuntu configuration ideas

Just found this long forum post with more ideas of recommended features for Lubuntu.

Background

What I'll be showing you today is how to rescue your 2011 Macbook Pro by putting Linux on it. I understand you might be asking 'Why would I do such a thing!?' So imagine this scenario:

You have a 2011 Macbook Pro — the Macbook Pro 8,2 as it will come to be known to you — and it is dying. The battery barely holds a charge and it has fallen victim to a cruel fate1 which has rendered the display all but useless. Some have chosen to sue Apple because of this and, justified though they may be, you have opted for another path.

You're going to attempt the impossible, and bring it back from near certain death.

You've tried a few home remedies before with only temprorary success so now, now you're ready for the nuclear option.

You are going to blow OS X away, and replace it with something else.Not something better. Something different. Not something superior. Something sufficient. You're going to put linux on it and disable the faulty AMD graphics card with extreme prejudice.

Well, I am. You're just going to read about it and decide whether you're interested in doing something similar.

Step 1 - Download Ubuntu

The primary reason I chose Ubuntu is convenience. I'm familiar enough with Ubuntu Linux and it's software ecosystem to feel confident that if there is some software I need, it's likely available for Ubuntu with minimal effort. That is to say, the applications I'm interested in are likely already available via Ubuntu's Software Center/App Store, or provided by third parties in a format that is usable by the Software Center.2

Getting Ubuntu Linux is easy enough just go to the download page and pick a version. I settled on the 64-bit 14.04.1 LTS version so everything I say from here on out is done with this version in mind.

Step 2 - Install Ubuntu

Once Ubuntu is downloaded we're left with an iso file containing the installer. However, before we can begin installing, this iso needs to be burned to a disk or made installable by other methods.

Though I have a 2011 Macbook Pro with a functional SuperDrive I chose 'other methods'. More fun that way (and I didn't have any readily available disks). The 'other method' was to install via a USB flash drive. A step-by-step guide to the process can be found at Ubuntu's exceptionally helpful community forum.

The steps involved running a series of commands in the Terminal , which I'll reproduce here for my own benefit. If you have any issues though, I highly recommend the original thread.

Terminal

Apparently what is happening is that both the open source and Nvidia drivers are buggy when doing an 'EFI Install' on Mac machines. If full graphics performance is desired, a 'Legacy BIOS Install' is needed.

From the forum post that the commenter cites, which is concerned with a MacBook Air 3,2:

The core problem with the [generic] installation is this. The graphic driver that Ubuntu installs by default (Nouveau) has bugs with the MacBook Air 3 graphic processor, the nvidia GeForce 320M (G320M). You can do a default install, it will boot normally, but you'll soon see little glitches here and there and the computer will normally crash after a few minutes of use (especially when transparency or shadow effects are used, it seems). The problem exists with Raring and I expect it arises with Precise (though see ‘‘alternative solutions' below).

To avoid that, you need to install the proprietary nvidia driver. But here is the catch: the driver requires the computer to boot in 'Legacy BIOS mode', not in 'EFI' mode (see here or here). If you install the nvidia drivers while Ubuntu is in EFI mode, you'll get a blank/black screen at the beginning of the boot. (If you got to that stage, see the ‘‘recovery for nvidia drivers EFI crash'' below). On a PC you can force Ubuntu to install in BIOS Legacy mode by selecting that mode in the computer BIOS. But on a Mac you can't (easily) do that, and if you install from a USB key by default you will be in EFI mode.

So summing up, if you do a default installation of Ubuntu from a USB on a MacBook Air 3,1 or 3,2, you'll either have buggy graphics and random crashes, or you'll install the nvdida drivers and have a blank/black screen at startup.

For the record, I followed the procedure detailed below with my MackBook Pro 3,1 and while I now believe that my nvidia card is NOT being used, basic computing (web browser, document editing coding, simple games) are working just fine. Not being a gamer I don't know much about graphics cards, but for what it's worth I believe my MacBook Pro has a G84M [GeForce 8600M GT] card, which is not the same model listed in the forum post the commenter cites.

But if I were starting over I might instead consider the procedure outlined in the forum post the commenter links to in hopes of even better performance. End of February 2017 update.

Alright, with all that said here's what I think I would do if I were starting fresh, knowing what I know now:

What I Did to Install Ubuntu

  1. Get a USB drive with at least 2 GB of storage. Know that it's going to get wiped, so move important files off it first. Then use the MacOS Disk Utility to format the USB stick as DOS FAT32.
  2. I'd follow this guide to download Ubuntu 16.04 LTS and get it onto the USB stick, using UNetbootin.
  3. As described in the final step in that guide, when you restart, hold down the option key on your Mac. In the resulting menu, select the 'EFI' device as the device to boot from.
  4. You'll be confronted with a text-only menu that's from a piece of software called GNU GRUB. Key down so your cursor is on 'Install Ubuntu', but instead of pressing enter, press e to edit the commands before booting.
  5. This opens an options file in a basic text editor. Find the line that has ro quiet splash in it and make that bit of the line read ro nomodeset quiet splash. Then press either F10 or Ctrl-X to boot (read the text at the bottom of the screen to be sure of the key(s) to press).
  6. If presented with a choice in GRUB (a text menu) with an option to install Ubuntu, choose that option.
  7. You should be then presented with a nice GUI (not text only) Ubuntu installer, or maybe an icon that says Install Ubuntu. Double click the icon if you see it. Go through everything, decide whether or not to connect your Wifi to download updates, decide whether or not to encrypt your home folder, and then choose restart.
  8. We now need to boot Ubuntu in recovery mode. To do this, as the computer is starting up again after restart, right after you hear the Apple/Mac start-up sound, hold the SHIFT key. Repeat step #3 above if you're presented with the EFI option. Once you're at a text-only menu, press e and add nomodeset to the line of code discussed above. Then press the key(s) to boot. Ubuntu should boot up– though the display may be screwy. In either case, we're not done yet.
  9. Now we need to make that nomodeset setting permanent. Open terminal (ctrl+option+t) and run sudo nano /etc/default/grub. (Reference)
  10. In that file, add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT as seen below:
  1. Save this text file by hitting Ctrl+O, then exit nano with Ctrl+X, then, back in Terminal, run: sudo update-grub
  2. Restart the computer (the menu for which is in the top-right corner of Ubuntu 16).

I think that would do it. I don't think I needed rEFInd. And apparently the warning on UNetbootin that I could run the device on Macs was not accurate.

For completeness sake, here is the actual process I went through over three days.

Attempt #1: Ubuntu 16.04

I found this guide which involved downloading and using the UNetbootin USB installer.

I believe I successfully downloaded the Ubuntu 16.04 ISO and UNetbootin. I then installed UNetbootin (by dragging it into Application) and then I used UNetbootin as described in the tutorial. However at step 7 when I restarted my Mac and held the option key I was presented with a menu to try or install Ubuntu. Every time I selected 'install' it just went to a black screen. I waited minutes but no installation screen appeared. I then held down the power button and the computer rebooted in OS X, back to square one.

I will say that after using UNetbootin to load the USB stick the program warned the device could only boot the new OS on PCs, not on Macs. I chose to ignore that warning and try anyway, but as I reported above, it didn't work.

Upon further research I believe the Ubuntu 16.04 may not work on Intel-based MBPs made circa 2009. One page, https://help.ubuntu.com/community/MacBookPro, seemed to encourage those with MBPs this old should instead opt for Ubuntu 14.04.

I didn't want to run an old version of a distro I wasn't particualrly excited about if I could find a distro that I could run the lastest version of. Plus I couldn't quite figure out how to download an (official) copy of version 14.04.

Attempt #2: Mint 18 ('Sarah') Cinnamon 64-bit

I understand that the other distro well-reviewed for beginners is Mint. And I saw that Mint 18 was itself got good reviews.

So I headed over to their download page and chose 'Cinnamon 64-bit' and downloaded it via a torrent.

The only tutorial that I found for installing Linux Mint via USB seemed strange and brief. Thus my current plan is to try to use UNetbootin again, following the Ubuntu guide but with Mint this time rather than Ubuntu 16.04.

However, as before, after using UNetbootin it told me the device could only boot the new OS on PCs, not on Macs.

When I restarted my Mac and held down the option key, I got a similar menu as when I tried Ubuntu, but eventually came to a dark black screen. I waited a few minutes, and then forced the computer to shut down by holding down the power button.

Attempt #3: Back to Ubuntu 16.04 by a different method

I followed the instructions presented here, which I was optimistic about it because it avoided using UNetbootin, along with the potentially helpful warning:

UNetbootin for Mac OS X can be used to automate the process of extracting the Ubuntu ISO file to USB, and making the USB drive bootable. The resulting USB drive, however, can be booted on PCs only.

Which mirrors the warning UNetbootin gave me.

However the method described in the link above failed in the same way the others did– I restarted, held down the option key, chose the EFI boot, chose to install Ubuntu, and then was met with a black screen. For the first time I thought to check the light on my USB stick to see if it was at least thinking but it was off.

Attempt #4: Using rEFInd Boot Manager

From here I found an article about installing Debian (a more advanced distro of Linux).

That let me to believe rEFInd was something I needed to install first.

However this program (I admittedly didn't take the time to figure out what it actually does) did not seem to help. Afterward, and before my next attempt, I bypassed rEFInd by going to System Preferences > Start Up Disk, selecting my hard drive and hitting the restart button. Thus I do not think I actually needed to install rEFInd to successfully get Ubuntu installed, however I'm not 100% of this, since the rEFInd uninstall instructions for OS X recommend bypassing rEFInd rather than actually uninstalling it.

Attempt #5: Having bypassed rEFInd, I replace quiet splash with nomodeset

Big success!

Somewhere else I remember seeing someone recommend turning on an option called nomodeset in GNU GRUB, but for some reason didn't think I had that option in the menu that I kept getting. Turns out, as described here, when you get to the GRUB menu you hit the e key. Then you add nomodeset as a parameter in one of the lines of code in the text file that opens. Removing quiet splash seems to just present more text as output– the nomodeset solved the problem.

After maybe 40 seconds I was presented with an Ubuntu desktop and a shortcut icon to an Ubuntu installer. I double-clicked the installer and followed the wizard.

I connected to my wifi network and told it to download updates as it installed to make things quicker. The only hard choice was whether to encrypt my home folder (which I believe you can't do later). I decided not to based on this answer as I was worried about the performance hit on decrypting on a machine with 2GB memory. Then I just waited for Ubuntu 16.04.1 LTS to install.

After installation it asked me to restart. I clicked yes. I then got an ugly error message that said something like 'remove the installation device and hit enter'. I still had the USB stick in, unsure when I was to remove it. I pulled it out and hit enter. The computer then restarted, making the familiar Mac start-up sound and presenting the familiar Mac gray, but then it switched to a purple Ubuntu-like color and stayed there for a minute.

Setting nomodeset permanently

When I came back from that restart it was stuck on a purple screen. I figured I needed to set nomodeset permanently on. I needed to get back to the GRUB screen, which I figured out from somewhere:

  1. Switch on your computer.
  2. Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
  3. Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.)

Then, to set nomodeset to be on permanently, I followed this Ask Ubuntu answer that reads:

I saved that file and ran sudo update-grub as instructed. I then restarted my computer once again and I think that's when things went smoothly for the first time.

(FYI a similar process to the one described above seems to be given here but with some other stuff as well, if you need more help at this stage.)

Initial Thoughts

Woohoo! It seems snappier that OS X 10.9, but it's not a speed demon like my 2012 MacBook Air with 8 GB of memory.

But the desktop and dock are familiar enough to me. It comes with Firefox, Libre Office, a basic text editor, and a link to Amazon.com(?) in the dock that's on the left by default. I got terminal Vim and RVM running with a few Google-able tweaks from the OS X installation process. Remapping caps lock to control was one line in Terminal (setxkbmap -option caps:ctrl_modifer), however that did not persist when restarted. I followed this AskUbuntu answer and went to Startup Applications > Add > and entered setxkbmap -option caps:ctrl_modifer. It seems to persist on restart now.

I was able to install git by running sudo apt install git. Similarly I was able to install KeePassX by running sudo apt-get install keepassx (I'm not 100% in the difference between apt and apt-get here but that's what I saw on the internet help sites I found). I also installed a fresh version of vim but I forget what line I ran in terminal.

To run a general update and upgrade, I run sudo apt update && sudo apt upgrade, which seems to work.

We'll see how much I use this old computer going forward, and what for. Instant download mac os lion install for macbook air bootable usb.

Update: Just found this website that aims to teach Linux for beginners, which I might checkout. There's also this series of YouTube videos: Ubuntu Beginners Guide that looks nice, is Ubuntu-specific, and is, as of this writing, only one month old.

Switching to Lubuntu

To avoid the high memory usage of Ubuntu's Unity desktop environment, I installed Ubuntu's LXDE desktop environment (called Lubuntu). I had a gist that Unity was a bit of a memory hog compared to other desktop environments. I also spotted this Reddit post that compares some lightweight distros in terms of RAM consumption and Lubuntu did well.

To install Lubuntu, I ran sudo apt-get install lubuntu-desktop (I learned this from a helpful user in the Ubuntu Riot.im channel). The size of the installation was about 340 mb.

After installing the Lubuntu desktop environment, you want to run the software updater, restart the computer (logging out is not enough), and at the login screen choose Lubuntu (or LXDE… that's another option and I'm not sure what the difference is).

You can check how much RAM you have available by running free -m in the terminal. Thanks to this site, I knew to look for the value under 'available' to get an accurate estimate of how many megabytes of my memory were 'free'. With my terminal and Firefox running on Lubuntu, I have about 1187 MB RAM of my 2 GB available, as opposed to Ubuntu, which generally only left about 700 or 800 MB available when I was running a couple of programs (not a very scientific test, I know).

Plus I can always switch back to regular Ubuntu via the login screen.

Lubuntu is pretty snappy! I did want to disable my touchpad from clicking, which I did by doing this:

How to disable tap to click persistently in Lubuntu

  1. Open ~/.config/lxsession/lubuntu/autostart or possibly ~/.config/lxsession/LXDE/autostart (not sure which)
  2. To disable tap touchpad to click, add synclient MaxTapTime=0

You can find other settings to set here, like enabling two-finger horizontal scroll (synclient HorizTwoFingerScroll=1).

Installing an application launcher for Lubuntu

On macOS I make frequent use of Alfred as an application launcher. Ubuntu's Unity desktop environment sort of had something like that, which you can initiate by pressing the command key on its own at any time. But I couldn't find something similar in LXDE– the application menu (similar to the Start menu in Windows) was just not fast enough for me coming from macOS + Alfred).

So I found this askubuntu answer that recommends installing an application called Synapse by running sudo apt-get install synapse. By default the launcher is invoked by hitting ctrl + space, but I changed it to alt+Enter by launching Synapse and clicking on the not-super-obvious round button on the right side of the pop-up display and clicking 'Preferences'. Works great!

My attempt to make the Gnome terminal the default

The default Terminal in Lubuntu (think it's called LXTerminal) didn't support true color in Vim, so I looked for other options. I had gotten used to the terminal in regular Ubuntu (which I'm pretty sure is the Gnome Terminal), so I figured I could switch that in on Lubuntu. Oddly it's not in the main menu of applications, but I figured out a way to set it as the 'default' terminal:

  1. menu > Preferences > Default applications LXSession
  2. Launching applications > Terminal manager > More > write in 'gnome-terminal' for 'Manual setting'

This seems to have worked– but only way I know how to launch Gnome Terminal is with the standard launch-terminal shortcut of option + control + t.

But note that if you're a Vim user the only way I could get a version of Vim with system clipboard support was to install Neovim and then install xsel by running something like sudo apt-get install xsel. Restart your Gnome Terminal and you should be good to go.

More Lubuntu configuration ideas

Just found this long forum post with more ideas of recommended features for Lubuntu.

Background

What I'll be showing you today is how to rescue your 2011 Macbook Pro by putting Linux on it. I understand you might be asking 'Why would I do such a thing!?' So imagine this scenario:

You have a 2011 Macbook Pro — the Macbook Pro 8,2 as it will come to be known to you — and it is dying. The battery barely holds a charge and it has fallen victim to a cruel fate1 which has rendered the display all but useless. Some have chosen to sue Apple because of this and, justified though they may be, you have opted for another path.

You're going to attempt the impossible, and bring it back from near certain death.

You've tried a few home remedies before with only temprorary success so now, now you're ready for the nuclear option.

You are going to blow OS X away, and replace it with something else.Not something better. Something different. Not something superior. Something sufficient. You're going to put linux on it and disable the faulty AMD graphics card with extreme prejudice.

Well, I am. You're just going to read about it and decide whether you're interested in doing something similar.

Step 1 - Download Ubuntu

The primary reason I chose Ubuntu is convenience. I'm familiar enough with Ubuntu Linux and it's software ecosystem to feel confident that if there is some software I need, it's likely available for Ubuntu with minimal effort. That is to say, the applications I'm interested in are likely already available via Ubuntu's Software Center/App Store, or provided by third parties in a format that is usable by the Software Center.2

Getting Ubuntu Linux is easy enough just go to the download page and pick a version. I settled on the 64-bit 14.04.1 LTS version so everything I say from here on out is done with this version in mind.

Step 2 - Install Ubuntu

Once Ubuntu is downloaded we're left with an iso file containing the installer. However, before we can begin installing, this iso needs to be burned to a disk or made installable by other methods.

Though I have a 2011 Macbook Pro with a functional SuperDrive I chose 'other methods'. More fun that way (and I didn't have any readily available disks). The 'other method' was to install via a USB flash drive. A step-by-step guide to the process can be found at Ubuntu's exceptionally helpful community forum.

The steps involved running a series of commands in the Terminal , which I'll reproduce here for my own benefit. If you have any issues though, I highly recommend the original thread.

First, convert the iso file to an img file.

Now use the diskutil program to find the device identifier of the USB drive we'll be using. What I do is run the command, plug in the USB drive, then run the program again to see what has changed. The new device that shows up is my drive.

** **PLUG IN FLASH DRIVE** **

Then we eject the drive from the desktop (but not physically from the computer) using the device identifier we just found.

Next we write the contents of the image file we created earlier directly to the raw device (which is why we use rdisk)

At this point I diverged from the Ubuntu forum guide. I had no need for refit — though I do recommend installing it — as I was only installing linux. I rebooted the computer and invoked Apple's Startup Manager to boot from the external USB drive.

  1. Restart Mac.
  2. Immediately press and hold the Option key.
  3. Use your mouse, trackpad or left/right arrows keys to select the USB drive. It'll be the one that's not like the other one.
  4. Hit Enter on the keyboard.
  5. Profit.

If the mac is currently having display issues the screen might not be clear, but once we switch from the light grey Mac Startup screen to a darker (black, or potentially blue if this is a bad day for you) screen you'll be in the GRUB bootloader.

Once in GRUB press the e key. We're now going to disable the AMD graphics card while we boot into the Ubuntu Live CD. Look for the line set gfxpayload=keep. Once you've found it, type the following lines underneath to disable the AMD graphics card:

Next find the kernel line and after 'quiet splash' , add the following

After checking to make sure that we're mistake-free press F10 (likely Fn + F10) on the Macbook. This should allow us to boot with the integrated Intel graphics card, and then install Ubuntu as per the installationdocumentation.3 Once the installation is done you can reboot into your new linux system.

Step 3 - Disable AMD graphics card permanently

But wait! There. Is. More. Not much more mind you, but enough to warrant another section. Or two.

Once you reboot you'll need to press e again, find set gfxpayload=keep and add the outb lines shown above again, along with the kernel parameters after 'quiet splash'.

This will load your new Ubuntu Linux system with Intel graphics. Now we just need to set things up so you don't need to do that ever again. Start a Terminal and run the following command to edit the necessary file:

This will ask you for your user account password to get admin privileges. Enter it and when the file opens search for the line

and change it to

Once this change is made, check for errors then save and exit.

Next we'll run another command in the Terminal

Again, enter your password if asked and when the file opens find the line

And place the following immediately before this line:

Check to make sure that everything is correct and save, then exit gedit once more.

Finally run

Install Ubuntu On Macbook

This will update the boot loader settings we just changed and make them stick. The next time we reboot we won't have to type out all those obnoxious commands to disable and enable things.

Step 4 - Use proper Wi-Fi Drivers

So after all that I would be remiss if I left you without the capability to use reliable Wi-Fi. I'm not sure why, but the proprietary driver for the Macbook Pro's Wireless adapter — that comes directly from the manufacturer — doesn't work very well. Wi-Fi connections using this driver are spotty and drop all the time. What's worse, I think the throughput is pretty slow. Slow and unreliable. What a travesty.

Here's what I believe I did to get a reliable wifi connection going.4

**PLUG IN ETHERNET CABLE**

Since I actually wanted these drivers, when asked to fetch and install the firmware, I said YES. Finally, I loaded the driver with:

At this point you should be able to go to the menubar up top, click on the networking notification icon (One arrow up, One down, if ethernet cable is plugged in) and click 'Enable Wi-Fi' If this doesn't work for you, I would reboot the computer and try again.

Step 5 - Profit!

Enjoy your functioning computer. That's it. Enjoy! I got nothin' else for yah. Well, not today at least. God willing, at this point we have a functional Ubuntu Linux 14.04 LTS system installed on a 2011 Macbook Pro. Easy, right?

Macbook Drivers For Ubuntu

Have questions? Comments? @reply to @opinion8d_logic on twitter with the hashtag #freedom.

Macbook Pro Install Ubuntu

  1. It seems 2011 Macbook Pros are prone to graphical glitches and ultimately, outright failures in booting. These failures have been linked to their discrete ATI graphics cards. ↩

  2. Just FYI: Ubuntu's Software Center is a wrapper around something known as a repository in linux. Packages for a large variety of software are stored in these repositories. What's more, others create software repositories to work with both new and older versions of Ubuntu. e.g. The Steam gaming client, Google's Chrome browser, Netflix and Spotify streaming services, etc. ↩

  3. Now the installer allows you to do many things. One of those things is encrypting the entire drive. I would hold off on that until you are more familiar with linux. ↩

  4. Instructions adapted from the Ubuntu Community and Ask Ubuntu sites. ↩





broken image