back track - pskl.us

8
back track www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us back track Brought to you by WARNING: While this procedure is pretty darn safe (if followed correctly) and we’ve never had a meltdown as a result, you should know that ANY time you mess with your harddrive, especially repartitioning it, you are taking the risk of losing EVERYTHING. Make sure your backups are up to date, make a Ghost image, pray to your God, whatever. Most of all... if you can’t stand the heat, stay out of the kitchen. Part I: Repartition your existing Hard Drive Properly shut down your windows operating system. If there are any errors on your windows 1. partitions, the tool will detect them and prevent you from repartitioning your drive. We’ll be using the GParted tool to resize your existing windows partition in order to make room for 2. the new Linux operating system. There is a self-booting ISO available at http://gparted.sourceforge. net. Download the ISO and burn it to a CD or DVD. (Note: We’ve found that ISOs burned to DVDs tend to boot faster compared to the same ISO burned to a CD). Boot your computer from your GParted disc. At the boot menu (See figure 1a), hit Enter to accept 3. the default choice. Press Enter at the “ 4. Load keymap (Enter for default): ” prompt. Press Enter at the “ 5. Load keymap (Enter the number matching your language, Enter for US): ” prompt. The system will now attempt to auto- 6. detect your computer’s video card and monitor settings. If the software is unable to find a compatible video driver for your computer, you will be dropped to a shell prompt. figure 1a - GParted boot menu BackTrack2/Windows XP Dual Boot How-To

Transcript of back track - pskl.us

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

back track

Brought to you by

WARNING:While this procedure is pretty darn safe (if followed correctly) and we’ve never had a meltdown as a result, you should know that ANY time you mess with your harddrive, especially repartitioning it, you are taking the risk of

losing EVERYTHING. Make sure your backups are up to date, make a Ghost image, pray to your God, whatever.Most of all... if you can’t stand the heat, stay out of the kitchen.

Part I: Repartition your existing Hard Drive

Properly shut down your windows operating system. If there are any errors on your windows 1. partitions, the tool will detect them and prevent you from repartitioning your drive.

We’ll be using the GParted tool to resize your existing windows partition in order to make room for 2. the new Linux operating system. There is a self-booting ISO available at http://gparted.sourceforge.net. Download the ISO and burn it to a CD or DVD. (Note: We’ve found that ISOs burned to DVDs tend to boot faster compared to the same ISO burned to a CD).

Boot your computer from your GParted disc. At the boot menu (See figure 1a), hit Enter to accept 3. the default choice.

Press Enter at the “4. Load keymap (Enter for default):” prompt.

Press Enter at the “5. Load keymap (Enter the number matching your language, Enter for US):” prompt.

The system will now attempt to auto-6. detect your computer’s video card and monitor settings. If the software is unable to find a compatible video driver for your computer, you will be dropped to a shell prompt.

figure 1a - GParted boot menu

BackTrack2/Windows XP Dual Boot How-To

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

At the prompt, type

gparted ~# Forcevideo

at the “7. Type the name of the driver you want to be forced in xorg.conf” prompt, enter “vesa”

At the “8. which resolution do you want to set?” prompt, enter “1024x768”

The system will now start the graphical environment using the standard VESA drivers. It won’t be 9. terribly pretty, but it will work just fine. Alternatively (eg: in the future when you know this is going to happen anyway), you can select the following option from the boot menu:

GParted-liveCD Force VESA driver

The X graphical environment starts, and you 10. are presented with the GParted display (see figure 1b). Select your NTFS partition and click Resize.

Repartition your disc such that there is a 10GB 11. partition at the beginning of your drive. You can create the new partition at the end of your drive if you like, but BIOS limitations in many computers prevent the system from booting from such a partition, especially if you have a large hard drive in your laptop. Your resize window should look something like figure 1c.

Click Resize/Move. You will be returned to 12. the main GParted window, which shows the proposed changes to your hard drive.

Your screen should look like figure 1d. Click 13. Apply to begin the repartitioning process. This can take several hours, depending upon the speed of your computer and the size of your harddrive.

figure 1b - GParted GUI

figure 1d - GParted GUI

figure 1c - GParted Resize Window

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

If you have errors on your NTFS partition, you may 14. see a screen similar to figure 1e. If so, reboot into windows and repair the disk errors before trying again.

When the process is complete, click Exit (see 15. figure 1f). Select Eject and reboot (see figure 1g).

Allow your computer to reboot into 16. Windows. You will notice that a disk check is forced -- this is normal. Just let it complete (see figure 1h).

You are now ready to install BackTrack 17. Linux to your hard drive :)

figure 1h - Windows wants to run a disk check

figure 1e - GParted NTFS error

figure 1f - GParted repartitioning completed

figure 1g - GParted exit screen

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

Part II: Install BackTrack

Download the BackTrack 2 ISO from 1. http://www.remote-exploit.org/backtrack.html and burn it to a CD or DVD.

Boot your computer from the BackTrack 2. disc.

At the login prompt, login as user “3. root” with password “toor”.

At the prompt, type “4. startx” to launch the graphical environment.

