Bt 2634 Update

BackTrack ISO Kernel 2.6.34 Upgrade

Last night we moved a new kernel package (2.6.34) out of the testing repositories, and into the official ones. This kernel update marks a huge improvement in hardware support and desktop responsiveness. In addition to the kernel, we have added several external wireless drivers – madwifi-ng (ath_pci), broadcom-sta (wl, no injection), r8187 drivers and rt73 k2wrlz drivers.

The following guide will walk you through a BackTrack 4 Final ISO update, which will include the new kernel into your build. The original customise script neglected to take into account kernel changes. Ideally, the ISO update process should be done from within an already updated BackTrack installation.

apt-get update && apt-get dist-upgrade
cd ~ && mkdir ISO && cd ISO
wget offsec.com/bt4.sh && chmod 755 bt4.sh

Then move the bt4-final.iso into the ISO directory you just created and run the customization script. This will bring you into the edited ISO’s chroot environment.

mv /location/of/bt4-final.iso ~/ISO/
./bt4.sh
##############################################################
#[*] BackTrack 4 Final customisation script
#[*] Setting up the build environment...
#[*] Copying over files, please wait ...

Once the copy is complete and you are entered into the chroot environment, update and upgrade the chrooted environment.

##############################################################
# [*] Once you have finished your modifications, type "exit"
##############################################################
apt-get update && apt-get dist-upgrade

The upgrade will take a while – you are essentially downloading all the package updates we released since BT4 final. This update will include the new 2.6.34 kernel. Once the upgrade is done, clean out all downloaded deb files and download additional drivers and kernel sources.

apt-get install madwifi-drivers broadcom-sta r8187-drivers linux-source-2.6.34
apt-get clean

Now prepare your kernel sources:

apt-get install madwifi-drivers broadcom-sta r8187-drivers linux-source-2.6.34
depmod -a
apt-get clean
cd /usr/src/
rm -rf linux linux-source-2.6.30.9*
rm -rf /lib/modules/2.6.30.9/
tar jxpf linux-source-2.6.34.tar.bz2
ln -s linux-source-2.6.34 linux
cd linux
cp /boot/config-2.6.34 .config
ln -s /usr/src/linux /lib/modules/2.6.34/build
make scripts && make prepare
apt-get clean && updatedb && history -c

At this point you can modify, add or remove any other tools you wish. When done, exit the chroot by typing:

exit
# [*] Exited the build environemnt, unmounting images.
# [*] Building manifest
# Removing any system startup links for /etc/init.d/inetutils-inetd ...
# ...
# Max brk space used 0
# 796020 extents written (1554 MB)
# [*] Your modified BT4 is in /root/ISO/bt4-mod.iso
##############################################################

The updated iso will take a while to build, and will be located in the ISO directory (bt4-mod.iso). If you have any issues with the script, post a comment or catch us in the backtrack IRC channel.

  1. Snakerdlk07-02-2010

    The customization script has errors.

    After creating the ‘edit’ directory, there is a comented entry copying the contents of the mounted squashfs image to the new folder.

    Then important system files are mounted/copied to non-existant sub-directories in the recently created ‘edit’ folder.(like to edit/etc/{resolv.conf, hosts, …} and edit/proc edit/dev)

  2. admin07-02-2010

    thanks, fixed!

  3. Snakerdlk07-02-2010

    I was going to going to say to uncomment the rsync command at the top of the script, but it is already done :D

    Though, another fix, lines 52,53 should have [...]print $8}’) to get the kernel/initrd name from the list generated from ‘ls’.
    52 vmlinuz=$(ls -lFLAt edit/boot/vmlinuz-* |head -1 |awk -F” ” ‘{print $8}’)
    53 initrd=$(ls -lFLAt edit/boot/initrd* |head -1 |awk -F” ” ‘{print $8}’)

Leave a Reply

You must be logged in to post a comment.