i know i know, macs aren't real popular here, but i just bought my first mac a few months ago and now i love my macbook pro. and i got it cheap! my system is setup to triple boot osx, ubuntu, and bt4. some of what i setup could be done differently if you are only looking to dual boot or triple boot with a windows os, i'll note differences as i go.

yes i also understand that i'm probably crazy for going through all this to get bt4 up and running the way i wanted. first, i did it because it was a great learning experience, and second, you'll never hear me claim i'm not crazy.

hardware

this howto was put together on the following laptop:
Code:
root@bt:~# dmidecode -s system-product-name
MacBookPro4,1
lspci output here:
hxxp://backtrack.offensive-security.com/index.php/HCL:Laptops:MBP-2008-1-lspci

if you have a different version of mac hardware some of it still may apply, but i wouldn't assume anything if i were you.

partitioning

there is a really good overview of the issues and limitations about partitioning your macbook pro to dual or triple boot and instead of duplicating that information i'll just send you there, come back when you are done though

http://wiki.onmac.net/index.php/Trip...t_via_BootCamp

i partitioned my disk using disk utility in osx, creating a layout that shows as 3 partitions (linux will see it as 4 in the MBR, the fourth being an EFI partition). osx has 100GB, ubuntu has 50GB, and bt4 has 35GB. relative sizes are of course up to you, i keep all my music on the osx partition because linux can read hfs+. if you are triple booting with windows it might make sense to have your NTFS partition the largest because you'll be able to write to it from osx and linux. you can just mark the partitions as FAT while in osx, they'll get reformatted anyway later.

linux will eventually see the disk like this when we are done:
/dev/sda
/dev/sda1 - EFI
/dev/sda2 - HFS+ (osx)
/dev/sda3 - Ext3 (ubuntu)
/dev/sda4 - Reiser

boot loader

Boot Camp cannot handle a triple boot system and i read that it is currently recommended to boot Linux through BIOS compatibility mode using LILO or GRUB, otherwise, the fully accelerated ATI and Intel graphics drivers will not work. so i chose to go with rEFIt as a boot loader and have been very happy with it. it will be required to get through this howto:

http://refit.sourceforge.net/

so you have rEFIt installed and your hard drive partitioned. i have found it is better to be safe than sorry when it comes to keeping the GPT and MBR in sync (you did read about paritioning your mac right?), so lets make sure they are. boot to rEFIt, there is an option called "partition tool" select it and press enter. it will check that the two are sync'ed and offer to do so if they are not, if it needs to sync choose "Y" and exit out.

hd install

boot to your bt4 beta dvd (rEFIt should pick it right up, no need to hold down the option key anymore). i followed the great howto here:

http://forums.remote-exploit.org/sho...ght=hd+install

with modifications because of the partitioning limitations due to triple booting the mac. each linux install in my setup can only have one partition, that means no swap or boot partition. supposedly a swap file should perform just as well as a swap partition in a 2.6 kernel, so if you are only dual booting its probably better to go with a boot partion and mount it read only.

[SIZE="2"]step 1 /SIZE] you can skip, partitioning was done in osx

step 2 format, mount, copy, chroot

Code:
mkreiserfs /dev/sda4
mkdir /mnt/bt
mount /dev/sda4 /mnt/bt
cp --preserve -R \
/{bin,dev,home,pentest,root,usr,boot,etc,lib,opt,sbin,var} /mnt/bt
mkdir /mnt/bt/{mnt,tmp,proc,sys}
chmod 1777 /mnt/bt/tmp/
mount -t proc proc /mnt/bt/proc
mount -o bind /dev /mnt/bt/dev/
chroot /mnt/bt/ /bin/bash
step 3 lilo config
Code:
lba32
boot=/dev/sda
root=/dev/sda4

# bitmap=/boot/sarge.bmp
# bmp-colors=1,,0,2,,0


# bmp-table=120p,173p,1,15,17
# bmp-timer=254p,432p,1,0,0
# install=bmp
# delay=20

prompt
timeout=50

# map=/boot/map

vga=0x317

image=/boot/vmlinuz
        label="BT4"
        read-only
        initrd=/boot/splash.initrd
        append=quiet
step 4 /etc/fstab
Code:
/dev/sda4 / reiserfs defaults 0 0 # AutoUpdate
proc /proc proc defaults 0 0 # AutoUpdate
sysfs /sys sysfs defaults 0 0 # AutoUpdate
devpts /dev/pts devpts gid=5,mode=620 0 0 # AutoUpdate
tmpfs /dev/shm tmpfs defaults 0 0 # AutoUpdate
step 5 lilo installation

to get rEFIt to properly boot to the new installation install lilo to the partition not the MBR

Code:
lilo -v -b /dev/sda4
and reboot the computer. you will come back up to rEFIt. because the partition type has changed you need to resync the GPT and MBR, choose the rEFIt partition tool again and let it do its magic.

now shut down your computer...

note that i said "shut down" not reboot. this part sucks, it turns out that rEFIt can have issues booting to the new installation and will just freeze. the only way through this is to shut down and try to boot, shut down and try to boot, shut down and, you get the idea. eventually (it has taken anywhere between 2 and 5 tries for me) it will successfully boot into bt4.

ok, we are done! well, not really, not even close, more to come...