[LUGSB] linux for macs
James Crasta
jcrasta at gmail.com
Sat Jan 20 11:14:00 EST 2007
On 1/19/07, Josef Sipek <jsipek at fsl.cs.sunysb.edu> wrote:
> On Mon, Jan 01, 2007 at 12:29:29PM -0500, Ilya Sukhanov (dotCOMmie) wrote:
> ...
> > Linux supposedly does support EFI
>
> It most definitely does.
>
> Josef "Jeff" Sipek.
>
I'm currently triple booting OSX, windows XP, and Gentoo on my
macbook, and dual booting on a mac mini. If you're experienced with
installing linuxes, it's pretty simple to do.
[ disclaimer: the following info is for intel macs. It's possible to
run linux on g3 and up powerPC macs as well, but the process is
completely different. So if your mac was made before 2006, ignore
this guide. ]
While Linux does support EFI, using either elilo or a properly patched
GRUB, there are some caveats if you want accelerated video in linux
(At least, with the macbook / mb pros, this is the case, I imagine it
would be the same with the imac, but I'm not positive.) Thankfully,
doing BIOS emulation is simple enough (commonly referred to as "boot
camp" though this isn't really the case, Boot Camp Assistant is not
needed to do this)
I recommend an EFI bootloader called rEFIt (
http://refit.sourceforge.net ) which will on-the-fly scan your
partitions (including external firewire/usb drives and CD drives) at
boot-time and provide a very nice graphical bootloader to choose
between linux, windows, macOS.
Due to limitations with the EFI / MBR synchronization, you're limited
to only three total partitions on the boot drive. Which means, if you
want to triple-boot, you won't be able to have a swap partition.
This wasn't an issue for me, as I don't ever use swap. But it's
something to consider.
As of 10.4.8, OSX can even resize its partitions on the fly without
data loss (look on onmac.net for the documentation on using diskutil's
resizeVolume command) so this is an option for installing linux on an
existing mac system, rather than a fresh install.
If doing a fresh partition (do it using the OSX utility from the
install CD, fdisk /cfdisk won't create compatible partition layouts),
here's my recommendation:
Partition 1: "MS DOS / Windows FAT32" (you'll convert this to NTFS
when installing windows)
Partition 2: "Unix Filesystem" (it doesn't actually matter, you'll
convert this to ext3)
Partition 3: "Mac OS extended (journaled)"
Note linux can write to Mac HFS/HFS+ partitions, so I use that as my
data partition for Linux, thus allowing me to make a really small
linux partition (80gb hd on the macbook, pretty squeezed for space)
Note 2: While the core 2 processors are 64-bit capable processors, the
core2 machines have new wi-fi cards which use 802.11n and the
open-source drivers don't handle them, you'll need to use ndiswrapper
to make wi-fi work. If you want wi-fi, then you'll want to run a
32-bit linux distro, not an x86_64 distro.
In short (the guides go over this in much more detail)
1) install OSX, if not already installed and set up partition using resizeVolume
2) install Boot Camp Assistant from Apple, just so you can get it to
burn the windows drivers to a blank CD, but don't actually use boot
camp to resize your HD or install windows
2) install rEFIt and run the ./enable.sh in /efi/refit/ to turn it on
3) boot up to the rEFIt screen with your windows XP CD in... select
the windows CD and go install windows
4) once windows is installed and working (use the driver CD to get
wifi and stuff) reboot with your favorite recent linux distro in the
drive.
5) install linux to /dev/sda3 (sda1 is your EFI system partition,
sda2 is windows, sda3 is your linux, and sda4 is macOS)
6) install the GRUB bootloader on the sda3 partition (not the MBR)
rEFIt will now chain-boot GRUB. Make sure you configure GRUB with a
timeout which automatically boots to linux if nothing's chosen,
because for me, I can't use the keyboard in the GRUB screen.
I used http://gentoo-wiki.com/Macbook to help me with finding info on
the hardware setup for linux. There's likely guides out there for
other distros (I saw several for debian) and other models. The
onmac.net wiki has a triple boot info page as well:
http://wiki.onmac.net/index.php/Triple_Boot_via_BootCamp
More information about the lugsb
mailing list