You are not logged in.

#1 2012-10-04 19:49:08

crowther
Member
Registered: 2012-10-04
Posts: 8

Mac Pro 2007 and the Bootloader issues with EFI

So, I've been working to get Arch on an old mac pro that I'm currently using for work.  This is the oldest of the old Mac Pros ever made, and uses 32-bit EFI and has 32GB of ram.  This means that I need to use a 64-bit OS, but am having immense difficulty getting it to boot.

I am installing to /dev/sdb, and /dev/sda contains the EFI partition and Mac OSX.

I'm currently using rEFInd liveCD to find and boot the .efi files.  I can select and boot into grub2 (which is stored completely on the EFI partition on /dev/sda), and have been able configure it so that it can find the vmlinuz-linux and initrd successfully (both stored on /dev/sdb2), but whenever I try to boot it, I get the following message:

"No suitable video mode found.
Booting in blind mode"

At which time no keyboard input is accepted, and I have to reboot and try again.  I know that the system uses UGA, and I tried adding that to grub.conf, but no results. Even with grub-mkconfig, I cannot get it to boot without receiving that error message. 

How can I get my system to boot correctly?  I've been working on this for about a week, so all help is appreciated.

Here was my process.
Steps:

1. Tried to install from new arch linux media.  The media would not boot, no matter what I tried. Changed to 64-bit Archbang live-cd. Booted fine. 
2. Created a GPT disk with a protective MBR on /dev/sdb (/dev/sda contains the EFI fat32 partition and the macintosh OS).
3. Installed Archbang onto GPT disk on /dev/sdb3, as /root /dev/sdb4 as /home, /dev/sdb2 as /boot and /dev/sda1 as /boot/efi
4. Chrooted from the LiveCD into the disk, updated pacman, installed grub-efi-i386, built the sysimage and kernel (stored in /boot on /dev/sdb2), and grub mkconfig storing all of it to the EFI partition at /boot/efi/EFI/grub


Gdisk prints the following for /dev/sdb

Disk /dev/sdb: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 43A3E85A-F473-468C-B361-6B3383AA65C5
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4077 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096          413695   200.0 MiB   AF00  Apple HFS/HFS+           
   2          413696          618495   100.0 MiB   8300  Linux filesystem         /boot
   3          618496       164458495   78.1 GiB    8300  Linux filesystem       /
   4       164458496       976773119   387.3 GiB   8300  Linux filesystem   /home

Offline

#2 2012-10-05 01:48:10

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: Mac Pro 2007 and the Bootloader issues with EFI

Hi,

Did you try PRAM reset? If you have try to install ubuntu or whatever it overrides Arch's efi entry I guess.

3. Installed Archbang onto GPT disk on /dev/sdb3, as /root /dev/sdb4 as /home, /dev/sdb2 as /boot and /dev/sda1 as /boot/efi

You should not try install with arch bang like me...


Sincerely,

tongue

Offline

#3 2012-10-05 03:34:01

crowther
Member
Registered: 2012-10-04
Posts: 8

Re: Mac Pro 2007 and the Bootloader issues with EFI

windingload wrote:

Hi,

Did you try PRAM reset? If you have try to install ubuntu or whatever it overrides Arch's efi entry I guess.

3. Installed Archbang onto GPT disk on /dev/sdb3, as /root /dev/sdb4 as /home, /dev/sdb2 as /boot and /dev/sda1 as /boot/efi

You should not try install with arch bang like me...

No, I have not tried this yet.  I can still boot the machine to the Mac install on the first drive.  The issue is finding a bootloader setup that works for my situation.  I have everything installed properly, with the exception of a way to properly load the kernel.  As I mentioned, the archbang livecd and the Ubuntu 10.04 LTS 64-bit livecd both boot correctly, so I have no reason to believe that getting this to work is impossible.

