Category: Unix

How to add More Space in pre-existing mount Point – using LVM (RHEL/OEL 6)

Just to achieve that we added 1 disk in the VM environment and switched on the machine.

Verify the current disk usage:


Add the new disk and verify using below command:


Partition the new added disk:


So now we have /dev/sdb1 new formatted partition created to use to increase the size of mount point. Create the physical volume out of this new partition:


Find out all available physical volume presented:


Find out the volume group name which we really need to extend and extend it using vgextend command like below:


Now check again vgdisplay:


We can see that 39.99 GB is visible now from vgdisplay command.

Now we have to find out which logical volume has to extend finally, find out through lvdisplay command:


So the actual LV we have to increase is – /dev/vg_oralinux/LogVol01.

Use command – lvextend to add space to logical volume:


Still it did not add the space to logical volume, we just need 1 more step to get this done.

Use resize2fs command to add space in logical volume.


So finally we have 40 GB added in the logical volume.

Hope it helps…

How to configure IP Address in Solaris 10 Manually

Hello Guys, I also faced the same problem where i did not configure the IP while installing the OS and decided to configure it later on and i did not know how to do that either.

Finally I searched on google and, i hope the below way will help many who is trying to achieve the same thing:

1. First of all find out what all we have in our system:


2. So i knew that NIC card was installed, however it was not showing up, so we needed to make it visible first of all, for that we have to use “dladm show-link” command, it will show us the NIC Card available for this machine.

Next Step would be to make this device up (We need to select the NIC Device which we have got from the previous command ) so that it could be visible through ifconfig -a command. This is what we achieved in below screenshot.


3. Finally we have to set the IP along with the Sub netmask


4. There are few other changes which we need to do before we get the final picture, if file is not there then create it and change it as per the configuration:


5. Make changes in /etc/hosts file as well:


6. Similar changes need to be done in – /etc/inet/hosts file as well:


And we are sorted now…let me know if that helps.

Thanks for reading!

UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

Recently I was trying to create an Oracle user on Solaris 10 and i got this error while giving useradd command.

bash-3.2# useradd -g oinstall -G dba -d /export/home/oracle -s /usr/bin/bash oracle
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M).

To resolve this error i did some search and find out to verify content of /etc/passwd file along with /etc/shadow file, however it did not resolve my error. Basically we need to see if we had this user before and deleted it for some reason, however in my case it was not the case.

Then i came to know one important file which we should check is /etc/user_attr.

I checked the content of this file and found oracle user is already there – (I did not remember if i created it or updated this file ever, but it was there).


I edited this file and removed the oracle entry. Now my file was like below:


Now try creating the user and it went well without any problem.


So now we have an entry in /etc/passwd and /etc/shadow file.

Hope it helps…

How to Add New Partition in Linux using LVM (Logical Volume Manager)

This concept will only work if we created our partition using Logical Volume Manager while installing the Operating System.

First of all find out the current usage and add 1 disk using VMWare Workstation, this step will be similar to Physical Machine as well.


Find out whether fdisk -l displays /dev/sdb:


Create the partition for /dev/sdb as /dev/sdb1.


Now create the PV Volume on new created disk /dev/sdb1 as below:


As we can we Physical Space has been displayed we need to extend the Volume Group using “vgextend”:


Confirm the Volume group has been extended or not, now we can see size has been increased to 39.79 GB.


Now finally find out the Logical Volume which is currently there:


Now extend the Logical Volume per the below command:


After the extend the logical volume we need to re-size the Logical Volume


Verify the space again, it has been increased to 14 Gig to 34 Gig.


Thanks for viewing.

Hope it helps…

How to Rename ethernet interface to eth0 in Linux

Today again I am going to discuss 1 more issue which I faced recently with Oracle Enterprise Linux – 6.3, maybe there are many who might have faced this already.

So let me discuss the problem first.

What’d caused the issue?
— I copied my VM Ware Machine- A from my current laptop to different laptop and when I started it, my default eth0 was not coming up.
— So I decided to delete this from VM Ware Setting and add a new Adapter and I did the same and started my Machine, I did not realize but I did this 2-3 times.
— So finally what I got this is my ethernet name was changed to eth3 though my configuration file which was ifcfg-eth0 before, was mistakenly deleted by me. The situation was like below:


Even though I tried starting my network but it was not coming up.

What I did to sort out my problem:

I created ifcfg-eth0 file manually, and the configuration file of eth0 was like the below:


I again tried to restart my network and it started this time, however, the ifconfig was still showing eth3, however, the configuration file eth0 was picked up.


Now, my motive was to change the name eth3 to eth0, for anyone it could be eth1 to eth0 or eth2-eth0, for me it was like eth3 to eth1.

Renaming your network interface to eth0:

Oracle Enterprise Linux, with many others, stores the network interface hardware configuration using udev. The network interface configuration is stored in the file /etc/udev/rules.d/70-persistent-net.rules. Open this file with editor (vim) and start editing. You’ll see configuration lines, like:


As you can see, the system now has the configuration for four interfaces: eth0,eth1,eth2 and eth3. The eth0,eth1 and eth2 line contain the hardware (MAC) address of the old network card, the fourth line is the new one.  Because your network configuration scripts (where IP address settings are stored) are bound to a specific device (eth0) and the system doesn’t know about eth1, it can’t bring it up. To fix this, simply rename “eth3″ to “eth0″ in the NAME field, and remove or comment other lines.


Updating hardware MAC address in networking script:

Apart from the hardware configuration, there is also a networking configuration for the interface. This configuration is stored in /etc/sysconfig/network-scripts/ifcfg-eth0. In this file the IP address configuration is bound to the specific interface. This file most of the times also contains a specific hardware address, the MAC address of the interface the IP address should bind to. Look for the “HWADDR” line and update its value to the one you wrote down earlier from the udev configuration.


Reboot the system to update ethernet numbering.

Now check ifconfig and you will get what you expect.


That’s It.

Hope it helps.

Configure Linux yum Server Step by Step Guide on 6uX

This post will describe how to configure YUM Repository in OEL/RHEL, there are many post on this and this one is just an another blog to define it works perfectly if we configure it correctly.

Let me start:

1. We need to create a directory that will solve our purpose to have all RPM placed.

In our case we created a new directory – repository under root directory.1

2. Now mount the iso file in VMWare and go to Server Directory under RHEL iso file image.2

3. Check whether ISO file has been mounted and go to Server Directory:7

4. Now for verification check how many packages are there to be copied and copy all rpm in /root/repository folder like below.


5. Now verify that if we are able to use yum before we start configuring yum repository.4

6. Now install yum packages to use it for repository.5

7. We also need need to install “createrepo” package to create repository for this Linux Box.6

8. So now we have installed required packages, now we need to create a repository. Now go to /root directory where we created “repository” directory. Run the command – createrepo -v repository (-v is not mandatory)

[root@oragyan1 ~]# createrepo -v repository
/usr/share/createrepo/ DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
/usr/share/createrepo/ DeprecationWarning: the sha module is deprecated; use the hashlib module instead
import sha
/usr/share/createrepo/ DeprecationWarning: use the name attribute
fname = self.filename[:-3]
1/3040 – libbdevid-python-
2/3040 – blas-3.0-37.el5.x86_64.rpm
3/3040 – bogl-devel-0.1.18-11.2.1.el5.1.x86_64.rpm
4/3040 – fonts-gujarati-2.3.1-1.el5.noarch.rpm
5/3040 – man-pages-de-0.4-11.noarch.rpm


* <== Output Trimmed


3036/3040 – gnome-python2-libegg-2.14.2-6.el5.x86_64.rpm
3037/3040 – openobex-devel-1.3-3.1.i386.rpm
3038/3040 – kdelibs-3.5.4-22.el5_3.x86_64.rpm
3039/3040 – xsri-2.1.0-10.fc6.x86_64.rpm
3040/3040 – parted-1.8.1-23.el5.i386.rpm

Saving Primary metadata
Saving file lists metadata
Saving other metadata
[root@oragyan1 ~]#

9. Now check hostname and change directory to /etc/yum.repos.d. copy sample repository file to the file with any name you want with .repo extension and open it, normally we usually name it with our directory name to remember e.g (repository.repo):

[root@oragyan1 yum.repos.d]# hostname
[root@oragyan1 yum.repos.d]#
[root@oragyan1 yum.repos.d]# pwd
[root@oragyan1 yum.repos.d]# ls
[root@oragyan1 yum.repos.d]#
[root@oragyan1 yum.repos.d]# cp public-yum-ol6.repo repository.repo
[root@oragyan1 yum.repos.d]#
[root@oragyan1 yum.repos.d]# vi repository.repo
[root@oragyan1 yum.repos.d]#
[root@oragyan1 yum.repos.d]# cat repository.repo
name=Oracle Linux $releasever Latest ($basearch)
[root@oragyan1 yum.repos.d]#

Edit the file with vi editor:

[root@oragyan1 yum.repos.d]# vi repository.repo
[root@oragyan1 yum.repos.d]#

10. Finally repository.repo should contain the content like below.

[root@oragyan1 yum.repos.d]# cat repository.repo
[root@oragyan1 yum.repos.d]#

Value of Enabled should be 1.

11. Make Sure your /etc/yum.repos.d directory should not contain any other repo file, else YUM may fail to get the required result, create an old directory and copy all other file except the current one in use.

It should be like below, i faced problem due to this i will share that problem in my next post-:

[root@oragyan1 yum.repos.d]# ls -lrt
total 8
-rw-r–r–. 1 root root 96 Aug 12 14:43 repository.repo
drwxr-xr-x. 2 root root 4096 Aug 12 22:08 old
[root@oragyan1 yum.repos.d]#

12. Now run the below commands:

[root@oragyan1 ~]# yum clean all
Plugin “filter-data” can’t be imported
/usr/lib/yum-plugins/ DeprecationWarning: the sets module is deprecated
from sets import Set, ImmutableSet
Plugin “rhnplugin” can’t be imported
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, keys, kmod, list-data, protect-packages, protectbase, refresh-packagekit, rhnplugin, security, tmprepo,
: verify, versionlock
Cleaning up Everything
[root@oragyan1 ~]#
[root@oragyan1 ~]# yum makecache
Plugin “filter-data” can’t be imported
/usr/lib/yum-plugins/ DeprecationWarning: the sets module is deprecated
from sets import Set, ImmutableSet
Plugin “rhnplugin” can’t be imported
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, keys, kmod, list-data, protect-packages, protectbase, refresh-packagekit, rhnplugin, security, tmprepo,
: verify, versionlock
This system is not registered with ULN.
ULN Satellite or ULN Classic support will be disabled.
Determining fastest mirrors
repository | 951 B 00:00 …
repository/filelists | 2.9 MB 00:00 …
repository/primary | 1.0 MB 00:00 …
repository/other | 8.8 MB 00:00 …
repository 3040/3040
repository 3040/3040
repository 3040/3040
Metadata Cache Created
[root@oragyan1 ~]#

You can also run –

[root@oragyan1 ~]# yum list all

It will show everything in this repository.

Now finally install the telnet using yum.

[root@oragyan1 ~]#

[root@oragyan1 ~]# yum install telnet
Plugin “filter-data” can’t be imported
/usr/lib/yum-plugins/ DeprecationWarning: the sets module is deprecated
from sets import Set, ImmutableSet
Plugin “rhnplugin” can’t be imported
Loaded plugins: aliases, changelog, downloadonly, fastestmirror, keys, kmod, list-data, protect-packages, protectbase, refresh-packagekit, rhnplugin, security, tmprepo,
: verify, versionlock
This system is not registered with ULN.
ULN Satellite or ULN Classic support will be disabled.
Loading mirror speeds from cached hostfile
0 packages excluded due to repository protections
Reading version lock configuration
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package telnet.x86_64 1:0.17-39.el5 set to be installed
–> Finished Dependency Resolution

