November 6, 2006

BackTrack 2.0 beta on USB stick

I have been playing with backtrack installation on USB since last 3 days. Just thought of sharing my experiences with you. I have a 2 GB USB stick. I wanted to create 2 partitions on it and install backtrack in one of them. Don't ask my why - I just wanted to play with different boot options on a USB stick. Here is what I learned from last 3 days of head breaking:

1. Using a filesystem other than FAT/FAT32 on USB stick is a bad idea. I tried ext2 and ext3. Sometimes they work and sometimes (and on some systems) they fail for no reason.

2. Bootloader 'grub' is a bad choice for USB boot. 'grub' tries to know too much about the system and when things change it just raises the hands and aborts. I could get it run my USB stick, but it was very unreliable.

3. Bootloader 'lilo' also didn't work always. I worked on my laptop, while it got stuck in between on my desktop. I don't know whether it was 'lilo' or filesystem ext2. I didn't test with FAT32. Not to mention that it's 20 times slower than any other bootloader in loading the kernel image.

4. Bootloader 'extlinux' is also unreliable. On the same system, sometimes it works and sometimes not.

5. Bootloader 'syslinux' with FAT32 seems to be the most stable thing till now. I think, I'll stop experimenting with other bootloaders and filesystems on my USB stick until somebody convinces me to do otherwise :)

To install backtrack on USB stick (I've been looking for these instructions for quite some time. No, I didn't want to use MySlax Creator.):
  • Create partitions on your USB stick using fdisk and format them using mkfs.vfat.
    fdisk /dev/sda
    mkfs.vfat /dev/sda1
    mkfs.vfat /dev/sda2

    Make sure that the partition that you want to use for backtrack is marked as active in partition table.

  • Mount 'the' partition on /mnt and copy all the files from one of the following locations:
    • If you are installing from a running live cd distribution, your source is /boot.
    • On any other system, just copy everything from BT iso image/CDROM or USB stick.

  • Install syslinux bootloader to the backtrack partition and copy the mbr.bin that comes with syslinux to MBR of the USB stick:
    syslinux /dev/sda1
    cat mbr.bin > /dev/sda

  • Copy isolinux.cfg inside /mnt to syslinux.cfg and change the paths /boot/vmlinuz and /boot/initrd.gz to vmlinuz and initrd.gz respectively. One way to do it:
    cd /mnt
    sed 's/boot\///g' isolinux.cfg > syslinux.cfg

  • Your USB stick is ready to roll now :)
This procedure can be followed for hard drive installation also. You would probably have another bootloader already installed on the hard drive. In that case you can just add an entry for BT.

Hope this will help backtrackers.
M

November 3, 2006

Some Modules For Backtrack 2.0 Beta

I have compiled some modules during my testing/use of BT 2.0 beta. Here are some modules that you could find useful:

NTFS read/write support using ntfs-3g: http://manugarg.googlepages.com/ntfs-3g-0.20061031-BETA.mo
More information on ntfs-3g can be found in my previous post: "Release of ntfs-3g beta, read write driver for ntfs"

LVM2 support. Device-mapper userspace tools and lvm2 tools are required to make lvm2 work in BT:
http://manugarg.googlepages.com/device-mapper.1.02.12-i386.mo
http://manugarg.googlepages.com/LVM2-2.02.13-i386.mo
Note: muts has already been informed and he has pushed these binaries in the cvs. So next release won't require these modules.

I'll update the modules for this release in this thread only to make it easier to find them.

Happy Backtracking ;)
M

Update: Nov 12, 2006
--------------------
Here comes the new modules: truecrypt. A very useful encryption utility.
http://manugarg.googlepages.com/truecrypt-4.2a.mo

Digg this; Post to del.icio.us