Post Reply 
Triple Booting Leopard, Ubuntu and XP on a Mac
Author Message
Ge64
Former Admin ;)

Posts: 3,194.6250
Threads: 295
Joined: 3rd Feb 2007
Reputation: 0.38918
E-Pigs: 108.4793
Offline
Post: #1
Triple Booting Leopard, Ubuntu and XP on a Mac
Ok, its friday and i get home and Leopard is there. I rush to create a last minute full backup of my Tiger system to save the school work I did today. At about 10 PM i succeed (sigh).

I don't mind though, because Ill stay up late to get my new system running. Ive been waiting for Leopard to install Ubuntu successfully for the first time, as everyones talking about it and it looks very promising (and is confirmed to work on my macbook pro). I read up a bit and decide on my partitioning. Note that I'm doing a full install, not an upgrade, because its more convenient for partitioning:

Partition 1: Common FAT drive 50GB
Partition 2: Windows XP FAT drive (to be converted to NTFS during setup) 29GB
Partition 3: Leopard drive 50GB
Partition 4: Unallocated space (to be formatted for ubuntu during setup) 20GB
Total: 160GB (or so they say)

Well, I followed some steps that were more or less  the same as my plan, but, it didnt work. At 3AM, after countless attempts to run numerous OSs, I gave up for now.

The next morning there was new hope. I discovered why my plan wouldnt work (from the ubuntu wiki):
Spoiler for Macs and partitons:
Disk Partitions and their Limitations

The primary problem with installing operating systems on a Mac is the partitioning system. Intel Macs use the new GPT method to partition drives. (GPT is part of the new Extensible Firmware Interface (EFI) standard proposed by Intel as a replacement for the outdated PC BIOS). This is supported by Mac OS X (obviously) and Linux. However Windows can only be installed on a machine with a legacy (MBR) based partitioning system. In order to overcome this, Boot Camp uses both systems, and herein lies the difficulty in triple booting. Currently there is no partitioning software available apart from diskutil (included with Mac OS X 10.4.6) that can create dual GPT/MBR partition system drives. Current GPT based partitioners (e.g. GNU parted) wipe the MBR portion, whereas current MBR partitioners (e.g. fdisk, Partion Magic) can't edit GPT.

There are certain things you can do with fdisk that won't hurt GPT when booted using BIOS Emulation/Compatibility mode, because of the layout of the MBR and GPT relative to each other and the way the BIOS Emulation protects certain parts of the GPT/MBR tables:

    * Changing the partition type [t] of your linux or windows partition using fdisk will change the flag. Of course it won't format the partition for you, you'll have to do that yourself. The GPT will be completely unchanged.
    * Setting the bootable/active [a] flag of partitions is also safe to do. Again, the GPT is completely unaffected.

However, any changes to the actual MBR partition table structure are impossible without ruining your GPT structure.


In other words wee have to manually partition the drive using diskutil in order to get the necessary partition structure for triple booting. However it gets worse. MBR only supports 4 primary partitions and GPT does not support extended partitions. Combining these two limitations means that a dual partition system disk can have a maximum of 4 primary partitions. In addition, Apple reserves the first primary partition for the "EFI System Partition". That leaves us with only three partitions to play with, one for each OS. Hence, wee cannot have a Linux swap partition, instead wee must create a swapfile. Also, for some reason Boot Camp expects the Windows "C:" drive to be the last partition present on the drive. If it isn't, Windows setup will crash with a "cannot find hall.dll" error after the first reboot.
After some thought, I decided to go with this partition structure:

Partition 1: Leopard drive 70GB
Partition 2: Linux drive 29GB
Partition 3: XP drive (NTFS) 50GB

Below is a tutorial on how to install Leopard, Ubuntu 7.10 and Windows XP SP2 on a Macbook Pro Santa Rosa model. It should most prabably work on any Intel mac with the latest firmware.

Heres what you'll need:
- Time and patience
- Leopard DVD
- XP CD with SP2 on it already
- Ubuntu 7.10 ALTERNATE INSTALL CD. The normal Live CD won't work. I used the 64-bit version.
- Knoppix 5.1 Live disc (or similar, this works. Must have GParted)
- Back up all the files on your harddrive if they mean anything to you.

