installing OS X from within MoL - here is now

Thomas Otto 3.1415926535897932384626433832 at gmx.net
Fri Oct 8 17:17:37 MDT 2004


Ignore everyone else, they have *no* clue ;-)


> i have an iBook G3 running slackware. i used to have OS X on a second
> partition, which at the time ran fine both when booted by itself and within
> MoL. Then i blew away that partition to try out CRUX/PPC.

Debian here, 20 GB HD with previously a third of the diskspace for OS X, 
removed it to place my DATA parition there so the Paritions looked like 
this, old DATA became Mac which I gave to MOL:

> ^ibook: /home/thomas # fdisk -l /dev/hda    ##note: fdisk is symlinked to mac-fdisk
> /dev/hda
>         #                    type name                 length   base     ( size )  system
> /dev/hda1     Apple_partition_map Apple                    63 @ 1        ( 31.5k)  Partition map
> /dev/hda2         Apple_UNIX_SVR2 DATA   <-old OS X  16013632 @ 64       (  7.6G)  Linux native
> /dev/hda3         Apple_Bootstrap bootstrap              1600 @ 16013696 (800.0k)  NewWorld bootblock
> /dev/hda4         Apple_UNIX_SVR2 Linux_Root         11059200 @ 16015296 (  5.3G)  Linux native
> /dev/hda5         Apple_UNIX_SVR2 HOME                3209216 @ 27074496 (  1.5G)  Linux native
> /dev/hda6         Apple_UNIX_SVR2 Mac  <- new w/ MOL  8699904 @ 30283712 (  4.1G)  Linux native
> /dev/hda7         Apple_UNIX_SVR2 swap                  86464 @ 38983616 ( 42.2M)  Linux swap
> 
> Block size=512, Number of Blocks=39070080
> DeviceType=0x0, DeviceId=0x0


> then i tried to run the OS X installer from within MoL. this seemed to go
> fine, and the disk manager seemed to see a disk of 27GB containing another
> disk of 12.6GB.

I ran the OS X installer from DVD Isos (which require the following 
patch from hugang which the lazy devs haven't merged yet ;-) 
http://lists.maconlinux.org/pipermail/mol-devel/2003-November.txt) but I 
just gave it the one parition so nothing could go wrong:

blkdev:                     /OSX.iso   -boot           # and
blkdev:                     /dev/hda6   -rw -boot

hda6 must be marked with -boot too else the mac installer wouldn't 
install itself onto it.

All worked fine and I could boot with MOL without problems.

> now my question: if i proceed to install, will it work properly? that is,
> is there any chance of my slackware partition (from which MoL is running)
> being accidentally destroyed? i figure MoL is smart enough to fool the OS X
> installer into thinking it only has the 12.6GB, but i kinda really wanna be
> sure...


> another question: if OS X is installed from within MoL, will it be able to
> boot by itself, i.e., without MoL? 

Yes, thats what I just did. Keeping in mind that on *nix everything is 
just a file:

> ^ibook: /home/thomas # fdisk -l /dev/hda6
> /dev/hda6
>          #                    type name                length   base    ( size )  system
> /dev/hda61     Apple_partition_map Apple                   63 @ 1       ( 31.5k)  Partition map
> /dev/hda62              Apple_Free                     262144 @ 64      (128.0M)  Free space
> /dev/hda63               Apple_HFS Apple_HFS_Untitled_3 8437680 @ 262208  (  4.0G)  HFS
> /dev/hda64              Apple_Free                         16 @ 8699888 (  8.0k)  Free space
> 
> Block size=512, Number of Blocks=8699904
> DeviceType=0x0, DeviceId=0x0

So we have this hda6 parition at 30283712 and within it the OS X 
partition starts at 262208, makes 30545920 absolute.

So fdisk /dev/hda, d 6, C, First block: 30545920,
Name of partition: Apple_HFS_Untitled_3
Type of partition: Apple_HFS
Length (in blocks, kB (k), MB (M) or GB (G)): 8437680, w,
Write partition map? [n/y]: y

I.e. I deleted the hda6 parition and created a new one where the OS X 
parition within the 6th parition started.

Also as you can see to be on the safe side I named the Partition just as 
it was named within MOL, since *maybe* that's how OS X identifys it...

After which the relevant part looks like this:

> /dev/hda5         Apple_UNIX_SVR2 HOME                3209216 @ 27074496 (  1.5G)  Linux native
> /dev/hda6              Apple_Free Extra                262208 @ 30283712 (128.0M)  Free space
> /dev/hda7               Apple_HFS Apple_HFS_Untitled_3  8437680 @ 30545920 (  4.0G)  HFS
> /dev/hda8              Apple_Free Extra                    16 @ 38983600 (  8.0k)  Free space
> /dev/hda9         Apple_UNIX_SVR2 swap                  86464 @ 38983616 ( 42.2M)  Linux swap

Swap changed to hda9 so I adapted that in the fstab, if your root or the 
Apple_partition_map changes you might have to boot with rescue CDs to 
fix this manually!

Afterwards I added macosx=/dev/hda7 plus brokenosx since its a HFS+ 
parition in yaboot.conf and ran ybin -v and OS X bootet fine again 
native (it asks what to do with the two patches of free space, told it 
to ignore) and MOL - It seems it can cope very well with changing 
hardware :).

Moving the last remaining bits arround is left as an excersise to the 
reader (hints: ext2resize and/or some perl/C code to move OS X non 
volatile 262208 or 16 blocks in the one or other direction :-).

qed

         -Thomas

-- 



More information about the mol-general mailing list