Thread available [http://lists.debian.org/debian-devel/2006/07/msg00008.html here]
elilo does not work (Bug: [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=376002 #376002])
Debian Etch on a MacBook HOWTO (triple-boot) at:
Triple boot (inc. Debian Etch) at:
Boot process described is rEFIt to LILO to Linux (as discussed in above-linked thread.)
Partitioning (via OS X)
Before being able to install Debian, you need to repartition the disk; supposing you want to reserve 20Gb for your OS X partition, run the following command from a terminal (Applications -> Utility -> Terminal):
Mac OS X $ sudo diskutil resizevolume disk0s2 20G Started resizing on disk disk0s2 Macintosh HD Verifying Resizing Volume Adjusting Partitions Finished resizing on disk disk0s2 Macintosh HD WARNING: You must now reboot!
Support for the resizevolume verb was added in Mac OS X 10.4.6. If you have an earlier version, you'll need to upgrade.
Preparing to dual boot (via OS X): rEFIt
Now [http://prdownloads.sourceforge.net/refit/rEFIt-0.8.dmg?download download (0.8)] and install [http://refit.sourceforge.net/ rEFIt]. For the the manual way (which is not needed) read the [http://refit.sourceforge.net/doc/c1s1_install.html rEFIt install documentation].
it's now possible to proceed installing Debian.
Grab and burn an image from the [http://www.debian.org/devel/debian-installer/ d-i website]; for example a daily [http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/i386/iso-cd/debian-testing-i386-netinst.iso netinst] or [http://cdimage.debian.org/cdimage/etch_di_rc1/i386/iso-cd/debian-testing-i386-netinst.iso etch i386 RC1] or [http://cdimage.debian.org/cdimage/etch_di_rc1/amd64/iso-cd/debian-testing-amd64-netinst.iso etch amd64 RC1] for the Core 2 Duo ?MacBooks).
Boot from the CD (hold down C while booting) and proceed with installation.
If you have strange keyboard problems (double keypresses) or other problems while booting from the install CD, use the following command line on the boot prompt:
install noapic irqpoll acpi=force
If you cannot type anything in the CD/DVD boot prompt (found this problem on MacBook Core 2 Duo), you can fix this with an external USB keyboard. This problem seems to be related to refit, since disabling it and booting while holding the C button pressed (boots directly from CD) fixes this. (It seems that booting after the real power-off seems to have less problem than reboot with "shutdown -r now". Also it seems to help situation a bit better by not pressing keyboad except when needed.)
When you reach the "Install the GRUB boot loader on a hard disk" step, switch to the second virtual console by pressing ctrl-option-F2, press return to start/ the shell, and then enter
chroot /target apt-get install refit /target/sbin/gptsync /dev/sda
and enter y at the prompt. (This syncs the [http://en.wikipedia.org/wiki/Master_Boot_Record MBR] from the [http://en.wikipedia.org/wiki/GUID_Partition_Table GPT], which were made out of sync by parted). On amd64 there is no refit package ([http://bugs.debian.org/383802 bug 383802] which is waiting for [http://bugs.debian.org/383801 bug 383801]). One solution I used is to start the installation, partition your hard disk, reboot and do the gptsync with the refit shell and then install
Switch back to the first virtual console by pressing ctrl-option-F1 and select <Go back> in response to the "Install the GRUB boot loader to the master boot record". Choose "Install the LILO boot loader on a hard disk" from the main menu and choose /dev/sda3 for the LILO installation target. Do not install LILO to the MBR! When the installer asks if you want to make this partition active, choose "No."
GRUB after 0.97-10 (released on 5 Jun 2006 and now in etch) is compatible with MacBook if you configure proper MBR/GPT hybrid. Although it was possible to install GRUB during the initial d-i install with many manual fiddling processes of MBR/GPT synching, I recommend you to install lilo initially as above and install GRUB to /dev/sda3 and/or /dev/sda4 later for the ease of process and ease of updating kernel. "rEFIt " on OS X does not like anything other than MSDOS or HFS+ for file system description in GPT table when executing gptsync to create matching MBR record. So I makeked Linux partitions as MSDOS before executing gptsync. I used both disked for GPT and fdisk for MBR. Once youmark MBR with the proper file system type(eg. 83), GRUB is happy to boot Linux by looking into FS and finding files.) Here is an example of /boot/grub/menu.lst for dual booting 484 and amd64 systems:
timeout 10 default 0 fallback 1 # For booting GNU/Linux (For frozen keyboard) title GNU/Linux64-safe root (hd0,2) kernel /boot/vmlinuz-2.6.18-4-amd64 root=/dev/sda3 initrd /boot/initrd.img-2.6.18-4-amd64 # For booting GNU/Linux title GNU/Linux64 root (hd0,2) kernel /vmlinuz root=/dev/sda3 initrd /initrd.img # For booting GNU/Linux title GNU/Linux64.old root (hd0,2) kernel /vmlinuz.old root=/dev/sda3 initrd /initrd.img.old # For booting GNU/Linux title GNU/Linux32 root (hd0,3) kernel /vmlinuz root=/dev/sda4 initrd /initrd.img # Change the colors. title Change the colors color light-green/brown blink-red/blue
(Linux kernel is GPT aware thus swap partition maybe located places such as /dev/sda7)
The following features work, either out of the box (if stated otherwise)
- Ethernet (as of 2.6.16)
- Video (install 915resolution)
- Sound (as of 2.6.18)
(See below for more)
Devices to be confirmed
Backlight + CD Eject button
Backlight keys (Fn+F1 and Fn+F2) work using [http://www.technologeek.org Julien Blache's] [http://packages.debian.org/pommed pommed] (there is a new project homepage at [http://alioth.debian.org/projects/pommed/ alioth]); you can even turn off the backlight using the keyboard; pommed also enables the CD Eject button's functionality, Fn behaviour and remote control. Besides, you can also install [http://packages.debian.org/gpomme gpomme]: a GTK+ client suitable for all environments(you should start it when your session starts) and [http://packages.debian.org/wmpomme wmpomme](a ?WindowMaker dockapp)
To get video to work properly, you need to adjust the resolution using
the [http://packages.debian.org/915resolution 915resolution] package:
apt-get install 915resolution
This is all that you have to do: 915resolution automatically sets the correct video modes, and X is configured properly (presuming that you selected the 1280x800 mode during install, which it should default to).
This adds the monitor's actual resolution to the Intel 915's video modes. Without this, you will get 1024x768 (the biggest normal size that fits), which is rescaled and fuzzy.
The video chipset shipped with Macbook is 945GM.
See also an [http://sourceforge.net/mailarchive/forum.php?thread_id=20229481&forum_id=47881 xorg.conf file] which enables use of an external monitor.
ALSA driver snd_hda_intel works for playback as of 2.6.18-rc1.
MacBook with etch kernel 2.6.17-2-686 and later has no problem with sound.
Caveat: The airport card in the newest MacBook (PCI-ID 168c:0024) is work in progress by Madwifi. You can see the [http://madwifi.org/ticket/1001 bug ticket]. In short: Madwifi now have an experimental version of the (binary-only) HAL (hardware-abstraction layer) for the new chipset. If this doesn't work yet, if you can accept non-free software on your system, and if your kernel is 32-bit, you can use ndiswrapper in combination with the [http://www.dlink.com/products/support.asp?pid=489&sec=0 32-bit windows driver] for the D-Link DWA-645. It's ugly, but it works.
Add the following to /etc/apt/source.list
# Testing deb http://ftp.debian.org/debian testing main contrib non-free deb-src http://ftp.debian.org/debian testing main contrib non-free
After adding the sources above to source.list do
apt-get install madwifi-source madwifi-tools module-assistant
m-a prepare m-a a-i madwifi depmod -a modprobe ath_pci
See [http://madwifi.org/wiki/UserDocs/Distro/Debian/MadWifi] for more details.
Now that you have the madwifi tools install iwconfig
apt-get install wireless-tools
See [http://www.linuxcommand.org/man_pages/iwconfig8.html] for more details on iwconfig
To start wireless up on boot, add the following to /etc/network/interfaces
# Starts the wireless on boot auto ath0 iface ath0 inet dhcp
Afterwards reboot or restart networking.
Configure right apple key to alt-gr adding the "?XkbOptions" line below
Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "it" Option "XkbOptions" "lv3:rwin_switch" EndSection
If two specific keys are swapped then add apple:badmap to ?XkbOptions (separated with a comma).
If you want the touchpad being usable with synaptics add these lines to a file in /etc/modprobe.d/
install usbhid /sbin/modprobe appletouch; /sbin/modprobe --ignore-install usbhid $CMDLINE_OPTS
Then add appletouch to /etc/initramfs-tools/modules and then don't forget to run update-initramfs
If you want to change the bahaviour of the Fn-keys look at /etc/pommed.conf after you've installed pommed.
If the appleir driver is also compiled as a module, change the line above to the following, so appletouch and appleir get loaded before usbhid:
install usbhid /sbin/modprobe appletouch; /sbin/modprobe appleir; /sbin/modprobe --ignore-install usbhid $CMDLINE_OPTS
Of course, also add appleir to /etc/initramfs-tools/modules and re-run update-initramfs .
[http://www.webalice.it/zinosat/macbook/macbook_kb.jpg Italian keyboard]
[http://flickr.com/photos/brianwc/151797592/ U.S keyboard]
Alternatively you can work around with xmodmap and xkbset. xkbset is useful for emulating mouse buttons with keyboard.
xmodmap -e "keycode 115 = Alt_L" xmodmap -e "keycode 116 = Zenkaku_Hankaku" # right-apple xmodmap -e "keycode 108 = Pointer_Button3" # KP-ENTER xmodmap -e "keycode 204 = Pointer_Button2" # eject xkbset m
Has anyone made the fn key work? I can't so to get Page Up and Down I use:
xmodmap -e "keycode 116 = Page_Up" # Right-Apple xmodmap -e "keycode 108 = Page_Down" # KP-Enter
I got my Fn-key working by adding the ProductID of the keyboard which seems to have changed in newer ?MacBooks to drivers/usb/input/hid-core.c
[http://bugs.debian.org/379789 #379789] has been filed to track down a problem with keymap
To workaround missing/unresponsive key issues on the console, I use loadkeys with following script:
/bin/loadkeys << EOF ## ## For MacBook jp106 keyboad after initial install ## Somehow default install has unresponsive keys in Linux console: ## [\] and [|] : 2nd row 2nd from right (next to Backspace marked as delete) ## [_] : 5th row 2nd from right (next to L-Shift) ## MacBook lacks real the access to Remove (keycode 111) key ## ## For English, missing key may be for [asciitilde] / [grave] instead. ## ## Here is the quick fix for jp106: ## ## enable [_] using unmarked shift 0 (In jp106, shift ^ gives ~) ## keycode 11 = zero underscore nul alt keycode 11 = Meta_zero shift alt keycode 11 = Meta_underscore ## ## enable [\] and [|] key and Boot combination with the key marked as enter ## You can create Ctrl-Alt-Del equivalent by Ctrl-Alt-enter for (re)boot ## keycode 96 = backslash bar Control_backslash alt keycode 96= Meta_backslash shift alt keycode 96 = Meta_bar control alt keycode 96 = Boot EOF
CPU frequency scaling is governed by SPEEDSTEP_CENTRINO kernel module.
echo speedstep_centrino >> /etc/modules
infra red receiver
Just usual HID device, kernel patch available as of 2006-07-17.
Sample userland utility implementation http://www.netfort.gr.jp/~dancer/diary/junk2006/20060712-usb-macbook-ir.c
iSight works with linux-uvc drivers with patches. It is installable with
# apt-get install linux-uvc-source linux-uvc-tools
Once source and tools are installed, then:
# m-a prepare # m-a a-i linux-uvc # mount -t hfsplus /dev/sda2 /mnt/mac/ # macbook-isight-firmware-loader /mnt/mac/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport # modprobe uvcvideo
Test it with ekiga.
# apt-get install ekiga libpt-plugins-v4l2 $ ekiga
Kernel patch and hardware tool resource
[http://www.mactel-linux.org/ Mactel-Linux] has mactel specific kernel patch and hardware tool resource. Its subversion archive can be seen at http://svn.sourceforge.net/viewvc/mactel-linux by the browser or retrieved by:
$ svn co https://mactel-linux.svn.sourceforge.net/svnroot/mactel-linux mactel-linux
CONFIG_FB_IMAC support is for booting from ELILO (EFI). You are most probably using lilo/rEFIt to boot, using IMAC driver will make your screen appear scrambled. Use CONFIG_FB_I810 driver instead.
Helpful guide on compiling a mactel kernel: http://gentoo-wiki.com/HARDWARE_Apple_MacBook
- - cpu temperature found through CPU MSR feature
tool available from: http://svn.sourceforge.net/viewvc/mactel-linux/trunk/tools/temperature/
Download Makefile and coretemp.c.
$ make $ sudo ./coretemp CPU 0: 69 C CPU 1: 69 C
- - hddtemp package provides support for hdd temperature monitoring
$ sudo hddtemp /dev/sda /dev/sda: ST98823AS: 38°C
- - I2C sensor is detected but not sure if it's functional
MacBook contains the 82801G (ICH7 Family) and [http://www.lm-sensors.org/wiki/SupportedDevices ICH7 is supported by lm_sensors since sensors 2.9.0] by the [http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/busses/i2c-i801 i2c-i801 kernel driver] which has been in the kernel since 2.6.11.
# sensors-detect revision 1.413 (2006/01/19 20:28:00) ... Probing for PCI bus adapters... Use driver `i2c-i801' for device 00:1f.3: Intel ICH7 Probe succesfully concluded. We will now try to load each adapter module in turn. Module `i2c-i801' already loaded. If you have undetectable or unsupported adapters, you can have them scanned by manually loading the modules before running this script. To continue, we need module `i2c-dev' to be loaded. If it is built-in into your kernel, you can safely skip this. i2c-dev is not loaded. Do you want to load it now? (YES/no): yes Module loaded succesfully. We are now going to do the adapter probings. Some adapters may hang halfway through; we can't really help that. Also, some chips will be double detected; we choose the one with the highest confidence value in that case. If you found that the adapter hung after probing a certain address, you can specify that address to remain unprobed. That often includes address 0x69 (clock chip). Next adapter: SMBus I801 adapter at efa0 Do you want to scan it? (YES/no/selectively): Client found at address 0x08 Client found at address 0x38 Probing for `Philips Semiconductors SAA1064'... Failed! Client found at address 0x3a Probing for `Philips Semiconductors SAA1064'... Failed! Client found at address 0x44 Probing for `Maxim MAX6633/MAX6634/MAX6635'... Failed! Client found at address 0x50 Probing for `SPD EEPROM'... Success! (confidence 8, driver `eeprom') Probing for `DDC monitor'... Failed! Probing for `Maxim MAX6900'... Failed! Client found at address 0x52 Probing for `SPD EEPROM'... Success! (confidence 8, driver `eeprom') Client found at address 0x69 .... Driver `eeprom' (should be inserted): Detects correctly: * Bus `SMBus I801 adapter at efa0' Busdriver `i2c-i801', I2C address 0x50 Chip `SPD EEPROM' (confidence: 8) * Bus `SMBus I801 adapter at efa0' Busdriver `i2c-i801', I2C address 0x52 Chip `SPD EEPROM' (confidence: 8) I will now generate the commands needed to load the I2C modules. To make the sensors modules behave correctly, add these lines to /etc/modules: #----cut here---- # I2C adapter drivers i2c-i801 # I2C chip drivers eeprom #----cut here---- # uname -a Linux coreduo 2.6.18-rc1dancer #2 SMP Sun Jul 9 09:57:01 JST 2006 i686 GNU/Linux
Old hardware issues
usual EHCI, UHCI stuff
Your kernel must have support for the Yukon Gigabit Ethernet driver known as sky2; this is built-in in 2.6.16 and above.
See [http://bugs.debian.org/378521 #378521]
915resolution now works automatically; the below (old) instructions show how to do it manually, but this is no longer necessary:
apt-get install 915resolution 915resolution -c 945 54 1280 800
then edit /etc/default/915resolution
# # 915resolution default # # find free modes by /usr/sbin/915resolution -l # and set it to MODE # e.g. use MODE=54 MODE=54 # # and set resolutions for the mode. # e.g. use XRESO=1024 and YRESO=768 XRESO=1280 YRESO=800 # # We can also set the pixel mode. # e.g. use BIT=32 # Please note that this is optional, # you can also leave this value blank. BIT=32
Adjust the Monitor section of /etc/X11/xorg.conf
Section "Monitor" Identifier "Color LCD" Option "DPMS" HorizSync 28-64 VertRefresh 43-60 Modeline "1280x800@60" 83.91 1280 1312 1624 1656 800 816 824 841 EndSection
and make sure the Screen sections uses "1280x800" as default resolution in the Modes lines and finally
- Server irc.oftc.net, channel #mactel-linux
http://www.netfort.gr.jp/~dancer/diary/junk2006/debianmeetingresume200607-presentation-english.pdf for Enlish-version presentation
see http://tokyodebian.alioth.debian.org/2006-07.html for Japanese instructions