4

I was attempting to install some Kali linux tools onto my computer running Ubuntu 16.04 using katoolin, and the majority of it worked out and installed properly, but when I tried to upgrade it an error came up. Eventually after some tinkering, the available updates from katoolin disappeared. Now when I boot Ubuntu does not even show up as Ubuntu, it says Kali Linux on the GRUB menu instead. I am not sure how to go about attempting to solve any of these problems as I am pretty new to Linux, so I was hoping someone out there could help.

Also, as of now GNOME is not loading, so I am at the stage of using a virtual console (I got there by pressing Ctrl+Alt+F1).

5

Start Ubuntu from a virtual console

  1. Open a text-only virtual console by using the keyboard shortcut Ctrl+Alt+F3.

  2. At the login: prompt type your username and press Enter.

  3. At the Password: prompt type your user password and press Enter.

  4. Now you are logged in to a text-only console, and you can run terminal commands from the console.

Warning about updates after installing Kali linux tools

The LionSec Katoolin GitHub webpage clearly warns Katoolin users to be careful when updating software.

Before updating your system, please remove all Kali-linux repositories to avoid any kind of problem.

enter image description here

All kinds of problems can occur if you don't do this.


  1. Make a backup copy of sources.list.

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  2. Open /etc/apt/sources.list for editing in nano text editor:

    sudo nano /etc/apt/sources.list  
    
  3. Replace the entire contents of your existing sources.list with the following default 16.04 sources.list:

    deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
    deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse  
    deb http://archive.canonical.com/ubuntu xenial partner
  4. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.

  5. Remove Katoolin.

    sudo rm -r /usr/bin/katoolin 
    
  6. Reinstall the Ubuntu desktop system.

    sudo apt-cache depends ubuntu-desktop | grep '[ |]Depends: [^<]' | cut -d: -f2 | tr -d ' ' | xargs sudo apt-get --reinstall install -y
    
  7. Install grub to the MBR of your boot drive with these commands:

    sudo apt-get --reinstall install base-files/xenial-updates  
    sudo os-prober  
    sudo update-grub   
    
  8. Run this command after changing sources.list to refresh the list of available software. This is the most important step, so please don't skip it.

    sudo apt update  
    
  9. Reboot.

    sudo reboot  
    
  10. Run autoremove.

    sudo apt autoremove
    
  11. Install deborphan

    sudo apt install deborphan  
    
  12. Run deborphan to show a list of packages orphaned after uninstalling Katoolin. These orphaned packages are no longer necessary except if you are still using any of the packages that were installed by Katoolin.

| improve this answer | |
  • I think it goes deeper than the desktop. If grub is reporting kali, I think his core system has been updated to kali. – ravery Mar 23 '18 at 4:20
  • 2
    @ravery katoolin frequently causes this error in the GRUB menu. His core system has not been updated to Kali, only the entry in the GRUB menu has been superficially changed from Ubuntu to Kali as indicated in step 8 of this answer and also in this answer: askubuntu.com/questions/836270/… – karel Mar 23 '18 at 4:24
  • ubuntu-desktop is just a lowly meta-package so apt install --reinstall won't do anything more than a plain install would. There's an another answer for reinstalling dependencies. – Oli Mar 23 '18 at 10:11
  • How would I go about undoing all of the upgrades. I was thinking about using the purge command, which I found online, but then I would have to type all 900 packages out individually because I cant do anything but type. Is there a simple way to undo all of the things I did. All of it was just me upgrading using apt-get upgrade and me using autoremove. I am assuming all I need to do is undo the upgrading parts. I feel like there is a smarter way to do it. I can only get to the console (I think that is what its called, I got there using ctrl alt f1), no gui, so what can I do? Thanks for the ans.! – Kaushik Mar 24 '18 at 0:40
  • katoolin also installs packages from GitHub. Removing multiple packages that were installed from GitHub will be a lot of hard work. Finding and removing orphaned packages (with deborphan) left over after removing packages that were quickly uninstalled with apt is even more hard work, and can also break your system if not done slowly and carefully. Fortunately it is not necessary to use deborphan. – karel Mar 24 '18 at 1:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.