I've never worked with Macs before, so I'm only barely familiar with their differences from what I consider to be conventional PCs.  What exactly does resetting the PRAM do in this case?  Also, why do you suggest ubuntu over something else?

Offline

#4 2012-10-05 03:37:37

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Mac Pro 2007 and the Bootloader issues with EFI

You say that you need to use a 64-bit OS, don't you mean 32-bit.  A 32-bit EFI is incapable of booting a 64-bit OS.  I should know, I have a late 2006 MacBook and spent quite a bit of time banging my head against the wall over this.  If you want to use a 64-bit OS, you have to use bios emulation.  This is in fact why those other distros you mention above boot correctly.  Many Mac users tend to (incorrectly) call this mode bootcamp.


Edit:  Funny story, when I initially learned about the EFI in my Mac and how to make it work for Linux, I did the whole 32-bit system and everything.  At the time I was using Ubuntu, so with the 6 month release cycle, by the time a new version came out, I said "Why the hell am I using a 32-bit OS?"  So I installed the 64-bit version, went to install grub-efi, and had to go through the same process again of learning why it was not working.  Sometimes I wonder about myself...

Last edited by WonderWoofy (2012-10-05 03:40:48)

Offline

#5 2012-10-05 04:16:05

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

I believe WonderWoofy is correct: you cannot boot a 64 bit OS with 32 bit EFI firmware. I think your only option is to boot arch in BIOS mode.

In regards to the step 1 you described in your post, you mentioned difficulty booting "arch linux media". What did you mean by "arch linux media"? Is this a CD you burned containing the latest Arch Linux ISO? If so, did you verify the checksum of the iso image you downloaded, and that it burned correctly to CD?


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#6 2012-10-05 04:21:36

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Mac Pro 2007 and the Bootloader issues with EFI

I think with the new install discs and macs, you have to remove the UEFI.  Especially in your case where you need a 32-bit uefi, as this is not an option on the installer.  I tried booting an installer on my macbook, and it would not go.  These forums were filled with these threads a couple months ago, and the.redikulus.rat pointed everyone to a page in our wiki to remove the UEFI.  Personally I did not try I because my mac is not my main machine anymore, but it is reported to work.

You know you can install Arch from any live cd or other distro now that it is a chroot install method.  You could before, if you didn't use the AIF, but now there is no choice.  I think it would be especially easy with the archbang live cd, as I think that they use the same repositories.  So you should be able to install the arch-install-scripts package.  If not, you could always simply fire up links and download the package and manually install it.  Then you should be able to proceed like normal.

Offline

#7 2012-10-05 13:36:38

crowther
Member
Registered: 2012-10-04
Posts: 8

Re: Mac Pro 2007 and the Bootloader issues with EFI

bsilbaugh wrote:

In regards to the step 1 you described in your post, you mentioned difficulty booting "arch linux media". What did you mean by "arch linux media"? Is this a CD you burned containing the latest Arch Linux ISO? If so, did you verify the checksum of the iso image you downloaded, and that it burned correctly to CD?

Yes. I verified that the 2012.09.07 official Arch Linux installation iso burned correctly and that the checksum was correct.  What happened was that the disc would attempt to load after selecting it in the Mac bootloader, and then I would get a black screen with the following
" 1.
  2.
Please select an option:
"
At this point the keyboard was unresponsive, and not recognized by the USB bus (I use a backlit keyboard, and it was not lit).  So I changed strategies.

WonderWoofy wrote:

You say that you need to use a 64-bit OS, don't you mean 32-bit.

No, I mean that I have to be able to use 32 Gigabytes of RAM with any application I am using, which cannot be done with a 32-bit OS.  This system is used for Memory intensive 3D images and volumes.

WonderWoofy wrote:

A 32-bit EFI is incapable of booting a 64-bit OS.  I should know, I have a late 2006 MacBook and spent quite a bit of time banging my head against the wall over this.  If you want to use a 64-bit OS, you have to use bios emulation.  This is in fact why those other distros you mention above boot correctly.  Many Mac users tend to (incorrectly) call this mode bootcamp.

