Monday, January 7, 2008

Installing BackTrack on a USB Drive

Okay, now we should have a USB drive with a FAT32 partition taking up most of the space of the drive and some empty unformatted space for our ext2 partition , which we'll create in linux.


First we'll install Backtrack on the partition we created, so that we can log in to BackTrack with it.


To begin, you must have a program that can open an .iso file to access the files. I use Winrar, which is an unzipping utility. There is trial version available at http://www.rarlab.com/download.htm.


Open the Backtrack iso file you downloaded a couple of posts ago, using Winrar or whatnot. You will see 2 folders, 'boot' and 'BT3'. Unzip this file to your FAT partition on your USB Drive.

Now if you go to to your drive, you should see 2 folders there. Great.

We need to make the drive bootable, meaning that when you turn on the computer, it should be able to boot an OS from that drive. To do that, we have to run a program.

Open to 'Boot' folder on your drive. You will see a file named 'bootinst.bat'. Double click on it to run it. It will warn you to make sure that you've selected the right drive. If you've done everything right until now, you should have nothing to worry about. Press Enter to run the program and then again to exit. The drive should be bootable now. I'm gonna go try, so we'll be in touch.

OOPS, tried to boot and got an error. I forgot one thing. Being that we're fooling Windows into thinking that our removable drive is a fixed drive, we have to edit the 'bootinst.bat' file with a tiny modification.

Go to the 'bootinst.bat' file, righ click on it, and select Edit.

Scroll down and look these lines:

:setupNT
\boot\syslinux\syslinux.exe -ma -d \boot\syslinux %DISK%:
goto setupDone
:setup95

\boot\syslinux\syslinux.com -ma -d \boot\syslinux %DISK%:

You have to add ' -f' (space dash f) to the 2 lines that start with '\boot' , after the letters -ma, so that the lines should look like this:

:setupNT
\boot\syslinux\syslinux.exe -ma -f -d \boot\syslinux %DISK%:
goto setupDone:setup95
\boot\syslinux\syslinux.com -ma -f -d \boot\syslinux %DISK%:


Now run the program, and boot up. Good luck. I'm gonna try it out now.

COOL!! Now it worked and I'm editing this post from within BackTrack. It was quite a bit quicker loading up from USB Drive compared to loading off a CD.

As I posted in an earlier post, if you hibernated out of Windows you may have to take one step to boot. When the computer starts, you may not get any boot options, so that you can choose which drive to boot from. What you must do is let the computer start coming out of hibernation and then quickly hold the power button to shut the machine. The next time you turn it on, you'll be able to access the boot options by pressing ESC or DEL or F1, depending on your system.

If you don't have any regularly connected USB drives, you can edit the boot order so that, in the future, whenever the USB drive is connected is should boot from it. It can always be changed at a later date. Enjoy.

11 comments:

Raz0r said...

Hi very good guide by the way m8 only problem is my usbs arnt booting i have tried it on two diffrent ones and they both dont work , its strange cos it works on my 1gb usb but not on my 2gb and 4gb and now i cant revert back the usbs how they used to be please can you shed some light on why they dont boot up , i have followed you instructions to a T mate please help thanks Ted

please add me up to msn i need a chat thanks

Raz0r

Raz0r said...

Raz0r here again i have also attached an image

http://i32.tinypic.com/2926tlk.jpg

please get back to me asap thanks

Raz0r

Unknown said...

I got backtrack 3 working on my usb drives following his directions. Its really simple. The only thing to make it boot form the usb is when you start your computer look for what key to push to pull up the boot menu. For my computer, an HP, I used F9 to pull the boot menu up and then chose the usb option. If your usb is out its prolly because you partitioned or fomated it deleting the hidden files. Make sure you didnt delete the hidden files on your usb. For example I had 2 partitions on my 8gb flash drive, which made it 4gb each. I put a lock on one partition, then I accidentally deleted the lock hidden file and now i cant access the other 4gb side. So becareful when partitioning or fomatting ur usb. Hope this helped.

shabedue said...

Hey,
great posts. I can actually fallow this stuff and I'm starting to feel like i know what i'm doing. So here's my problem. I can boot bt3 from the CD but when i try to boot from the flash drive it gives an error message right away. I'm not really sure whats wrong. I fallowed the directions and have a 1gb version of the same flash drive you do. The partitions worked. I've been playing around with it and was wondering if you have any advice. I think maybe the ( -f) that was added is the wrong letter or something. Also i made the partition a FAT32 and am running vista, is it possible that i should have just created a FAT partition. Any help would be greatly appreciated!!

thanks

Unknown said...

Using Vista you may need to open bootinst.bat from the command line, with Administrator rights or you will get "disk access denied" when the program runs. It will run but it won't actually write the MBR changes to the disk. Create a shortcut to cmd.exe on the desktop, then right click on it and select "Run as Administrator". Click "Allow" when the security dialog box comes up. From the command prompt navigate to whatever drive letter your USB stick is- just type the drive letter followed by : and hit enter. Make sure you are in the right drive by typing "dir" and hit enter. You should see the two folders that you copied to your USB stick. Switch to the boot directory- "cd boot". Do another "dir" and you should see the files. Type "bootinst.bat" and hit enter. The program will run and write the changes to the disk now.

Unknown said...

the syslinux.exe is not working. It says that it's not a valid win32 program. that happens in xp and I get a simmilar error in vista. the install from linux went fine but it still won't boot because it doesn't find some files.

Unknown said...

Hi everyone,
I GOT A NEW HP LAPTOP DV51080EL...
ACTUALLY IT IS THE BEST COMPUTER ON SALE...
BUT IT RUNNING WINDOWS VISTA HOME PREMIUM.
I M NOT A MOSTER WITH LINUX BUT I CAN DO MOST OF THINGS.
SO DECIDED TO INSTALL BACKTRACK 3 ON MY NEW MACHINE.

after 4 days work no stop ...
i m exousted...

1) boot bt3 live cd and save to the hard disk...NOTHING
http://wiki.remote-exploit.org/index.php/Transcript_of_movie

2) boot bt3 USB
http://n00bhacker.blogspot.com/2008/01/installing-backtrack-on-usb-drive.html
in the end it looks working fine from vista.
after boot from USB alwell.

i run the command ...xconf... and it saids:

Trying to autoconfigure Xwindow system, please wait...
creating /etc/X11/xorg.conf...
all done.Run startx now.
if you get a black .....

Until now it looks FINE.. or NOT?

i run the command ...startx... and i get:

kded:ERROR communication problem ,probably crashed

Did i do something wrong?
i try everything on web with this error but nothing
http://www.linuxforums.org/forum/debian-linux-help/55705-startx-problems.html

Plese someone HELP PLEASE,HELP PLEASE,HELP PLEASE,HELP PLEASE

i post an image to help you understand....

I M EVEN ABLE TO DONATE SOME MONEY TO SOLVE MY PROBLEM.
THANK EVERYONE

sergio said...

please help me to solve my problem with bt3 on vista i m fucked up..
THANKS EVERYONE

https://www.blogger.com/comment.g?blogID=4174730118021546698&postID=4718519850592462493&page=1

Unknown said...

I am booting up from usb aka "+Hard Disk" on my boot menu and once the computer is running. nothing is happening. (i have XP) what should i do?

Unknown said...

now when i try to boot BT3 from command prompt it is telling me WARNING: Not enough free memory load buffer size

im lost....

Anonymous said...

Cool story you got here. It would be great to read something more concerning that theme. The only thing I would like to see here is some pictures of any gadgets.
Alex Karver
Cell jammer