Wednesday, July 22, 2015

Kali Broken - "Cleaning up temporary files"

I broke my Kali Linux. I was going wild with Burp Suite while forgetting I was low on disk space. Once I noticed the disk was full, it was too late. The system was too crashy to even use and I had to do a hard boot. Of course, once I did a hard boot it wouldn't come back up. The booting process would get stuck at "Cleaning up temporary files" and then eventually die at a blank screen. :(




I've documented the steps I used to fix it, minus a few wrong turns I took. :) Hope this helps someone:


  1. Download Kali Linux in order to boot it live for the repair
  2. Create bootable media from the ISO (I like YUMI)
  3. Boot the live Kali to the GUI
  4. Run the command df from Terminal and leave the results up for now
  5. Open Thunar, right click the HDD with the broken Kali install and choose mount
  6. Type the encryption password (this gave me an error which I just ignored)
  7. Right click the LVM and start the multidisk
  8. Wait a moment and then right click again and mount it. Unfortunately, this mounts it read only. No worries...
  9. Run df again in order to determine what was mounted and where. Compare the 2 df outputs.
  10. Now unmount it with: sudo umount /media/the-place-it-is-mounted
  11. Create a new directory for mounting: sudo mkdir /media/hdd
  12. Mount it as read/write: sudo mount -o rw /the/path /media/hdd (Replace /the/path with the partition you are trying to mount. You can determine this by comparing the results from the 2 times you ran df.)
  13. Use chroot to make the mounted filesystem be treated sorta like you booted into it directly: chroot /media/hdd
  14. Delete whatever you can to free up space
  15. Clean up the tmp files: rm -r /tmp/*
  16. Exit chroot: exit
  17. Close Terminal
  18. Go back to Thunar, unmount and stop the multidisk.
  19. Reboot into the repaired Kali install!

Remember, always keep good backups!!

EDIT: @blackMOREOps just reminded me of something...Don't forget to clean the Trash folder! I did this and forgot to document. Thanks @blackMOREOps!



Repaired OS: Kali Linux 1.0.6, 32 bit
Live OS: Kali Linux 1.1.0a, 32 bit


No comments:

Post a Comment

Spammy/foul language comments or those with an explicit avatar will be tossed in a 55 gallon drum and a match thrown in after them. (Oooo, now I can warm my hands!!)