Open a Shell window by clicking on the 5. black terminal icon in the lower left of your screen (see figure 2a).

At the prompt, type “6. fdisk -l” to show all of your disk partitions. On most systems with PATA hard disks, your primary hard drive is called /dev/hda. If you have SATA drives, it will be called /dev/sda.

Having learned the name of your hard disk, type 7. “fdisk /dev/hda” (or “fdisk /dev/sda” depending upon what your disk is called) to begin the disk partitioning tool (see figure 2b).

At the fdisk prompt, enter “8. p” to print (on the screen) the list of partitions. You should see your newly-resized windows partition listed.

At the prompt, type “9. n” to create a new Partition. When prompted for a partition type, enter “p” for Primary. Press enter at the next two prompts to accept the defaults.

At the prompt, type “10. p” to print the list of partitions. You should now see your new linux partition listed (see figure 2c).

At the fdisk prompt, type “11. w” to write the changes to the disk.

At this point, it is wise to reboot your computer. 12. At the # prompt, type “reboot”.

Boot your computer from the Backtrack CD, log 13. in as root, start the graphical environment, and open a Shell window (repeat steps 3 through 5).

figure 2a - BackTrack terminal window

figure 2b - fdisk partitioning tool

figure 2c - your updated partition list

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

Check on your newly created partition by typing 14. the command “fdisk -l” at the command line. You should see both partitions listed. Note the device name (/dev/hda2 or /dev/sda2) for your linux partiton (see figure 2d).

Format your new linux partition with the EXT3 15. filesystem using the following command. Be sure to specify the disk name (sda2 or hda2) which is correct for your system.

IF YOU USE THE WRONG DISK NAME HERE, IT WILL FORMAT YOUR WINDOWS PARTITION AND YOU LOSE IT ALL.

Use this command: mkfs.ext3 /dev/hda2

Mount your new partition. Once again, substitute 16. your partition name for /dev/hda2 (see figure 2e)

Use the command: mount /dev/hda2 /mnt/hda2

Start the BackTrack installer. Open the Backtrack Menu (in 17. the lower left of the screen -- the same place you would find the windows Start button) and select “BackTrack Installer” from the System Menu (see figure 2f).

In the “Install Backtrack To” window, select your newly 18. formatted partition (/mnt/hda2 or /mnt/sda2)

Select the “Real” installation method. 19.

Click “Install” to begin the installation process. This can take 20. anywhere between five and sixty minutes, depending upon the speed of your computer.

When the installation is complete, reboot your computer 21. by clicking on the KDE Start menu -> Log Out -> End current session.

Type “reboot” at the prompt.22.

The cdrom will be ejected automatically and your system will now boot into BackTrack from the 23. hard drive installation.

Allow your system to reboot, and once again log in as root using the default password of “toor”. 24. Start the GUI by typing “startx” at the command prompt.

figure 2d - note the name of your linux partition

figure 2e - mount your newly-formatted partition

figure 2f - BackTrack installer

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

Part III: Customize your installation.

Now that Backtrack is installed, it’s time for a few critical customizations.

Change the password to your root account by 1. issuing the command “passwd” at the shell prompt (see figure 3a). Be sure to pick a strong password!

If you haven’t already done so, type “2. startx” to start up the GUI.

Now we need to configure a boot menu so that 3. you can boot into either BackTrack or Windows. From the command prompt in a terminal window, enter “kwrite /etc/lilo.conf” (see figure 3b)

Add the following lines to the bottom of the file 4. (see figure 3c):

other=/dev/hda1

(substituting, of course, the proper label for your hardware -- usually “/dev/hda1” or “/dev/sda1”)

label=Windows

figure 3a - change the root password!

figure 3b - kwrite to edit the boot menu

figure 3b - making edits to lilo.conf

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

You may also wish to adjust the timeout and 5. your default operating system. In the following example (see figure 3c), we’ve changed the timeout to ten seconds, set the default operating system to Windows, and changed the menu text to read “Backtrack 2” instead of “bt”:

Save the file to commit your changes to disk, 6. then close KWrite.

You must now rewrite your boot sector with the 7. new information. To do this, issue the command “lilo -v” (see figure 3d)

You can double-check your installation by simply 8. running “lilo”. You should see one line of output for each operating system installed, as shown in figure 3e.

figure 3c - more edits to lilo.conf

figure 3d - lilo -v command to rewrite boot sector

figure 3e - lilo command to preview boot configuration

back track

www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us www.pskl.us

Typing “startx” every time you boot gets old 9. rather quickly, so let’s configure BackTrack do it automatically. To boot directly into the graphical user environment, type “kwrite /etc/inittab” and change the default runlevel to 4.

Save the changes and next time you boot, 10. the GUI will start immediately.

Well, there ya go. You now have a fully-functional dual-booting BackTrack machine. If you use BackTrack a lot, don’t forget to make a donation to the remote-exploit.org team! Great stuff like this doesn’t write itself.

Look for more great tutorials involving BackTrack and system/network security at pskl.us

figure 3f - edit inittab to start KDE upon boot