0

grub2 tips and tricks – CentOS/RHEL based

grub2 is vastly different from grub. Will post some tips and tricks.. list the current kernels on the OS # egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \’ Linux Server, with Linux 3.10.0-123.el7.x86_64 Linux Server, with Linux 3.10.0-123.4.4.el7.x86_64 Linux Server, with Linux 0-rescue-d3e0313c0f6d48a0bb72495d2x32r1 if your wanting to change the defautl kernel that the system boots into grub2-set-default # where the # is the line number starting with 0 if your just wanting to boot into a version of kernel just 1 time you can do grub2-reboot # where the # is the line number starting with 0 or if… Continue Reading

0

RHEL/Centos 7.x software raid LIVE! both LVM and standard partitions with grub2

Before getting started please read my previous post for RHEL/CentOS 6.x systems here. grub2 is vastly different than grub and I did not find any good solution of doing this on a live machine so lets get started. The setup will be the same as the previous post. make sure that the 2nd disk is added and now clone the partitions. You can also create partitions manually if you like or if you want to change the sizes of the partitions. [root@cent7 ~]# cat /proc/partitions major minor #blocks name 8 0 8388608 sda 8 1 1048576 sda1 8 2 7339008… Continue Reading

1

RHEL/Centos 6.x software raid LIVE! both LVM and standard partitions with grub

It seems that there are still many machines out in the world today that have a need for software raid to protect its data. Recently I’ve been working on some POS machines which can house 2 drives but does not have any type of raid option for protection. This post will walk through creating a software raid1 and also talk about even changing partition sizes and also deal with those systems that have LVM instead of standard partitions. (I am a big fan of LVM and use it as much as possible even on small drives.) This post is a… Continue Reading

2

RHEL/CentOS7 create custom cdrom

Once in a while you will need to install a system thats not on the network and instead of manually installing it you want it automated with a kickstart file. For most hosts you can create a floppy image with the kickstart file and mount it however on most Dell servers due to the way it handles the device names it can be tricky and this is where a custom cdrom can help. – download the dvd iso – mount the iso.. mkdir dvd; mount -o loop rhel-server-7.2-dvd.iso ./dvd – create a temp directory and copy over the files.. mkdir… Continue Reading

0

Linux cleanup before turning images into templates for virtual environments

After the OS is installed and prepped there are some cleanup steps needed before turning it into a template. Remove old kernels Remove yum cache Clean out log files Remove device persistencies Clean up MAC and UUID Clean up history and keys I made a sample script that will automate the process. Instead of hosting the script here I’ve moved it to my github.

0

all things subscription-manager

Register and auto subscribe in one step # subscription-manger register –username –password –auth-attach Register first then attach a subscription in the customer portal # subscription-manger register Attach a subscription from any available that match the system # subscription-manager attach –auth Register with a specific pool # subscription-manager attach –pool= Get pool id # subscription-manager list –available –all Check your enabled subscriptions # subscription-manger list Status of consumed subscriptions # subscription-manager list -consumed Unregister system # subscription-manager remove –all # subscription-manager unregister # subscription-manager clean list all provided repos # subscription-manager repos –list enable/disable repos # subscription-manager repos –enable or –disalbe

0

Dell SUU on 64bit CentOS/RHEL

Dell SUU (Server Update Utility) is a tool provided as an ISO from Dell that runs on windows and linux to search for drivers and firmware updates. In 32bit CentOS/RHEL SUU runs without problems however in 64bit correct pre-reqs are required for SUU to work correctly. SUU manual is located here. yum -y install glibc.i686 compat-libstdc++-33.i686 libstdc++.i686 zlib.i686 libxml2.i686 libXp.i686 libXtst.i686 ncurses-libs pam.i686 procmail mount the ISO. you can do this 2 ways. #1 using virtual media in the IDRAC or #2 loop mounting the iso from the OS after transferring the ISO to the OS. Check for updates ./suu… Continue Reading

0

LDAP MD5 Cert Error on RHEL/CentOS 6.4+

With the update of nss-3.14.0 LDAP stopped using the MD5 signed certificate. nss-3.14.0 update deems that MD5 as unsecure. The change causes authentication of users using LDAP to fail. There are 4 possible ways to fix this problem 1) update the LDAP certificate to use other type of encryption than MD5 2) modify each kernel line in /etc/grub.conf to add support for MD5 and also in create nss.sh in /etc/profile.d in /etc/grub.conf add to the end of each kernel line systemd.setenv=NSS_HASH_ALG_SUPPORT=+MD5 in /etc/profile.d create nss.sh with export NSS_HASH_ALG_SUPPORT=+MD5 REBOOT 3) export the correct options to /etc/sysconfig/init in /etc/sysconfig/init add export… Continue Reading

0

Docker Common Commands: 101 Part 2

The comprehensive Docker command line reference is located here. However we will cover some basic commands. Image Build an image docker build -rm=true . Install an image docker pull ${IMAGE} List of installed images docker images docker images –tree (tree view) docker images -no-trunc (detailed listing) Remove an image docker rmi ${IMAGE_ID} Remove all untagged images docker rmi $(docker images | grep “^” awk ‘{ print $3 }’) Remove all images docker rm $(docker ps -aq) Container Run a container docker run (many other options on this) List containers docker ps docker ps -a (list all containers) Stop a container… Continue Reading

0

Docker on CentOS/RHEL7 101 Part 1

My journey with Docker. Installing Docker on CentOS/RHEL7 $ sudo yum install docker $ sudo systemctl start docker $ sudo systemctl enable docker NOTE: if you are using firewalld make sure that firewalld is started before Docker. Also if firewalld is restarted please make sure to restart Docker afterwards. Now that Docker is installed lets pull a image and play with it a bit. $ sudo docker pull centos # pulls the latest centos7 container Trying to pull repository docker.io/centos … fd44297e2ddb: Download complete 6941bfcbbfca: Download complete 41459f052977: Download complete Status: Image is up to date for docker.io/centos:latest $ sudo… Continue Reading