Tutorials in ‘System’ Category

Recover your Hard Drive like a Pro, How to Make a Low Level Image and Recover From It

Your hard drive crashed? It is likely that your files are still there! The FIRST thing you should always do in this situation is make an image (a copy) of your Hard Drive. Making an image won\”t fix anything; it will simply make an exact copy of your disk, copying good as well as corrupt data. Damaged hard drives usually only get progressively worse the more they are used, so to cut your losses you need to make an image. You then will recover your data from a different computer, using the image, while leaving the damaged hard drive alone – protecting it from further damage.

This tutorial will help you image your hard drive and then create a virtual hard drive on another Windows machine, using your image. Inside the virtual hard drive you should be able to see your lost data. This tutorial requires an external hard drive and the following free software:

The Ultimate Boot CD (Scroll down to \"Mirror Sites\" and click the download icon next to \"ISO\". It does not matter which sponser you use.) P2 eXplorer Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

Enable kernel logging

Kernel Logging is an instrument for tracking and logging specified behaviors of the kernel in Unix or Linux operating system. It may significantly enhance the availability of the operating system by providing detailed kernel trace information to enable a system administrator or other troubleshooter to diagnose and eventually fix the root cause of a system problem without the need of a reboot of the system or performing long and time-consuming actions to reproduce the problem. This is possible because, working in the background, while the system is running, Kernel logging collects and stores messages aboutcertain events that have taken place. The contents of the log are available to you at any time.

Kernel logging is usually enabled by default in may Linux kernel based distributions, however, generally such messages are directed to the standard output of the operating system. In other words they go to the screen.

For the purposes of this tutorial we have used Redhat Enterprise Linux 4 update 4 to demonstrate how you can enable kernel logging and direct the output to a file.

The first step is to setup the syslog to collect kernel messages to a file.

The default config file is syslog is /etc/syslog.conf. In that file you should add the following line Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 3.1/10 (15 votes cast)

yum via authentication proxy in Fedora/CentOS/RHEL5

This tutorial we will teach you something that most may need to use just for a few times in their Linux experience but will be very happy that such functionality actually exists at first place. Common Linux users, including me, are not so used to get updates through a proxy. Maybe used a proxy server once or twice some time ago but I have totally forgotten that proxies even existed in the Internet.

However if one day it happens that you find yourself in a corporate network and need to update a package as it currently doesn”t work as expected (unfortunately we all have to admit that this is something common for Linux distributions, not only under RedHat based systems) you will have to pass through a proxy.

For such cases after you finish reading this tutorial you will know how to configure yum for using proxy with basic authentication.

The configuration file for yum is located in /etc directory Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 1.3/10 (11 votes cast)

pacman via authentication proxy on Archlinux

In this tutorial we will demonstrate you something that most of you may need to use just for a few times in their Linux experience but will be very glad that such functionality exists. Others, like me, are so used to get everything through a proxy that I have actually forgotten what was without it. Anyway in case one day it happens that you find yourself in a corporate network and for example Pidgin fails to log you in ICQ as a new version of the ICQ protocol has emerged. A quick pacman -Ss pidgin fails right away if the network is build up fine. For such cases after you finish reading this tutorial you will know how to configure pacman for using proxy with authentication.

There are few general methods to make pacman use a proxy. Most common are to enable the proxy via wget or curl. I do not know why I never liked curl so I will show you how to do it only with wget. This actually will make pacman use wget as application for download and on the other hand we will setup wget to use the proxy. If you would need to download andything else with wget then you will be able to do it right afer we finish with the tutorial.

Ok the files that you will need to edit are two. First one and most important is /etc/wgetrc and second one is /etc/pacman.conf.

Here is what you need to set in wgetrc. Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 2.3/10 (12 votes cast)

wget using authentication proxy on Linux

In this tutorial we will demonstrate something that most of you may need to use just for a few times in their Linux experience but will be very happy that such functionality existed at first place. Commong Linux users, including me, are not so used to get things through a proxy. Maybe used one some time ago but I have totally forgotten that such things as proxies even existed. Anyway in case one day it happens that you find yourself in a corporate network and need to download someting from the command line you will find yourself into some trouble. Not that you cannot download it quickly using a browser but for example in my case it was a script that I had to make work. For such cases after you finish reading this tutorial you will know how to configure wget for using proxy with basic authentication.

There are two ways for wget to pick up the proxy server hostname. One way is from the environment variables and another way is via the wget configuration file.The main and only configuration file of wget is located in etc directory Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 2.5/10 (14 votes cast)

Configure better and rich command history log

In this tutorial i will guide you how to make more detailed log than what default bash history provides.

First of all I want to explain that the purpose of such log is generally to used in multi-user and multi access environments. There is generally no need to configure this on your home Linux system that is used only by you, nor you need that on your laptop. I have personally use this method on client servers where the client has full root access. By client i mean a company and that usually means a dozen of people with access to the server. I just want to keep track of who did what and at what time from which IP and in which directory.

That is pretty much all you need to know. Here is an example of how the log file looks like Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)

