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

11 comments:

  1. Jacob Swenson22/11/06 2:25 AM

    It took me a while but I also got this working using your guide. Thank you.

    ReplyDelete
  2. Thank you Jacob for letting me know. Feels good :-)

    ReplyDelete
  3. Happy New Year Dude..

    Best Regards

    Esh ....

    ReplyDelete
  4. thanks dude! wish you a very happy new year too :)

    -Manu

    ReplyDelete
  5. A better boot manager and MSDOS-based partition utility, SPFdisk, which can be downloaded from SourceForge.

    http://spfdisk.sourceforge.net/Spf2K3tE.exe

    fyi

    ReplyDelete
  6. http://spfdisk.sourceforge.net/Spf2K3tT.exe

    Text-based, much smaller in prog size

    I believe that it can co-exist with syslinux and not EFI. Simply install SPF Boot Manager and menu into a primary partition with at least 30-40 sectors.

    http://forum.insanelymac.com/index.php?showtopic=20174

    fyi

    ReplyDelete
  7. thank you. i will try. thank you

    ReplyDelete
  8. Thanks for taking the time to write. Worked. Best,

    ReplyDelete
  9. Hi Manu!
    well i want ur help very badly.. :(
    I hav downloaded the latest BT v.3 Beta, but hav downloaded the stripped down version (701 MB) of it!
    So, i wanna know..that is there any difference relating to tools, performance in the USB version (946MB) and the stripped down version which i hav downloaded..?
    Also, i want to know how to install this beta version on my HDD...as the support's website hav not provided documentation for this BETA release. :(
    Can u please e-mail me your reply as i won't b able to access your blogs in college, my mail ID : < the.quaker@yahoo.com >
    Waiting for ur reply.....
    thanks in advance...

    ReplyDelete
  10. Nice guide, I have something similar fro BackTrack 3 ,its quite simple
    http://felipeferreira.net/?p=37

    ReplyDelete
  11. I will definitely try .. thanks for sharing. keep the nice work.

    ReplyDelete