You are not logged in.

#26 2012-10-06 18:37:25

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

crowther wrote:

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.

Grub's "set root=" command has nothing to with linux kernel "root=" command. The "set root=" tells grub which partition to find files which are called by commands after the "Set root=" command. When grub comes to "linux /vmlinuz-linux" internally grub considers it as "linux <set root= value>/vmlinuz-linux". So it should be your /boot partition, nt your "/" partition (since you seem to have both as separate partitions).

linux /vmlinuz-linux
initrd /initramfs.img  #Don't remember the full name of this, and its mostly irrelevant
boot

Your code should be something like

set root=(hd1,2)           # Should be your /boot partition in grub's naming scheme, the partition containing the kernel and initramfs files
linux /vmlinuz-linux ro root=UUID=xxxx             # Should be your "/" root partition, in kernel's or blkid or udev naming scheme, not in grub's naming scheme
initrd /initramfs-linux.img        # Correct filename is important
boot

The filename of initrd is also relevant as it contains the kernel modules required by the kernel to detect and load the rootfs. Without the required FS modules, the kernel will not be able to boot into "UUID=xxxx" partition. So not only is the filename important, but you also did not pass any "root=" parameter to the kernel, and this it fails with the "Cannot mount" error message.

Sorry to be frank, but if you did not know the above things then Arch is not for you, as these are the bare minimum any do-it-yourself distro like Arch requires its users to be proficient in.

Offline

#27 2012-10-06 18:53:19

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

I am going to have to agree with the.ridikulus.rat, why are we helping you if you are just going to disregard what we tell you and then do your own thing?  I am seriously losing interest in this thread.... as helping you seems like it may be impossible.

Offline

#28 2012-10-06 20:16:04

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:

Sorry to be frank, but if you did not know the above things then Arch is not for you, as these are the bare minimum any do-it-yourself distro like Arch requires its users to be proficient in.

Or, at least be willing to do your homework and learn them. Of course, if you have specific questions about GRUB, or there is a particular section of the wiki that isn't clear, then I'm sure someone will be willing to give you a "leg up".

I think perhaps you're in a rush to get this working, and as a result are skimming through the wiki and forums for quick answers. (I know, I've been there.) The problem is, this usually generates way more confusion that it eliminates. Calm down, get a cup of coffee (or tea), sit back, and carefully read the wiki articles the.ridikulus.rat mentioned. You already know that you cannot use EFI boot for your system (due to the mismatched 32 bit firmware and 64 bit OS), so start by getting your head wrapped around GRUB, MBR partitioning, and the BIOS boot process. (Yes, technically you can use GPT with BIOS via GRUB 2, but considering the difficulties you're having, I would keep it simple for now.) Then, move on to understanding EFI and the nuances of Apple's firmware. By this point, you should have a good working theory as to how to boot linux from your second drive.

EDIT: spelling/grammer

EDIT: Another piece of advice: avoid trying random things. Reflect on what you know, build a hypothesis, cross check with what other's have done, and systematically test it in a way that gives informative feedback.

Last edited by bsilbaugh (2012-10-06 20:32:35)


- 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

#29 2012-10-06 20:41:49

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

I'll probably get yelled at for spoon feading you, but you might also find this helpful GRUB 2 Tutorial


- 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

#30 2012-10-06 21:45:51

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

Personally I think grub2 is kind of a wreck.  I usually recommend people try syslinux, as its simplicity is much more appealing to me.  Also, there is no need for a 2mb bios boot partition.

Offline

#31 2012-10-07 21:54:09

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

To all of the people generously helping me on this: I humbly apologize if it appears that I have been wasting any of the contributors' time or ignoring them.  I have read every word posted on the topic as it was available, and I am currently learning/reading so that I can fix this when I go to work tomorrow.

I am posting my present plan of action at the end, having read all of the relevant wiki pages very carefully.

bsilbaugh wrote:

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)?

This is correct. I once I get back to work, I will confirm this, and make sure that I have done that correctly. I may have forgotten a post-MBR gap.

the.ridikulus.rat wrote:

Bro, you seriously need to read the whole GRUB2, UEFI, UEFI_Bootloaders and GPT wiki pages to understand how all these work together

I agree on this point.  Until now, I have not had time to read every piece of documentation, because I was at work doing many, many other things.  I appreciate all the help that everyone has been able to provide, and I never ask for help until I have exhausted every resource I know of, and I try not to waste people's time.  I may have misrepresented my timeline, as this was during the day that I performed my last actions, and have not been around to work on it since.

bsilbaugh wrote:

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.

I have tried this approach, and the apple boot loader (and boot selector from Mac OS X) did not recognize the disk at all.  The reason is presently a mystery to me. The rEFInd liveCD also did not locate the boot partition correctly as far as I was able to determine.

the.ridikulus.rat wrote:

Your code should be something like

set root=(hd1,2)           # Should be your /boot partition in grub's naming scheme, the partition containing the kernel and initramfs files
linux /vmlinuz-linux ro root=UUID=xxxx             # Should be your "/" root partition, in kernel's or blkid or udev naming scheme, not in grub's naming scheme
initrd /initramfs-linux.img        # Correct filename is important
boot