Can you provide a link with a procedure or more information about booting in BIOS mode?  I think all the places I looked I ignored this because I wasn't sure what the difference was.

WonderWoofy wrote:

I think with the new install discs and macs, you have to remove the UEFI.  Especially in your case where you need a 32-bit uefi, as this is not an option on the installer.  I tried booting an installer on my macbook, and it would not go.  These forums were filled with these threads a couple months ago, and the.redikulus.rat pointed everyone to a page in our wiki to remove the UEFI.  Personally I did not try I because my mac is not my main machine anymore, but it is reported to work.
You know you can install Arch from any live cd or other distro now that it is a chroot install method.  You could before, if you didn't use the AIF, but now there is no choice.  I think it would be especially easy with the archbang live cd, as I think that they use the same repositories.  So you should be able to install the arch-install-scripts package.  If not, you could always simply fire up links and download the package and manually install it.  Then you should be able to proceed like normal.

I am unclear what you mean with removing the UEFI.  Do you mean removing it from the kernel or the bootloader?  Please, point me to this page used by the.redikulus.rat.  As for the second half, I have already installed via chroot, and the difficulty is getting it to boot from anywhere.

Offline

#8 2012-10-05 14:48:42

crowther
Member
Registered: 2012-10-04
Posts: 8

Re: Mac Pro 2007 and the Bootloader issues with EFI

Upon searching, I found the.redikulus.rat's favorite method for booting Arch's install CD, but opted not to use it because it didn't really make a difference for me.  Is there a way to boot an installed Arch in bios mode?

Offline

#9 2012-10-05 17:20:14

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Mac Pro 2007 and the Bootloader issues with EFI

@crowther: If you have already setup grub-efi-i386 in your system and are able to load it from refindia32.efi then try booting the kernel with "noefi" parameter, and/or try with grub's fakebios option. But I would suggest going with bootcamp or bios compatibility mode rather than booting kernel directly via efi as 32-bit efi + 64-bit kernel and vice-versa combination is tricky to work. Even with noefi you may have problem with memory-map issues and the kernel may not reliably determine the memory regions used by firmware (due to ARCH mismatch) and may overwrite parts of firmware and might result in kernel panic.

Although I am the person who wrote https://wiki.archlinux.org/index.php/Un … t_from_ISO , I have never used a Mac (and thus no real 32-bit (U)EFI firmware) to test it. I do know how UEFI booting works. That article as the name implies removes UEFI support from the ISO, forcing the firmware to fallback to BIOS boot (if that is the default behaviour of the firmware). It does not contain instructions on how to create 32-bit (U)EFI bootable iso, although the steps would be similar to 64-bit UEFI iso.

In any case, you are trying a boot with ARCH mixup and that may not work and may not be supported. Even kernel devs recommend not to try EFI booting 32-bit kernel in 32-bit EFI Macs as those Macs have other compatibility issues with the kernels which do not seem to occur in BIOS aka bootcamp booting (again not tested by me).

Offline

#10 2012-10-05 17:45:15

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

the.ridikulus.rat wrote:

Although I am the person who wrote https://wiki.archlinux.org/index.php/Un … t_from_ISO , I have never used a Mac (and thus no real 32-bit (U)EFI firmware) to test it.

(Cringe...)

Perhaps you should mention this tidbit in the wiki article you wrote. It isn't that your effort isn't appreciated, but I think most people who read the Arch Wiki assume that it contains validated information. A simple little text box saying "This has not yet been tested" would suffice.

Otherwise, thank you for your contribution.

Last edited by bsilbaugh (2012-10-05 17:45:28)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#11 2012-10-05 17:52:13

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Mac Pro 2007 and the Bootloader issues with EFI

bsilbaugh wrote:
the.ridikulus.rat wrote:

