Posts tagged CentOS

In-place upgrade CentOS6 to CentOS7


centos-logoI’m currently busy testing the CentOS6 to CentOS7 online upgrade.

The first tests on a plain CentOS (6.5) installation were successful and I’m hoping to start testing some (DirectAdmin development boxes running ‘real’ websites soon).

The CentOS core team has pre-build packages available of Red Hat’s tool to do the in-place upgrade. These are available as RPM-package in this repository.

Installation is done by adding a repo file (/etc/yum.repos.d/upgrade.repo) with this content:


Limit number of kernels in CentOS


By default, CentOS will keep the 5 last installed kernels available. Since kernels are getting bigger and the /boot partition is, in most of the cases, a primary partition which is difficult to extent, you can run into problems like I had today. My /boot was getting too small.

I always create it with a size of 150M, but 250M is more common these days. The workaround is quite easy: limit the number of old kernels that you want to keep after installing a new one to 3 instead of the default 5.

Install the package yum-utils:

yum install yum-utils

Now remove the old kernels:

package-cleanup --oldkernels --count=2

To make this permanent, edit /etc/yum.conf and set installonly_limit:


That’s it. CentOS will now install no more than 3 kernels. The current one and two older versions. This also works with other RPM-based systems like Fedora and Redhat or Oracle Enterprise Linux.

Where is eth0 on new Dell servers


Dell made some changes in their 12th generation servers like the R520, R620, R720, etc. These changes reflect Consistent Network Device Naming announced by the Fedora project earlier. Onboard network interfaces are no longer know as eth0, eth1, etc. by default but now named em1, em2, etc.

System Administrators can then use BIOS-provided names, which are consistent and not arbitrarily named, for their network ports. This eliminates the confusion that non-deterministic naming brings, and eliminates the use of hard-coded MAC address based port renaming which a) is racy and error-prone, and b) introduces state into an otherwise stateless system.

But there can be some problems. What if you use licensed software that used the MAC-address as unique identifier and polls hard to /dev/eth0. Well, then you have to hack around in the boot parameters of grub to use the old ethX device naming. This is also the case if you’re current PXE of Configuration Management isn’t ready for the new device naming.

  1. cp –preserve=context /etc/grub.conf /etc/grub.bak
  2. Add biosdevname=0 to the kernel boot arguments in /etc/grub.conf.
  3. Rename /etc/sysconfig/network-scripts/ifcfg-em1 to /etc/sysconfig/network-scripts/ifcfg-eth0, changing the line DEVICE=”em1″ to DEVICE=”eth0″
  4. Delete /etc/udev/rules.d/70-persistent-net.rules
  5. Reboot.

Now the network devices have their old names again. I’ve tested this with CentOS 6.2. If you’re looking for a quick fix for your current PXE-environment just use the first two steps (Add biosdevname=0 to the kernel boot arguments in /etc/grub.conf).

Dell DSET 3.2 on CentOS 6


We have been having some issues with some Dell servers and we were asked to provide a DSET output for one of them. Of course the new version 3.2 does not run directly under CentOS 6.x, however as RHEL is supported then it should work. This is the steps I took to get it to work:

mkdir -p /tmp/dell; cd /tmp; wget

This binary does a lot of checking to see that it is to be run on a supported system, unfortunately CentOS is not one of them. So I extracted the contents using:

tail -n+20 dell-dset- | tar -xzv -C dell; cd dell

The +20 offset was found by using:

awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' dell-dset-

You will need to find the RedHat strings for /etc/issue and /etc/redhat-release, once changed. After that, run ./ and select install and run. The easiest way to do so is adding this line on top of your /etc/issue:

Red Hat Enterprise Linux Server release 6 x86_64

Dell: Since CentOS is should be 100% binary compatible with Redhat, please provide support. It’s your department always asking for DSET reports. Provide us, SysAdmins, the good tools to do this without waisting a lot of time.

If you find the above method to scary, just use an older version of the DSET tool. This one isn’t strict on checking the OS type:

By the way: Is the Dell website hosted on the moon. Sloooooowww as always.

Go to Top