All posts by Josef H.

Run fsck on boot

Have you ever ran into the issue of rebooting a remote system just to find you cannot log in remotely again because the system decides to require a manual fsck on a partition?
I know how irritating it can become as i have a system that runs into this upon boot any time i reboot it (It acquires and removes about a hundred gigs a day).
So just incase you run into the same issue as well, the way to fix this issue is to edit
/etc/default/rcS
and change the line #FSCKFIX=no to #FSCKFIX=yes
of course this will need to be done as root (In general would need to be completes as root unless you have altered the directory or file permissions)

By changing #FSCKFIX=no to #FSCKFIX=yes you will be running auto repair on boot, the same thing as pressing y through the interactive version that usually comes up.

Unpackage a .tar.bz2 file

Ever download a file to your Linux system and it’s extension was .tar.bz? Have you needed to extract that file from the command line? It is actually very easy to do, to extract the file all you need to do is type:
tar -xvjf filename.tar.bz2

(Informational) Kali Linux has released USB EFI bootable ISOs


     Mati Aharoni has announced the release of Kali Linux 1.0.8, a minor update of the project’s Debian-based distribution with specialist tools for penetration testing and forensic analysis: “The long awaited Kali Linux USB EFI boot support feature has been added to our binary ISO builds, which has prompted this early Kali Linux 1.0.8 release. This new feature simplifies getting Kali installed and running on more recent hardware which requires EFI as well as various Apple MacBook Air and Retina models. Besides the addition of EFI support, there is a whole array of tool updates and fixes that have accumulated over the past couple of months. As this new release focuses almost entirely on the EFI capable ISO image, Offensive Security won’t be releasing additional ARM or VMWare images with 1.0.8. As usual, you don’t need to re-download Kali if you’ve got it installed, and apt-get update && apt-get dist-upgrade should do the job.” Read the rest of the release announcement for further information. Download (SHA1): kali-linux-1.0.8-amd64.iso (3,037MB, pkglist).

Disable Laptop LCD Completely on boot

      I use my laptop connected to a 55″ television, and linux always recognized the LCD screen that i don’t use. This was always great except for the fact that it causes a few issues.

Recognizing the LCD screen Cons:

Dealing with the LCD being set as primary
When going to console Ctrl+Alt F1 the console only displays on the LCD’s resolution
The simple fact that it bugged me

Pro’s to disabling LCD:

All of the video auto settings set to the proper resolution of 1080
Console is also the proper resolution
The unused screen is no where listed in linux, as if it does not exist

To disable the LCD screen and let everything automatically work with your external monitor is actually very easy.

EDIT /etc/default/grub

#sudo nano /etc/default/grub

Edit the line

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

and add video=LVDS-1:d to the end of whatever you have listed

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash video=LVDS-1:d”

Then save and run

#update-grub

and reboot

The boot loader will show up on its usual screen, then all you have to do is continue and from that point forward your laptop will act as though the LCD screen does not exist and will continue to work as though your external monitor is the only connected display.

Side note: Disabling the LCD does not disable the laptop lid switch, so you will still need to change the lid closed option to do nothing if you plan on keeping the lid closed as you work with it.

(I keep the lid closed and use an external mouse and keyboard connected to my television)

(Below is Display properties after editing grub and disabling LCD)
(As you can see lcd is not listed at all as if it does not exist)

Connecting to the internet in terminal with Network Manager (nmcli)

Have you ever been in a position where your GUI just needs work done or some complicated thing came up denying you access to the Network Manager icon or the GUI in general? It’s one of those times you really wish you have wicd installed on your machine, but most people are given Network Manager to start off. Fear Not network manager is actually pretty easy when you know what your doing with it.

Step 1.

Type the command : nmcli dev wifi

Returns :

Step 2.
The network I wanted to connect to was 2WIRE316
Type the command : nmcli dev wifi connect 2WIRE316 password shhmypassword
                                 nmcli dev wifi connect <SSID> password <YOUPASSWORD>
Give it a few and when you see the terminal is ready for input again you are online.
I hope this helps you out, needless to say, it did for me.

Keep xterm open after running a command

If you want to keep xterm open after it has run a command, it’s actually a lot easier then you think.

Just a -hold option remember -e is always the last option

Example of what it usually does:

xterm -e cat * Dropbox/

Example of keeping the xterm open after execution: (Click the windows X to close)

xterm -hold -e cat * Dropbox/

Update: Install (Force) Kali Linux on an EFI based system

Requirements to install:

Hardware –

Thumb Drive
Your EFI/UEFI System
An Internet connection

Software –

Kali Linux ISO – Linux Distrobution ISO (64 bit image)
Rufus – Application (Used to place and create Bootable USB)

Step 1.

Download Kali Linux ISO

Step 2.

Plug in your USB drive

Step 3.

Download and run Rufus

Step 4.

In Rufus select the thumb drive and the Kali Linux ISO and let it format and place Kali onto your thumb drive (Make some hot coco, coffee or something this process takes atleast 5 min)

Step 5.

Open your Thumb drive in explorer

Step 6.

EFI.tar.gz – Download this, Extract and copy to thumb drive
                               -this will place /EFI/BOOT with 3 req files inside the directory

Step 7.

Reboot the system pressing esc to choose what efi partition to boot and select your thumb drive and you good to go.

—————————————————— Various Tips and Hints —————————-

Internet connection is required during install process

It downloads the grub efi packagess

Disable Secure Boot in Bios

Usually del or f1 while computer is booting, find it and turn it off. That is an idea Microsoft came up with and surprise surprise make linux installation more complicated

WiFi Drivers are not always recognized

I recommend a hard line(Ethernet Connection) till you have it installed

Video of this how to to prevent confusion: (Still original how-to’s video)

Displaying the networks in your area

In order to view the networks in your area we will use just a few commands (This is Terminal method)

First of all you would make sure that your wifi card is down with the command

ifconfig wlan0 down

then enable monitor mode of that card with

airmon-ng start wlan0   —— this will create a monitor mode network interface on mon0

now to see the networks and broadcasting devices around you just type

airodump-ng mon0

when you are done scanning the networks just press ctrl+c to exit the program

Adjusting the txpower of your wifi adapter

The default TX-Power of wireless adapters in Kali linux is set to 20 dBm. You can however increase that value making it operate at 30 dBm allowing you to have clearer and stronger signals. Be warned though that raising the power is actually illegal in some countries.

And as a side note this is not something that works for all wireless cards and if you set the power to high for to long their is a chance of messing up your wifi card as the manufacturer may have not provided an adequate heat-sink for your device to operate at such a high level.

Commands To Use:

ifconfig wlan0 down
iw reg set BO
ifconfig wlan0 up
iwconfig wlan0 txpower 30



Following video is the whole process as well as a little showing how it affects your reception, All commands and why they where used are in the comments of the video on youtube Video URL: http://youtu.be/-7dpNNB-c50




Extra Info:
Legal Power Output Community Created List
http://www.tomshardware.com/forum/8931-43-legal-power-output-country