Enterprise Lockdown

Reply

Dual-boot your Windows XP/Vista/7 lab laptop with Backtrack 4 Beta

The following information is not guaranteed to work and may result in the loss of your active data if you attempt this on your own machine without a proper backup. Any number of mistakes or mistypes or misconfigurations in your machine may result in the loss of all your data. Back up your machine before attempting, or ONLY use a lab laptop. You have been warned, I am not responsible for any loss of your data.

Quick notes from my T42 Test Laptop that I run Vista on, and configured to dual-boot the BT4-Beta.
Get BackTrack 4 Beta here
http://www.remote-exploit.org/cgi-bin/fileget?version=bt4-beta-iso

##############################################################################

From T42:
shutdown T42
power on T42 with BT4 cd in the drive
Log in (root/toor)
Start networking (/etc/init.d/networking start)
Start the GUI if you want (startx)

##############################################################################

From within the Booted BT4 OS:
Open a terminal window
install ubiquity (apt-get install ubiquity)
unmount your hda1 (umount /dev/hda1)

##############################################################################

Follow the rest here at:
http://www.offensive-security.com/movies/dualbootbt4/offsec-backtrack-03.html
http://forums.remote-exploit.org/showthread.php?t=20140

The above links are the notes I've used to figure out what I needed to do. Some things worked, some didn't. Below is what I got out of my system, though you're may differ. The first link above is a how-to video, and if you don't have the same weird hardware issue mine had, then it may be all you need. If not, see if the other link, or the below info helps you.

##############################################################################

From the Ubiqiuty Wizard:
None of these are requirements, this is just what I did. Choose your own sizes to match, but 8GB should be enough for the / partition.

Reduce your windows partition to create around 12GB of free space. This will force Windows to run a chkdsk, which you SHOULD allow!

Create three partitions within Ubiquity (you can use 'fdisk' if you want):
/hda5 - make this 7GB
/hda6 - make this 2GB
/hda7 - make this 3GB

For me, the install wizard failed due to some weird ACPI/motherboard hardware issue, though it may not fail for you if your hardware revision is different than mine. If you see the wizard fail, let the wizard fail the install, as it will at least create the partitions. Then, once done, you can check and make sure this was done correctly by doing the following:

fdisk /dev/hda
p


you should see all the partitions laid out like this:
Device Boot Start End Blocks Id System
/dev/hda1 * 1 3070 24658751 7 HPFS/NTFS
/dev/hda2 3071 4864 14410305 5 Extended
/dev/hda5 3071 4256 9526513+ 83 Linux
/dev/hda6 4257 4499 1951866 83 Linux
/dev/hda7 4500 4864 2931831 82 Linux swap / Solaris


Now, write the tables

root@jhoward-bt4:~#mke2fs /dev/hda6
root@jhoward-bt4:~#mkswap /dev/hda7 (this may throw an error that it's already done, if Ubiquity did it's job)
root@jhoward-bt4:~#swapon /dev/hda7 (this may throw an error that it's already done, if Ubiquity did it's job)
root@jhoward-bt4:~#mkreiserfs /dev/hda5 (choose Y)
root@jhoward-bt4:~#mkdir /mnt/backtrack
root@jhoward-bt4:~#mount /dev/hda5 /mnt/backtrack
root@jhoward-bt4:~#mkdir /mnt/backtrack/boot
root@jhoward-bt4:~#mount /dev/hda6 /mnt/backtrack/boot
root@jhoward-bt4:~#cp --preserve -R /{bin,dev,home,pentest,root,boot,usr,etc,lib,opt,sb in,var} /mnt/backtrack

this will take awhile, just give it 10-15 minutes until it completes and you get your prompt back
root@jhoward-bt4:~#cd /mnt/backtrack
root@jhoward-bt4:~#mkdir {mnt,proc,sys,tmp}
root@jhoward-bt4:~#chmod 1777 /mnt/backtrack/tmp
root@jhoward-bt4:~#mount --bind /dev /mnt/backtrack/dev
root@jhoward-bt4:~#mount -t proc proc /mnt/backtrack/proc/
root@jhoward-bt4:~#chroot /mnt/backtrack /bin/bash
root@jhoward-bt4:~#nano /etc/lilo.conf


My lilo.conf file looks like this:
#####################################
boot=/dev/hda
root=/dev/hda5

# 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

#Windows Vista Partitions
other = /dev/hda1
Label = "Windows Vista"
table = /dev/hda

#####################################

Replace the windows partition with whatever yours is (/dev/sda1 to /dev/hda1 in my case)
save and exit

root@jhoward-bt4:~#lilo -v

Make any mount points you may want for our windows/pen drive
root@jhoward-bt4:~#mkdir /mnt {sda1,sda2,sda3,sdb1,sr0)

Edit the fstab to reflect the new partitions
root@jhoward-bt4:~#nano /etc/fstab

My fstab config is below:
#####################################
aufs / aufs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/hdc /mnt/hdc iso9660 auto,noatime,users,suid,dev,exec,ro 0 0
/dev/hda1 /mnt/hda1 ntfs-3g auto,noatime,users,suid,dev,exec,locale= 0 0
/dev/hda6 / reiserfs defaults 0 0 #autoupdate

#####################################

save all changes to any files open and reboot
root@jhoward-bt4:~#init 6


If all went well, when your machine comes back up, you will see LILO present you with your Windows OS(es) and BT4.

Good luck and happy hunting!
Jerrod Howard
Sr. Technical Marketing Engineer
Aruba Employee

Re: Dual-boot your Windows XP/Vista/7 lab laptop with Backtrack 4 Beta

Nice tutorial Jerrod. I've found that using a 2-4G USB stick works very well and lets you move from laptop to laptop.
That tutorial can be found here: http://www.offensive-security.com/movies/persistent/offsec-backtrack-02.html

-J
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: