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

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

3

Running the latest kernel CentOS7

I decided to start using the ML kernel for my kvm host for performance gains on my kvm guests. You can easily install the ML or the LT kernels easily on CentOS7 using the ELrepo. kernel-MT – mainline stable kernel kernel-LT – long term support kernel Steps: rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum remove kernel-headers kernel-tools kernel-tools-libs edit /etc/yum.repos.d/elrepo.repo and enable=1 the elrepo-kernel. change the ml to lt to install the long term support kernel. yum install kernel-ml.x86_64 kernel-ml-devel.x86_64 kernel-ml-headers.x86_64 kernel-ml-tools.x86_64 kernel-ml-tools-libs.x86_64 kernel-ml-tools-libs-devel.x86_64 time to get grub settled awk -F’ ‘$1==”menuentry ” {print $2}’ /etc/grub2.cfg it should list all… Continue Reading

0

Reset root password on RHEL/CentOS 7

much have changed since 4/5/6 days since RHEL/CentOS7 uses grub2 to boot. root password recovery is now very different than before. start/reboot the system and on the GRUB2 boot screen press the e key for edit. scroll down to the linux* line (could be linux/linux16/linuxefi) and remove rhgb and quiet and add init=/bin/sh to the end of the line. For some virtual hosts you might have to use rb.break instead of init=/bin/sh. Press CTRL-X to boot the system and it a shell prompt will be presented. Once booted the / filesystem will be in read only mode please issue mount… Continue Reading