Dependencies Resolved

Package Arch Version Repository Size
telnet x86_64 1:0.17-39.el5 repository 60 k

Transaction Summary
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 60 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 11 pre-existing rpmdb problem(s), ‘yum check’ output follows:
rhn-client-tools-1.0.0-87.0.2.el6.noarch has installed conflicts yum-rhn-plugin < (‘0’, ‘0.9.1’, ’35.el6′): yum-rhn-plugin-0.5.4-13.el5.noarch
yum-3.2.22-20.el5.noarch has installed conflicts yum-skip-broken: yum-3.2.29-30.0.1.el6.noarch
yum-3.2.22-20.el5.noarch has installed conflicts yum-basearchonly: yum-3.2.29-30.0.1.el6.noarch
yum-3.2.22-20.el5.noarch has missing requires of python(abi) = (‘0’, ‘2.4’, None)
yum-3.2.22-20.el5.noarch has missing requires of python-elementtree
yum-3.2.29-30.0.1.el6.noarch is a duplicate with yum-3.2.22-20.el5.noarch
yum-metadata-parser-1.1.2-3.el5.x86_64 has missing requires of python(abi) = (‘0’, ‘2.4’, None)
yum-metadata-parser-1.1.2-16.el6.x86_64 is a duplicate with yum-metadata-parser-1.1.2-3.el5.x86_64
yum-plugin-security-1.1.30-14.el6.noarch has installed conflicts yum-security < (‘0’, ‘1.1.20’, ‘0’): yum-security-1.1.16-13.el5.noarch
yum-rhn-plugin-0.9.1-40.0.1.el6.noarch is a duplicate with yum-rhn-plugin-0.5.4-13.el5.noarch
yum-utils-1.1.30-14.el6.noarch is a duplicate with yum-utils-1.1.16-13.el5.noarch
Installing : telnet 1/1

telnet.x86_64 1:0.17-39.el5

[root@oragyan1 ~]#

Thats it!

Hope it helps..

How to install VMWare Tools in Linux – 5uX OR 6uX

This may be a very simple tasks for many however this is also tedious task for few, and as far as i know, many even do not know that VMWare tools exists to get multiple features.

I came to know about VMWare tools when my screen was not coming to full screen and i was very desperate to get that. Then my search started and i found that there is tool given by VMWare which has to be installed after every operating system we install on VMWare workstation to get many important features.

So this is how it will go:

This would be the login screen of OEL 6.3:


Now select Install VMware tools from VM menu bar:


After you click on that you will see VMware Tools showing on desktop screen:


Double click on VMware Tools icons and you will see the below image that will have *.tar.gz file.


Copy the file to desktop:


Now Open the terminal and find out the software in the directory – Desktop like below:


Now simply untar the file using the tar command like below and you will get – “vmware-tools-distrib” directory generated:


Now cd to vmware-tools-distrib and execute the script and keep on press enter and select all default values:

[root@oragyan1 Desktop]# cd vmware-tools-distrib/
[root@oragyan1 vmware-tools-distrib]# ls -lrt
total 528
drwxr-xr-x. 15 root root 4096 Nov 1 2012 lib
-rwxr-xr-x. 1 root root 260711 Nov 1 2012
drwxr-xr-x. 2 root root 4096 Nov 1 2012 installer
-rw-r–r–. 1 root root 2538 Nov 1 2012 INSTALL
-rw-r–r–. 1 root root 253239 Nov 1 2012 FILES
drwxr-xr-x. 4 root root 4096 Nov 1 2012 etc
drwxr-xr-x. 2 root root 4096 Nov 1 2012 doc
drwxr-xr-x. 2 root root 4096 Nov 1 2012 bin
[root@oragyan1 vmware-tools-distrib]#

Now Execute the script:

[root@oragyan1 vmware-tools-distrib]# ./
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools.

