Jump to content

grub invalid or unsupported executable format


zmac
 Share

23 posts in this topic

Recommended Posts

Hi,

 

My fresh installed system doesn't boot os x. The error is "invalid or unsupported executable format".

 

My grub config is

 

title OSX86

root (hd0,2)

chainloader +1

 

Please tell me if you know anything about this error.

Link to comment
Share on other sites

  • 1 year later...
Same problem here, my other posts detail my problem (and lack of replies :blink:)

 

I can't make grub work with 10.4.10 either.

 

Tried chainloader +1 and chain0 methods with and without --force.

 

But I can boot OS X. Since I put it on 2nd HDD, I can make BIOS boot MBR of 2nd HDD. Would really prefer to add it to my bootloader menu.

 

If anyone has gotten grub to work, I too would appreciate advice.

Link to comment
Share on other sites

It wasn't only about the --force bit, there was the makeactive too:

try again with

title OSX86
root (hd0,2)
makeactive
chainloader +1

add the --force as mentionned earlier if it doesn't work.

 

(adjust for your own partition)

 

Sorry, still a no go for me.

I get HFS+ Partition error.

 

Also tried:

map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,1)

makeactive

chainloader +1

 

Same result.

 

But it boots quite happily if I just tell BIOS to boot 2nd HD MBR.

Link to comment
Share on other sites

Just to eliminate a possibility, is your osx on hdb2 (ie (hd1,1)), or hdb1 ((hd1,0)) ?

The mapping looks ok, so if it's really (hd1,1) I don't know what else, unless you try all combinations with root or rootnoverify, with or without --force, etc.

 

Never tried it myself on a secondary hd, so can't test it out.

Link to comment
Share on other sites

Just to eliminate a possibility, is your osx on hdb2 (ie (hd1,1)), or hdb1 ((hd1,0)) ?

The mapping looks ok, so if it's really (hd1,1) I don't know what else, unless you try all combinations with root or rootnoverify, with or without --force, etc.

 

Never tried it myself on a secondary hd, so can't test it out.

 

Its hd (1,1)

 

XP is on hd(1,0) and boots nicely from grub with map

SUSE 10.3 is on hd(1,2) and also boots nicely.

 

I have tried all the combinations mentioned above and still no joy.

 

But it boots fine with BIOS activating 2nd HD MBR, so its more annoying than serious.

Link to comment
Share on other sites

Whoops, forgot I posted here, was about to search somewhere else!

 

Ive tried both GRUB and chain0, both don't work

 

My GRUB setup is basically:

title Mac OS X
rootnoverify (hd0,3)
makeactive
chainloader +1 [tried --force too]

 

Partition setup is like this:

 

1. Windows Partition

2. Recovery Partition

3. Mac OS X

4. Extended Partition

- Data Partition

- Swap Partition

- Linux Partition

- Linux Partition

 

Any ideas? I can boot with the CD though by typing hd(0,3) at the prompt though.

 

I wonder if it was because I installed mine through vmware? (I only own bad discs :P)

Link to comment
Share on other sites

Partition setup is like this:

 

1. Windows Partition

2. Recovery Partition

3. Mac OS X

4. Extended Partition

- Data Partition

- Swap Partition

- Linux Partition

- Linux Partition

 

(...) I can boot with the CD though by typing hd(0,3) at the prompt though.

Strange, since from your partition structure your osx should be on (hd0,2) (partition numbering begins at 0).

Link to comment
Share on other sites

Right, found out the partition table from linux, looks as if its a bit dodgy:

 

Disk /dev/sda: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x99c799c7

  Device Boot	  Start		 End	  Blocks   Id  System
/dev/sda1   *		   1		7649	61440561	7  HPFS/NTFS
/dev/sda2			7650		8230	 4666882+  1c  Hidden W95 FAT32 (LBA)
/dev/sda3		   12056	   36481   196201845	f  W95 Ext'd (LBA)
/dev/sda4			8231	   12055	30724312+  af  Unknown
/dev/sda5		   12056	   33038   168545916	7  HPFS/NTFS
/dev/sda6		   33039	   33293	 2048256   82  Linux swap / Solaris
/dev/sda7		   33294	   35206	15366141   83  Linux
/dev/sda8		   35207	   36481	10241406   83  Linux

Partition table entries are not in disk order

 

Technically, the OSX partition is after the extended, but all the logical ones are after that, i didn't think that was possible...

 

GParted reported my partition table like I described, where the extended contained the logical, and the OSX partition was before it...which it should be.

 

Any ideas how to remedy this?

Link to comment
Share on other sites

Well, your osx is physically before the extended.

But the partition table isn't sorted, so osx is listed after the extended, as you see, which causes the problem.

 

You shouldn't have to reinstall.

 

For reordering the partition table, one can manually edit the partition table; this is for extremely cautious experimented users.

But I found a long-forgotten post (well, back in May 2007) by KemenAran: Reordering the partition table with Linux's fdisk

Didn't try it myself, but should be safer than manual editing.

 

In any case, backup mbr/partition table beforehand and know how to rewrite it back in case of a problem.

 

Good luck.

Link to comment
Share on other sites

Yeah, does the bootloader work for AMD though? (And I thought it was Leopard only...)

 

I'll give the new bootloader a try, seems worth it, and I might delve into reordering the partition table (im a fairly learned linux user :P) if that doesnt work!

Link to comment
Share on other sites

Tried the linux way, easier for me, basically:

 

sudo fdisk /dev/sda
> p	[print table to screen]
> x	[expert mode]
> [the one for fixing order, i forgot it, explanatory though]
> r	[return to main menu]
> p	[verify it]
> w	[write the fixed table]

 

Reodered it successfully, have all my data, still won't boot OSX , but I shall reinstall and it should work.

 

Hopefully...

 

(PS. the tutorial's commands were all wrong, it pointed me in the right direction though)

Link to comment
Share on other sites

screw Grub, I use the LILO bootloader. very easy to edit

 

Lilo requires constant updating, ie. you have to update lilo everytime you update lilo.conf.

 

Which you don't have to do with grub.

 

I understand grub more, (how it works, command etc), and have no idea how to use lilo.

 

Thus, I prefer grub, since lilo isnt too easy to edit for me :o

Link to comment
Share on other sites

 Share

×
×
  • Create New...