Enter your email address:


Delivered by FeedBurner
Feb
13th

Make bootable USB to save changes – Back Track 3 on USB with persistent changes

Author: admin | Files under Tutorials

In this article I will try to explain how to install Back Track 3 (BT3) in your USB stick and how to set up USB to save all your changes. So each time you reboot BT3 your will have all the same changes made before restart.

We will need:

A Computer compatible with Back Track 3. I will be using Acer Aspire 5930G.

– The USB stick you will be installing on (USB). Here I will use 2 GB USB stick. It is named JetFlash TS2GJFV90 USB device.

– And the second USB to boot BT from. For this I will use 1GB USB stick (USB2).

Two sticks will be used because we want to make USB bootable and to save changes. So USB2 will be used to do all the steps. Remember that it is possible to do it in Linux only so that is why I use 2 sticks. You can also have CD or HDD.

STEP 1. FORMAT USB and USB2:

If your USB2 is a CD/DVD, you can skip this step, since it is formatted to begin with. In Windows, go to My Computer, right-click USB, and select Format. Choose FAT32 for the file system, label it what you want. Don’t choose quick format, it doesn’t take that long anyway. Follow the same steps for the USB2, if applicable.

You can also format USB in linux.

STEP2. INSTALL BACKTRACK TO USB2:

Download and extract bt3final_usb to USB2. Our USB2 is USB stick so:

  • In Windows navigate navigate to /boot/ within the USB2, and run ‘bootinst.bat’. Follow the instructions, ENSURING THAT bootinst.bat IS WITHIN THE USB, NOT THE HDD. If you run it while it’s within the HDD, YOU WILL LOSE ALL DATA STORED ON THE DRIVE.
  • In UNIX, navigate to /boot/ within the USB2, and run ‘bootinst.sh’. The same warnings given to Windows users apply, but I won’t repeat them seeing as UNIX users are generally more intelligible than users of Windows ;)

STEP 3. REMOVE ALL PREVIOUS PARTITIONS ON USB:

Insert the USB2, boot up, and re-insert the USB. (Remember that we have Linux in USB2). On the desktop, go to System, then Storage Media. Mount the USB, and hover your mouse over the USB2 and USB to identify their device nodes.

My USB’s device node was /dev/sdc, and my USB2 was /dev/sdb. These device nodes will be used as such throughout the rest of this guide – you will have to replace sdc and sdb with your own USB’s and USB2’s device nodes respectively. In my case I have /dev/sdc and /dev/sdb because I am using two sticks.

Having identified your device nodes, open up a shell and type:

umount /dev/sdc1
fdisk /dev/sdc

We need to delete all partitions so type d and hit enter. You will then be asked for the partition number that you want to delete.

Command (m for help): d
Partition number (1-4):

Then type 1 and hit enter again. Do it for all partitions. To see what partitions you have type p and hit enter.

Once there are no partitions, the output of “p” will be:

Command (m for help): p

Disk /dev/sdc: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System

STEP 4. CREATE PARTITION TABLE ON USB:

n
p
1
<ENTER>
+1024M
n
p
2
<ENTER>
<ENTER>
p

The final ‘p’ input should now show two entries: /dev/sdc1 and /dev/sdc2. Remember that <ENTER> means you have to hit enter button not to write. Well, you should see something similar to this:

Command (m for help): p

Disk /dev/sdc: 1998 MB, 1998585344 bytes
255 heads, 63 sectors/track, 242 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa62da6ab

Device Boot Start End Blocks Id System
/dev/sdc1 1 132 1060258+ 83 Linux
/dev/sdc2 133 242 883575 83 Linux

Numbers can be different so it is OK. To apply changes, return back to root:

w

This will write changes to the drive after hitting <ENTER>. Make sure devices are unmounted before moving onto the next step.

STEP5. CREATE PARTITIONS ON USB:

Follow these commands:

mkdosfs -F 32 /dev/sdc1
mkfs.ext2 /dev/sdc2

STEP6. SETTING UP PARTITIONS:

In root type:

mkdir /mnt/sdc1
mount /dev/sdc1 /mnt/sdc1
mkdir /mnt/sdc2
mount /dev/sdc2 /mnt/sdc2
cp /mnt/sdb1/* /mnt/sdc1

It is possible to skip this step and copy BT3 and boot folders in other way. As you do copying in Windows. Well, just copy these two folders to your new and empty USB. The copying will take a few minutes, so you can take a break here. Then:

cd /mnt/sdc1/boot/syslinux
kwrite syslinux.cfg

Scroll down until you find the boot line for the mode compatible with your computer. Since my Wind was only compatible with VESA KDE, I scrolled down to VESA’s boot line. In the APPEND line, add

changes=/dev/sdc2

See I write here /dev/sdc2 but when you unplug your USB stick and use only one stick (the one we are preparing now) you will have to repeat this step and change /dev/sdc2/ to /dev/sdb2 because we are using here two sticks now. So after removing one, sdc2 should become sdb2. Then should look like this:

APPEND changes=/dev/sdb2 vga=0x…

Save the file, and exit Kwrite. Back in the shell:

cd ..
chmod 777 bootinst.sh
./bootinst.sh

In the top line, it should say ‘This installer will setup disk /dev/sdc1 to boot only Slax.’ If it does, go ahead and install it. It doesn’t, don’t run it. Finally,

mkdir /mnt/sdc2/changes
umount /dev/sdc1
umount /dev/sdc2
poweroff

Note that /dev/sdc1 may be busy. This doesn’t really matter. When it has shut down, take out the USB2. To ensure that everything went smoothly, when you’re back in the desktop, double click System, go to Storage Media, and you should see two separate USB devices for your two partitions. Hover your mouse over both of these – the 1.0G Removable Media should be /dev/sdb1 and the other /dev/sdb2.
Then, right-click the desktop and make a ‘test.txt’ file. Reboot, and it should have remained there.

This tutorial was written for my personal use with some changes especially using with my Acer Aspire 5930G and other devices with a help from Remote Exploit. You may also read how to install BT4 on USB with persistent changes.

Related posts:

  1. Back Track 4 on USB with persistent changes – bootable BT4 USB stick
  2. Keep network changes in BackTrack after reboot
  3. I will show you how to increase hard disk spead
  4. Install network card, assign IP and change MAC in linux
  5. How to clean dangerous malware?
en_quibids_ipad_300x250_18

13 responses. Wanna say something?

  1. mike
    May 17, 2009 at 23:55:38
    #1

    excellent instruction — got it working and learned quite a bit in the process. thanks

  2. Bilo
    Nov 18, 2009 at 08:54:48
    #2

    I can’t do this step
    mkdosfs -F 32 /dev/sdc1
    /dev/sdc1: No such file or directory

  3. admin
    Nov 18, 2009 at 09:14:06
    #3

    If you follow all the steps you will do it without any problems. Just do it again from the beginning if you get any errors. I have tested many times and it worked.

  4. Bilo
    Nov 18, 2009 at 12:11:58
    #4

    At first I should select which mode?
    BT3 Graphice mosde (Compiz)
    BT3 Graphice mosde (Compiz Nvidia)
    BT3 Graphice mosde (KDE)…etc

  5. Bilo
    Nov 18, 2009 at 12:22:02
    #5

    some files are exist? (I have already format)
    can u help me to view the log file and point out the mistake?

  6. Bilo
    Nov 18, 2009 at 13:57:01
    #6

    I did everything without error msg in BT3 Graphice mosde (KDE), but the usb become non-bootable, even i ran bootinst.bat or bootinst.sh what should i do?

  7. admin
    Nov 18, 2009 at 16:11:15
    #7

    YOU should try a different usb stick if something is wrong. But according to this tutorial you shouldn’t get any errors. It took my hours to install but I have been reading and doing it. Bootinst.bat u can run in Windowns, bootinst.sh in Linux.

  8. Bilo
    Nov 19, 2009 at 19:14:39
    #8

    [Fixed Version, some words were missing, sorry for double post]

    Thanks! I have done it and working perfectly. You have taught me the conecpt about this.
    However I think there is something u can add in the essay
    You have partition 2 Linux drive at first by」
    /dev/sdc1 1 132 1060258+ 83 Linux
    /dev/sdc2 133 242 883575 83 Linux」

    then:
    「mkdosfs -F 32 /dev/sdc1〞to change back to FAT32

    But if I partition the USB like this it will become non-bootable, even i have used the bootinsh.
    For my 8GB USB, I create a 7GB partition with FAT32 BT3 and 1GB is empty under Windows at first. So I can just simple create ext2 parition under BT3 and skip the file copying step, everything goes perfect :)

    Also, u said that
    「It is possible to skip this step and copy BT3 and boot folders in other way. As you do copying in Windows. Well, just copy these two folders to your new and empty USB. The copying will take a few minutes」

    At that time, if u remove the usb and plug in to another Windows machine to copy file then u plug it back to BT3, the /dev name has been changed(My another fatal mistake!!), so I think you should also mention it 「the /dev name will be changed if you copy the BT3 and root folder in the other machine under Windows」

    that’s all
    Thanks!
    I have made it :)
    Have a nice day!
    (Sorry for my bad English.)

  9. Roland
    Jan 15, 2010 at 10:23:48
    #9

    I’d like to know if I can install backtrack 3 in my old pentium III desktop… If so, please show me how… thanks…

  10. admin
    Jan 16, 2010 at 10:59:22
    #10

    yes you can, just follow same instructions but use Hard disk not USB, i reckon it may be sda

3 Trackback(s)

  1. Mar 17, 2009: Keep network changes in BackTrack after reboot | Blog and SEO tips to help you make money blogging
  2. Mar 17, 2009: Back Track 4 on USB with persistent changes - bootable BT4 USB stick | Blog and SEO tips to help you make money blogging
  3. Mar 17, 2009: Install network card, assign IP and change MAC in linux | Blog and SEO tips to help you make money blogging

Post a Comment