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 (2) A+ (5) ad ds (1) addon (4) Android (4) anonymous functions (1) application (9) arduino (1) artificial intelligence (1) backup (1) bash (6) camera (2) certifications (3) comptia (5) css (2) customize (11) encryption (3) error (13) exploit (5) ftp (1) funny (4) gadget (4) games (3) GUI (5) hardware (16) haskell (6) help (14) HTML (3) imaging (2) irc (1) it (1) java (2) javascript (13) jobs (1) Linux (19) lua (1) Mac (4) malware (1) math (6) msp (1) network (13) perl (2) php (3) plugin (2) powershell (8) privacy (2) programming (24) python (10) radio (2) regex (3) repair (2) security (16) sound (2) speakers (2) ssh (1) story (5) Techs from the Crypt (5) telnet (1) tools (13) troubleshooting (11) tutorial (9) Ubuntu (4) Unix (2) virtualization (2) web design (6) Windows (16) world of warcraft (1) wow (1) wx (1)