Contents. What is a MacBook is a series of laptop PCs sold by Apple Inc.
The Unified Extensible Firmware Interface. Independent device driver stored in memory as EFI byte. 3 software for Mac OS X can boot Mac OS X Server.
There are several different models with different internal hardwares. You can find the version of a MacBook in the 'About this Mac' menu in OSX, or dmidecode output from Linux.
Installation Overview. Update OS X.
It's always good to start from a clean, backed-up and up-to-date install of OS X. Partitioning Disks. Installing Debian. Configuring a boot manager. Post-install Debian configuration specific for MacBooks.
Debian installation See also: Single boot (Debian only) It is advisable to leave OS X installed, as the computer's firmware can only be updated from OS X. This requires you to set up system with EFI bootloader. We should see this happen real soon for squeeze. Double boot - Mac OS X & Debian Partition Disks A clean install of Mac OS X will create three drive partitions:. EFI: a 200 MB partition at the beginning of the disk. OS X: an HFS+ partition that includes OS X and user space. Recovery HD: A 600 MB recovery partition that includes the OS X installer and basic utilities.
To run Debian, you will want two partitions: one for the Debian OS, and one for swap space for Debian. You will shrink the OS X partition, so decide how much space you want to give your OS X and Debian partitions. If you would like a shared partition between OS X and Debian, consider creating a partition now. Also see the below. Reboot your computer, holding down Command+R to enter Recovery Mode.
In the File Menu, select Utilities Disk Utility. Select the hard drive entry, and enter the Partition tab. Shrink the OS X partition (by default named 'Macintosh HD') and create the Debian OS and Debian swap partitions. If you experience errors like 'you can't perform this resize unless it has a booter' when attempting to resize the OS X partition, Install Debian Get an installer image: To install Debian, you will need an installer image to boot from, either on a CD, DVD, or USB stick. Debian offers various installer images. The is a minimal image containing few packages. Other other packages are downloaded as needed from the internet.
This works well if you have a wired ethernet connection. As new Macs don't have an on-board ethernet port, an ethernet-to-thunderbolt adaptor will be required and will work during the Debian install process.
Get the amd64 image which works with Macbook 2007+ architecture. Mount the image onto a mountable physical volume (CD, DVD or USB stick). Here are for mounting an ISO image onto a USB stick. Insert the Debian install volume into your computer and hold down the Option key while booting. This will bring up the OS X Startup Manager. Select the Debian installation drive.
When asked, install Debian via the Graphical Install. The Expert Install provides more options, but are unnecessary for most users.
Follow along through the installation screens. When asked to Partition Disks, configure Debian to use the partitions created previously. The Debian OS partition should mount as the system partition in the / location on the filesystem, and the swap space partition should be configured as well. Ext4 is a good default for filesystem. Also consider creating a partition for exchanging data between Linux and Mac OS X, see Section below.
In Software Selection screen, you should select a desktop environment, which will be the windowing, graphical user interface for interacting with the operating system. Continue through the install until complete. Debian installs GRUB, a boot manager and loader, on the hard drive's EFI partition. Debian also configures the computer's firmware to open the GRUB boot manager instead of entering directly into the Mac OS X boot loader. Boot Management A boot manager, on computer start-up, lets the user decide which operating system to load. If you are planning on dual booting OS X and Debian, this is the easiest way to manage this process. On installation, Debian sets GRUB as the default boot manager and boot loader.
Turning on the computer will start GRUB, and start Debian. OS X can be booted by holding down the Option key at power on and entering OS X from Apple's Startup Manager. Some find this a usable way to control booting between OSes. If you want a more user-friendly boot manager, is a boot manager which presents a screen to select which operating system to boot at power on. REFInd works out-of-the-box after installation with OS X and Linux installs on the machine. Other boot managers are available such as and, which require configuration to boot OS X.
Installing rEFInd If you will use rEFInd as rEFInd for boot management, disable the GRUB boot manager which Debian configured by (hold Command, Option, P and R when turning on the computer). The Linux kernel doesn't require a separate boot loader since version 3.3, so you can also remove the GRUB boot loader from the EFI partition. To install rEFInd, download the latest stable version on onto your Macintosh HD. Restart your computer in Recovery Mode (hold Command and R when booting), and open a Terminal. Navigate to the rEFInd folder, and run the bundled install script (Also see ). When you restart your computer, the rEFInd screen will come up, allowing you to boot into OS X or Debian. !!
Finish the installation: Remove the ejected installation CD and select. During reboot select Linux from the Mac rEFIt menu. GRUB as bootloader Installing lenny using GRUB Lenny install CD can install GRUB as bootloader. Its dialogue can be misleading if you wish to install bootloader to MBR. You must create proper MBR/GPT hybrid. It can be done by:. gptsync command on Linux.
menu from rEFIt boot loader Switching from LILO to GRUB If you wish to switch from lilo to GRUB:. First, please read and understand some basics at:.
Second, make rescue media (a rescue CD) using. Consider installing package to ease GRUB configuration. The package to use is the package, which uses GRUB 2. (GRUB Legacy is no longer supported.) Boot Loader.
See The most delicate part of installing operating systems, other than drive partitioning (which can destroy data), is configuring the, which can render your system unbootable. Best practice has been changing with improved development of GRUB and supporting software. Currently the best stable (lenny and squeeze) configuration is:. by first loading rEFIt (in EFI), then using the BIOS version of GRUB 2.
This allows multi-booting to Linux, Mac OS X, and Windows, yields accelerated hardware, and does not require LILO to be run every time a kernel or init ramdisk change occurs. For squeeze installer, this is the default. Example: If you install Debian on /dev/sda3, install grub on /dev/sda3 (instead of /dev/sda) and run gptsync in rEFIt on next reboot. You will find a Linux boot option in rEFIt menu and selecting Linux will load GRUB. In future, but not in squeeze, it may be able to use:. a single stage boot, with the EFI version of GRUB 2 (BTS:, ).
This is supposed to be simpler to rEFIt + GRUB 2 (BIOS version), but it may lack 3D acceleration. In the past, (etch?), pratice was:. chain loading by first loading rEFIt (in EFI), then using LILO.
This worked, but had the usual limitations of LILO (system wouldn’t boot if forgot to run lilo after kernel changes, etc.), and was necessary because GRUB Legacy does not support Macbooks. Any OS can be selected as default if you use GRUB 2 in EFI, or rEFIt then the BIOS version of GRUB 2 (so long as Linux is the first non-Mac partition). See for further details. Cross-mount file systems To make a double boot system really useful it is desirable to cross-mount file systems, i.e. To make Mac OS X-filesystems readable (and writable) under Linux and vice versa.
Mac OS X uses a file system called HFS+ while Linux uses ext3. Even though cross-mounting is possible in either direction, there seems to be some scepticism (and possibly bad experience?) concerning the reliability, so that the common advice seems to be to only use small partitions mounted under both operating systems and use them for data exchange. Mounting and using large partitions for regular usage under both operating systems seems to be not advisable. (Please let us know if you have experience with that.) Mount Mac OS X filesystems (HFS+) under Linux If you want to mount a Mac OS X-filesystem under Linux in read-write mode (not read-only) then you have to turn off journaling first under Mac OS X. If you leave journaling on, you can only mount in read-only mode and will not be able to write or modify files in the Mac OS X-filesystem. This is a trade-off, of course, because journaling gives you security that your Mac system lacks if you turn it off.
It might thus be advisable to have one partition for the Mac operating system with journaling (which is the default) mounted from Linux read-only (if at all) and one partition with user data without journaling mounted from Linux read-write. See for more information about HFS+ under Linux. Step 1 (if mounting read-write) - turn off journaling under Mac OS X: If you want to mount the Mac OS X-filesystem in read-write mode (not read-only) then you have to turn off journaling. (i) Boot into Mac OS X.
(ii) Start a terminal. (iii) As root (e.g. With sudo) use diskutil to turn off journaling : mac:user sudo /usr/sbin/diskutil disableJournal /data This assumes your partition is mounted to the directory /data. If you want to turn off journaling for your Mac operating system partition, use / instead. (iv) Reboot into Linux. Step 2 - mount the Mac OS X-filesystem under Linux: If /dev/sda2 contains the HFS+-filesystem of the Mac OS X you want to mount, then run under Linux the following as root.
Root# mkdir /media/macdata root# mount -t hfsplus /dev/sda2 /media/macdata This mounts /dev/sda2 on the directory /media/macdata (only read-only if the HFS+ partition is using journaling, which is the default when Mac OS X creates a HFS+ partition). Of course, you can also create and mount on a different directory.
Verify: To check whether your mount was successfull, as root go into the directory /media/macdata and list the files, create a file, and remove it again. To check whether users have access, as root create a directory for that user in /media/macdata, change ownership to that user, change into that directory, su to that user and perform the same test actions as before (list, create and delete a file).
Step 3 (optional) - edit fstab to auto-mount at boot time: If you want to mount the partition automatically at boot time, you have to add an entry like the following in the file /etc/fstab. /dev/sda2 /media/macdata hfsplus defaults 0 2. Verify: To check whether automount should work, unmount the partition (if it is still mounted from Step 2), and remount it with the -a option. Root# umount /media/macdata root# mount -a Then perform the same checks as in Step 2.
TROUBLESHOOTING (cannot write on HFS+ filesystem anymore): If you cannot write on the HFS+ filesystem anymore, boot into Mac OS X and perform a filesystem check, maybe that helps. Mount Linux filesystems (ext3) under Mac OS X To mount Linux filesystems (ext3) under Mac OS X the best open source option is to use. Once installed, reboot and execute: $ cd /Volumes $ mkdir LinuxHome $ sudo fuse-ext2 /dev/disk0s5 LinuxHome/ You should now see your partition in the finder.