Sunday, May 14, 2017

Kali Live with Persistence and Updating

So recently I was trying to set up Kali Linux on a live USB fully updated. I kept running into a few problems with it that ultimately are based on how the instructions online are worded. After modifying the steps, I managed to create a fully updated Kali Linux live USB and hopefully you can set one up as well by following these instructions.

So the obvious first step is to download the most recent ISO image that you plan on using. At the time of this writing, that would be 2017.1 and I will be using the 64 bit, so my ISO file is named:
kali-linux-2017.1-amd64.iso

Starting from Windows, I use a program called Rufus to create a live USB. It's a very handy program to keep around and my go to for this stuff on Windows. At work, it's gotten disks working with less effort than all the random tools my co-workers download from the random tutorials they read and with no installation required you can keep it on removable medium and have it with you for when you need it. So download that as well, pop your USB drive in and load up Rufus. Then you need to select your ISO file.

After selecting the ISO, the drop down should say something about it being a DD image, and that's exactly what we want. Tell it to start and let the magic happen.


Starting from Linux, we are going to ignore the dd command (dd if=kali-linux-2017.1-amd64.iso of=/dev/sdb bs=512k) because that's both complicated and pointless. A much simpler way to get this done with a LOT less to remember is the cat command. Assuming the drive is /dev/sdb, we simply do: cat kali-linux-2017.1-amd64.iso > /dev/sdb
Simple, easy to remember since it's not using a different syntax style than other bash commands and straight forward. I've also read online that cat is quicker and has less overhead than dd, but I do not know enough about them to confirm or deny these claims. I just think it's a lot easier and gets the job done just as well.

Now with this drive ready to boot from, we shall move on to the next step through Kali because then we know we have the simple and easy tools we need to get the persistence set up. So boot on into Kali and select Live, NOT PERSISTENCE. We need to create the persistence partition. In the actual instructions, they list off some commands than every time I try, they do not work. Even when in Kali Live itself. The commands themselves are a bit beyond my understanding, but that seems to happen every time someone makes a "copy and paste" tutorial because they need to compensate for dynamic possibilities. I, on the other hand, think gparted is a perfectly acceptable solution for today's day in age. If you want to do this via command, I suggest you learn the parted command and do it yourself rather than copy-paste.

So first, press the windows key on your keyboard or bump the top left corner with your mouse. That should bring you to the activities view. Type in "gp" and an icon for gparted should show up, click on that to open it up.

Right click on the empty space and select New. Create an ext3 partition with the label persistence.

Now click on the apply arrow.




Now we are entering the home stretch. The command portion. Open up a terminal, it's the little black icon on the left dock. Enter in these commands:
mount /dev/sdb3 /mnt
echo "/ union" > /mnt/persistence.conf
umount /mnt

Now we reboot the computer to Live with persistence. On some random installation like this, I have run into just a black screen with a pointer. To fix that, I pressed ctrl+alt+f2, which should bring you into TTY2. Then run the command:
kill -9 $(pgrep gnome)
This then dumped me back over to TTY1 and after some time the desktop came back up on TTY3 (ctrl+alt+f3). In the meantime, I just updated on TTY2.

So to finish things off with a clean and easy update:
apt-get update && apt-get upgrade -y

Hopefully this will help anyone struggling with this process. I did notice a lot of people ran into the same problems I did, so now to list off those problems and what caused them for me:

Out of space because updates going into the disk image.
This was caused by booting into persistence and trying to do things before persistence was set up which then lead to an non-bootable USB.

Boots to a black screen with a cursor.
I don't know the cause of it, but killing all gnome related processes seems to correct it. While performing this process 

Could not write files while updating.
This was another case of not having the persistence set up properly.

Saturday, May 13, 2017

Linux ESXi Screen Resolution Will Not Change

I ran into a problem with an ESXi server at work, version 5.5 but I assume the solution will be the same on other versions. The screen resolution would not change. The solution was pretty simple. Edit the virtual machine settings and up the video memory. I found that small increases or using the recommended settings was not enough, so I set it to 32MB and it seemed to work great after that.

Tag Cloud

.NET (1) A+ (2) addon (6) Android (3) anonymous functions (5) application (10) arduino (1) artificial intelligence (2) bash (4) c (7) camera (1) certifications (4) cobol (1) comptia (4) computing (2) css (2) customize (16) encryption (2) error (19) exploit (17) ftp (3) funny (2) gadget (2) games (2) Gtk (1) GUI (5) hardware (6) haskell (15) help (8) HTML (6) irc (2) java (5) javascript (21) Linux (19) Mac (4) malware (2) math (8) network (9) objects (2) OCaml (1) perl (4) php (9) plugin (7) programming (42) python (24) radio (1) regex (3) security (25) sound (1) speakers (1) ssh (3) story (1) Techs from the Crypt (2) telnet (2) tools (14) troubleshooting (5) Ubuntu (4) Unix (4) virtualization (1) web design (14) Windows (7) wx (2)