Install and configure heartbeat version 2

The following tutorial will explain how to install and configure heartbeat version 2. The Heartbeat program is one of the core components of the Linux-HA (High-Availability Linux) project

The installation is pretty simple and straight forward process. For the purposes of this tutorial we have used RedHat Enterprise Linux 4.

Dependency package is: libnet-1.0.2-2.2.el4.rf.i386.rpm

or
wget http://download.opensuse.org/repositories/server:/ha-clustering/RHEL_4/i386/libnet-1.1.2.1-1.1.i386.rpm – for RHEL4

wget http://download.opensuse.org/repositories/server:/ha-clustering/RHEL_4/src/libnet-1.1.2.1-1.1.src.rpm

Install and configure HEARTBEAT – 2.1.3


mkdir /usr/local/src/packs
cd /usr/local/src/packs/
wget http://linux-ha.org/download/heartbeat-2.1.3.tar.gz
tar –zxvf heartbeat-2.1.3.tar.gz
cd heartbeat-2.1.3
./ConfigureMe configure
make
make install
groupadd haclient
useradd -g haclient haclient

Use just 1 white space between parameters in haresources

In case of fail with reason user id hacluster not configured add

groupadd hacluster
useradd -g hacluster hacluster

Check in : /etc/passwd that :
1. pegasus:x:66:65:tog-pegasus OpenPegasus WBEM/CIM services:/var/lib/Pegasus:/sbin/nologin
2. hacluster:x:17:65::/home/hacluster:/sbin/nologin
3. haclient:x:500:65::/home/haclient:/bin/bash

and in : /etc/group that :

1. pegasus:x:66:
2. haclient:x:65
3. hacluster:x:500: Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 1.0/10 (11 votes cast)

Install and configure heartbeat

The Heartbeat program is one of the core components of the Linux-HA (High-Availability Linux) project

The installation is pretty simple and straight forward process. For the purposes of this tutorial we have used RedHat Enterprise Linux 4.

Dependency package is: libnet-1.0.2-2.2.el4.rf.i386.rpm

It can easily be installed with the following command
rpm -Uvh libnet-1.0.2-2.2.el4.rf.i386.rpm

Now we ready to continue with the installation of heatbeat itself

mkdir /usr/local/src/packs
cd /usr/local/src/packs/
wget http://linux-ha.org/download/heartbeat-2.0.8.tar.gz
tar –zxvf heartbeat-2.0.8.tar.gz
cd heartbeat-2.0.8
./ConfigureMe configure
make
make install

Copy or create two main configuration files – ha.cf and haresources in /etc/ha.d/
Below follows a config example of a high availability system with 2 identical nodes which will share an IP address.

Here is an example configuration for /etc/ha.d/ha.cf is on the first host :
Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

How to find what package provides a file

If you are a Linux user you probably some day will need to to find where a specific file came from. This is not information that you will need on daily basis but it is still something very useful to know and some times it may even be life-saving.

Basically i will try to give examples for the most commonly used distributions : RedHat (Fedora, CentOS, Suse, Mandriva), Debian (Debian Linux, Ubuntu, Kubuntu) and Archlinux.

If it was installed from an RPM (RedHat Package Manager), there is an easy way. Actually there are a few ways. Just use one of the following commands and you will get the information that you needed Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (10 votes cast)

Taking screenshots in Gnome with active Menu

Greetings to all of you curious people who came on this page. In this tutorial I will demonstrate you a small trick to workaround one of the most annoying bugs in Gnome – the malfunction of printscreen button when a menu is active.

A little background of the case I came across. I was writing another useful tutorial today , you may want to check it here How to disable F10 key shortcut in gnome-terminal and I was trying to prepare the screenshots for it. I hit on a rock making even the first print screen!!! As you can see in the tutorial first step is to open gnome-terminal and then click on Edit menu. Then I wanted to take a screenshot so I”m pressing Alt+PrtSc and guess what … nothing happens. I release the menu and press again Alt+PrtSc and to my surprise all works as expected. I was lucky to narrow the problem pretty fast so I was thinking … Alright I guess gnome-screenshot doesn”t work fine then lets find another application that will work. I run Archlinux , pretty cool distro by the way, so I run Read the rest of this entry »

VN:F [1.9.18_1163]
Rating: 0.0/10 (0 votes cast)