Here's what you may want to get / will get during the process:
- rEFIt 0.10
- Paragon NTFS for Mac

Heres what I did. If you do exactly the same, it's likely to work.

PART ZERO: DISCLAIMER

I wrote this tut to HELP others. It is very possible that this tut leads to data loss or damage, or any other problems with booting your Mac. Some software in this tut is BETA SOFTWARE. It is very possible that following the steps outlined in this tut cause your Mac to stop working in any way. If you can not accept this risk, or do not know what you are doing, do not follow these steps. If you do follow this tut, accept that there may be errors in it. DO NOT PROCEED WITHOUT A BACKUP OF YOUR STUFF SAFELY SECURED ON A REMOTE MEDIA THAT IS NOT CONNECTED TO THE COMPUTER DURING THE COURSE OF THIS TUTORIAL.

PART ONE: PARTITIONING

Once you have decided on a partition scheme, read everything and make sure it complies with all the restrictions, or it won't work.
Partitioning is difficult because not one tool supports all the filesystems I want. Heres what I did.

1) Boot from your Mac OS disk. When the Introduction screen appears, select Utilities from the menu bar and go to Terminal.

2) If you already installed OS X and you want to keep it, make sure there is only one partition on the drive. Then, wee will resize the partition to make room for, and create, the two other partitions. Type this:

Code:
diskutil resizeVolume disk0s2 70G JHFS+ Linux 28.7G JHFS+ XP 50G


This will resize the first partition (OS X) to 70G, and create 2 new HFS partitions named Linux and XP after it. I chose HFS, because diskutil doesn't support NTFS which I want for my XP partition or Ext3 which wee want for Linux. Well just format these partitions later.

If you havent installed OS X yet you can clear your drive and create the partitions in one step by typing:

Code:
diskutil partitiondisk disk0 JHFS+ Leopard 70G JHFS+ Linux 28.7G JHFS+ XP 50 0B


