You are not logged in.

#1 2011-05-18 00:27:43

brittanderson
Member
Registered: 2010-09-16
Posts: 34

[SOLVED] macbook air 3.2 and grub problem

I would like to dual boot osX and arch on a macbook air. I have tried to follow the advice on https://bbs.archlinux.org/viewtopic.php?id=117088, but it just doesn't seem to be clear to me and my random variations have not had any success.

I had a fresh OS X install. I used disc util to shrink the mac disk and carve off a new partion.
I used gparted from a rescue disk to format the new partition as ext4. Originally I left the boot flag off (later I tried with boot flag on, no practical difference)
Refit was installed and I rebooted twice to see the refit icon for getting into the OS X side.
I boot into the archboot disc and just mounted / to /dev/sda3 (the new partition) and skipped a swap partition.
Followed the defaults for all packages.

What is not clear to me from the above discussion, and which my experiments have failed to clarify is:
Which version of grub should I be installing? Presumably the 64 bit version  with efi in the name?
Do I install from the installation screen or does it have to be manual? And which version should I be installing. The commands for manually mount directories and chrooting. These happen after I quit the installation and am dropped to a bash prompt?
Which partition should grub2 be installed into? And should it be grub2 as opposed to legacy or bios?

Basically I have never been able to get anything to boot involving the linux side. I have never gotten grub to start. If I turn the boot flag on my partition where Arch has been installed, I can see an icon in refit with four gray diamonds, but clicking on it just tells me operating system is missing.

Thank you,

--Britt Anderson

Last edited by brittanderson (2012-05-15 14:24:32)

Offline

#2 2011-05-18 07:22:21

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

Also see this thread: https://bbs.archlinux.org/viewtopic.php?id=111698

You do need the boot-flag, and manually install grub from the command line to the partition that contains your /boot. When that is done you need to update refit from it's settings menu.

You don't need to create a Windows partition first as suggested in the above thread, just follow the partition table in the second post for reference.

I used grub2 but don't use EFI boot myself, so it basically works as legacy.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2011-05-19 10:19:45

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

I am afraid no success.
1. When following the above suggestions, I get to the chroot lines and it fails with the error that /bin/bash/ command cannot be found. I do not understand the source of this error.
2. I am trying to install 64 bit system, and use ext4, are those problems?
3. I am using archboot archboot 2011.05-2 is this important?
4. Should I be using grub-install or grub2_efi-x86_64-install?
Thank you.

--update, the chroot problem was because
a) I had installed the x64 version, but occassionally let the archboot disk launch the 386 version and
b) I was exiting the installer before mounting /dev/sda3. If I use the prepare hard drive option to mount / /dev/sda3 in /tmp/install then I can do:
mount -t proc none /tmp/install/proc
mount - bind /dev /tmp/install/dev
chroot /tmp/install

However, the question is now, what command? There is no grub-install so I tried,
grub_efi_x86_64-install --boot-directory=/boot/efi/efi --bootloader-id=grub --no-floppy --recheck

but still no success to be able to boot or even see a grub menu
Also, despite all these changes, refit still says everything is in sync and updates nothing.

Any more advice would be appreciated--Britt

Last edited by brittanderson (2011-05-19 11:16:39)

Offline

#4 2011-05-20 20:37:22

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