Although I am the person who wrote https://wiki.archlinux.org/index.php/Un … t_from_ISO , I have never used a Mac (and thus no real 32-bit (U)EFI firmware) to test it.

(Cringe...)

Perhaps you should mention this tidbit in the wiki article you wrote. It isn't that your effort isn't appreciated, but I think most people who read the Arch Wiki assume that it contains validated information. A simple little text box saying "This has not yet been tested" would suffice.

Otherwise, thank you for your contribution.

It completely removes UEFI boot support from the iso and is not Mac specific. However if the Mac still fails to boot the iso in BIOS mode, then something is wrong with the firmware that has nothing to do with UEFI booting. That part of the article is equally valid for non-Mac UEFI systems (and actually written mainly for such systems). Macs are psychotic combo of EFI 1.x and UEFI 2.x and some apple specific crap (even the latest ones) that do not follow (U)EFI Spec (any version) and do not work with standard (Spec. compliant) UEFI tools (efibootmgr etc.).

Last edited by the.ridikulus.rat (2012-10-05 17:53:58)

Offline

#12 2012-10-05 18:15:30

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

@Crowther (the OP)

Correct me if I'm wrong, but it sounds like your objective is to contain OS X on one disk (sda), and Arch on a separate disk (sdb). Is this correct?

If so, would it be possible to setup sdb with a conventional MBR and disk partitioning scheme (no ESP), and install Arch and GRUB (BIOS version) to that disk. Then use the Apple Startup Manager to select which volume to boot when you start up your machine? By default, it should continue to automatically boot OS X (sda) on subsequent reboots if you do nothing. However, if you wanted to set your arch disk as the default boot volume, you could do this through the settings panel in OS X; to switch back to OS X at a later time, you would simply need to restart/reboot your machine, enter the Startup Manager, and select the volume containing OS X.

This is not the most elegant solution. But, it might be easier to get working, as the firmware should automatically fall back to BIOS mode when booting from a disk with an MBR and no ESP.

EDIT: My claim that your firmware should fall back to BIOS mode in the absence of an ESP is based on my experience with a MacBook 5,1 (late 2008 model). Your firmware may be different.

Last edited by bsilbaugh (2012-10-05 18:27:29)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#13 2012-10-05 18:21:31

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

the.ridikulus.rat wrote:

Macs are psychotic combo of EFI 1.x and UEFI 2.x and some apple specific crap (even the latest ones) that do not follow (U)EFI Spec (any version) and do not work with standard (Spec. compliant) UEFI tools (efibootmgr etc.).

Agreed. This is why it is important to test your ideas before passing it off as factual information.


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#14 2012-10-05 18:37:50

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

@Crowther

Out of curiosity, have you installed all the latest firmware updates available for your machine?


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#15 2012-10-05 20:22:38

crowther
Member
Registered: 2012-10-04
Posts: 8

Re: Mac Pro 2007 and the Bootloader issues with EFI

@bsilbaugh
I just tried installing it that way (using full MBR on sdb and also a BIOS mode partition) using the.ridikulus.rat's ISO image.  The image booted fine, and the system appears to have installed fine.  The Apple Bootloader no longer recognizes sdb as a valid boot disk, so I can't boot from there, even using rEFInd.  I tried to use the regular MBR method, and

I could find the last grub that I installed to /dev/sda1, which is the EFI partition, but could not use it.  The perk, though, is that using the grub command line I was able to at least get into the kernel space, but not mount the right files, maybe I just don't know how to use grub2 console.

I am currently working on installing rEFInd, and hopefully, this will give me something to work off of.

I will let you know how it goes.

Offline

#16 2012-10-05 20:40:52

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

Just to be clear, you tried installing GRUB to the MBR of sdb (i.e. /dev/sdb) and not one of the partitions (e.g. /dev/sdb1)?

Last edited by bsilbaugh (2012-10-05 20:42:13)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#17 2012-10-05 22:33:59

