CREATING A PERSISTENT USB
BOOTABLE VERSION OF BACKTRACK 3
Updated: September 2008
Ok so you don't want to have a
dedicated Linux hard drive or machine for your wireless tools and you can only
do so much with a CD-ROM version of Backtrack (Can't save changes) or a VMware
version (limited wireless card support).
The solution = Create your own USB
bootable (persistent) version of Backtrack 3.
Prerequisites:
A USB drive at least 2Gb in size.
Your laptop must support booting from
a USB device (you may have to change the boot order in the BIOS to accomplish
this).
You have downloaded the USB version
of Backtrack 3 from:
www.remote-exploit.org/backtrack_download.html
Configuring the USB device:
First we need to create two
partitions on the USB device:
1. Boot up your Linux machine
(this is only required for initial installation a VMware machine will work
fine).
2. In the Linux machine run "tail
-f /var/log/messages" and insert the USB drive. In my case the
following is displayed "[sdb] Attached SCSI removable disk" so we now
know the USB device is sdb.
3. fdisk /dev/sdb
4. Command (m for help):
p (to see what is on the drive).
5. If there are any existing
partitions on the device delete them using d you will then be prompted
for the partition number.
6. Command (m for help): n
(to create a new partition)
7. Command action e extended, p
primary partition (1-4): p (for primary)
8. Partition number (1-4): 1
(for first partition)
9. First cylinder (1-245,
default 1): 1 or Enter (to start at the first cylinder)
10. Last cylinder or +size or +sizeM
or +sizeK (1-245, default 245): +1024M (to create a 1Gb partition)
11. Command (m for help): t
(to set partition type)
12. Hex code (type L to list
codes): b
13. Command (m for help): n
(to create a new partition)
14. Command action e extended,
p primary partition (1-4): p (for primary)
15. Partition number (1-4):
2 (for the second partition)
16. First cylinder (126-245,
default 126): Enter (to accept default)
17. Last cylinder or +size or +sizeM
or +sizeK (126-245, default 245): Enter (to use the rest of the
disk this will create a 1Gb partition if you're using a 1Gb disk)
18. Command (m for help): t
(to set partition type)
19. Partition number (1-4):
2
20. Hex code (type L to list
codes): 83
21. Command (m for
help): p (to make sure there are two partitions of the type and
size you are expecting)
22. Command (m for help): w
(to write you changed to the disk, without this step nothing is actioned).
Mounting the new partitions in
Linux:
1. Create 2 mount points e.g.
mkdir /usb and mkdir /usb1
2. mount /dev/sdb1
/usb (mount the FAT partition). You made need to specify the
file system e.g. mount -t vfat /dev/sdb1 /usb
3. mount /dev/sdb2
/usb1 (mount the Linux partition). You made need to specify the
file system e.g. mount -t ext3 /dev/sdb2 /usb1
Note: If you are having trouble
mounting any particular drive do a format on the windows partition or an fsck on
the Linux partition prior to performing the mount.
Installing Back Track 3 to USB:
1. Copy the Backtrack 3 .iso
image: bt3final_usb.iso to / on your Linux machine.
2. mkdir /bt3_iso
(create a mount point to mount the .iso image)
3. mount -o loop -t /iso9660
bt3final_usb.iso /bt3_iso (mount the Backtrack 3 .iso image)
4. cp -r /bt3_iso/boot
/usb (copy the boot directory to the FAT partition)
5. cp -r /bt3_iso/BT3
/usb (copy the BT3 directory to the FAT partition)
6. mkdir /usb1/changes
(manually create a "changes" folder on the Linux partition)
7. /usb/boot/bootinst.sh
(execute bootinst.sh on the FAT partition and follow prompts)
8. vi /usb/boot/syslinux/syslinux.cfg
(or use another text editor to open the file)
9. At the end of the APPEND
line, under the mode you are planning to use e.g. KDE, add the following:
changes=/dev/sdb2
So, for the MENU LABEL BT3 Graphics
mode (KDE)
"......rw autoexec=xconf;kdm"
becomes "......rw autoexec=xconf;kdm changes=/dev/sdb2"
After you have made the changes save
the file.
Done, reboot, enjoy : )
|