PDA

View Full Version : How to install BackTrack 3 Final from the shell, to a Macbook


Action discrete
06-21-2008, 10:56 AM
I managed to install BT3 final on my MBP Core2Duo Intel. The steps were basically the same as pureh@te described [0], but here is the right steps to follow.

1. You have at least 3 neuron, which is better than 2. (I'm a Mac, you're a PC).

2. You may folow the how to of Jereonimo [1] if you start from scratch (from OSX environment), and follow this how to until Jereonimo starts speaking about Installer GUI (which is no more present in Backtrack).
If you have followed the Jereonimo's explanation and previously installed BT2/BT3b/BT3Pre-IRC, and you would switch to the new BT3 release, you would just have to rewrite a blank filesystem using the command
mkfs.ext3 /dev/sda3

3. The partition table :
On a mac which have rEFIt, Leopard, and another prepared partition, this would like this :
sda1==> EFI GPT (rEFIt boot)
sda2 ==> MacOSX (to preserve)
sda3 ==> Newly formatted partition to be Backtracked.

To see this information, simply use the command fdisk with L parameter :
fdisk -l

4. Insert the liveCD and reboot. rEFIt will run, and choose the LiveCD. If rEFIt don't launch, boot under OSX and follow the rEFIt manual. You can also press ALT once the boot sound plays, and choose rEFIt.

5. You are now under the Backtrack environment. As you Macbook Pro have 1Go RAM or more, you don't have to make a swap partition. I'm on a MBP with 4Go RAM, this would be sic. So, I will jump the swap stuff and let the auto memory swap manage this thing.

5. The steps to install BT3 on the sda3 partition. Open a shell, and type :


mkdir /mnt/backtrack
mount /dev/sda3 /mnt/backtrack/
mkdir /mnt/backtrack/boot/
mount /dev/sda3 /mnt/backtrack/boot/
cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,va r} /mnt/backtrack/
mkdir /mnt/backtrack/{mnt,proc,sys,tmp}
mount --bind /dev/ /mnt/backtrack/dev/
mount -t proc proc /mnt/backtrack/proc/
cp /boot/vmlinuz /mnt/backtrack/boot/


Note about :
- mount /dev/sda3 /mnt/backtrack/boot/ <<< We musn't write anything on our EFI GPT boot partition. So we will write the MBR to the sda3.
- cp --preserve -R /{bin,dev,home,pentest,root,usr,etc,lib,opt,sbin,va r} /mnt/backtrack/ <<<< If you don't find the { and } key, it's : Right ALT then 5. Copy takes 5 min in my case.
- cp /boot/vmlinuz /mnt/backtrack/boot/ <<< If you followed the thing, this will write the MBR to sda3.

6. LILO

chroot /mnt/backtrack/ /bin/bash
## You can either use nano to edit the lilo.conf file or manually navigate to /mnt/backtrack/etc/lilo.conf and open it with any GUI editor.
nano /etc/lilo.conf

My lilo.conf look like this :

# /etc/lilo.conf

boot = /dev/sda3
prompt
timeout = 60
change-rules
reset
#vga = 769,771/773/792
vga = 791
# bootable kernel images:
image = /boot/vmlinuz
initrd = /boot/splash.initrd
root = current
label = BackTrack3
read-only


Then save the file, and execute the lilo.conf using
lilo -v

You can now exit and reboot
exit
reboot

7. Troubleshooting

If at first reboot OSX runs automatically, let it boot, and reboot from OSX. rEFIt should run.
If rEFIt don't launch, hit ALT at boot sound and choose rEFIt the choose the Backtrack3 Icon.
If Backtrack won't launch at all or if OSX wouldn't run after this, simply synchronize the GPT with the MBR using the one key press method provided by the rEFIt command GUI.
If startx gives error, launch xconfig after log in.
But anything of this would normally happen ifyou followed the steps.

Everything works out of the box except sound which need a kernel upgrade, compiz which isn't installed by default in BT3-iso release, and keyboard locale switch under the system tool. For this last thing, I used " setxkbmap -model macbook78 -layout fr " to set it in my locale. Models can be "macbook78" (intel / ppc) or "macbook79" (Intel). You can also follow this how to [2] in order to install the NVIDIA drivers and get 1900x1200.


Enjoy



[0] : hxxp://forums.remote-exploit.org/showpost.php?p=87694&postcount=1
[1] : hxxp://forums.remote-exploit.org/showthread.php?t=11154&highlight=macbook
[2] It's in French : hxxp://wiki.backtrack-fr.net/index.php/Configurer_sa_carte_graphique_NVIDIA

Barry
06-21-2008, 12:01 PM
Can you change the title of your thread to MacBook Pro? MacBooks and MacBook Pros have different hardware and don't work the same with BT.

Action discrete
06-21-2008, 12:46 PM
Can you change the title of your thread to MacBook Pro? MacBooks and MacBook Pros have different hardware and don't work the same with BT.

Done.
Do you to release a MB how to ?

cahrnah
06-27-2008, 04:38 AM
Been trying to do this on my 2008 mbp, but my googlegut feeling is telling me something is missing around the cp /boot/vmlinuz part, since everyone else with the same problem I've seen had to install GRUB? or I'm just tarded. I get my 3 partitions in GPT where it lists sda3 as Basic Data, and in MBR it lists it correctly as Linux. Shows "Legacy OS" in rEFIt boot menu. Tried syncing through the refit partition tool, and reinstalling few times.

Action discrete
06-27-2008, 05:31 AM
Been trying to do this on my 2008 mbp, but my googlegut feeling is telling me something is missing around the cp /boot/vmlinuz part, since everyone else with the same problem I've seen had to install GRUB? or I'm just tarded. I get my 3 partitions in GPT where it lists sda3 as Basic Data, and in MBR it lists it correctly as Linux. Shows "Legacy OS" in rEFIt boot menu. Tried syncing through the refit partition tool, and reinstalling few times.

Hi
GRUB can do the job too, but rEFIt ris really a ease of use, and GRUB is more complicated for the exactly same functionnalities. I'm using a Sept 2007 MBP and this steps worked fine. This worked fine too on a May 2008 MBP. Are you using a newly-released MBP ?
Be sure to install the vmlinuz boot to the root of your ext3 partition and to declare it on LILO.conf. Synchronizing the GTP with the MBR is finally not a matter, as rEFIt should automatically synch the boot sectors if it found one which isn't at restart (restarting 3 times from OSX can make the thing).

Is LiveCD boot working ?

Is Lilo OK ?