In which directory do you want to install the binary files?

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?

What is the directory that contains the init scripts?

In which directory do you want to install the daemon files?

In which directory do you want to install the library files?
.            <—- Output Trimmed here.

You must restart your X session before any mouse or graphics changes take effect.

You can now run VMware Tools by invoking “/usr/bin/vmware-toolbox-cmd” from the
command line.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.


–the VMware team

Found VMware Tools CDROM mounted at /media/VMware Tools. Ejecting device
/dev/sr0 …
[root@oragyan1 vmware-tools-distrib]#

No simply logout and login ur session and you will be set to get full screen along with many features.

Thanks for viewing..

Hope it helps..

Required Software to get X Window in Linux 6uX.

I have been informed by many students that they did not get the X Window of Linux when they first tried Linux Installation in their environment.

Its simply lack of information that they need to have to get this X Window in Linux. Given below are the details that can help students to achieve what they really want without roaming around here and there.

Screen which comes before the below one has been discussed in other Post. This screen comes when we need to select particular Software to make our Linux work. So select Customized Now option below and Press Next.

This is like same post i have posted for 5uX – this post will describe about 6uX.

Below screen comes up during the installation, we did partition using LVM in our previous Blog, and this is what we get when we need to select the packages for X window. Check on Customize Now and Press Next.


This is self explanatory and we need to select required one at right hand side window. We can do later on if we need to anything extra.


Select the required option from Servers.


From webs services – we don’t need to select anything until we really need to.


Same thing applies here as well. Select the required one only.5

Same for System management. Nothing special to select here.


We don’t need Virtualization as of now.


From the Desktop we need to select the Ticked one to get the X Window.


From the application select the required one – though its up to you whatever you select from Applications.


From Development – Select the Ticked One.


Language is purely your choice.



Press Next and Installation will be started:


That’s it.

Hope it helps..

How to do Custom Partition in Linux 6uX using Logical Volume Manager

Below post will describe how can we make Custom Partition in Linux using Logical Volume Manager. Benefit of having LVM is – we can later on increase the size of our Physical Volume so we no need to worry about the space now.


Select “Create Custom Layout” for custom partition. 2

Press Next and Disk will be displayed which we have selected for the partition.3

Select the partition and press Create button, below screen will come up.4

Select “Standard Partition” and click on create, below screen will come up:5

Just to show /boot partition can not be in LVM i selected Swap name and gave size 200MB, later on we will change it to /boot. So it will look like below.


Now select the Free Size and click on “Create”, pop up will come up – then select “LVM Physical Volume” and Press “Create”:


File System Type – should be “physical volume(LVM)” and give “Fill to maximum allowable size” to this and press OK.


It will be displayed like below:


Now its time to create “Logical Volume Group” on top of “Physical Volume” we created.10

Click Create – Give Volume Group Name – VOLGroup00 and Physical Extent is 4 MB, in our case it will solve the purpose.


Now click on Add and Create Partition for SWAP and select almost double of RAM – however not necessary. Press OK.


SWAP partition over Logical Volume has been created, we can easily extend it later on. That is what we are going to get if we need to.


Click Add again and create Logical Volume root(/) – we can create as many as we want as per our requirement, however we are creating only two as of now. Press OK.14

It will be look like like below, so now we have two Logical Volumes in Volume Group.15

Finally it will look like below:


No select the main partition to install Oracle Linux 6.3 and Press Next:17

So we will get the below error as we did not create /boot partition separately and Kernel will decide that /root partition will itself contain /boot- though its not possible to have /boot partition in Logical Volumes.18

So press ok and select the SWAP partition we created above and gave 200 MB.Change the – Mount Point to /boot and File System Type – ext4. Press OK. Make sure it should be – Force to be a Primary Partition.19

So now it will be like below. We have /boot partition as well.20

Select the partition and Click Next and below screen will come up, Click Format.21

Click on – Write changes to disk.22

After few seconds below screen will come up and we are good to go for installation.23

That’s it.

Hope it helps..