Jump to content

triple-booting


jnev
 Share

72 posts in this topic

Recommended Posts

hey guys, first post here. i've been interested in installing osx86 on my pc for a while now, but have never had a spare hd to do so until now.

 

anyways. i want to triple-boot my computer, i currently have ubuntu and winxp running on it, and i want to add osx86 to that. i have one drive with both windows and ubuntu on it, and a spare 80gb all for os x. i got the tiger-x86-flat.img file and did the dd method in ubuntu to install it. it said that it worked fine, but then when i rebooted my computer i wasnt able to boot into os x. is there a special method to do it? is it a simple matter of adding os x to my grub.conf? i hope i dont need to reinstall anything...

 

also, i dont know if this matters or not, but the tiger-x86-flat.img file i downloaded was 4gb, not 6gb like everyone said. the file name is the same though so i dont know if i got the wrong file or not...

 

 

thanks for any help guys, i hope to be able to have all 3 os's working in harmony soon!

Link to comment
Share on other sites

These are the lines I have in my grub.conf for booting OSX. You need to change the (drive,partition) to match the one you've installed to. Remember that grub calls the first partition 0, the second partition 1, etc.

 

title MacOSX 10.4.1

rootnoverify (hd0,1)

chainloader +1

 

The size of the .img file I used really is 6gb, so unless you got a compressed version of some flavor, it looks like your download was not complete.

Link to comment
Share on other sites

ahh, that would be why. i did use a fat32 partition to store the file...

 

jrrjrr, i'm not sure how to go about adding it to my grub.conf. i have windows and linux on sda, and my whole sdb is for os x. i dont understand why there's 2 partitions (hd0,1) for it. could you elaborate please?

 

thanks a ton guys!

Link to comment
Share on other sites

(hd0,1) in grub means drive 0 and partition 1. Which in english means the first drive (drive 0) and the second partiton on it (the first partition is partition 0 in grub-talk.) Grub always calls the first "whatever" 0, the second "whatever" 1, etc. And you are telling it a pair: (drive,partition).

 

So if OSX is on your second drive, add a grub entry with the drive 1 higher than what it has for the drives it boots Windows and Linux from (so it will be hd1 or sd1 ???) and since there is just the one partiton, it will be a 0 after the comma.

 

If this doesn't make sense, paste in your current grub.conf and I'll give you the exact entry to get it to your OSX partiton based on what you said above.

Link to comment
Share on other sites

here is my menu.lst:

 

# menu.lst - See: grub(8), info grub, update-grub(8)

# grub-install(8), grub-floppy(8),

# grub-md5-crypt, /usr/share/doc/grub

# and /usr/share/doc/grub-doc/.

 

## default num

# Set the default entry to the entry number NUM. Numbering starts from 0, and

# the entry number 0 is the default if the command is not used.

#

# You can specify 'saved' instead of a number. In this case, the default entry

# is the entry saved with the command 'savedefault'.

default 0

 

## timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

timeout 10

 

## hiddenmenu

# Hides the menu by default (press ESC to see the menu)

#hiddenmenu

 

# Pretty colours

#color cyan/blue white/blue

 

## password ['--md5'] passwd

# If used in the first section of a menu file, disable all interactive editing

# control (menu entry editor and command-line) and entries protected by the

# command 'lock'

# e.g. password topsecret

# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

# password topsecret

 

#

# examples

#

# title Windows 95/98/NT/2000

# root (hd0,0)

# makeactive

# chainloader +1

#

# title Linux

# root (hd0,1)

# kernel /vmlinuz root=/dev/hda2 ro

#

 

#

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

 

### BEGIN AUTOMAGIC KERNELS LIST

## lines between the AUTOMAGIC KERNELS LIST markers will be modified

## by the debian update-grub script except for the default options below

 

## DO NOT UNCOMMENT THEM, Just edit them to your needs

 

## ## Start Default Options ##

## default kernel options

## default kernel options for automagic boot options

## If you want special options for specifiv kernels use kopt_x_y_z

## where x.y.z is kernel version. Minor versions can be omitted.

## e.g. kopt=root=/dev/hda1 ro

# kopt=root=/dev/sda6 ro

 

## default grub root device

## e.g. groot=(hd0,0)

# groot=(hd0,5)

 

## should update-grub create alternative automagic boot options

## e.g. alternative=true

## alternative=false

# alternative=true

 

## should update-grub lock alternative automagic boot options

## e.g. lockalternative=true

## lockalternative=false

# lockalternative=false

 

## altoption boot targets option

## multiple altoptions lines are allowed

