UPDATED to kernel 220.127.116.11 -howto
#Donīt do this unless you need a new kernel! #
To begin, you need a working hd install, if you don't yet have, search for "gopher" or look in the Wiki for alternatives.
About this howto:
This is quite long, I tried explaining what needs to be done, and the post should be newbie-friendly.
1. Backup everything important
Iīve had a lot of problems while learning to work with kernel recompiling (newbie of course). The worst-case-scenario could be a re-install to hd, but usually copying a working vmlinuz to /boot/ is enough to recover and continue trying. Iīm really interested getting feedback how this howto works for others.
2. Download and install necessary files
I'd like state here, that none of the scripts are my work (All credits go to Tomas M and "vstoykov"), I merely figured out, how to use them and how to make the .iso smaller (and some bugs or problems).
Let's get started!
Make a directory for all required files
The name can be anything and be in anywhere, but I use /livecd/ so that I can find it easily and the files don't accidentally get to .iso or live-usb-install.
2.1 Kernel-build-scripts (Author Tomas M, modified by "vstoykov")
Download the modified kernel 18.104.22.168 build script from
and unpack it with
That should create a directory called "new", although you can rename it if you like to more appropriate name.
tar zxvf Build_kernel_for_VAST_v11.tar.gz
Remove the linux-22.214.171.124.tar.bz2 symlink from
So that you can replace it with the real kernel package.
2.2 Download kernel 126.96.36.199
and place it in
2.3 Download Linux-live-scripts (Author Tomas M)
and unpack it in
Note: There are newer versions (currently 6.1.4 is latest), but 6.1.4 has some poweroff-issues, and I don't advice using it, besides it doesn't add anything compared to 6.1.0..
tar zxvf linux-live-6.1.0.tar.gz
3. Prepare to install kernel
and remove everything
Note: Please check that you're in the right place..
rm -r *
Yes, this will remove alsa and ipw3945 drivers to mention, but alsa can be compiled in kernel and ipw3945 is easy to get later if you need it, or you can move the /usr/src/drivers/ipw3945-1.2.0/ directory to a "safe location", which could be /tmp/ for now.
(if you're already running a modified kernel, you can use your .config as a base to build the new one, but it's safer to use the default one and later tweak it if you like).
4. Install the new kernel
modify config with
and edit line
and you can also choose a appropriate cpu option in config
For instance, a Centrino Duo requires following (google for appropriate cpu settings for you)
# CONFIG_MPENTIUMM is not set
When happy with config, proceed with building the new kernel (in /livecd/new/)
The script may still ask you to enter your cpu-type and gives a list of choices.
When completed (~30min), install new kernel
(the name might alter a little, but you'll manage!)
Note: I'm using Grub, if using lilo, you might have to run it again, if the install script doesn't. I'm really not sure.
After rebooting, if you receive some errors about module dependencies, commence
and REBOOT again
depmod -e -F System.map
5. Prepare to compress image
Add/remove/update the tools of your choice
6. .iso size tweaking
We can safely remove some of the stuff that would be otherwise take space from .iso (especially if you're trying to compile a 700MB cd)
remove all files and directories but linux symlink and linux-188.8.131.52
remove 2.6.20-xxx dir
Note: If extra space is really needed, or you wish to modify further the kernel settings without difficult text-editor in step 4. ,recompile kernel and create a smaller kernel and modules-directory by hand-picking all kernel components (with a little trouble easily down to ~650modules or less which means ~25MB less uncompressed size). Then build again as suggested in step 3. "modified kernel" by copying .config from /usr/src/linux to /livecd/new/ and rename it to config (And do all the other steps again)
7. Compress Image
modify .config by
change the line
MKMOD="bin etc home lib lib64 opt root usr sbin srv var"
MKMOD="bin etc home lib lib64 opt pentest root usr sbin srv var"
give LiveCD name when prompted, enter The name is very important, otherwise at bootup the live data can't be found. Default path to kernel is ok. The process takes about 30minutes to complete.
7. Install to CD/USB
7.1To make a CD:
and burn the .iso slowly (some say at 2x-4x)
7.2To make a bootable USB (recommended):Copy linuxcd and boot directories from /tmp/live_data_xxxx/ to your sticks root and then run
the stick is now bootable.
8. What I added/updated
sqlite.3.4.0-module (By Balding_Parrot, BT Wiki)
Aircrack-ng 1.0 dev 664
Ati-proprietary-drivers 8.40.x from www.ati.com
updated framework3 and milw0rm
some firefox extensions (fasterfox, fireftp, firefox, downthemall, ablock plus)
some my native language dictionaries
The passwd command changes the root password, which is quite nice.. Choose a strong password.
My actual .iso size was 695MB (plenty of space remaining), but if you update a lot of things, space may be a problem, if you insist on building a liveCD..
EXTRA: IPW3945 INSTALL
The ipw3945 requires (sometimes) the rf kill switch support, you can easily add that to kernel config in step 4. by modifiying config in /livecd/new/ with
and change the line
# CONFIG_RFKILL is not set
Then you need to get the new drivers
unpack it with
and build&install it with
tar xvf ipw3945-1.2.2.tgz
and you should be fine. (For monitor mode to work, you need to modify the Makefile)
make && make install
Note: IF you receive ieee80211 errors while building the driver, you need to get ieee80211 driver, the version 1.2.18 works with new kernel if I recall correctly.
Please don't bother downloading any other stuff for ipw3945 (like firmware), as everything is ready in Backtrack and it should work as it is.
TO ALL READERS:
I will update and modify this post if it's needed (etc more specific instructions), so please give me a holler if something works or doesn't (post or pm, anything goes). Whereas creating "own" modified livecd/usb perhaps isn't really needed for most of the people, there are some who might find this useful, for kernel 184.108.40.206 has better hardware support (including rf kill switch, my ipw3945 works perfectly with it now) and possibly something else (those who need it, probably now because something doesn't work before).
Another reason for me was my Centrino Duo cpu, which showed only one core and I wanted more..
BUT if nothing more, atleast this thread answers the post "How do i change livecd password"
Hope you like,