mojojojo
Member
From: Los Angeles, CA
Registered: 2012-10-05
Posts: 7
Website

Re: Mac Pro 2007 and the Bootloader issues with EFI

From having issues installing Arch on my Macbook Pro 4,1 (2008), I found that most of the difficulty came from trying to use grub-efi.  What I would suggest is using rEFIt and grub-bios.  Also, I believe it is important to change the partitions' type code from 8300 to 0700.  Doing so will not destroy any data, but will allow you to sync your GPT and MBR tables so that rEFIt can locate Grub.  After changing those codes (using gdisk or cgdisk), you can sync the GPT and MBR tables either using rEFIt at boot or using gptsync from the AUR.  Then you would simply use grub-bios and install grub to the partition your Linux is installed on (i.e., /dev/sdb2 not /dev/sdb) with "grub-install --force --recheck" and "grub-mkconfig -o /boot/grub/grub.cfg".  I am assuming installing grub to your choice of your /boot if / partition is fine, but I didn't make separate partitions for those myself.  It is possible you will need to add "nomodeset" to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and rerun "grub-mkconfig -o /boot/grub/grub.cfg".  Like I said, I don't recommend using rEFInd and grub-efi from my experience.

Offline

#18 2012-10-06 00:02:21

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

mojojojo wrote:

From having issues installing Arch on my Macbook Pro 4,1 (2008), I found that most of the difficulty came from trying to use grub-efi.

GRUB EFI support is known to be buggy. The recommended EFI boot loader is (perhaps suprisingly) the kernel stub loader (cite). (It seems to work well for my 2008 MacBook.) In any case, the OP's system has 32-bit EFI firmware, so he/she has no choice but to try to use the BIOS boot mode supported by his/her firmware.

mojojojo wrote:

What I would suggest is using rEFIt and grub-bios.

rEFIt is a dead project. I think the last update was back in 2010. This doesn't mean that it's unusable. It just means that any outstanding bugs will not likely get fixed, and it may cease to work as the linux kernel continues to evolve. I believe rEFInd (a fork of rEFIt) is now the preferred boot manager for EFI/UEFI systems.

mojojojo wrote:

Then you would simply use grub-bios and install grub to the partition your Linux is installed on (i.e., /dev/sdb2 not /dev/sdb) ...

The OP is dual booting off two separate disks--not separate partitions of the same disk. If the OP wants to try to boot the second disk (sdb) with the minimal amount of tricks (e.g. refind/refit, etc), it seems to me that his/her best shot would be to use an MBR partitioning scheme on sdb, and install grub (bios) to the MBR, as one normally would for a single boot BIOS system. Then the OP can use the Apple Startup Manager to select which drive to boot. The hope being that the firmware would fall back to BIOS mode when it detected a bootable disk with an MBR. That was the hypothesis, anyway. There may be reasons why this is not as straightforward as I expect it would be.

Last edited by bsilbaugh (2012-10-06 00:04:24)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#19 2012-10-06 00:04:38

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Mac Pro 2007 and the Bootloader issues with EFI

bsilbaugh wrote:
the.ridikulus.rat wrote:

Macs are psychotic combo of EFI 1.x and UEFI 2.x and some apple specific crap (even the latest ones) that do not follow (U)EFI Spec (any version) and do not work with standard (Spec. compliant) UEFI tools (efibootmgr etc.).

Agreed. This is why it is important to test your ideas before passing it off as factual information.

If you need confirmation that it works, you could read the numerous other threads that popped up whenthe new install media came out, of people who needed to boot it on mac, were directed here by the.rediculus.rat, and then marking their threads as solved.


Edit: oh, I guess if I had just kept reading  to the next post, the OP also confirmed.

Last edited by WonderWoofy (2012-10-06 00:08:04)

Offline

#20 2012-10-06 00:10:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Mac Pro 2007 and the Bootloader issues with EFI

