Hey guys

Thought I'd write this guide so others can upgrade their BT2 HDD install into slackware 12. The benefits of this are too much to list But the main reason I done this mod is because I found some tools I like to use for pentesting couldn't be installed with BT2's slackware 11 framework because of some things being out of date. And slackware 11 only lets you go so far. So lets get stuck in. First thing to note that you will need at least 16gb of space on your BT2 HDD . If you don't have this space then don't do this mod. This mod was wrote for people using BT as a OS so if you want slackware 12 on a DVD BT3 is so close I can smell it lol. Afterwards I would burn slackware 12 to disk and free up that extra 4.3gb. This is also based on a standard install of BT2. If you do have other tools it will probably keep them but I can only guarantee the tools installed with BT2 will work. Tools I know NOT to work unless you reinstall them after is any one of the VMware suite.

You will need a few things before we begin, first thing is slackware 12. Go to http://www.slackware.com/getslack/ and choose a mirror thats close to you and download the Slackware-12.0 folder and save it to /. This is 4.3GB so it will take a few hours. Save all drivers ETC to the slackware-12.0 folder!!!!!!!!!!!!!!!!!!! For EG see images in post 5. You can download the whole folder with the wget -r command. For EG if you were USA

Code:
cd /
wget -r ftp://slackware.cs.utah.edu/pub/slackware/slackware-12.0
Next you will need some drivers for your network card. Find out what card you are using and grab the latest drivers patched for injection of course.

You will need to get wlassistant again. Grab it here http://sourceforge.net/project/downl...mirror=surfnet

Now this upgrade will update your kernel to 2.6.21.5 with dual core support but it will use BT's config file, so if you have any missing drivers ETC you may want to upgrade and setup a fresh kernel. I use 2.6.22.9 if you want grab a kernel from ftp://ftp.eu.kernel.org/pub/linux/kernel/v2.6.

And you may need to update the sound drivers so grab the alsa suite from http://www.alsa-project.org/main/index.php/Main_Page.

Also grab my bootsplash patch if you are upgrading your kernel manually from http://rapidshare.com/files/64520842....diff.bz2.html

And grab http://rapidshare.com/files/64621470...486-1.tgz.html

OK, let's proceed.

***************************Slackware upgrade***************************

Lets Backup our working kernel by going to /boot and renaming vmlinuz to vmlinuz2

Put your machine in single-user mode:

Code:
telinit 1
Upgrade your glibc shared libraries. This is important, or things can go a bit haywire
Code:
installpkg /slackware-12.0/slackware/a/glibc-solibs-*.tgz
installpkg /slackware-12.0/slackware/a/pkgtools-*.tgz
Install everything else:
Code:
installpkg /slackware-12.0/slackware/*/*.tgz
Remove the old packages.
Code:
cd /var/log/packages
removepkg ? ?? ??? ???? ????? ?????? ??????? ????????
NOTE: This will remove all packages with names from 1 to 8 characters long.

Install the new packages again. If you don't do this, you might have a few missing files here and there.

Code:
installpkg /slackware-12.0/slackware/*/*.tgz
Fix your config files. Some of the config files in /etc are going to need your attention. You'll find the new incoming config files on your system with the ".new" extension. You may need to fill these in with information from your old config files and then move them over. So go to /etc and check around for files with duplicates of them with .new added. Load them both up with kwrite and if the old file contains some setting you need to keep move them across, delete the old file and delete .new of the new files name. Do this also in the /etc/rc.d folder.

For EG I will start you off with how to add the fortune script to shell.

Go to /etc and load up profile and profile.new. Now check the PATH= settings. Move the old settings across to the new file and if you really did look you would of noticed your old configuration also didn't have the path to /usr/games. So add it to your new config and save. Now delete profile and renake profile.new to profile.

Now edit lilo and add your old kernel just incase we have problems booting from 2.6.21.5. Type

Code:
nano /etc/lilo.conf
Copy the part that looks like AND NOT MINE!!!

image = /boot/vmlinuz
root = current
initrd = /boot/initrd-1024x768
label = DrGr33n
read-only

Paste it below and add a two to the second image name and label edit so you end up with:

image = /boot/vmlinuz
root = current
initrd = /boot/initrd-1024x768
label = bt
read-only
image = /boot/vmlinuz2
root = current
initrd = /boot/initrd-1024x768
label = bt2
read-only

