Monday, March 25, 2013

HOWTO : Rebuild Kali Linux 1.0.1 for Xfce 4 Desktop

This article has been deleted for several days due to this reason. However, more than 2 readers request this article back. Thus, it is back, enjoy!

To rebuild Kali Linux for Xfce 4 takes time but it worths to process if you want to have a Xfce 4 desktop interface.

Step 0 :

Download the Kali Linux 1.0.1 and install to the hard drive. Make sure you enable the "mirror" when asked. Otherwise, your Kali will not working properly.

If you don't, please append the following to the /etc/apt/sources.list :

deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib


Then, do the following may fix the problem :

apt-get update && apt-get dist-upgrade

Make sure you DO NOT edit the GNOME/Xfce menu yourself as it will mess the Kali Menu. However, if you messed the Kali menu, you can do the following to fix :

rm ~/.config/menus

Step 1 :

To prepare your Kali box to be capable to rebuild the Kali iso files :

apt-get install git live-build cdebootstrap kali-archive-keyring apt-cacher-ng

Step 2 :

touch standard.list.chroot

Append some package name to the file in order to tell the maker to include such package to the .iso file.

Or copy and paste to the file namely "standard.list.chroot" to /root/ which includes some useful packages instead (you may edit this file) :

! Packages Priority standard
gedit
radiotray
preload
gtk-recordmydesktop
galculator
synaptic
axel
cpuid
network-manager-pptp
network-manager-pptp-gnome
network-manager-openvpn
network-manager-openvpn-gnome
network-manager-vpnc
network-manager-vpnc-gnome
isomaster
xchat-common
xchat
libreoffice
shutter
bluez-gstreamer
bluez-compat
bluez-alsa
bluez-cups


Step 3 :

Copy and paste to file "update-kali" to your /root/ directory :

apt-get update
apt-get -y dist-upgrade
apt-get --purge -y autoclean
apt-get --purge -y autoremove


Make it execuatable :

chmod +x update-kali

Step 4 :

rm -R /root/live-build-config

git clone git://git.kali.org/live-build-config.git

cp /root/standard.list.chroot /root/live-build-config/config/package-lists/
cp /root/update-kali /root/live-build-config/config/includes.chroot/root/

cd live-build-config

Step 5 :

nano config/package-lists/kali.list.chroot

To locate the following section in the file and make it looks like the following :

# Graphical desktops depending on the architecture
#
# You can replace all the remaining lines with a list of the
# packages required to install your preferred graphical desktop
# or you can just comment everything except the package of your
# preferred desktop.

#if ARCHITECTURES i386 amd64
# *** GNOME DESKTOP ***
iceweasel
alsa-base
alsa-firmware-loaders
gstreamer0.10-alsa
gnome-alsamixer
gir1.2-gstreamer-0.10
gstreamer0.10-pulseaudio
gstreamer0.10-nice
gstreamer0.10-ffmpeg
gstreamer0.10-x
gstreamer0.10-gconf
gstreamer0.10-plugins-base
gstreamer0.10-plugins-ugly
libgstreamer0.10-0
libclutter-gst-1.0-0
gir1.2-clutter-gst-1.0
libgstreamer-plugins-bad0.10-0
libgstreamer-plugins-base0.10-0
gstreamer0.10-plugins-good
gir1.2-gst-plugins-base-0.10
gstreamer0.10-plugins-bad
kali-defaults
kali-root-login
desktop-base
network-manager-gnome
network-manager
xfce4
#endif


Step 6 :

/etc/init.d/apt-cacher-ng restart
export http_proxy=http://localhost:3142/


./build_all.sh

The rebuilt amd64.iso and i386.iso are located at /root/live-build-config/images. The process will take 4 to 6 or more hours to complete. Please be patient.

Bouns #1

If your CPU is too old that does not support PAE, you need to rebuild your Kali Linux.

Follow Step 1 to Step 5 as above.

cd live-build-config
cd auto
nano config


Locate the following :

lb_opts="--debian-installer live --linux-flavours 686-pae"

and replaces with :

lb_opts="--debian-installer live --linux-flavours 486"

Save it and exit.

cd ..

or

cd /root/live-build-config

/etc/init.d/apt-cacher-ng restart
export http_proxy=http://localhost:3142/


lb config --architecture i386
lb build


That's all! See you.