## e.g. altoptions=(extra menu suffix) extra boot options

## altoptions=(recovery mode) single

# altoptions=(recovery mode) single

 

## nonaltoption boot targets option

## This option controls options to pass to only the

## primary kernel menu item.

## You can have ONLY one nonaltoptions line

# nonaltoptions=quiet splash

 

## controls how many kernels should be put into the menu.lst

## only counts the first occurence of a kernel, not the

## alternative kernel options

## e.g. howmany=all

## howmany=7

# howmany=all

 

## should update-grub create memtest86 boot option

## e.g. memtest86=true

## memtest86=false

# memtest86=true

 

## ## End Default Options ##

 

title Ubuntu, kernel 2.6.12-10-386

root (hd0,5)

kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/sda6 ro quiet splash

initrd /boot/initrd.img-2.6.12-10-386

savedefault

boot

 

title Ubuntu, kernel 2.6.12-10-386 (recovery mode)

root (hd0,5)

kernel /boot/vmlinuz-2.6.12-10-386 root=/dev/sda6 ro single

initrd /boot/initrd.img-2.6.12-10-386

boot

 

title Ubuntu, kernel 2.6.12-9-386

root (hd0,5)

kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sda6 ro quiet splash

initrd /boot/initrd.img-2.6.12-9-386

savedefault

boot

 

title Ubuntu, kernel 2.6.12-9-386 (recovery mode)

root (hd0,5)

kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/sda6 ro single

initrd /boot/initrd.img-2.6.12-9-386

boot

 

title Ubuntu, memtest86+

root (hd0,5)

kernel /boot/memtest86+.bin

boot

 

### END DEBIAN AUTOMAGIC KERNELS LIST

 

# This is a divider, added to separate the menu items below from the Debian

# ones.

title Other operating systems:

root

 

 

# This entry automatically added by the Debian installer for a non-linux OS

# on /dev/sda1

title Microsoft Windows XP Professional

root (hd0,0)

savedefault

makeactive

chainloader +1

 

i have windows on sda1 and ubuntu on sda6. i want to put os x on sdb. i'm guessing that the entry for os x should be:

 

root (hd1,0)

chainloader +1

(what does chainloader mean and what does it do?)

 

 

 

thanks a ton

Link to comment
Share on other sites

I think you have it basically right. hd1 will tell it to go to the second drive and the 0 will tell it to go to the first (and only) partiton there.

 

The "chainloader +1" entry I think tells grub that it is going to pass along the boot process to another system instead of continuing as a Linux booter itself.

 

And I think you should try it with rootnoverify rather than root because you don't need it to do any checking on a partition it can not read anyway, but maybe it is something specific to the version of grub I run as opposed to your version. Try one way and then the other if necessary. Worst that can happen is no boot from that particular entry. It won't mess up any other entries.

 

You also want to give the entry at title, so you can know what it is, and you might want to try the makeactive line as well, because I think the Darwin bootloader defaults to booting the currently active partition, which will be your WinXP partiton unless you add the same makeactive command to the set for the OSX system. If you don't add it, the Darwin booter may boot you into Windows unless you hit your ctrl or alt key (don't remember which it is) while it is booting to get a choice of what to boot into. You can maybe save time and make 2 grub entries, one with makeactive and one without it to try both ways without needing to re-edit the grub.conf file inbetween. Find the one that works best and then eventually delete the other one. It is ok to have extra sets of commands in the grub.conf file.

 

So, make at least this entry:

 

title OSX86

rootnoverify (hd1,0)

makeactive

chainloader +1

 

And maybe also make this entry:

 

title OSX86

rootnoverify (hd1,0)

chainloader +1

Link to comment
Share on other sites

i just looked at the stickied thread at the top of this forum, but it's not helping me much (at all). when i do cfdisk i get 'FATAL ERROR: Cannot open disk drive'

 

any other way to remove the boot tag? i have gparted installed in ubuntu and i have partition magic 8 in windows.

Link to comment
Share on other sites

i just looked at the stickied thread at the top of this forum, but it's not helping me much (at all). when i do cfdisk i get 'FATAL ERROR: Cannot open disk drive'

 

any other way to remove the boot tag? i have gparted installed in ubuntu and i have partition magic 8 in windows.

If you wish to change the active partition you can do it with Partition magic 8 or with DiskPart (diskpart is a tool inside of WinXP). Both way are easy.

Link to comment
Share on other sites

is that the same thing as getting rid of the boot tag? that's what it said i need to do in the stickied thread to get it to boot.

