logtail

Get all new dhcp leases, but only the new leases since last check in bash

I needed to make a bash script for work that got the ip address of all new leases in the dhcp server, but only the new ones.
I spend some time looking for something useful, and therefore I decided to write a short post here to help others since i had a hard time finding it (maybe my google-fu is not as good as it should be)

The script had to do the following:
1. Get all new lines from a log file since last run
2. Get the ip addresses of the new leases
3. Do some stuff with the new ip addresses. This will not be part of this post
4. Run every minute in cron. This will also not be part of this post

In this post I will only cover how i did 1 and 2.

Continue reading

centos

How to install a CentOS 7 64Bit server

With CentOS 7 just released, I thought it would be a great time to make a CentOS 7 64Bit server installation step-by-step guide, with pictures and everything just like the old CentOS 6.5 64Bit server installation guide.

Requirements for installing a CentOS 7 64Bit server

You don’t need much for this, of course you need a computer or server to install this on, and the only other things you need are a working internet connection on the server and the CentOS 7 64Bit iso.

You can download the iso here: http://centos.skarta.net/7.0.1406/isos/x86_64/CentOS-7.0-1406-x86_64-DVD.iso

Continue reading

harddrive

Creating and mounting a partition lager than 2 TB in Linux

This might be basics for some, but it’s a good thing to have bookmarked for the day you might need it. It helped me a lot.

Why can I only use 2 TB (TeraByte) of my 2+ TB drive in linux?

The answer is really simple. I guess you formatted the drive using “fdisk” which use a ms-dos partition table.
MS-dos partition table (MBR) is 32 bit, and thereby it can’t handle anything above 2 TeraBytes

How to create a partition above 2TB in linux

To fully use your 2+TB harddrive, you have to use a partition table that supports it. We now know that the MS-DOS partition table (MBR) does not, so what should you use instead? GPT.

GPT supports up to 9.4 ZB (ZetaByte). That’s 9895604649984 GB (GigaByte)!. It’s pretty safe to say, that you will not hit this limit in the near future.

Continue reading

word_lens

Word lens – The real time translation app for Android and IOS is now free!

Word lens is not really Linux, or hardware related. But i’m sure every tech geek will love this.

What is World lens

Word lens is an app that can translate text from signs, papers or similar through the phones camera. I think it would be simpler to just show you their official video:

The app is not perfect, and if you try to translate something on a computer screen, it will “flicker” a bit. But it’s a nice and useful tools to have in your pocket when you are travelling or just visit another country, specially because it will work without any internet connection!

Continue reading

iLO-Configuration

Find all HP ILO interfaces on a subnet in Linux

By default, HP’s ILO interfaces are set to DHCP.
Yes you could go into your router to see which DHCP lease it got, but here is a much more easy solution that you can use anywhere, even though you don’t have access to the router/DHCP server.

Requirements

You don’t need much. What you need on your Linux computer for this to work is:

  • sudo (You only need this if you are not logged in as root)
  • nmap

Continue reading

bin-bash-extended.sh-600x600

Execute commands if load average is above in linux

Description

I needed this to do some testing with a load problem I had. One of our server would spike in load for a minute or two, but at random times.
I needed to see what was generating these spikes, but did not want to sit around waiting for it to happen and being ready to hit enter on the commands i needed to run when the load was spiking. So I made this simple little script that you can edit to your needs.

It’s a bash script, and requires the package “bc” to be installed (install it using your package manager if you don’t already have it installed.)

I have tested the script on CentOS and Debian.

I have tried commenting everything in the script as good as possible, but if you have any changes feel free to post a comment.

Continue reading

debian-logo-555x242

How to install a single package from debian testing through apt

Why would you want to install a package from testing when running on stable?

The reason is simple. Sometimes you just need a later version of a package than is in the Debian Stable repository. You could of course compile it from source, but this was not good enough for me since if you compile it from source, you have to keep it updated manually, and i’m sure i will forget to.
I wanted to do it through apt like the normal packages, But at the same time still keep running on Debian stable but having the option to install a later version of a package.

In this post, i will show you how you can make that possible, and it’s really easy!

Continue reading

M1015-front

Flashing the LSI Megaraid M1015 SAS/SATA controller firmware

If someone would like to take pictures and screenshots of the process for me that I can put into the guide, that would be great. Since I do not have a running Windows computer at the moment I can’t make them myself. (post a comment and I will contact you). This line will be removed once I have the pictures i need.

Some guys a reddit.com requested that I made a quick guide on how to flash a LSI Megaraid M1015 SAS/SATA controller for pass-through firmware.
This guide will be on how to flash it for pass-through OR raid functions, since it’s the same method but with two different files.
I will supply you with the files needed as well.

What you need to flash the Megaraid M1015

You will need the following:

  • A Windows XP/vista/7 computer (I have only tested on Windows 7)
  • Package containing the firmware and tools for flashing, you can download it here
  • A USB stick (I Think 256MB is more than enough), it should not contain any data, since we need to format it!
  • This program (hp flashing utility, easy way to make bootable usb DOS usb stick)
  • Win98 boot files, you can download that here

That’s all you need except for the raid controller itself and a computer/server to install it in!

Continue reading

images

Realtek network cards and VMware ESXi 5.5

Yesterday I decided to upgrade my two ESXi servers from ESXi 5.1 to ESXi 5.5 since the update came out some time ago.
The upgrade from ESXi 5.0 to ESXi 5.1 went great, without any problems. But this time, that is not the case.

My two ESXi servers are white boxes made of the following hardware:

  • Motherboard: MSI Z87-G43 (http://www.msi.com/product/mb/Z87-G43.html)
  • CPU: i5-4670K (http://ark.intel.com/products/75048/)
  • RAM: Kingston HyperX DDR3 1600MHz, 8Gb * 2(16GB total) (http://www.newegg.com/Product/Product.aspx?Item=N82E16820104173)

The problem was the motherboard that ships with an onboard Realtek 8111E network adapter.
This problem has been verified to be the same with Realtek 8168 and Realtek 8169.
The reason for this, is that VMware removed the drivers from the new ESXi 5.5 iso.

In this post I will show you how to get ESXi 5.5 working with the Realtek network adapters.

Continue reading

Open PDF with Chromium in Linux using the in-browser PDF viewer

Chromium is the open source version of Google Chrome.
There are some none-open source stuff in it that has been left out, a good example is the Chrome in-browser PDF viewer.

I needed this back, since I like it. so I did some googling around. I found lots a lots of posts, and none of them worked. But when I finally got it working, I decided to make this post hoping it will help others like me!

So this will be a short post on how to enable the in-browser PDF viewer in Chromium.

Continue reading