Jump to content

[HOW TO] Install Tiger OSx86 on a Linux system without wiping your Hard drive


d11wtq
 Share

1 post in this topic

Recommended Posts

Preamble:

 

This guide will step through how to get OSx86 on your existing setup, even with multiple operating systems and without erasing your existing data.

 

You don't need an SSE3 CPU to do this because we'll use a patched image that works on SSE2. If you don't have SSE2 you might as well stop here.

 

You will use this guide at your own risk and the author will not be held responsible for any problems you encounter.

 

Assumptions before we begin:

 

This is aimed primarily at Linux users. Mostly because I'm a linux user and partly because I don't know what the equivalent tools are in windows. If you are not a linux user it is assumed that you are least comfortable with working with command line tools.

 

It would help if you understand the basics of partitioning and filesystems. I take no responsibility for any loss of data through repartioning your hard disk incorrectly.

 

Pre-requisites:

 

You will need access to a linux environment where you can work with your hard disk without having it mounted. A linux live CD will work for this or you can use another linux system with the hard disk attached. Make sure the live CD contains tools to resize your current filesystem* to make room for OSX and also contains fdisk to repartition.

 

Your hard disk cannot have more than 4 primary partitions... if you have 4 at present you'll either have to delete one or use another disk.

 

* If you use reiserfs you need resierfsprogs which contains a binary called resize_reiserfs, if you use ext2 you need e2fsprogs which contains resize2fs. For other filesystems I'm not sure what you'd use so you'll need to Google for these.

 

You will need a copy of GNU/Parted installed on your system so that you can perform some advanced imaging tasks.

 

You need the "deadmoo" image of OSx86. This is the image that comes with the VMWare files for Tiger and is floating around on torrent sites. Hint: tiger-x86.tar.bz2

 

Check your CPU supports SSE2 by booting into Linux and then do the following:

 

grep -i sse2 /proc/cpuinfo

 

If nothing comes out, stop right here... this won't work.

 

Setting up your hard disk:

 

You need to boot into a linux environment where you can work with your hard disk without mounting it. Therefore you cannot boot the linux that resides on the disk you want to install OSX to.

 

Boot into linux and log in as root. I attached my hard disk to another linux machine and worked with it from there (purely so i could use Google if I messed up)... you may also use a Live CD to do this.

 

Do not mount your hard disk yet!

 

Right, you need to know which partition you want to shrink to make room for OSx86. If you already know the device, great! If you don't know the device it's probably /dev/hda1 or /dev/hdb1 or hdc3 etc for IDE/PATA drives. If it's a SATA or USB drive it's most like /dev/sda1 or /dev/sdb2 or sdc1 etc. I can't help you much more than that on this part I'm afraid although the next step should hopefully make it obvious if you have the wrong device.

 

Run fdisk on the main disk device (/dev/hdX or /dev/sdX where x is the letter of the device, not followed by the partition number).

 

fdisk /dev/hda
p

 

Type "p" and hit enter when you run fdisk. This will show you what partitions are on the disk... this should hopefully clarify which one you want to resize.

 

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/hda1			   1	  108508	54688000+  83  Linux
/dev/hda2		  135636	  137574	  977256   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/hda3		  137589	  155040	 8795587+   7  HPFS/NTFS
Partition 3 does not end on cylinder boundary.

 

Type "q" and hit enter to leave fdisk.

 

You're going to need to create at least 6.0GB of space to accomodate the deadmoo image. Resize your filesystem now to create this space (I'd strongly urge you to create a little bit of extra space to avoid possible corruption of the disk... I actually created 14.0GB and will resize the OSX filesystem later).

 

For example, using resize_resiserfs you would do:

 

resize_reiserfs -s -6G /dev/hda1

 

This may take some time depending upon your hard disk.

 

Once it's done make sure the filesystem still works:

 

mkdir /mnt/disc
mount /dev/hda1 /mnt/disc
df -h
ls /mnt/disc
umount /dev/hda1

 

If it mounts ok and the files are listed you're safe.... if it can't mount the device or files are missing, well, that just sucks but I'll leave you to take that risk (which is a very small one if you have enough room).

 

When you typed df -h above you should have seen a list of devices. Write the number down that's in the "capacity" column for your partition you just resized... you'll need to know this.

 

Now comes the trickiest part... you need to fix your partitions to allow another filesystem on the disk. A word of warning, if things go wrong first time do not panic... changing your partition table and deleting partitions does not remove the existsing filesystems... you will be able to reverse the changes if you're careful.

 

OK, run fdisk again like you did before. If you make a mistake at any point, hit "q" to quit fdisk and start over again :D

 

fdisk /dev/hda
p
  Device Boot	  Start		 End	  Blocks   Id  System
/dev/hda1			   1	  108508	54688000+  83  Linux
/dev/hda2		  135636	  137574	  977256   82  Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/hda3		  137589	  155040	 8795587+   7  HPFS/NTFS
Partition 3 does not end on cylinder boundary.

 

Find the partition you just resized in the list and look what number it is (hda1 or 2 etc). Delete it by pressing "d" then hitting enter and typing the correct number in. Don't delete more than on partition or you'll not be able to recover lost data very easily.

 