If you have a windows partition added leave it as it is.

then press ctrl+o and crtl+x the + means"and" not push three buttons lol.

Reboot

Congratulations you are now running Slackware 12. But we are not done yet ooooohhhh no! far from it. If you have problems rebooting, Select the other kernel when lilo loads at the start. It will be called bt2.

Open a shell and type:

Code:
cd /slackware-12.0
installpkg pixman-0.9.5-i486-1.tgz
Go back to http://www.slackware.com/getslack/ and find the mirror closest to yourself. This time go into the slackware-current dir and cut the address in the address bar. Now go to /etc/slapt-get/ and edit slapt-getrc in kwrite.

Paste your URL in SOURCE= for EG: SOURCE=ftp://mirrors.blueyonder.co.uk/sites/ftp.slackware.com/slackware-current and change EXCLUDE= to EXCLUDE=^kernel-.*,^alsa-.*,^glibc. <<<<<(KEEP THE DOT). Save and exit.

Now load a shel and paste:

Code:
slapt-get --update && slapt-get --upgrade
Wait another 2 hours

Again fix your config files. Some of the config files in /etc are going to need your attention. You'll find the new incoming config files on your system with the ".new" extension. You may need to fill these in with information from your old config files and then move them over. So go to /etc and check around for files with duplicates of them with .new added. Load them both up with kwrite and if the old file contains some setting you need to keep move them across, delete the old file and delete .new of the new files name. Do this also in the /etc/rc.d folder.

Install wlassistant

Code:
installpkg /slackware12.0/wlassistant-0.5.7-i386-1.tgz
REBOOT

Now because I also use BT as my OS I add a new user at this point. Then we can have a nice new desktop with all the extra stuff added to the taskbar ETC. Then if we want to do some pentesting login as root and if we want to surf the net ETC login as your new user. Also its not wise to use BT as a OS if you are loged in as root.

Type ADDUSER in a shell and follow the instructions. Login as root and select from the start menu

System >>>> User Manager

Click on the user you just made and click on the groups tab and select what you want this user to control like sound etc. Save and you are done!!!

Now we are ready for the kernel update. If you are happy with 2.6.21.5 Skip the next bit and go to the drivers section.

****************************Kernel Update***********************************

Ok lets begin, it is important that you don't compile your kernel before you install slackware 12 AND all the updates. This is because some software doesn't like the kernel being complied with a old version of gcc and you are using a new version.

Copy /slackware-12.0/linux-2.6.22.* to /usr/src

Open a shell and type

Code:
cd /usr/src
rm linux
tar zxvf linux-2.6.22.*
Now copy the bootsplash patch to the /usr/src/linux-2.6.22.* folder and extract it. You can use konqueror to do this for ease.

And type in shell

Code:
cd /usr/src/linux-2.6.22.*
patch p1 < bootsplash-3.1.6-2.6.22.diff
(do the same command for all your other patches)
cd ..
ln -s linux-2.6.22.* linux
cd linux 
make xconfig
And now we are ready to setup your hardware.

First thing is to load up BT's old config. I know this is cheating but is the safest way

Go to file >> load and navigate to the linux-2.6.20 folder. Right click an empty space inside the box displaying your files and choose the show hidden files option. Now you should be able to see the .config file, click on this and click open.

I can't guide you on your setup because its unique to your PC. So I will help you out as much as I can!!!

First open a shell and type

Code:
lspci
And you should see all your hardware listed. Now follow the list down and match it to the settings in xconfig. Now setup your processor type and and extra stuff like ntfs read/write ETC, and select the bootsplash option!!! Now save and close.

Next type in shell.
Code:
make bzImage && make modules && make modules_install && make install
And wait another 2 hours lol

REBOOT

***********************Drivers******************** ****

Now you can install your network card and alsa to get your sound back up. Install them how you would any other package.

Code:
cd /slackware12.0
tar [options] package or yadayada
cd [path/to/driver]
./configure
make 
make install

or

installpkg whateva.tgz
After installing all the alsa packages lets setup your sound. Open a shell and type

Code:
alsaconf
Follow the instructions on the screen, choosing your sound card. Reboot and if all is well you should here the startup sounds.

And Congratulations you now have a new kernel.

Give yourself a pat on the back!!!!!!!!!! and enjoy your new look

Any questions I would be happy to answer.

Fixes on post 24