Thank you, this has been incredibly helpful, as well as the rest of what you have said.  This was my first experience with grub console, without any configuration files or informaiton beyond what I could find online.  I did all of this on a grub2 console, so everything I did was a learning experience on its own, reading through the grub2 manual. My memory is not perfect, so my seeming disregard for filenames is an artefact of that, since I was using tab completion to find the file names that I needed.

bsilbaugh wrote:

I think perhaps you're in a rush to get this working, and as a result are skimming through the wiki and forums for quick answers. (I know, I've been there.)

This is exactly what I've been doing, and I have lost a lot of time with this.  I have read more than 10 guides on similar use situations, but each of them has failed for various reasons.

Note: It appears that I have made a small error in making my disk layout, and need to rectify this.  per the UEFI Wiki Page. It appears that I may have forgotten to add a post MBR gap when converting to MBR, so GRUB2 was unable to properly do anything.

After reading through these guides, and collecting as much data as I had available, my plan of action is as follows.  I am open to critique or suggestion before I start.
I have two possibilities, and I will try the simpler one first.
Simple:
1. Make sure that there is a 2MB post-MBR gap. 
1b. If there is not, adjust the partitions so that there is sufficient space. (and remove the GPT BIOS partition for the moment. There’s a 200MB space with just that and some free space. This may be causing grub to install to that partition instead of the MBR)
2. Install grub-bios to the MBR of /dev/sdb.  Run all relevant configuration steps.
3. Attempt to select sdb from the Apple Bootloader.
4. Reboot and confirm that th

I think I have a bootable flag set on “/boot” partition (/dev/sdb2), and I will confirm this is the case.

Not as simple:
1. Using gdisk, convert /dev/sdb back to GPT from MBR.
2. Also using gdisk, make a small parititon /dev/sdb1 (which is presently empty) to a BIOS Boot partition, type code=‘EF02’ for cgdisk (source)
3. Make sure that I am using grub-bios, and Install grub2 to /dev/sdb1 (the new bios partition). Run appropriate configuration steps. ?Include noefi flag in the grub.cfg Arch linux boot option?
4. Attempt to boot into sdb.

Hopefully one of these works.

Offline

#32 2012-10-08 00:21:32

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

I think your first approach should work. But, I don't have a Mac Pro to verify against. So, I could be wrong. Good luck, and let us know how it turns out.


- 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

#33 2012-10-08 16:25:20

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

Alright, so I've got something working to the point where I can load with super grub2 disk.  I'll give you more when I can boot without it.

Offline

#34 2012-10-10 09:40:31

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

Re: Mac Pro 2007 and the Bootloader issues with EFI

crowther wrote:

Simple:
1. Make sure that there is a 2MB post-MBR gap. 
1b. If there is not, adjust the partitions so that there is sufficient space. (and remove the GPT BIOS partition for the moment. There’s a 200MB space with just that and some free space. This may be causing grub to install to that partition instead of the MBR)
2. Install grub-bios to the MBR of /dev/sdb.  Run all relevant configuration steps.
3. Attempt to select sdb from the Apple Bootloader.
4. Reboot and confirm that th

The above approach is basically BIOS-MBR boot, for which 1 MiB post-MBR gap should be fine, unless you are using LVM or dmraid or btrfs in which you may need 2 MiB gap.

I think I have a bootable flag set on “/boot” partition (/dev/sdb2), and I will confirm this is the case.

Grub does not care about bootable flag. That is used by syslinux. Grub follows a different approach (stage1 -> core.img -> prefix dir with modules). The 1 MiB gap is for embedding core.img and that file has grub specific FS drivers that allow grub to access the partition containing the grub modules and grub.cfg . This partition info is embedded by grub-install (actually grub-bios-setup) automatically and boot flag is no where read (neither by grub-install while setup, nor by core.img during runtime).

Not as simple:
1. Using gdisk, convert /dev/sdb back to GPT from MBR.
2. Also using gdisk, make a small parititon /dev/sdb1 (which is presently empty) to a BIOS Boot partition, type code=‘EF02’ for cgdisk (source)
3. Make sure that I am using grub-bios, and Install grub2 to /dev/sdb1 (the new bios partition). Run appropriate configuration steps. ?Include noefi flag in the grub.cfg Arch linux boot option?
4. Attempt to boot into sdb.

I suppose you mean BIOS-GPT boot. If that is the case step 1 should be conversion from MBR to GPT, not vice-versa. Step 2 is correct. Make the EF02 partition about 2 MiB just to be on the safe side.

In step 3, you DO NOT point grub-install to /dev/sdb1, you point it to /dev/sdb . The device parameter instruction grub where to install the stage 1 boot code (440-byte MBR boot code). grub-install (grub-bios-setup) will automatically detect whether the disk is GPT, and if so it will automatically determine the EF02 partition and embed its core.img there.

You do need to create a /boot/grub/grub.cfg file (either manually or using grub-mkconfig). No need for "noefi" flag since you do will boot only in BIOS mode so EFI ARCH mismatch should not be an issue.

In both the cases I do not know how to finally boot /dev/sdb from Apple boot chooser (either EFI or BIOS mode) since I do not have a Mac (never used one).

Offline

Board footer

Powered by FluxBB