Jump to content

Quadruple boot with GRUB


nastyhome
 Share

27 posts in this topic

Recommended Posts

Hi all,

 

Here's a challenge for you.

 

I want to boot Mac OS X from my GRUB menu. Its a big ask.

 

Here is my setup:

 

HDD 1: Windows XP (active and primary)

HDD 2: Windows 2003 Server (active and primary)

HDD 3 > Partition 1: NTFS partition will have future Windows XP installed (primary)

HDD 3 > Partition 2: Mac OS X (active and primary)

 

I have setup my GRUB in such a way that when you select an OS, it boots that OS without going to an additional menu (eg: Windows boot loader menu) to select the right one. Just boot straight to the right OS.

 

In an addition, I want to install another Windows XP on HDD3\Partition 1.

 

Now I have read of the chain0 boot loader to boot Mac OS X. But to do that in my setup, I may have to chuck in HDD\Partition 1, where my future Windows XP install will be. Therefore, it would mean when I want to load Mac OS X from grub, I am going to boot to GRUB, then it will boot to HDD3 Partition1's Windows boot loader and then I can select Mac OSX or windows XP...

 

Any ideas?

 

Any improvements?

 

Many thanks in advanced.

Link to comment
Share on other sites

You can access osx directly with grub, no need to go through ntloader.

 

Here's an example:

http://forum.insanelymac.com/index.php?showtopic=28848

 

Adapt to your situation (you have wingrub i guess).

 

I don't know how exactly you configured your grub, but here's a possibility:

 

title WinXP
rootnoverify (hd0,0)
makeactive
chainloader +1

title Win2003
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

title WinXP2 [when it will exist]
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1

title OSX
rootnoverify (hd2,1)
makeactive
chainloader +1

You might have used the map command in your grub for the two windows; if not, use however you like.

You might also have to insert the --force option in the chainloader if it doesn't work.

You might prefer to hide/unhide partitions as needed also.

Adapt for wingrub if that's what you're using.

 

By searching forum for "grub" you will get other examples/problems/solutions.

Link to comment
Share on other sites

You can access osx directly with grub, no need to go through ntloader.

 

Here's an example:

http://forum.insanelymac.com/index.php?showtopic=28848

 

Adapt to your situation (you have wingrub i guess).

 

I don't know how exactly you configured your grub, but here's a possibility:

 

title WinXP
rootnoverify (hd0,0)
makeactive
chainloader +1

title Win2003
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

title WinXP2 [when it will exist]
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1

title OSX
rootnoverify (hd2,1)
makeactive
chainloader +1

You might have used the map command in your grub for the two windows; if not, use however you like.

You might also have to insert the --force option in the chainloader if it doesn't work.

You might prefer to hide/unhide partitions as needed also.

Adapt for wingrub if that's what you're using.

 

By searching forum for "grub" you will get other examples/problems/solutions.

 

Thats amazing. Thats almost exactly how my GRUB is set up...except for OSX and the future Windows install.

 

One question:

 

Currently I have OSX partition as active and the first partition, the Windows XP partition is not active. Wont I need both partitions set as active in order to be booted?

Link to comment
Share on other sites

Thats amazing. Thats almost exactly how my GRUB is set up...except for OSX and the future Windows install.
Well, we've read the same grub user manual... :)

 

Wont I need both partitions set as active in order to be booted?
Only one active partition at a time.

As Ramjet said, the one to be booted is set active. When you'll set hdd3 winxp partition active and mapped as first disk, that's the one that'll be booted, and the osx partition will be set non-active. Set the boot.ini accordingly for that winxp.

Next time you'll boot osx with that grub, its partition will be set active, and automatically the winxp one will be set non-active. IIRC it doesn't need its hd to be mapped as first disk.

Link to comment
Share on other sites

