Thursday, October 26, 2017

Step By Step Procedure To Change Boot Device In RHEL6

If you’ve ever come across a situation where there is a need to change the boot device then this document explains a step by step procedure with screen images on how to get this done. There are situations wherein the initial boot device selected is of less capacity and later there is a need to change this to something bigger one. So there is no way to increase the size of this drive since the next block device which is usually “/dev/sda2” starts from the sector wherein the “/dev/sda1” ended (*considering installation done in default mode).  Hence, we’ve to plan to move all the boot files onto a new, bigger block device and make that as a bootable.

Friday, October 13, 2017

Main Differences Between MBR & GPT

A few points about GPT(GUID Partition Table) when compared with MBR(Master Boot Record) partitioning method for hard disk drives. GPT is a standard partition layout for storage devices used in a desktop or server, such as a hard disk drive or solid-state drive. GPT has many advantages when compared with traditional MBR scheme.  Ideally, GPT is being used on servers with bigger disks volumes and MBR still remains as a favorite for home based systems such as desktops, otherwise on older server systems with disks of lesser size . Normally parted utility would be used for larger disks which would create GPT partition scheme which otherwise performed by traditional disk utilities such as fdisk, cfdisk etc, (on Unix systems). These disk partition tools normally work for smaller disks and can only create MS-DOS partition tables, and got a few drawbacks which are overcome by parted tool.

Friday, October 6, 2017

Simply Services Cheat Sheet

This is a simple table which would list out commonly used services with a quick look. I’ve tried to sum-up service configuration at the basic level, so, this table would provide a quick look on packages required to start service, config files to be used, ports to be opened via firewall, command to check for syntax errors(if any) and commands to bring up service. This is not an exclusive information regarding configuring a service in Linux, but just a quick look sheet. Also note that I've tried to list out most commonly used services.

Friday, September 15, 2017

Best Practices Of Running File System Check On Ext4 Or Xfs

linux dvd.pngGenerally, running a file system check/repair
command in Linux is expected to automatically repair at least some of the inconsistencies it finds. In some cases, severely damaged i-nodes or directories may be discarded if they cannot be repaired, hence, significant changes to the file system may occur which may result in data loss.

To ensure that unexpected or undesirable changes are not permanently made, perform the following precautionary steps:

Dry run (read-only mode)
Most file system checkers have a mode of operation which checks but does not repair the file system. In this mode, the checker will print any errors that it finds and actions that it would have taken, without actually modifying the file system. Using "e2fsck" on EXT4 (ext family file systems) and "xfs_repair" for XFS.

Saturday, September 9, 2017

Generate E-mail Alert Whenever An User Is Added


Recently I came across a situation wherein there was a requirement to trigger an email alert whenever a new user is added to the system (Linux). By default an alert would get logged in "/var/log/secure" file as and when a user is added or removed. However, I wanted a similar e-mail alert to be sent. Hence, I thought of coming up with a script to get this done. I found that this can be achieved in 2 ways as explained below (there could many other ways as well):