Backtrack 4 – USB/Persistent Changes/Nessus

UPDATE 12/30/2009: I created a new how-to for installing Backtrack 4 to a USB drive. This one uses "full" disk encryption. You can find it here. Once done, you can skip down to the Install Nessus section and then skip the Truecrypt section and most of the  Tweaks section. I will be updating this how-to with the new information soon.

UPDATE 12/27/2009: We used to be able to get away with a 4 GB thumb drive. The amount of updates has reached a level where using a 4 GB drive does not leave us with much free space after updating. I have updated the minimum size requirement to 8GB for the target drive.

Welcome to the new and improved Backtrack 4 How-to. This version supports Nessus 4.2 which no longer uses a separate client. The client is web-based now. If you were in the middle  of the using the version with Nessus 4.02, you can reach it here.

If you prefer an off-line version of this how-to, you can grab a PDF version here.

This how-to will show you a method for building a USB thumb drive with the following features:

  • Persistent Changes - Files saved and changes made will be kept across reboots.
  • Nessus and NessusClient installed - Everybody needs Nessus :)
  • Encryption configured (Note: This is not whole drive encryption)

We will also tweak a few things and make some interesting changes.

Table of contents:

Tools and Supplies
Partition the USB thumbdrive
Make a bootable Backtrack 4 USB thumbdrive
Persistent Changes
Install Nessus
Configure Encryption
Tweak a few things


Tools and Supplies

  1. A USB thumbdrive - minimum capacity 8GB
  2. A Backtrack 3 CDROM, Backtrack 4 DVD or an additional USB thumbdrive  (minimum 2GB) - Used to partition the thumbdrive.
  3. Optional: UNetbootin - A tool to transfer an iso image to a USB drive.

Let's get started!

Let's grab a copy of the Backtrack 4 Pre Release ISO.

Description: Image Download
Name:: bt4-final.iso
Size: 1570 MB
MD5: af139d2a085978618dc53cabc67b9269
Download Backtrack

Now that we have the goods in hand, we can get to cooking. This tutorial is based on booting Backtrack 4 first. This means that you need some form of bootable Backtrack 4 media. This can be a virtual machine, DVD, or USB drive. Use your favorite method of creating a DVD or USB drive or you can use UNetBootin to create the thumb drive.  Below is a screenshot of using UnetBootin to install Backtrack 4 on a USB drive.

Installing Backtrack 4 with UnetBootin

It is as simple as selecting the image we want to write to the USB drive, the drive to write it to, and then clicking the 'OK' button. Warning: Make sure you pick the correct destination drive. You don't want to shoot yourself in the foot. :)

Partition the USB thumbdrive

The first step is to boot up Backtrack 4.  With the release of Backtrack 4 Final, a 4 GB drive is required (8 GB recommended) if we are going to enable persistence.  For Backtrack 3 and Backtrack 4 Beta, we could get away with a 2GB drive.  We will also need to figure out which drive is our target drive. The following command will show the drives available and you can determine from that which is the new USB drive:

dmesg | egrep hd.\|sd.

We need to partition and format the drive as follows:

  1. The first partition needs to be a primary partition of at least 1.5 GB and set to type vfat. Also remember to make this partition active when you are creating it. Otherwise you might have some boot problems.
  2. The second Partition can be the rest of the thumb drive.

Below are the steps to take to get the drive partitioned and formatted. These steps are taken from this video on Offensive Security website. A '# blah blah' indicates a comment and is not part of the command and user typed commands are bolded. One note, we will need to delete any existing partitions on the drive.

fdisk /dev/sdb # use the appropriate drive letter for your system

# delete existing partitions. There may be more than one.

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

# create the first partition

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-522, default 1): <enter>
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): +1500M

#create the second partition

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (193-522, default 193): <enter>
Using default value 193
Last cylinder, +cylinders or +size{K,M,G} (193-522, default 522): <enter>
Using default value 522

# Setting the partition type for the first partition to vfat/fat32

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): b
Changed system type of partition 1 to b (W95 FAT32)

# Setting the partition type for the second partition to Linux

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 83

# Setting the first partition active

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

Command (m for help): w

# now it is time to format the partitions

mkfs.vfat /dev/sdb1
mkfs.ext3 -b 4096 -L casper-rw /dev/sdb2

Two things to notice above in the format commands; 1) we are using ext3 instead of ext2 and 2) you must include the -L casper-rw portion of the command. Being able to use ext3 is great because of journaling. The -L casper-rw option helps us get around the problem we had where we had to enter the partition name in order to get persistence working. As you will see, that is no longer necessary. WooHoo!

So go ahead and partition and format the drive according the layout above.

Make it a bootable Backtrack 4 USB thumb drive

In the previous version of this how-to, we used UNetBootin to copy the ISO to the thumb drive and make it bootable. That required us to boot back to windows and then back again to Backtrack. We are changing to doing everything from Backtrack now. These steps are also taken from the Offensive Security video mentioned above.

The steps are basically:

  1. Mount the first partition.
  2. Copy the Backtrack files to it.
  3. Install grub.

Following are the commands to execute. Again, '#' denote comments and user typed commands are in bolded.

# mount the first partition, sda1 in my case.

mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1

# copy the files, you will need to find where the ISO is mounted on your system.

cd /mnt/sdb1
rsync -r /media/cdrom0/* .

# install grub

grub-install --no-floppy --root-directory=/mnt/sdb1 /dev/sdb

That's it. We now have a bootable Backtrack 4 USB thumb drive. Now on to setting up persistent changes.

Persistent Changes

This is done much differently and more easily than it was in Backtrack 4 Beta or Backtrack 3. First of all, for basic persistence, we don't have to do anything at all. There is already a menu option that takes care of it for us. Unfortunately, it is only for console mode so we need to make a couple changes.

We want to do the following things:

  1. Change the default boot selection to persistent.
  2. Set the resolution for our gui.

To do so, do the following. Again, '#' ...comment....user typed...blah blah.

cd /mnt/sdb1/boot/grub

vi menu.lst

# change the default line below to 'default 4' and append 'vga=0x317' (that's a zero) to the kernel line to set the resolution to 1024x768

# By default, boot the first entry.
default 4
.
.
.
title                Start Persistent Live CD
kernel           /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet vga=0x317
initrd            /boot/initrd.gz

:wq

Here is my entire menu.lst file for reference.

# By default, boot the first entry.
default 4

# Boot automatically after 30 secs.
timeout 30

splashimage=/boot/grub/bt4.xpm.gz

title                Start BackTrack FrameBuffer (1024x768)
kernel                /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x317
initrd                /boot/initrd.gz

title                Start BackTrack FrameBuffer (800x600)
kernel                /boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0x314
initrd                /boot/initrd800.gz

title                Start BackTrack Forensics (no swap)
kernel                /boot/vmlinuz BOOT=casper boot=casper nopersistent rw vga=0x317
initrd                /boot/initrdfr.gz

title                Start BackTrack in Safe Graphical Mode
kernel                /boot/vmlinuz BOOT=casper boot=casper xforcevesa rw quiet
initrd                /boot/initrd.gz

title                Start Persistent Live CD
kernel                /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet vga=0x317

initrd                /boot/initrd.gz

title                Start BackTrack in Text Mode
kernel                /boot/vmlinuz BOOT=casper boot=casper nopersistent textonly rw quiet
initrd                /boot/initrd.gz

title                Start BackTrack Graphical Mode from RAM
kernel                /boot/vmlinuz BOOT=casper boot=casper toram nopersistent rw quiet
initrd                /boot/initrd.gz

title                Memory Test
kernel                /boot/memtest86+.bin

title                Boot the First Hard Disk
root                (hd0)
chainloader +1

Reboot and either select "Start Persistent Live CD" or just wait since we set it to auto-boot to persistent mode. To test it, create a file and reboot again. If your file is still there, everything is golden.

Install Nessus

Now that our changes are saved from boot to boot, we can install things and they won't disappear on us :)

Download the Ubuntu Nessus package from nessus.org. The 32-bit 8.10 version worked fine for me. We used to have to install a separate client package, but no longer. The client is now web-based and included in the Nessus package.

Again, with Backtrack 4 things are little easier. To install the Nessus server, simply execute the following command to install the package.

dpkg --install Nessus-4.2.0-ubuntu810_i386.deb

Finally, it's time to configure Nessus. Another step that is no longer necessary is the creation of certificates for authentication, so all we really need to do is add our user.

# add user/opt/nessus/sbin/nessus-adduser

Login :Me
Authentication (pass/cert) : [pass]<enter>
Login password :
Login password (again) :
Do you want this user to be a Nessus 'admin' user ? (can upload plugins, etc...) (y/n) [n]:y
User rules
----------
nessusd has a rules system which allows you to restrict the hosts
that Me has the right to test. For instance, you may want
him to be able to scan his own host only.

Please see the nessus-adduser manual for the rules syntax

Enter the rules for this user, and enter a BLANK LINE once you are done :
(the user can have an empty rules set)

Login             : Me
Password         : ***********
This user will have 'admin' privileges within the Nessus server
Rules             :
Is that ok ? (y/n) [y]y
User added

We want to disable Nessus starting at boot. We are going to do some things a little later than require that Nessus not be running at boot.

/usr/sbin/update-rc.d -f nessusd remove

This command does not remove the Nessus start scripts. It only removes the links that cause Nessus to start at boot time.

The next thing we need to do is register our installation so we can get the plugin feed. You need to go here and request a key. That is a link to the free feed for home use. Use appropriately.

Once you have your key. Execute the following to update your plugins. Please note that there are two dashes before register in the nessus-fetch line below. They can display as one sometimes.

/opt/nessus/bin/nessus-fetch --register [your feed code here]

When that is done, and it is going to take a few minutes, you are ready to start the server and client. Be aware that with version 4.x, while the command to start returns quickly, the actual starting of the service may take a minute or two. In many cases, I have had to reboot after the initial install before Nessus started working. You can use 'netstat -napt' to check that the server is listening on port 8834. Yup, this is different too. We used to look for port 1241.

/etc/init.d/nessusd start

Woohoo, time to find those vulnerabilities.

Configure Encryption

Before we configure encryption, we need to go ahead and update the system. We used to be able to wait to do this, but the amount of packages is now enough that we run out of space if we wait until after creating the Truecrypt volume.

First execute the following:

apt-get update

This is update the software repository information. Next, execute the this command:

apt-get upgrade

The system will determine if there is anything that needs to be updated and then prompt you to continue. Individual packages can be updated by including the package name after upgrade.

Finally, execute the following to clean up the downloaded packages and make room for the Truecrypt volume.

apt-get clean

Now to configure encryption. Since we are using this tool to poke at peoples networks and systems, with permission of course, it is very important that the information we find be protected. To do this, we are going to setup an encrypted volume that will eventually become our home directory.

This can be done with the gui or via command line. We will be using the gui because we need to be able to format the volume with ext3 and, as yet, I have not been able to figure out how to do that via the command line on linux. Click on the images to see a larger version.

Truecrypt Configuration (Time 0_00_12;24)

Truecrypt Configuration (Time 0_00_16;18)

Truecrypt Configuration (Time 0_00_28;12)

Truecrypt Configuration (Time 0_00_28;12)

Truecrypt Configuration (Time 0_00_29;00)

Truecrypt_size

Truecrypt Configuration (Time 0_00_41;18)

Truecrypt Configuration (Time 0_00_44;24)

Truecrypt_type

Truecrypt Configuration (Time 0_00_50;18)

You will get a message that the volume was successful created. Click on the 'OK' button, then exit the Truecrypt gui, both the 'Create Volume' windows and the main windows. We want to be back at the command prompt at this point.

If you want to test the your filesystem, execute the following, note the -k '' is two single quotes, not a double quote:

truecrypt -t -k '' --protect-hidden=no /my_secret_stuff /media/truecrypt1
mount
cd /media/truecrypt1
df .

This will show that the volume is mounted and the amount of disk space you have left. Our next step is to have this volume mounted when we log in. We do this by editing the root user's .profile file. Add the truecrypt command above to root's .profile so it looks like this:

# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

truecrypt -t -k '' --protect-hidden=no /my_secret_stuff /media/truecrypt1

mesg n

The next time you reboot you will be asked for the password for the volume and it will be mounted for you.

Now it is time to tweak a few tings

Tweak a few things

The first thing we are going to do is go ahead and configure networking to start at boot time. It's convenient and easy to disable if we need to. All we have to do is execute the following command.

/usr/sbin/update-rc.d networking defaults

This next bit is interesting and I was surprised it worked. We are going to reset the root user's home directory during the login process to the mounted truecrypt volume. This will ensure that anything written to the home directory will be encrypted.  The following commands will set this up for us:

cd /media/truecrypt1

rsync -r --links /root/ .

# add the bold lines below

vi /root/.profile

# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

truecrypt -t -k '' --protect-hidden=no /my_secret_stuff /media/truecrypt1

export HOME=/media/truecrypt1
export HISTFILE=/media/truecrypt1/.bash_history

cd

mesg n

:wq

The next time you reboot, when you are finally in the system, your home directory will be /media/truecrypt1.

There is one last thing we want to do. We want to change nessus to log to the encrypted volume. This is very easy. The file that controls this is /opt/nessus/etc/nessus/nessusd.conf. We need to create a place for the log files to go. So execute the following

cd /media/truecrypt1

mkdir -p nessus/logs

Once you have done that, edit the /opt/nessus/etc/nessus/nessusd.conf file and change this:

.
.
.
# Log file :
logfile = /opt/nessus/var/nessus/logs/nessusd.messages

# Shall we log every details of the attack ? (disk intensive)
log_whole_attack = no

# Dump file for debugging output
dumpfile = /opt/nessus/var/nessus/logs/nessusd.dump
.
.
.

to this:

.
.
.
# Log file :
logfile = /media/truecrypt1/nessus/logs/nessusd.messages

# Shall we log every details of the attack ? (disk intensive)
log_whole_attack = no

# Dump file for debugging output
dumpfile = /media/truecrypt1/nessus/logs/nessusd.dump
.
.
.

That's it. You are all done now. Go forth and have fun. :)

Please let me know of any corrections or changes that should be made. You can leave a comment or send me a note at kriggins [at] infosecramblings.com.

Kevin

Creative Commons License
Backtrack 4 – USB/Persistent Changes/Nessus by Kevin Riggins is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

{ 14 trackbacks }

How-to: Bootable Backtrack 4 USB Thumbdrive with Persistent Change and Nessus | Infosec Ramblings
February 10, 2009 at 10:15 pm
Liquidmatrix Security Digest » Security Briefing - February 11th
February 11, 2009 at 9:14 am
Install backtrack 4 Beta on a usb stick with persistent changes
February 14, 2009 at 12:32 pm
Security Justice » Blog Archive » Security Justice - Episode 10
February 28, 2009 at 8:51 pm
Imagine and Explore …. » Blog Archive » Linux on USB (persistent mode)
May 10, 2009 at 6:51 am
Building a BackTrack 4, Nessus USB Stick that maintains changes across boots - Opsec
May 27, 2009 at 7:31 am
Building a BackTrack 4, Nessus USB Stick that maintains changes across boots | Steve Shead Dot Com
May 27, 2009 at 7:33 am
Roy Firestein » Backtrack 4 USB How-to Updated for Nessus 4.0.1
May 27, 2009 at 3:33 pm
BT4 Pre Final on a SD Card. - Remote Exploit Forums
July 10, 2009 at 6:07 pm
Unetbootin and persistant changes BT4 - Remote Exploit Forums
November 29, 2009 at 7:48 am
Backtrack 4 Final
January 13, 2010 at 1:15 am
links for 2010-01-22 : econovus
January 23, 2010 at 5:06 am
Instalando o BT4 em modo persistente num memory card | Alexos Core Labs
January 28, 2010 at 2:29 pm
Trouble installing BT4 Final from live DVD or USB
February 17, 2010 at 4:10 pm

{ 135 comments… read them below or add one }

1 dsljanus January 31, 2010 at 9:12 am

@kriggins
Thanks a lot! I finally found the way around this.
Now I have problem with the rsync to transfer the iso image to the USB...
The output says that there is no "/media/cdrom0", although there is. After all I'm running a live CD version.

2 alhoasny February 4, 2010 at 3:40 am

First,thanks for the tutorial!

To tell you the truth,why would I go through all that trouble typing commands when he can just run the install.sh ?No offense,but i made a persistent usb without typing any command!

Here are the steps (credits to #mfBaranian# ):

1. Take an empty pen drive (this tutorial requires an 8 GB min. USB drive, for smaller look under the alternative methods)
2. Get bt4-pre-final.iso
3. Burn it with nero or whatever (use low writing speed)
4. Boot the live CD, startx and run install.sh - you may get the "Language failed with exit code 10" - don't worry just continue
5. Follow the instructions and when you get to the partitioner use 'Guided - use entire disk' and select sdb (you should have inserted your USB after the live CD booted - please do check the partitioner for your USB - it might be marked sdc, sdd ...) thnx Snakerdlk
6. Finish the rest of the steps and at step 7 choose advanced and select /dev/sdb1 for the boot loader
7. It will then perform all the necessary steps to create the USB. (Be patient - it will take some time to copy all the files from a CD to a USB)

I just added the above informations just for guys like me,who doesn't feel like typing too many commands.

Finally,thanks to the author of this tutorial.

regards,

3 kriggins February 4, 2010 at 10:28 am

@alhoasny,

Thanks for the feedback. As mentioned at the very top of the how-to, check out the latest how-to for encrypting the usb key:

Backtrack 4 - Bootable USB Thumb Drive with "Full" Disk Encryption

Still a bit of typing, but at least your data is protected. I also created a video of the install:

Backtrack 4 Video - USB With "Full" Disk Encryption

-Kevin

4 Franco February 8, 2010 at 5:39 am

pls help me!
don't work persistent mode and menu.lst it's exactly the same of your!
Thanks you

5 kriggins February 8, 2010 at 8:54 pm

@Franco,

Did you check the syslinux.cfg file in the root directory of the first partition? That's the file you need to edit if you used UnetBootin to build the drive.

The other common problem is to forget or miss-type the -L casper-rw portion of the mkfs.ext3 command.

-Kevin

6 kriggins February 8, 2010 at 8:56 pm

@dsljanus,

Did you get things working? Sometimes the drives get mounted in cdrom02, cdrom03 or just cdrom. Check those out and modify the command accordingly.

-Kevin

7 Franco February 9, 2010 at 3:37 am

Ummmm... I think you have right! I didn't change syslinux.cfg because I didn't find it into boot dir! I read:
1. mount /dev/sdb2 /mnt/sdb2
2. cd /mnt/sdb2
3. mkdir changes
and this is ok!
but ...
1. cd /boot/syslinux
2. chmod +Xx lilo
3. chmod +Xx syslinux
In sdb1 I have boot dir, casper dir and some file; syslinux.cfg is here!
I haven't "lilo" file!
I'm trying ... OK! It work! wow!!!
10000 Thanks!

ps: i used UnetBootin

8 kmitnick February 9, 2010 at 4:03 pm

thank you for this tutorial, but when I reached
->grub-install –no-floppy –root-directory=/mnt/sda1 /dev/sda
I got :-
The file /mnt/sdb1/boot/grub/stage1 not read correctly
so any help?

9 kmitnick February 9, 2010 at 4:07 pm

alhoasny I've tried the install.sh but I got an error than can't format ext3 filesystem or sth like this so what's wrong?

10 icurnet February 11, 2010 at 9:29 am

One correction for the grub step:

you listed:
grub-install –no-floppy –root-directory=/mnt/sda1 /dev/sda

correct syntax:
grub-install –-no-floppy –-root-directory=/mnt/sda1 /dev/sda

Thanks,
david

11 kriggins February 11, 2010 at 5:13 pm

@icurnet,

You are absolutely right, the correct syntax is as you state. The problem was not a typo though. I installed a new theme and it re-enabled the wptexturzie function with tries to make things pretty. I have disabled that function again.

Thanks for the heads up.

-Kevin

12 kriggins February 11, 2010 at 5:15 pm

@kmitnik,

As I indicate in the comment above a theme change messed things up the command needs two dashes before no-floppy and no-directory. Sorry about my delay in responding.

-Kevin

13 Sean February 13, 2010 at 10:19 pm

I feel like a huge idiot since I just deleted my windows partition. Is there anyway I can save some files.

14 kriggins February 14, 2010 at 8:41 am

@Sean,

I am very sorry to hear this happened. There are data recovery tools that can sometimes recover partitions. Below are some links to information that might be helpful. I have not used any of these tools.

http://www.buzzle.com/articles/how-to-recover-missing-lost-windows-partition.html
http://www.handyrecovery.com/
http://www.datadoctor.org/partition-recovery/windows-ntfs.html
http://www.thefreecountry.com/utilities/datarecovery.shtml

The last link above has some tools that are free.

I hope you can get back your data.

-Kevin

15 Sean February 14, 2010 at 11:14 am

Using partition recovery it is showing a logical c drive but when I boot into it windows boot manager I get \boot\bcd 0xc0000001 an error occured while attempting to read the boot configuration data.

16 Sean February 14, 2010 at 11:31 am

I used http://www.partition-recovery.com/ and my computer is running just like normal with all files.

17 kriggins February 14, 2010 at 4:05 pm

@Sean,

Great. Glad you were able to recover.

-Kevin

18 jman February 15, 2010 at 4:45 pm

Does this allow you to install to a flash drive and then plug it into any pc and run BackTrack. I tried something like this and I could only use it on the one PC I installed it to and it installed Grub on me. I would like to make this a bootable cd almost with the ability to create user names and install to any cd and all. Is this what this does? Thanks

19 kriggins February 15, 2010 at 7:01 pm

@jman,

At the very top of the how-to is a pointer to the new persistence method I wrote up. Use that and you should have what you want.

-Kevin

20 jman February 16, 2010 at 9:00 am

So just follow your whole guide along with the persistence method and I should be able to use the USB drive on any pc and save things to it? Thanks for taking the time to respond.

Justin

21 kriggins February 16, 2010 at 9:11 am

@Justin

Yup. You don't have to worry about all the Truecrypt stuff and moving the home directory, etc. Just do the new persistence method and install Nessus.

It uses the volume id instead of device name so should be more portable.

Don't know if you saw it or not, but there is also a video of the full disk encryption method on the site.

-kevin

22 Danny February 19, 2010 at 11:03 pm

Just some minor feedback...

When partitioning the USB drive, you're using /dev/sdb, but then later in the tutorial you switch to /dev/sda. It seems like a good idea to stick with the same device through the full article. I'll grant that the reader should pay attention, but consistency is good. :)

The other thing is the use of ext3. Journaling is great on regular hard drives - but on flash media, the journal just creates a bunch of extra writes that aren't needed, wearing the media out way faster than it should. Yeah, flash drives are cheap - but just using ext2 would be much better for longevity purposes.

23 tntfnc February 20, 2010 at 1:01 pm

/mnt/sdb1 mount point
sdb1 pendrive's partition name
there isn't grub.conf file in the path /mnt/sdb1/boot/grub
this is the output
[root@francesco sdb1]# grub-install --no-floppy --root-directory=/mnt/sdb1 /dev/sdb
Probing devices to guess BIOS drives. This may take a long time.
ln: creating symbolic link `/mnt/sdb1/boot/grub/grub.conf': Operation not permitted
Installation finished. No error reported.
This is the contents of the device map /mnt/sdb1/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda
(hd1) /dev/sdb
what i have to do?

24 kelvin February 20, 2010 at 2:55 pm

hi..
i dont understand the partition-part :P can anyone help me ?

25 kriggins February 22, 2010 at 6:24 am

@Danny,

Thanks for the feedback.

The sdb/sda business is fixed now. Now that you mention it, using ext2 might even be faster.

-Kevin

26 kriggins February 22, 2010 at 6:27 am

@tntfnc,

It almost seems like the copy didn't work correctly. Try the rsync command again and then manually confirm that the /boot/grub directory exists before running grub-install.

@kelvin,

Partitioning is where to cut up the physical disk into logical devices. I would offer that you may want to get some help from someone with experience since it is possible to make your primary system unbootable if you make a mistake when partitioning.

-Kevin

27 samurai February 27, 2010 at 11:26 pm

After following the above and installing Backtrack 4 from a USB unetbootin Bactrack 4 mounted ISO, when I load the new Backtrack 4 from the new USB without Unetbootin, the loading of the OS is very very slow and doesnt get anywhere. Any suggestions?

28 kriggins February 28, 2010 at 3:03 pm

@samuri,

Sounds like something didn't go right during the install. I'd try again and see what happens.

-Kevin

29 samurai February 28, 2010 at 10:11 pm

ok, I try again and let you know. weird

30 Stevie March 1, 2010 at 5:29 am

Hi,

Excellent tute; I did have some minor issues with it, most of which you have promptly corrected - many thanks!

Just to draw your attention to the encryption section; you have two identical screenshots at the beginning of your process, missing out what might be a key step for beginners (which type of TrueCrypt container to create). I deduced the correct answer from the context, so I guess others must be doing that too.

Have to say that theme issue also got me; I'm unsure whether there's meant to be a space between the "/root/" and the "." in the rsync command used to populate the newly-created home directory for root.

Imagine my dismay when I logged out and in to find a new profile wizard waiting for me!
Luckily, running rsync again from the new home drive, this time with syntax "rsync -r /root/ ." seemed to sort it.

Goes to show, no matter how clear your guide, some of us will still screw it up!

Kudos again, for yet again you are the authority on installing and configuring this distro! :)

Peace,

Stevie

31 hari om March 8, 2010 at 12:22 pm

rsync -r /media/cdrom0/* .

command always gives an error that the drive not found , can somebody give me some sollution

32 kriggins March 9, 2010 at 8:13 am

@hari,

Check /media/cdrom /media/cdrom1, etc. Sometimes the drives get mounted in weird places.

Kevin

33 Chris March 9, 2010 at 7:20 pm

I seem to be overlooking something here. After partitioning the USB I attempted to do the formatting step:

mkfs.vfat /dev/sdb1
mkfs.ext3 -b 4096 -L casper-rw /dev/sdb2

but when I ran it I got:
root@bt:/# mkfs.vfat /dev/sdb1
mkfs.vfat 2.11 (12 Mar 2005)
mkfs.vfat: /dev/sdb1 contains a mounted file system.
root@bt:/# mkfs.ext3 -b 4096 -L casper-rw /dev/sdb2
mke2fs 1.41.3 (12-Oct-2008)
Could not stat /dev/sdb2 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

So I fired up fdisk again and printed the current partition table:
Command (m for help): p

Disk /dev/sdb: 8065 MB, 8065646080 bytes
255 heads, 63 sectors/track, 980 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 192 1542208+ b W95 FAT32
/dev/sdb2 193 980 6329610 83 Linux

so it seems the partitioning worked but is unrecognized?

root@bt:/# ls /dev | grep sd..
sda1
sda2
sda3
sda4
sda5
sdb1

Im a bit confused. Do I need to unmount sdb1 before formatting (this doesnt seem right to me)? and why isnt sdb2 showing up?

for completeness:

root@bt:/# dmesg | grep -E sdb
sd 7:0:0:0: [sdb] 15753215 512-byte hardware sectors: (8.06 GB/7.51 GiB)
sd 7:0:0:0: [sdb] Write Protect is off
sd 7:0:0:0: [sdb] Mode Sense: 45 00 00 08
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sd 7:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 7:0:0:0: [sdb] Attached SCSI removable disk

any advice is much appreciated.

34 kriggins March 9, 2010 at 10:16 pm

@chris,

I have had this happen to me before. Usually it means the partition table needs to be reread. The easiest way to do this is to reboot into Backtrack and then just pick up after the partitioning step.

-Kevin

35 Guilherme March 10, 2010 at 2:00 pm

Thank you for your tutorial!

I still haven't managed to make the install persistent.
Everytime I boot I get the following error message: "EXT3-fs: sda(X): couldn't mount because of unsupported optional features (240)" .

Since I'm dual booting Ubuntu + Windows 7 I tried moving the boot files in the USB to /boot/BT4/... but still haven't had any success.

Could you please help me with this issue?

Thank you

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>