*** Now recreate the partition but smaller than it was before... this is why you wrote the capacity down after running df -h above. Type "n" to create a new partition, type "p" to create a primary one, type the number of the partition that you deleted. When it asks where to start the partition from just hit enter because it should have the correct default value. When it asks where to end the partition type "+<size>G" where <size> is the capacity you wrote down.

 

Type "n" again to create another partition, type "p" for primary. Choose a number that isn't in use and keep hitting enter until the prompts are finished since this will use the available slot. Now you need to set the partition type for the one we just created. Type "t", then choose the number of the partition.

 

When you're asked to type a code you need to type "af" and hit enter.

 

Type "w" to write the partition table to the disk and leave fdisk.

 

Make sure you can still mount the device you shrunk. I had to run fdisk several times before i got this working and increase <size> in +<size>G until it worked. The reason it may not work is if the filesystem on the disc extends beyond the allocated slot on the partition table... you can fix this providing you don't try formatting!

 

mount /dev/hda1 /mnt/disc
ls /mnt/disc
umount /dev/hda1

 

If it worked then great, if you get errors fire up fdisk, type "d" to delete the partition you shrunk, type "d" to delete the partition you added and then start over from the point I marked with " *** " above only, try increasing <size> to allow more space.... it's OK, you can fill this space again ;)

 

Once you have everything above working the hardest part is done (phew!).

 

Copying the deadmoo image to the new partition:

 

Firstly, extract the contents of the tar.bz2 archive you sourced from bit torrent or elsewhere.

 

tar -xvjf /path/to/tiger-x86.tar.bz2

 

This is not a fast process, you're uncompressing over 4GB worth of data! Be patient and wait... read the paper, have a coffee... just wait ;)

 

Once it's uncompressed you should have a new directory called "tiger-x86". List it's contents:

 

ls -l /path/to-tiger-x86/

 

Output (extract):

 

-rw-r--r--  1 root root 6441910272 Feb 24 12:30 /tiger/tiger-x86-flat.img

 

Make sure the file listed above is there! It's called tiger-x86-flat.img ... if these number does not match 6441910272 stop right here -- the extraction either went wrong, you've downloaded the wrong archive or the download is corrupt. If the size is 6441910272 then good :)

 

If you're familiar with imaging you may be tempted to just dd that image to the partition... don't do this! The image is a full disk image, not a single partition. It contains the partition table and MBR etc so it will not work without dd'ing it over your entire disk and you'll lose data.

 

OK... Fire up GNU/Parted for the disk you want to copy to.

 

parted /dev/hda

 

Here's where we'll copy the image:

 

cp /path/to/tiger-x86-flat.img 1 4

 

Where you change "4" for the number of the partition you created using fdisk (the one you set the type to "af" for).

 

If you get warning about HFS+ being unsupported just type "i" and hit enter.... it won't matter ;)

 

This may take a long time... be patient. When it's finsished you type "quit" to leave parted.

 

If your linux kernel has HFS+ support compiled in you can try mounting the device to see if it works... otherwise... just cross your fingers and move to the next step.

 

Add Tiger to your bootloader:

 

I'm assuming you're using GRUB as a bootloader... if you use LILO you'll have to do the equivalent for LILO but I wouldn't know what that is :)

 

Mount the device your GRUB runs from and open up the config file... this may be called "grub.conf" of "menu.lst" depending upon the distro you use.

 

nano -w /mnt/disc/boot/grub/grub.conf

 

Add the following lines at the bottom of the file and then save it:

 

title		   Mac Tiger OSx86 10.4.3
root			(hd0,3)
makeactive
chainloader	 +1
boot

 

Change (hd0,3) the actual device you put the image onto. This will be the same as your linux system except that the last digit should be the number of the partition you added, minus one.

 

Reboot into Tiger:

 

When the grub menu pops up after a reboot, select the option you added for tiger and pray it works :)

 

If you get a black screen with some white writing about Darwin at the top you're good... if you get errors from GRUB then either the image didn't copy correctly, or you have the wrong device set for root (hd0,X).

 

Here you'll need to do some tweaking to get OSx86 to boot. Hit enter before the timeout runs out.

 

At the prompt type "-s" and hit enter. If it halts with an error use the power button to restart and try typing "-s platform=x86pc" instead of just -s. If that still doesn't work you'll need to do some searching on the forums but you're close in any case :)

 

Once you've booted into OSx86 with the -s option you should be at a command prompt. Type following to give yourself write access to the disk:

 

mount -uw /

 

Now you need to remove the TPM stuff so that your machine actually runs to any usable level. I wouldn't suggest deleting this at first in case you have problems... intead, just move it somewhere else.

 

mv /System/Library/Extensions/AppleTPMACPI.kext   /

 

Now reboot again without the "-s"... type "reboot" to reboot. If you needed to type "platform=x86pc" then type that again at the prompt... just leave out the -s.

 

Hopefully everything will boot into tiger OK. I can almost guarantee that things like graphics may not work but ask around on here and you'll fix that if you're determined enough...

 

Hopefully this will help a few Linux users trying to install OSx86 without losing data (like me). Good Luck :D

Link to comment
Share on other sites

 Share

×
×
  • Create New...