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

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