Make sure that: 1) the osx partition is really primary; 2) and of type 0xAF; 3) and is before any extended partition (if there's one).

 

If these are ok, as a test, make sure the osx partition is active, then reboot and make your pc boot on disk3 first (from bios or menu option). This should avoid loading grub and test directly your osx.

If then you don't get this "hfs+..." error, the problem is in the grub menu. If you still get the "hfs+..." error, the problem is elsewhere.

Link to comment
Share on other sites

title Mac OSX86 10.4.6 Tiger

rootnoverify (hd2,1)

makeactive

chainloader -- force +1

 

It came up with:

 

Error 1: filename must be either an absolute pathname or blocklist

 

Details about this error found here:

http://www.uruk.org/orig-grub/errors.html

http://www.uruk.org/orig-grub/filesystem.txt

 

hmm...

 

 

Try setting up the osx partition (not disk) like this. Read the whole thread as it it is clarified a bit later.

 

http://forum.insanelymac.com/index.php?sho...mp;#entry166040

 

It worked for me. I got errors on the bless command but I think grub doesn't need what ever bless does.

 

Good discusion here also.

http://forum.insanelymac.com/index.php?showtopic=29859

 

Don

Link to comment
Share on other sites

Error 1: filename must be either an absolute pathname or blocklist
Someone else encountered this before.

Here's what was his particular problem: http://forum.insanelymac.com/index.php?s=&...st&p=203796

and the solution: http://forum.insanelymac.com/index.php?s=&...st&p=203873

 

Basically, make sure the lines are written correctly, no tabs etc.

Not sure this is your case though.

Good luck in any case.

Link to comment
Share on other sites

I got the Error 1: filename must be either an absolute pathname or blocklist error because i had a space between -- and force (ie: -- force)

 

Typo mistake

 

Corrected that but still got 'HFS+ partition error'.

You get the error because grub can't read the partition. HFS+ is not supported by grub. Grub2 is going to but I don't think it does yet. Chainload passes control to your partition but it is not setup. If you set it up as above Darwin boot loader will launch and you are there.

 

In my grub I use root instaed of rootnoverrify. Not exactly sure if it maters.

 

title Mac OSX86 10.4.6 Tiger

root (hd2,1)

makeactive

chainloader +1

 

 

Don

Link to comment
Share on other sites

In my grub I use root instaed of rootnoverrify. Not exactly sure if it maters.
For some root works, others need rootnoverify. I suggested later just on the safe side. But if root does work for him, great.

Same with --force, varies from one user to another.

 

As for grub not supporting hfs+, well, neither does ntldr nor acronis os selector, etc, officially, but in many instances they have no problems with it. That would sound conforting if it were not for this infamous HFS+ error that often appears! Sometimes it's been solved by simple means. While others need jrsdead's trick (which i've never needed and so overlooked).

 

So I still wonder where's the difference, why some don't have the hfs+ error while others do.

[Just for further information, I prepare my (primary) install partition by making it active and of type 0xAF with a partition tool before even using the osx install dvd.]

Link to comment
Share on other sites

For some root works, others need rootnoverify. I suggested later just on the safe side. But if root does work for him, great.

Same with --force, varies from one user to another.

 

As for grub not supporting hfs+, well, neither does ntldr nor acronis os selector, etc, officially, but in many instances they have no problems with it. That would sound conforting if it were not for this infamous HFS+ error that often appears! Sometimes it's been solved by simple means. While others need jrsdead's trick (which i've never needed and so overlooked).

 

So I still wonder where's the difference, why some don't have the hfs+ error while others do.

[Just for further information, I prepare my (primary) install partition by making it active and of type 0xAF with a partition tool before even using the osx install dvd.]

 

 

Using XP and chain0 chain0 is on the readable drive. Once it is loaded it finds the HFS+ and can read it. Off it goes. Grub can pass control to the first 512 bytes of a partition without having to read it. That is what chainloader +1 means. In this case boot1h needs to be there. Boot1h then can read the HFS+ and continue booting. Don't bet your pay check on this but that is what seems to be happening. It was far from easy to figure this much out. Documentation is scarce.

 

Don

Link to comment
Share on other sites

Ok, but question is: what is to be done during pre-installation and installation to insure the presence of this 'boot1h'?

 

Anyway, I did have once hsf error problem with grub, but solved it with rootnoverify and/or chainloader --force +1 lines in grub, and this works for many. So where's the difference with those for which this doesn't work? Wondering what their bootsector (0+1) contains; empty?

Link to comment
Share on other sites

Ok, but question is: what is to be done during pre-installation and installation to insure the presence of this 'boot1h'?

 

Anyway, I did have once hsf error problem with grub, but solved it with rootnoverify and/or chainloader --force +1 lines in grub, and this works for many. So where's the difference with those for which this doesn't work? Wondering what their bootsector (0+1) contains; empty?

 

I haven"t got that far yet. In my case it happened because the install disk could not read most of my drives. I installed on an old 10G and got the kexts setup to work with my drives. Then tried many ways to copy. Never got it right because i was copying without the boot sector. I lived with booting off the DVD for a while then started trying to fix as I got things working better.

 

I guess if the partition was setup and then copy the files that would be the best way to go. maybe write a howto including a check to see if the partition has the file in the right place. Not sure how to check that from command line. Tech tools 4.5 can do it but not every body has that. I suppose it wouldn't hurt if it was already ok.

 

See Hackint0sh I started a new thead there. I think you replied over there once. Thanks

 

Don

Link to comment
Share on other sites

;)

Dang! Ok, that donh... yeah, believe it or not didn't remember your nick. :D

 

I was thinking once to write a sarcastif topic in the Genius Bar titled:

How To Get the HFS+ Partition Error Message

where would be catalogued the many ways to encounter this error. I would have tried to get that error message from a working osx system. But then my cynicism wasn't matched by my lack of time and patience... It would take testing on different install methods, checking each time how the mbr, partition tables and boot sectors where changed... bleh...

 

Anyway... just went to your post on hackint0sh about solving your problem; most interesting for me is the sata support from the pci-e card, will look into that.

 

/edit: I forgot to ask you a question on the hackint0sh board: were your osx partitions booting on their own without the dvd and without grub, ie just by making their partition active and booting on their disk first (through drive order in bios)? This is the present case with nastyhome, he can boot directly.

Link to comment
Share on other sites

:)

Dang! Ok, that donh... yeah, believe it or not didn't remember your nick. :bag:

 

I was thinking once to write a sarcastif topic in the Genius Bar titled:

How To Get the HFS+ Partition Error Message

where would be catalogued the many ways to encounter this error. I would have tried to get that error message from a working osx system. But then my cynicism wasn't matched by my lack of time and patience... It would take testing on different install methods, checking each time how the mbr, partition tables and boot sectors where changed... bleh...

 

Anyway... just went to your post on hackint0sh about solving your problem; most interesting for me is the sata support from the pci-e card, will look into that.

 

That is an interesting one. His post actually led me to the fix for me.

 

/edit: I forgot to ask you a question on the hackint0sh board: were your osx partitions booting on their own without the dvd and without grub, ie just by making their partition active and booting on their disk first (through drive order in bios)? This is the present case with nastyhome, he can boot directly.

 

I forgot it boots directly. HD3 has NTFS on first partition does he use chain0 method? If not OSX must be on the MBR. maybe point grub to root (hd2). Can't remember if that will work or not.

 

 

The 10G drive booted on its own. It was a clean install to an only drive. I made a small partition in front of osx to simulate the drive I wanted to get working. OSX installed to the mbr I am sure and then setup the partition correctly. The other 2 drives had grub on the MBR from Fedora installs. Neihter would boot without the DVD. To get the drives to boot I had to move them around either in the bios or plugging in the cables and jumpers.

 

I htink your sarcastic post would be funny now but would have been to painful a while ago;)

 

Don

Link to comment
Share on other sites

He reserves ntfs on (hd2,0) for another XP install. His osx on (hd2,1) can boot directly without grub (when he disconnects other drives). I assume he already has an ntfs on (hd2,0) though, and not only an unallocated space (he could tell us). So the mbr pointed to active partition, and osx partition bootsector proceded to start osx. But then why would grub not properly chainload for such cases? Must be simple thing we're missing in the picture.

 

So, in your particular case before the jrsdead trick, even if you had set, say, hd0 or hd1 as first drive in bios, you'd have needed the dvd?

So the mapping drives around in grub woudln't help even in those cases.

 

I'll eventually get a third drive and proceed to test installing osx on something other than the first drive. Otherwise I'm almost of no help in these cases.

Link to comment
Share on other sites

You get the error because grub can't read the partition. HFS+ is not supported by grub. Grub2 is going to but I don't think it does yet. Chainload passes control to your partition but it is not setup. If you set it up as above Darwin boot loader will launch and you are there.

 

In my grub I use root instaed of rootnoverrify. Not exactly sure if it maters.

 

title Mac OSX86 10.4.6 Tiger

root (hd2,1)

makeactive

chainloader +1

Don

 

 

You beauty!

 

That worked. The root worked.

 

FYI I was using GRUB Stage 2

 

Thanks guys!

Link to comment
Share on other sites

You beauty!

 

That worked. The root worked.

 

FYI I was using GRUB Stage 2

 

Thanks guys!

 

Thats great. Please hang around we are still learning stuff and may have more questions.

 

What does this mean? FYI I was using GRUB Stage 2

 

I see stage 1.5 loading then a menu. Is the menu from stage 2?

 

Don

Link to comment
Share on other sites

He reserves ntfs on (hd2,0) for another XP install. His osx on (hd2,1) can boot directly without grub (when he disconnects other drives).

 

His boot sector on the partition must be allready setup. No need for the above hacks unless he is actually booting from DVD.

 

I assume he already has an ntfs on (hd2,0) though, and not only an unallocated space (he could tell us). So the mbr pointed to active partition, and osx partition bootsector proceded to start osx. But then why would grub not properly chainload for such cases? Must be simple thing we're missing in the picture.

 

The diff between root and rootnoverify. A quick read and I don't see it. I'll look closer later. Hind sight helps here.

 

So, in your particular case before the jrsdead trick, even if you had set, say, hd0 or hd1 as first drive in bios, you'd have needed the dvd?

So the mapping drives around in grub woudln't help even in those cases.

 

TRue

 

I'll eventually get a third drive and proceed to test installing osx on something other than the first drive. Otherwise I'm almost of no help in these cases.

 

You are a great help. You are trying to help and eager to learn. Many are not willing to learn or help. I have seen you get others going also.

 

I wonder if there is a way to test the boot sector with diskutil or fdisk. Maybe some other utility.

 

Don, Still learning too.

Link to comment
Share on other sites

 Share

×
×
  • Create New...