mojojojo, you say you changed the type code from linux to exfat (8300 to 0700)?  This seems rather silly and funky to me.  I think gptsync is a terrible piece of software, and it actually doesn't suprise me that you have to do this.  But I think a much better way to create a hybrid mbr is to simply use gdisk.  There is an option to interactively choose the partitions you would like to include, and then whether or not you want to use any potentially remaining partitions for protective mbr areas.  It is super simple and much more reliable.

Offline

#21 2012-10-06 01:06:42

mojojojo
Member
From: Los Angeles, CA
Registered: 2012-10-05
Posts: 7
Website

Re: Mac Pro 2007 and the Bootloader issues with EFI

bsilbaugh wrote:

rEFIt is a dead project. I think the last update was back in 2010. This doesn't mean that it's unusable. It just means that any outstanding bugs will not likely get fixed, and it may cease to work as the linux kernel continues to evolve. I believe rEFInd (a fork of rEFIt) is now the preferred boot manager for EFI/UEFI systems.

Sorry, I just never switched to rEFInd because I have been using rEFIt since I first tried out Linux with Ubuntu a couple years ago, so I just stuck with what has worked well so far.  I suppose it is time I change to it myself.  But curious, wouldn't rEFIt/rEFInd only affect the bootloader (Grub) and not directly the Linux kernel when you suggest it ceasing to work?

--

WonderWoofy wrote:

mojojojo, you say you changed the type code from linux to exfat (8300 to 0700)?  This seems rather silly and funky to me.  I think gptsync is a terrible piece of software, and it actually doesn't suprise me that you have to do this.  But I think a much better way to create a hybrid mbr is to simply use gdisk.  There is an option to interactively choose the partitions you would like to include, and then whether or not you want to use any potentially remaining partitions for protective mbr areas.  It is super simple and much more reliable.

I was unaware of the hybrid mbr function of gdisk.  I will have to give that a try.  I am assured that my data will remain untouched and still available correct?  But yes, following some of the wiki's, I had to change the type codes to 0700 to be able to sync the tables  (because gptsync nor rEFIt would touch the tables otherwise) and allow refit to actually find grub.  I didn't see a problem with that since I was still able to maintain my ext4 fs despite the change.

Offline

#22 2012-10-06 01:49:55

bsilbaugh
Member
From: Maryland, USA
Registered: 2011-11-15
Posts: 141

Re: Mac Pro 2007 and the Bootloader issues with EFI

mojojojo wrote:

Sorry, I just never switched to rEFInd because...

No need for apologies.

mojojojo wrote:

But curious, wouldn't rEFIt/rEFInd only affect the bootloader (Grub) and not directly the Linux kernel when you suggest it ceasing to work?

