Showing posts with label macbook. Show all posts
Showing posts with label macbook. Show all posts

Thursday, December 20, 2007

The best of three worlds

Yay! After thinking about re-installing OS X, Ubuntu and finally adding Windows XP to the mix, I played around for about 9 hours and finally was able to install Windows XP together with Mac OS X and Ubuntu 7.10, so triple-booting is now standard here! That's Windows XP for games and the usual website compatibility testing, then there is Ubuntu for all development and "default work environment" stuff and finally Mac OS X for some other useful things. All three OSes boot really quick from rEFIt, and it's much better than any virtualization can ever provide. Sadly, triple-booting is a little tricky, and especially Windows is very picky about when it decides to boot and when it doesn't (most of the time today, it didn't ;).

The trick is to get the GPT-to-MBR mapping to produce a partition table that has the Windows XP partition as last entry and be sure to let the Windows XP setup (the blue console-based one) reformat the partition - or else you will get media errors or the famous hal.dll error. Hints on how to do all this can be found here and here. You will probably not want to have swap partition, but only three "real" partitions: One for Mac OS X, one for Linux and one for Windows (in that order!). The fourth of the four partitions the MBR can have will be the EFI partition. All other partitions beyond that cannot be seen by MBR/BIOS-based OSes (like Windows). Linux and Mac OS X will "see" the GPT partition table, but I don't know if GRUB or Lilo can successfully boot off GPT partitions or if they still rely on the "bootable" partition to be accessible through the MBR.

I somehow followed the guides and did much trial-and-error, because I didn't start from scratch but wanted to keep my OS X partition and Ubuntu partition. But it is possible to get it working. If you have backups of all your data and all installation media ready (and a fast internet connection for the updates), I recommend wiping out the entire MacBook and starting from scratch by restoring Mac OS X and then following the triple-boot guide described above. And don't forget: The Windows XP partition has to be the last one in the MBR. And the partition has to be re-formatted by the windows installer to boot after the first restart. This can be accomplished by zero-ing out (using dd) the first one hundred megabytes of the Windows partition before starting the XP install.

After all, it's worth the hassle. All three mainstream operating systems on one machine is really helpful. And you won't ever go "ah, a great application, but not for me - I don't have {Windows|Mac OS X|Linux}". Yep - the best of three worlds.

Tuesday, December 18, 2007

MacBook Ubuntu: Keypad enter opens Terminal

Here's just a short note I want to put somewhere in case I really decide to re-install Ubuntu on my MacBook and want the nice "open terminal" functionality of the keypad enter button (the button on the right side of the right apple key): Add the following line to ~/.Xmodmap:

keycode 108 = ISO_Level3_Shift

After that, you can configure the key in System, Preferences, Keyboard Shortcuts. After logging in again (and letting Ubuntu load the Xmodmap file for you), the next terminal is just one keystroke away! Improves my productivity a lot :) The rest of setting up Ubuntu on a MacBook (including nice tweaks such as OS X-like font rendering and the correct color profile) can be found at the MacBook Ubuntu Community page.

Monday, November 19, 2007

Disabling startup sound/chime on the MacBook

Today at university, a fellow student asked me about how I disabled the startup chime/sound that the MacBook makes when it is powered on from cold state. I remembered I applied some setting after a suggestion on the mactel-linux-users mailing list, but I didn't remember exactly how I did it. Just in case, I need to repeat this procedure, and to tell him what worked for me, I started looking for the corresponding post. Here it is: how to silence apple startup chime.

Good thing that OS X is based on BSD, and therefore very unix-y, we can simply edit the local shutdown script (/etc/rc.shutdown.local) and append the following line:
/usr/sbin/nvram SystemAudioVolume=%80
This will set the volume in nvram to zero and effectively disable the startup chime, so you won't be annoyed by the startup chime when you forgot to mute the OS X audio volume before shutdown. The good thing with this method is that you don't need to install nasty third-party software, and that it still preserves the volume settings inside Mac OS X and (of course) in Linux, thanks to alsactl's restore functionality.

Sunday, October 28, 2007

MacBook Linux Live CDs

Last week, Ubuntu 7.10 came out, and so I thought I might give it a try on my August 2006 MacBook (non-Pro). Today, I tried out the Fedora 8 Test 3 Live CD - the same thing Ubuntu provides with its "Live Desktop" CD (boot system from CD, try it out, if you like it, you can install it to your hard disk).

Guess what? Ubuntu 7.10 crashed with a distorted screen, while Fedora 8 booted happily with a very nice boot splash that even had mouse support. It also seems like Fedora 8 is more advanced, technology-wise with its PulseAudio (very cool) and NetworkManager 0.7, although I think the version of NetworkManager in Fedora 8 Test 3 isn't the NM version that will be put in F8.

Anyway, testing these "new" releases of the flashy, user-friendly Linux distros showed me some really neat things (PulseAudio is what I want to have installed soon :), but I'm perfectly fine with my Debian testing/unstable system, which is cool, dpkg-based, fresh and already set up to my taste :) I also like the way Debian keeps most things "vanilla" and doesn't try to brand the whole Desktop with logos of the distro, and a special GTK+ and icon theme, opposed to the fully-branded Fedora and Ubuntu distros, although I'd like to see the new Fedora GTK, Metacity and GDM themes available as a package in Debian, because the look is quite nice.

Saturday, October 6, 2007

Fixing Macbook problems

Today, I've set out to fix some problems and annoyances that I had with my MacBook (August 2006) for several months:
  • Suspend-to-RAM not working
  • CD-ROM drive works unreliably (hda: drive appears confused)
  • Newer kernels don't boot ("NMI appears to be stuck (0->0)!")
  • Random lock-ups when VT switching from Xorg to text console
Kernel command-line parameters
I figured some of these problems were related to having obsolete/old kernel command line parameters that were needed for older 2.6 kernels to get things working, but are not needed for recent kernels. I'm currently using Debian's stock 2.6.22-2-686 kernel. The "append=" line in my /etc/lilo.conf for the kernel was "noapic acpi=force irqpoll resume=/dev/sda4". Removing the "noapic" option fixed the "NMI appears to be stuck" problem. Additionally, removing the "irqpoll" option fixed the CD-ROM drive problem ("drive appears confused"). Now, I can boot newer (2.6.22) kernels and have a working CD-ROM drive again (previously, the CD-ROM drive spontaneously "detected" an inserted Audio CD when there really was no CD inserted).

Compiz Fusion/Beryl and the intel driver bug
I've been running Compiz Fusion (and previously Beryl) and it worked great, except that when VT switching to the text console, the whole Macbook locked up sometimes. This bug is described in bug #127101 on Launchpad.net. So, I have now disabled the whole Compiz Fusion stuff and things seem to be working fine now, I have not yet had a random lock-up and garbled screen since. Sure, Metacity is not as nice as Compiz Fusion, and some Compiz features are really useful (Scale plug-in and Expo plug-in among some others), but it's better to have reliable shutdown than some Desktop bling-bling. With this text VT switch bug fixed, I've tried Suspend-to-RAM, which also seems to work okay-ish now. That would make Linux (Debian) awesome on that Apple MacBook :)