Game Maker's Garage Forum

Game Maker's Garage => Trash Talk => Topic started by: Circuit on June 30, 2013, 07:53:08 PM

Title: Linux
Post by: Circuit on June 30, 2013, 07:53:08 PM
I'm studying to become a professional programmer, and it's important that I start getting some experience with Linux.  To that end I've decided to install Debian on my MacBook.  I've already backed up all my critical files on both the OS X and Windows partitions, and now the only thing left to do is to modify my machine's "boot settings" (for lack of a proper term) and start installing Debian.  This is the scary part because I'm not very familiar with how the machine boots up.  Some of you guys have mentioned using Linux before.  Have any of you ever installed it on a Mac?
Title: Re: Linux
Post by: Gan on June 30, 2013, 07:56:42 PM
I've installed Ubuntu on a few of my macs.
Fairly painless.
Title: Re: Linux
Post by: Circuit on June 30, 2013, 09:03:32 PM
Thanks for responding Gan.

I'm worried because I've read that Windows and Linux don't like to coexist at the BIOS/EFI/hybrid MBR/whatever level.  Also, the method used to boot Linux can affect Linux's ability to use the GPU.  I've prepared myself for the worst-case scenario (messing up and having to reinstall everything) but it would be nice to do it right the first time.   ;D

Gan, did you have to use rEFIt/rEFInd to install a new boot menu?  Have you triple-booted OS X with Ubuntu and Windows, or just dual-booted OS X and Ubuntu?  Regardless, I'd really like to know what you did, and why you did it.  It would give me some much-needed insight.
Title: Re: Linux
Post by: Zoo on June 30, 2013, 09:10:15 PM
Ubuntu is nice, albeit harder to use than Mac or Windows (just because I'm not used to it.

I use a form of Debian on my Raspberry Pi called Raspbein
Title: Re: Linux
Post by: Gan on June 30, 2013, 09:17:40 PM
Thanks for responding Gan.

I'm worried because I've read that Windows and Linux don't like to coexist at the BIOS/EFI/hybrid MBR/whatever level.  Also, the method used to boot Linux can affect Linux's ability to use the GPU.  I've prepared myself for the worst-case scenario (messing up and having to reinstall everything) but it would be nice to do it right the first time.   ;D

Gan, did you have to use rEFIt/rEFInd to install a new boot menu?  Have you triple-booted OS X with Ubuntu and Windows, or just dual-booted OS X and Ubuntu?  Regardless, I'd really like to know what you did, and why you did it.  It would give me some much-needed insight.
I used Refit, had 10.8, 10.5, Windows and Ubuntu on the same hard drive.
Don't use Bootcamp to install Windows.

If Refit doesn't show up on boot, keep restarting until it does. First time I installed, took 3 restarts for it to show up.
Title: Re: Linux
Post by: Circuit on July 01, 2013, 02:15:53 AM
Thank you so much, Gan.  This really helps me out.  If I may ask one more question, I promise* it will be the last one:

A tutorial on howtogeek (http://www.howtogeek.com/howto/35676/how-to-choose-a-partition-scheme-for-your-linux-pc/) states that a Linux installation should use a swap partition, a root partition, and a home partition.  The reasoning makes sense, but I noticed that this guide is about making a dedicated Linux PC, so this rule may not apply to a multi-boot setup.  Do you think it's still a good idea to create swap, root, and home partitions when using Linux on a multi-boot Mac, or should I just use one partition for all Linux functions?
Title: Re: Linux
Post by: Gan on July 01, 2013, 02:33:13 AM
That's above my knowledge. I only had linux limited to 1 partition.

I don't mind questions.
Title: Re: Linux
Post by: Circuit on July 01, 2013, 01:31:57 PM
Thanks Gan.  In that case, I'll keep it simple and just use 1 partition.  If everything goes according to plan, I'll post a message here using "IceWeasel" (a Linux web browser) before the end of the day.    :)
Title: Re: Linux
Post by: Circuit on July 02, 2013, 04:43:34 PM
It worked!  I am now running Debian on its own partition alongside OS X and Windows 7.  rEFIt worked like a charm.  I still have a lot of work to do (downloading drivers, etc.), but right now I'm going to take a break.  Thanks for the help Gan!
Title: Re: Linux
Post by: Charlo on July 02, 2013, 06:26:22 PM
I run Ubuntu in a virtual machine to do some of my web development.  A bit more convenient to use than a full Linux install, but quite a bit slower too.  The lag when typing is somewhat annoying.
Title: Re: Linux
Post by: Gan on July 02, 2013, 07:55:28 PM
Glad I could help.

Charlo, why do you use Linux for web development?
Title: Re: Linux
Post by: Charlo on July 05, 2013, 10:14:18 PM
Glad I could help.

Charlo, why do you use Linux for web development?
I like to experiment with installing different languages and frameworks, and it's a lot easier to do that in Linux.  A lot of frameworks aren't really intended to be run on Windows.  For vanilla PHP and MySQL I still use Windows, though.
Title: Re: Linux
Post by: Circuit on July 08, 2013, 12:03:29 AM
Installing Debian on my Mac wasn't as easy as I probably made it sound.  It didn't work the first time, and when it did work, I was unsatisfied because I hadn't installed it the "right" way.  I've written this tutorial so that others can learn how to install Linux on a Mac without having to repeat my mistakes.  I know that nobody has asked for a tutorial here, but it's good information to have, and someone will probably find it through a search engine.


CIRCUIT'S GUIDE TO INSTALLING LINUX ON A MAC
edited 8/10/13

Should I install Linux on a partition or in a VM?
Linux runs faster outside of a VM.  However, installing it on the hard drive requires a lot of work, risk, and time.  You should only do it if you're sure you really want to.

Why is this guide for Macs?  Is installing Linux on a Mac different from installing it on a PC?
Yes.  Even though Apple switched to Intel architecture in 2006, Macs and PCs still have significantly different hardware:

The point is: If you want to install Linux the same way you install Windows, you're asking for trouble!

So how should I install it?
You should install Linux on GPT partitions and have it boot natively via UEFI, which is the natural way to install it on a Mac.  I'll explain how.
You'll need the following:

Okay, so what do I do?

There's a good chance that this plan won't work for you 100% because each Mac is different.  You should supplement it with other tutorials that you find on the net.  You probably won't find a tutorial that's tailored for your exact machine and Linux distribution, but you will learn more about how things work, and eventually you will figure out how to run Linux on your Mac.

Will Linux be able to use my graphics card?
NVIDIA graphics card drivers don't work with Linux when booted from EFI.  There may be ways to get around this, but I don't know how.  You probably don't need the GPU in Linux anyway.