Loading

Monday, August 3, 2009

Installing Backtrack 3 to a harddrive

I started with a clean drive, so you might have to manipulate your partition tables. I’m going to assume that you’re comfortable working with partition tables. If not, work on your googleing.

Here are the steps I took to install Backtrack 3 on to my laptop harddrive.

1. Boot system from Backtrack 3 CD.
2. Once booted, open a terminal and type; cfdisk
3. Re-configure your partitions. I made several; / , /boot, /var, /tmp, /home, swap. Be sure to set your / or /boot partition to be bootable.
4. When your changes are complete, use the write option and type YES to confirm the changes.
5. Reboot, booting from the Backtrack 3 CD again.
6. When the system restarts, open a terminal and enter preform the following;
bt~# mkswap /dev/sda5
bt~# swapon /dev/sda5
This formats and enables swap space. You’ll need this later
7. Create directories needed to mount up the partitions you just created. I used the following;
bt~# mkdir -p /mnt/backtrack/{boot,home,tmp,var}
8. Now format and mount the partitions you created earlier in steps 1-4. I used the following commands;
bt~# mkfs.ext3 /dev/sda6
bt~# mount /dev/sda6 /mnt/backtrack/
bt~# mkfs.ext3 /dev/sda7
bt~# mount /dev/sda7/mnt/backtrack/var
bt~# mkfs.ext3 /dev/sda8
bt~# mount /dev/sda8 /mnt/backtrack/tmp
bt~# mkfs.ext3 /dev/sda9
bt~# mount /dev/sda9 /mnt/backtrack/home
9. Once all targets are mounted, use the following command to copy the live cd to your harddrive;
cp --preserve -R /{bin,dev,pentest,root,usr,etc,lib,opt,sbin}
10. Create additional directories
bt~# mkdir /mnt/backtrack/{mnt,proc,sys,tmp}
11. Mount up /mnt/backtrack/dev
bt~# mount --bind /dev /mnt/backtrack/dev
12. Mount slash proc!
bt~# mount -t proc proc /mnt/backtrack/proc
13. Copy our Linux Kernel into place
bt~# cp /boot/vmlinuz /mnt/backtrack/boot
14. Use choot to your new Backtrack 3 installation.
bt~# chroot /mnt/backtrack /bin/bash
15. Edit /etc/lilo.conf
bt~# nano /etc/lilo.conf
and ensure both the boot and root reflect your local installation. I used options similar to the following;
boot /dev/sda
root /dev/sda5
16. When your changes are complete, write the file and exit nano.
17. Install lilo on /dev/sda
bt~# lilo -v
18. Almost done! Edit /etc/fstab to reflect your partition layout. It should be pretty simple to copy and modify existing entries. Check and double check. If this file is wrong, your system may not boot.
19. Once done, exit your chrooted environment
bt~# exit
20. Reboot! Remove the CD from the drive. If everything has gone properly, your system should boot Backtrack 3. I had to login as root and use the startx command to start KDE.

BackTrack links

No comments:

Post a Comment