View Full Version : [ubuntu] 10.04 on Macbook Air -- Grub and Xorg problems

June 28th, 2010, 05:28 PM
Hi all,

I'm having nightmares trying to get a dual boot OSX-Ubuntu 10.04 working. I've tried to follow the guides out there, but they are numerous and sometime they seem to contradict themselves. Well I'm having a hard time :-)

So basically, I've OSX working, I've installed refit and already I'm not so happy about the way it works: If I plug the superdrive with the ubuntu CD, sometime it's present at startup as a refit option and sometimes it's not (most of the time it's not).

Keeping C pressed at startup to boot on the cd was not successful: it got me to the terminal prompt of the ubuntu cd and I could neither 'install' nor 'try', whatever option I tried to add (noapic, acpi=noriq, pnpacpi=off).

I finally used the other option: keep Option pressed at startup and select the cd to boot on (I'm not sure what's the difference between that and refit, but this seems to work everytime). I used gparted to resize the extra partition I had made with diskutil in OSX and added a 2.5 Goswap. I then installed ubuntu with grub on /dev/sda4 (/dev/sda3 is my swap). I could reboot and run ubuntu. I thought I was successful and was soon to be punished for my hubris :-)

1/ The Grub problem

When I reboot, if I select linux in refit, I successfully get grub to start. However I can't go any further: whatever kernel I choose ( or .22) results in hang up. I tried the aforementioned boot options without success. For some reason the grub commands are quite fancy, e.g.:

menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,4)'
search --no-floppy --fs-uuid --set 0342eb67-f589-4780-9c25-3d56d136cdf7
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-2.6.32-21-generic root=UUID=0342eb67-f589-4780-9c25-3d56d136cdf7 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-21-generic

I'm not sure what all this is for. I tried to reduce it to the set root plus linux plus initrd line without more success.

Now the weird thing is that if I boot while keeping option pressed, I also manage to get grub started, but this time it "sometimes" boot !!! I'm for instance writing this message with ubuntu up and running. It took me quite some time to understand grub1 in the past and it could be I simply mess around with grub2, but I'm quite lost... In particular, some people say they have installed grub in /dev/sda while some other have it installed in /dev/sda4.

2/ The X settings.

I tried to install nvidia drivers using jockey and the install seems ok, but gdm can't restart and here is the end of my /var/log/Xorg..log

NVIDIA: Failed to load the NVIDIA kernel module. Please check your
(EE) NVIDIA: system's kernel log for additional error messages.
(II) UnloadModule: "nvidia"
(II) Unloading /usr/lib/xorg/extra-modules/nvidia_drv.so
(EE) Failed to load module "nvidia" (module-specific error, 0)
(EE) No drivers available.

Fatal server error:
no screens found

and the end of my /var/log/kernel is

Jun 28 16:10:12 julien-MBA kernel: [ 3357.872351] NVRM: The NVIDIA probe routine was not called for 1 device(s).
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872356] NVRM: This can occur when a driver such as rivafb, nvidiafb or
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872357] NVRM: rivatv was loaded and obtained ownership of the NVIDIA
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872358] NVRM: device(s).
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872361] NVRM: Try unloading the rivafb, nvidiafb or rivatv kernel module
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872363] NVRM: (and/or reconfigure your kernel without rivafb/nvidiafb
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872364] NVRM: support), then try loading the NVIDIA kernel module again.
Jun 28 16:10:12 julien-MBA kernel: [ 3357.872367] NVRM: No NVIDIA graphics adapter probed!

however lsmod | grep riva returns nothing while lsmod|grep nvidia returns
mbp_nvidia_bl 2335 0

Apart from that, almost everything works fine.... :o) Any help would be really appreciated !



June 28th, 2010, 11:47 PM

no answer so far ? Too bad :-)

Anyway I've partially solved the X problem following https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia and more precisely using this command:

sudo update-alternatives --config gl_conf
I realized I had several versions of the nvidia drivers installed and choosing nvidia-current did the trick. No big deal but I'm not used to the automatized aspects of ubuntu (coming from debian) and I suppose Jockey did lots of stuff I had not noticed...

Regarding the grub problem, I've found a reproducible way to boot:

boot a first time. Try whatever using refit (os/X or linux)
reboot (normally in OS-X, by keeping power button pressed several seconds when linux hangs)
keep the option button pressed before refit starts and choose the linux disk (called windows...).
Grubs starts and you can start linux normally

This second trial always work... I suppose this is what some people where referring to in http://bloggis.se/atte/99928 when they said they needed to boot OS-X first before booting linux, but their tricks (boot options acpi=noirq and pnpacpi=off) does not help here (or I'm applying them the wrong way...).

Anyway, if anyone has a clue about the grub problem, I'm interested !