For those who are contemplating a macbook air, but like myself, are really only a casual Arch user, I will report that I have given up. I have never been able to even get to a grub menu (although I did manage to trick refit into thinking that there are lots of different OS's and so now I have a very colorful first screen - lots of colored blocks), despite several hours of reading and rebooting. If your version of the  arch way is to follow the excellent suggestions and write ups of the power users, I will suggest that it may be a bit early and optimisitic to expect the same understanding and documentation for the macbook air, but I have no doubt the situation will change in a few months, and then I will try again. In the meantime there are other Linux versions that can tide you over.

Offline

#5 2011-05-20 21:20:11

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

I think you were pretty close though.. wink

From the Archboot drive, exit the installer, then mount your Arch root partition somewhere. Chroot into the directory where you mounted it, then issue the grub install command (probably the regular one, not the efi). After that you only need to update your refit partiton map.


ᶘ ᵒᴥᵒᶅ

Offline

#6 2011-06-23 23:44:13

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Trying again:
after following the installation instructions I exit before install boot loader and try

mount -t proc none /tmp/install/proc
mount -o bind /dev /tmp/install/dev
chroot /tmp/install
grub-install /dev/sda3 --no-floppy

I receive the following error message:

/dev/sda3: Not found or not a block device

Help?

--Britt

Offline

#7 2011-07-12 17:26:24

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Because of your encouraging comment, leitmotiv, I have tried again. All with no success. Here is what I try:
fresh install of the arch 64 from the cd, then I exit before the grub installer. I use the mount commands as listed above and chroot to /tmp/install
so far so good, I can see the grub-install command, but when trying to use /dev/sda3 in tells there is no correspoding BIOS device.

I am pretty good at following instructions, and I can't see where I have deviated from the guidance above.

I also don't understand why Ubuntu works out of the box, but I can't get arch to boot after hours and hours and trying every possible related thread?

Is there some way to use the ubuntu grub installation to call arch?

Any ideas from anyone would really be nice. I would also like to know if there is anyone who has successfully gotten this to work on a mac book air purchased after May 1, 2011, as encouragement.

Last edited by brittanderson (2011-07-12 17:26:52)

Offline

#8 2011-07-12 17:39:50

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

It could be that only the device number is different for you. Before issuing the grub-install command, do:

$ fdisk -l /dev/sda 

and see which partition number actually carries /boot.

Good luck, again. smile

P.s., i am one of the people who succesfully installed Arch on a MBA3,2


ᶘ ᵒᴥᵒᶅ

Offline

#9 2011-07-12 20:16:23

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

fdisk does not show the partition (nor does the partition inspector in OS X) as bootable, though gparted does show a boot flag. What else can I try to get the partition recognized as bootable?

Offline

#10 2011-07-12 21:53:34

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

brittanderson wrote:

fdisk does not show the partition (nor does the partition inspector in OS X) as bootable, though gparted does show a boot flag. What else can I try to get the partition recognized as bootable?

fdisk is not well suited for working with GPT disks, so you should rely on (g)parted for this. The only goal however was for you to find out the actual partition on sda to install grub to, since sda3 didn't seem to be the right one.


ᶘ ᵒᴥᵒᶅ

Offline

#11 2011-07-14 23:34:54

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Still problems, but they are different from before. Since some of this may help others, I will summarize my actions to this point.

Reformat and reinstall MAC OSX for clean start.

Shrink mac partition (I used boot camp, and then deleted boot camp partition)

Get refit and make sure everything syncs and shows only the two partitions (I also found gpt fdisk helpful for this step, since things were out of sync from the beginning, and it was easier to delete the partition with gdisk)

Then used the latest gparted live to make the new partitions and turn on the boot flag. Now had a /dev/sda3 for / ext2 and /dev/sda4 linux swap

Resyncd with refit

When all was in sync I used the archboot may 2011 disk.

mounted my prepared partitions and used http as the source for packages for arch 64 bit

exited before installing boot loader

/dev/sda3 is still mounted on /tmp/install at this point so I mount -t proc none /tmp/install/proc
mount -o bind /dev /tmp/install/dev
chroot /tmp/install

grub-install /dev/sda3 --FAILS--

so I did a cp /usr/lib/grub/i386-pc/* /boot/grub
then grub
root (hd0,2)
setup (hd0,2)

and rebooted

Now when I picked the tux logo in refit, I could see the grub menu at least but nothing booted. I had to go into the /boot/grub/menu.lst file to edit the locations of all the files. It had root as (hd0,0) changed to hd0,2 and it also did the kernel and image files as /.. instead of /boot/..

After changing that it actually seemed like it my boot. But it failed with trouble deteriming the file type of the  root=/dev/sda3  so I replaced this with root=/dev/disk/by-uuid/<myUUID> and subsequently added rootfstype=ext2 ro nomodeset

Now, I am stuck in the boot process with the error "Unable to determine major/minor number of root device '/dev/disk/... '. You are being dropped to a recovery shell.

Now What??

Offline

#12 2011-07-15 13:37:46

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Yet another update.
After above I decided to try installing grub2, which I could do, and I could get grub1.99 to launch and display my installation,  but still I could never get a working arch installation to boot, things always hung at different stages of the boot process. Basically, I don't have the knowledge to troubleshoot this further, and I will be going back to one of the distributions that "works."

Sorry, I do like arch's flexibility, and package availability. But this has taken too much time.

--Cheers. I will continue to monitor for other peoples success.

Thank you leitmotiv for your time and advice. It's not your fault.

Offline

#13 2011-07-15 13:47:55

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

Your last reply suggests that you got a working grub2, which couldn't find the actual root device to boot from? That is usually pretty easy to fix, one of the common errors is to use a wrong partition id (grub starts from id 0, where grub2 start from id 1) in the grub config (/boot/grub/grub.cfg).


ᶘ ᵒᴥᵒᶅ

Offline

#14 2011-07-15 13:54:03

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Actually, it found the kernel, but hung when doing the initramfs step for the img.--Britt

Offline

#15 2011-07-15 14:14:32

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

brittanderson wrote:

Actually, it found the kernel, but hung when doing the initramfs step for the img.--Britt

Ah then you were really close! Did you know that you need to append "nomodeset" to the kernel line in grub, because the kernel tries to start in KMS which the Nvidia card doesn't support?


ᶘ ᵒᴥᵒᶅ

Offline

#16 2011-07-15 16:44:41

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Your constant encouragement is going to kill me.
Okay...
Install Arch, get to the spot for configuring and I escape to another shell. There I copied /etc/resolv.conf to /tmp/install/etc/resolv.conf
Then I mounted the /dev and proc and chrooted into /tmp/install
from there I ran pacman-db-upgrade
pacman -Syy
pacman -S grub2-efi-x86_64
then I mounted my efi partition (/dev/sda1) to /boot/efi/
then I did grub_efi_x86_64-install --boot-directory=/boot/efi/efi --bootloader-id=grub --no-floppy --recheck
Next, cp /usr/share/grub/{unicode.pf2,ascii.pf2} /boot/efi/efi/grub/
(By the way these come from the Grub2 wiki)
grub-mkconfig -o /boot/grub/grub.cfg

However, this doesn't put a grub.cfg on /dev/sda1 and my system will show an efi/grub option in refit, but I can't get to it.

So I used the archboot disk to get back into my system mounted all again (including /dev/sda1) where I could find it and ran grub-mkconfig again with the out put directory <mountpt>/EFI/grub/grub.cfg

I also edited /etc/defaults/grub to add "nomodeset reboot=pci" to the GRUBCMDLINE

Now, I can resync refit and try to boot the efi/grub option from the refit menu. It loads grub 2 and I see the arch and arch fall back entries from grub.cfg (which seem to be pointing where they should (hd0,gpt4))and I get the loading vmlinuz26 then loading initramfs and the cursor drops to the next line and everything freezes. I let it sit about 10 minutes to make sure that stuff wasn't running but just not updating the screen, but no.

So, now what?

Last edited by brittanderson (2011-07-15 16:45:27)

Offline

#17 2011-07-15 17:03:44

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

Ok, i suspect that may have to do with the efi setup. For the record, i didn't use efi for simplicity and installed a regular grub2 on my Arch boot partition. I have 4 partitions:

/dev/sda1               1      409639      204819+  ee  GPT
/dev/sda2          409640    88300263    43945312   af  HFS / HFS+
/dev/sda3   *    98066432   117577727     9755648   83  Linux
/dev/sda4       117577728   236978142    59700207+  83  Linux

I didn't touch sda1, /boot is on my sda3 so i installed grub there, it will place a grub.cfg in /boot/grub/grub.cfg. After reconfiguring Refit it recognized the bootloader on sda3 and i could boot without problems using the nomodeset parameter.


ᶘ ᵒᴥᵒᶅ

Offline

#18 2011-07-15 17:07:06

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

As one last desperate attempt, I just tried installing everything in the boot directory on /dev/sda4 (where the the arch linux system is). I then see a boot legacy option in the refit window, but clicking it never takes me anywhere, I just get the four diamonds in the center.

Offline

#19 2011-07-15 17:11:48

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

In your last attempt, from https://wiki.archlinux.org/index.php/Gr … Arch_Linux, did you replace all the sda entries with sda4?

I can't recall exactly, but you might need to do a partition rescan in the settings screen of refit after that first.


ᶘ ᵒᴥᵒᶅ

Offline

#20 2011-07-15 17:12:20

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Could you be clearer by what you mean by "regular" grub2. I clearly know little about bootloaders, but I could use some more specifics.

Offline

#21 2011-07-15 17:17:35

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

brittanderson wrote:

Could you be clearer by what you mean by "regular" grub2. I clearly know little about bootloaders, but I could use some more specifics.

The MBA uses a non-standard EFI system which resides in sda1 (GPT). You can either try to install grub2-efi there to setup a 'native' boot solution (you would basically replace the Mac bootloader doing this), or you can completely work around that and install grub2 to the linux partition where your /boot resides. Doing this you keep the original bootloader (with refit) and chainload grub from there. For this last scenario, you can follow the instructions in the "From a running Arch Linux - BIOS systems" section, only replacing the MBR (sda) with the partition number of your /boot (in your case that would be sda4 i assume).

Hope that clarifies things a little..


ᶘ ᵒᴥᵒᶅ

Offline

#22 2011-07-15 17:37:12

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

Your clarification helps. I did change the sda to sda4. Still no go. I don't know what to say. I do sincerely appreciate the help and guidance, but I am afraid I have used up both my free time and my patience, so don't invest anymore of your time, leitmotiv, on this thread.

Thanks again,
Britt
P.S. And please no final words urging me to try again:)

Offline

#23 2011-07-15 18:12:30

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: [SOLVED] macbook air 3.2 and grub problem

@brittanderson: https://help.ubuntu.com/community/UEFIBooting is page for you. I know grub2 bios and uefi booting in non-Mac systems. I don't know how Mac specific EFI (Mac has EFI 1.x, not UEFI 2.x) booting. That page has lot of troubleshooting tips. If none of them work try :-

1. 'noefi' kernel parameter (especially for kernel<3.0 series) , OR
2. Try https://aur.archlinux.org/packages.php?ID=39965 package. The 3.0 series (currently in upstream mainline branch) has important UEFI related patches that solve many problems in both Mac and non-Mac systems.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#24 2011-07-15 18:50:17

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [SOLVED] macbook air 3.2 and grub problem

skodabenz wrote:

@brittanderson: https://help.ubuntu.com/community/UEFIBooting is page for you. I know grub2 bios and uefi booting in non-Mac systems. I don't know how Mac specific EFI (Mac has EFI 1.x, not UEFI 2.x) booting. That page has lot of troubleshooting tips. If none of them work try :-

1. 'noefi' kernel parameter (especially for kernel<3.0 series) , OR
2. Try https://aur.archlinux.org/packages.php?ID=39965 package. The 3.0 series (currently in upstream mainline branch) has important UEFI related patches that solve many problems in both Mac and non-Mac systems.

That looks like a lot of work / trouble, for a first time installation chainloading is probably a bit easier...


ᶘ ᵒᴥᵒᶅ

Offline

#25 2011-07-26 16:48:27

brittanderson
Member
Registered: 2010-09-16
Posts: 34

Re: [SOLVED] macbook air 3.2 and grub problem

As a brief follow-up. I once again easily installed ubuntu 10.04 using their installation disk.  I don't have the skill to look into how ubuntu installs the boot loader, but if someone told me what to look for in my current set up I would be happy to do so; if that would help us diagnose why my earlier efforts failed, and then maybe we could piece together a more reliable procedure for Arch.

Offline

Board footer

Powered by FluxBB