I guess I was thinking of the kernel stub bootloader, EFISTUB (which is what I'm currently using). But, you're right, the boot manager directly interfaces with the boot loader, which in many cases would be something like GRUB, ELILO, etc. The broader case I was trying to make is that it's generally a good idea to avoid dead projects if there is a suitable alternative out there.

(P.S. Welcome to the Arch Forum.)

Last edited by bsilbaugh (2012-10-06 01:50:52)


- Good judgement comes from experience; experience comes from bad judgement. -- Mark Twain
- There's a remedy for everything but death. -- The wise fool, Sancho Panza
- The purpose of a system is what it does. -- Anthony Stafford Beer

Offline

#23 2012-10-06 02:30:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Mac Pro 2007 and the Bootloader issues with EFI

mojojojo wrote:

I was unaware of the hybrid mbr function of gdisk.  I will have to give that a try.  I am assured that my data will remain untouched and still available correct?

Yes, definitely.  Really what it does is looks at your current gpt layout, and then asks for a comma separated list of the partitions you would like to include in the mybrid mbr.  Then it asks if you would like a protective mbr before and after those partitions (assuming you haven't used all four).  You do have to keep in mind though that Macs only like it to have one protective mbr in the beginning and must start at block 1.  If you put one at the end it is reported to not like it and refuse to boot.

Offline

#24 2012-10-06 18:04:57

crowther
Member
Registered: 2012-10-04
Posts: 8

Re: Mac Pro 2007 and the Bootloader issues with EFI

Yesterday, I changed the second disk over to an MBR exclusive map, and installed grub to the MBR of /dev/sdb.  The system is completely unable to find the bootloader installed to /dev/sdb, even rEFInd and the super grub2 disk were unable to locate an intact bootloader on the MBR.  Super grub 2 disk found something resembling an MBR boot loader, with no menu options available, so using some grub2 command line, I was able to almost get the system to boot. Procedure as follows:

 set root=(hd1,3)
set root=(hd,1,2) #I don't know why, but changing the root from "/" to "/boot" helps later.
linux /vmlinuz-linux
initrd /initramfs.img  #Don't remember the full name of this, and its mostly irrelevant
boot

At this point, the system loads a crippled kernel, with a message something like 'Cannot mount "" to "/new_root" '
So, at first I couldn't figure how to fix this one when there was no working /dev, but the second time I tried this, the /dev appeared on the tree.
So I did the following:

mount -t ext4fs /dev/sdb3 /new_root
mount -t ext2fs /dev/sdb2 /new_root/boot 
mount -t ext4fs /dev/sdb4 /new_root/home
exit

I can't remember if I needed type codes at the time or not.

This got the kernel to start loading including some of the mesa graphics drivers, but the system hung and dropped into maintenance mode because it said that it could not get something mounted correctly. I mounted it, and typed exit, and then the system restarted (which is not what I wanted to happen). Then I had to leave to go home.

My goal is really to make a useable desktop, and I have already lost too much time to this.  A simpler method to load a system and use the GUI I want to use is to boot the system into the modified Arch disk from the.redikulus.rat's favorite link and mount all the local partitions that I need everything onto /mnt like I would to install. Then:

arch_chroot /mnt
su [i]user[/i]
startx

This is the nastiest workaround that kind of works for what I need, but I still wish I could load the system from a disk.

Most recently, I tried to install rEFInd to /dev/sda, but nothing changed, and the hooks never got set for it after multiple reboots.  I may have to install it to the ///EFI partition to get it to work, because I tried the default way (since it was an older system).  Random question, are /EFI and "ESP" the same partition?

I think that my next step will be to change the partition map to hybrid MBR using gdisk, and reinstall grub.  If that doesn't work, I'll pull out /dev/sda and see what happens with /dev/sdb as the only disk.  I'll need to reconfigure a few things when I do this, but I don't think this will be a problem.

The other question is: Currently, I was using grub2 for x86, with only the OS prober extension. Should I be using grub-efi-i386 to install grub2 to /dev/sdb, or just grub-i386?

Offline

#25 2012-10-06 18:19:30

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: Mac Pro 2007 and the Bootloader issues with EFI

@crowther: Bro, you seriously need to read the whole GRUB2, UEFI, UEFI_Bootloaders and GPT wiki pages to understand how all these work together, even if the UEFI related pages may not be fully applicable for Macs.

f you are going the EFI route, use grub-efi-i386 and use bless to make it appear in your Mac's boot menu/chooser/whatever its called. If you are going the BIOS route (bootcamp), then use grub-bios. In both cases read the whole GRUB2 wiki page.

You can perfectly use pure GPT even for BIOS booting with grub2 or syslinux. Hybrid gpt/mbr is required only for Windows booting and not required for Linux booting.

In your case I suggest not going the EFI route if you find it to difficult to setup because (i) the iso and bootloaders are more tuned to work in a proper UEFI system, (ii) 32-bit EFI Macs are too old to support linux efi booting, even recent 64-bit EFI Macs have problems booting linux in efi mode.

Offline

Board footer

Powered by FluxBB