I guess that you need to active your osx86 partition in order to boot from it. You need to boot from osx86 ? or maybe i misunderstood it.

Link to comment
Share on other sites

First off, can you copy here the link to the sticky you are refering too? I'd like to give it a look.

 

When you did the dd copy, did you do it with the "skip" part, like most instructions suggest? I am not positive, but I think that is to skip a portion of the boot record stuff that one does not want if you install to a PARTITION. You might want/need that stuff if you are installing to a (virgin) WHOLE DISK, though. I am only making a guess here, because I have not ever installed to anything except a partiton in the middle of an already bootable disk (like your Win/Lin disk), but you could try to dd again without any skip this time.

Link to comment
Share on other sites

Ok. Thanks for the info and the link.

 

Almost all of the dd instructions I have seen set you up to skip some initial portions of the flat.img file. I don't know why exactly, but it has something to do with booting or not booting. The bs=xxxxx is telling dd the size of the chunks to work with and then there is a skip=xxxx command that tells it how many chunks to skip. The original version was bs=512 skip=63, and then they found out it was faster to use bs=32256 skip=1. (512 x 63 = 32256 x 1). But you did not do any skip, and maybe that is causing your problem. I wish I knew for sure, but I don't.

 

The dd command I would have thought you used, and maybe the one you need to use would be:

 

sudo dd if=./tiger-x86-flat.img of=/dev/sdb bs=32256 skip=1

 

 

 

Another possibility I see is using a file called chain0 that I've seen floating around like in this quote:

 

------------------

If you have an "HFS+ partition error", copy all the files from /usr/standalone/i386 of the Darwin CD to a partition in NTFS, FAT or ext but not hfs on your hard disk, and put this in menu.lst :

 

title OSX_X86

rootnoverify (hd0,2) <- replace hd0,2 by the partition where you have copied chainloader files.

makeactive

chainloader /chain0

-----------------

 

menu.lst is the same as grub.conf (they are linked files). I think this is meant for having everything on one drive, not with grub on one drive and the system you want to boot on another, but again, I can only toss out suggestions. I don't know the right way for sure because I am only sure of it the way I have my machine set up.

 

Anyway, this is another good page to pour over for the how and a little of the why for some of what I said in this post:

 

http://wiki.osx86project.org/wiki/index.ph...le_And_Accurate

 

And I'm attaching a chain0 file for you if you want to try it that way.

 

chain0.zip

Link to comment
Share on other sites

thanks for all the help so far. i tried that command you gave me, but it didnt install anything onto my hd. it was doing something for ~10min, but i looked at my hd in gparted and it was still unformatted. i'm trying it again, just in case something went wrong the first time. if it doesn't work out i'll try the chainloader. question: do i need to copy the chainloader files to the root of a partition? like if i put them in windows, does it need to be in the root, or can it be anywhere?

 

thanks

Link to comment
Share on other sites

dd takes a long time on the 6GB file, like 20 minutes for me. I'm not sure gparted is able to tell you lot because you are making a partition/drive that it may not be able to read, depending on the modules built into your kernel.

 

There is a switch you can add to the dd command, I think I saw on the page I linked you to, that adds a counter to it while it runs: --progress

 

Check that page to be sure I am remembering correctly.

 

Most of what I have read on using the chain0 file is with the Windows boot loader, where you add an entry into it so it will boot you into either Windows or OSX. The entry goes in the boot.ini file at the root of your Windows drive and the chainO file would then go in there too. There are examples on the page I linked you to before. I guess to use it with grub, it needs to be in the same location that your kernel or grub or grub.conf is in. It can't hurt anything to put it in a few places. It is an easier thing to try than going through all the dd-ing.

 

You should also hope that tomorrow some new people are around here who are more expert at this stuff than I am. I mostly know things that I had to get figured out like you are having to get it figured out now, and this was one thing that worked right away for me, so I didn't get to learn that much about it. There are bound to be other people who have been stuck with your problem and who know how to solve it who will be bored at work or school on Monday and will chime in here :)

Link to comment
Share on other sites

well when i do the dd command without the skip you told me to do gparted sees the changes. what's more, when i tried to boot into os x after the dd command you gave me it said partition not found. i dont know why, but skip doesnt seem to work for some reason...

 

both of the dd commands take ~15min for me

 

 

does anybody know what to do??

Link to comment
Share on other sites

pc guru, i thought that dd was a linux command, all the how-to's i've seen are for linux. no i haven't yet tried with windows.

 

Hagar, i'm using grub...

Link to comment
Share on other sites

 Share

×
×
  • Create New...