Upgrading Kali (Debian) Linux on Tablet Hybrid

I have 2 older tablet hybrids running an older version of Kali (1.x if I remember correctly) in dual boot with Windows. I recently decided to upgrade them and in the process, write a quick guide on what can be done with it.

It is often a good idea to do a clean install – i.e., wipe out the old install, preserve the /home and/or /root partitions if separated, or backup the important files, then install anew. This, however, is not an option for me, as my tablet hybrids do not have a DVD drive, being ultraportables, and re-attaching one via USB is cumbersome, so I have to upgrade.

This being older hardware, the hard drives were smaller than usual, so I only gave Kali 13-15 GB. To make sure I had at least 3GB free I had to delete some old Nessus plugins that were taking a few GB – I have not removed Nessus completely because everything other than the plugins wasn’t that storage-heavy.


The simplest way to upgrade is to remove the old sources.list (or back it up) and replace all repositories with

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

Follow that with apt-get update && apt-get dist-upgrade and you’re on.

Alternatively, it may be possible to just update the “tool” you are interested in with apt-get install tool.


Since one of this computers has an error and frustration-prone keyboard, I do not like to use it much and prefer to use it via SSH. Since I’m not always using it on my own LAN, its IP address is not always known and logging in to find it is not easy. If logged in, one can find the IP with

  • '/sbin/ifconfig -a'
  • 'hostname –I'
  • 'ip addr show' or simply 'ip a'

To display only the IP, pipe it into a “grep inet”.

The file “controlling” what’s displayed just before the login prompt is /etc/issue, so one way to have the IP displayed this way is to echo it in there via a statement in /etc/rc.local, for example,

ip address show eth0 | awk '/inet / {print $2}' | cut -d/ -f1

A fancier solution using Perl in bash:

PREFIX="Local IP addresses:"
IPADDRS=$(hostname -I | tr " " "\n" | grep -v "^$" | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tr "\n" " ")

perl -i -p -0777 -e "s/^$PREFIX[^\n]*\n\n//m; s/$/\n$PREFIX $IPADDRS\n/ if length('$IPADDRS')>6" /etc/issue

That only gets executed at boot-up, but


..will get executed everytime an interface gets up or down, respectively.

To switch from a graphical login to a text prompt and viceversa use Ctrl+Alt+F1 and Ctrl+Alt+F7.


This all works great as long as connected via Ethernet, but that is seldom an option when traveling off-site. Connecting to Wi-Fi and displaying that address is a bit more complex.

One major problem is that SSH-ing can be nearly impossible via Wi-Fi due to AP Isolation.


For some reason (probably I played with it before) nginx would autostart. To disable a service, just do service nginx stop. To prevent it from starting again, do

update-rc.d tomcat disable

Obviously, if you’re not running as root, you need to preface with sudo.




Sources / More info: LANip


InBonobo said…
Thank you for the tip, James :-)

Popular posts from this blog