This will create three partitions, the last one taking up any leftover space on the drive (so you don't have to specify 50G, because that's what's left over.)

Don't worry about the EFI partition, Diskutil won't touch it.

PART TWO: LEOPARD AND REFIT

This is a simple step. If you already have Mac OS installed on the OS X partition, just boot it. If you don't, quit out of Terminal and continue with the install.

Once you've booted into Mac OS, download and install rEFIt. The current version is 0.10, get it from refit.sourceforge.org. Install it using the installer, make sure you install it to the OS X PARTITION. You might want to go to Customise and check the File System Drivers.

PART THREE: PARTITIONING CONTINUED

Insert your Knoppix disc. Restart out of Mac OS, when rebooting hold Option. From the menu, chose rEFIt.

This part is important. If you skip it, Windows Setup will only display one partition which is NOT WHAT WEE WANT.

From rEFIt, use the arrow keys to go down to 'Start Partitioning Tool'. If it asks you for permission to edit the MBR, hit Y. Now go back to refit, and chose Boot Linux from CD. This will go to the Knoppix menu, when that appears just press Enter to boot Knoppix.

Once its loaded to the desktop, click the blue K button on the bottom left to open the menu and go to System. Open GParted (NOT QTParted).

You need to change the drive to /dev/sda0 in the top right. Once you get your partitions in the list, delete the windows one. Select the new unallocated space and create a new partiton. Make the type UNFORMATTED, this is the most important part. I also selected 128MiB to bo free before  the new partition because it was there before, but I think you might as well just fill up all the space. Apply the changes. Once its finished just shut down using the power button and exchange the Knoppix CD for the XP CD.

If you're wondering why wee had to create an unformatted partition, ill explain. In Windows Setup, there will be 4 partitions, the EFI partition and our 3 partitions wee made. All three are of Unknown type (HFS) to Windows so it can't install them. When you try to, it won't ask you to format it like it would with an unformatted partition, it will say it can't install and to delete the partition and create a new one. The problem is, once you delete the partition in Windows Setup, it won't create a new one because there are already 3 partitions and Windows can't handle it properly. GParted works with EFI so it can handle creating a 4th partition. Once you have an unformatted partition, Windows can format it as NTFS during setup. It needs to format it during setup in order to make it bootable.

PART FOUR: XP

Insert the XP CD and reboot to refit. Remember: it MUST have SP2 already on the disc for it to work! Chose Boot Windows From CD. This will start XP Setup. You may have trouble pressing any key to boot from CD. I didnt have any trouble, it just booted setup anyway. If there is a problem, just connect a USB keyboard and reboot and try that.

After 2 decades when Windows finally finishes 'loading files', you will see the partitions. Chose the last partition in the list and confirm its the right one using the size, press enter. I chose to format completely just to be safe but I think itll work with a quick format.

After it copies the files and reboots to refit, chose Boot Windows From Partition 4 or Boot Windows From XP to continue setup. If you didnt use the last partition for Windows, it will now fail and give you a 'failed to find hal.dll' error. Start over. If you did read, like I didnt, twice, then itll continue setup happily.

After Windows XP is successfully installed, pop in the Ubuntu disc.

PART FIVE: UBUNTU

By now you should know how refit works. Boot into it and boot your Ubuntu CD. The installer will run some things and then ask you a series of questions. When it gets do drive partitioning, choose MANUAL. Then select the Ubuntu partition, mine mas now called Untitled but whatever, and make the following changes: Format it as EXT3, and use it as 'Mount Point /'. Finish up and it will ask for permission to write any changes to the disk.

Later on it will ask you to install GRUB. I chose not to install it to the MBR because OS X wasn't in the list and I didnt know if it would work with/overwrite refit. However, there is no other correct option. What I did was destroy my Windows install by putting it in /dev/sda4, which is the windows partition, because when it Boots GRUB, and you tell GRUB to boot XP, it reloads itself. To fix it, I later made a bootable GRUB CD in Ubuntu, and reinstalled windows to remove GRUB. Heres the steps:

1 Boot Ubuntu
2 Go to System > Administration > Synaptic Package Manager
3 Look for mkisofs, check it and press Apply. Wait for the download.
4 Go to Applications > Accessoires > Terminal
5 Type the following lines:

Code:
mkdir iso
mkdir -p iso/boot
cp /boot/* iso/boot/


Now check to see if it copied all the files in /boot to /home/USERNAME/iso/boot

Code:
cp /usr/lib/grub/x86_64-pc/stage2_eltorito iso/boot/grub

If that doesn't work:

Code:
cp /usr/lib/grub/x386-pc/stage2_eltorito iso/boot/grub


Code:
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso


6 Now burn the file grub.iso in your home directory to a CD. Reboot to it using rEFIt to test it.

If it boots Ubuntu, insert the XP CD. Boot to it. Reinstall XP on the last partition and format it as NTFS (Quick) when prompted.

PART SIX: FINISHING UP

Congratulations, you now have a Triple booting Mac with two of the best OSs ever and one that is, well, necessary sometimes. There are just a  few more things to do.

Boot to XP and insert the Leopard install CD. Go to setup and install the Mac drivers. You may also want to do stuff like get updates.
Boot to Leopard and google for Paragon NTFS for Mac. Its a public beta as of now, but this great software lets you read and write NTFS Windows partitions as if it were Mac partitions in Finder.
As for Ubuntu, theres a lot to be done, for instance wee need to get rid of the low-grophics mode it boots in. Go here https://wiki.ubuntu.com/MacBookPro and follow the rest of the instruction for the Macbook Pro, search for a similar page if you have an iMac or Mac Mini.

CONCLUSION

I wrote this tut because it took me so long to get things working in my situation, even with so many other tutorials. If you know where to succesfully intall GRUB, let me know. Also if anything else is wrong, unclear, missing, or could otherwise be improved, please post as well. It took me around 20 hours to get all of this done using trial and error, Ihope this helps speed it up a bit. In total I installed OS X 3 times, Windows (attempts) more than 12 times, and had to download the Ubuntu Alternate CD to get that working ofter 3 tries to boot it. If you find this helpful please digg it or post :)


[Image: ub1985584.jpg]
27/10/2007 06:01 PM
Find all posts by this user Quote this message in a reply
beaner2k6
∞©∞

Posts: 2,554.2221
Threads: 62
Joined: 1st Mar 2007
Reputation: 1.65351
E-Pigs: 73.7056
Offline
Post: #2
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
badass, i didnt know it was possible to triple boot os's if i get the motivationand patience i might do it too,i doubt I'll get ubuntu (linux right?)too

[Image: beaner2k6.jpg]
[Image: 218ohu.jpg]
[Image: newbitmapimage3aj5.png]
[Image: beaner2k6.png]
27/10/2007 06:10 PM
Find all posts by this user Quote this message in a reply
squee666
Grand Warlock

Posts: 3,582.3833
Threads: 350
Joined: 4th May 2007
Reputation: 12.17831
E-Pigs: 555.0043
Offline
Post: #3
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
lol finally i can see this thread

[Image: sotw52.png]
Spoiler for anime watched:
[Image: squee666.jpg]
27/10/2007 06:16 PM
Find all posts by this user Quote this message in a reply
.:ʕΘЯg@nʔ:.™
Elite EPerson

Posts: 1,612.4675
Threads: 233
Joined: 14th Apr 2007
Reputation: 3.87089
E-Pigs: 66.6058
Offline
Post: #4
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
WoW now i guess i should go get a mac
maybe next year

[Image: hw_wow_sig.php?cardCharacterName=Tetriz]
28/10/2007 08:03 AM
Find all posts by this user Quote this message in a reply
diego
poof

Posts: 7,878.3593
Threads: 264
Joined: 22nd Jun 2007
Reputation: 1.80067
E-Pigs: 37.3972
Offline
Post: #5
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
yeah wow. . . complicated I think. . . I only need Vista at the moment but I might dual boot this pc with ubuntu. . . . my brother is lazy to even try to dual boot his mac.

[Image: cce6aa9e-c40c-4ae7-aebe-d7780d6fc009.gif]
29/10/2007 12:38 AM
Find all posts by this user Quote this message in a reply
sticky
Way Of Destruction 33

Posts: 697.1851
Threads: 25
Joined: 16th Mar 2007
Reputation: -1.78625
E-Pigs: 11.3016
Offline
Post: #6
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
wow, 3 OS in 1. that's really cool. but what's the use of so many OS?
30/10/2007 02:21 AM
Find all posts by this user Quote this message in a reply
MaTaMoSkA
Paradigmatic Entity

Posts: 239.4671
Threads: 2
Joined: 3rd Sep 2007
Reputation: 4.35811
E-Pigs: 3.1085
Offline
Post: #7
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
I Want to Dual Boot Ubuntu On My HP Pavilion (DV6000) But It Won't Work. It Shows That Screen Ubuntu With The Bar Loading And Then It Turns Black And Nothing Happens. If Anyone Figures Out How To Get Ubuntu On HP's Please Tell Me How Thanks :) Oh And That's So Cool On How You Got To Triple Boot 3 OS's Must Of Been Real Hard To Do :)
30/10/2007 11:24 PM
Find all posts by this user Quote this message in a reply
beaner2k6
∞©∞

Posts: 2,554.2221
Threads: 62
Joined: 1st Mar 2007
Reputation: 1.65351
E-Pigs: 73.7056
Offline
Post: #8
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
i might consider double booting xp, but with my leopard disc coming in the mail, i might not, i watched the online tour of leopard, its too badass to have it share hdd space with another os, specially xp

[Image: beaner2k6.jpg]
[Image: 218ohu.jpg]
[Image: newbitmapimage3aj5.png]
[Image: beaner2k6.png]
31/10/2007 04:58 PM
Find all posts by this user Quote this message in a reply
Ge64
Former Admin ;)

Posts: 3,194.6250
Threads: 295
Joined: 3rd Feb 2007
Reputation: 0.38918
E-Pigs: 108.4793
Offline
Post: #9
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
hahah lol ye but ubuntu is really good as well. i like both but i still prefer mac

[Image: ub1985584.jpg]
31/10/2007 06:50 PM
Find all posts by this user Quote this message in a reply
Kaiser
The Average Lucky Bastard

Posts: 2,525.1100
Threads: 296
Joined: 13th Apr 2007
Reputation: 0.38918
E-Pigs: 43.7138
Offline
Post: #10
RE: Triple Booting Leopard, Ubuntu and XP on a Mac
im gonna do this once i do the proper upgrades to my computer... well, i heard its possible to have leopard on a PC, right?

i would like a quad boot... to also have vista...

COLEGIOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!
FEEL THE POWER   \(m)/ (@_@) \(m)/
Vi Veri Veniversum Vivus Vici
31/10/2007 08:32 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: