GRUB vs GRUB2

grub2

GRUB2 is a rewrite of legacy GRUB with many great updates, specially speed and security.

  • Configuration file has a new name
    grub.cfg replaced menu.lst , and configuration cannot be migrated from GRUB menu.lst to GRUB grub.cfg
  • New Commands
    Many new commands are added to GRUB2 which can be found in the link
  • grub.cfg gets automatically generatedThe file get automatically generated by grub-mkconfig This makes it easier to handle versioned kernel upgrades.
  • The configuration has updated syntax The syntax used in grub.cfg includes variables , conditionals, and loops something similar to scripting language.
  • Finding GRUB2 Kernel Files  GRUB2 has more reliable ways to find its own files and those of target kernels on multiple-disk systems
  • GRUB2 Multiple types  GRUB2 is available for multiple system such as PowerPC , PC BIOS, EFI , SPARC , MIFS
  • Many more file system supported GRUB2 supports many more file systems as compared to GRUB
  • GRUB2 reads  It can read files from LVM and RAID directly.
  • Graphical  GRUB2 has graphical terminal and graphical menu.
  • Modular design  GRUB 2 puts many facilities in dynamically loaded modules, allowing the core image to be smaller

Linux Boot Series – Part 1

linux boot process part 1

Boot process is one of the major part of troubleshooting an Operating System , it is the most critical time when administrators are tested to bring server up and running as soon as possible. Understanding how Operating system boot and what are the possible issues helps administrator to manage and configure Operating system which can not only boot faster but also recover and repaired in the fasted possible time.
The very first part of the boot process depends on the hardware architecture, there are few of them that are commonly used

  • Intel x86-based                         i386
  • AMD64 & Intel 64                      amd64
  • multiplatform for LPAE        generic-lpae
  • IBM POWER Systems             ppc64el
  • IBM z/Architecture                  s390x
BIOS based X86 Architecture

X86 systems are BIOS based and loads the first stage boot loader from the MBR of assigned storage , that inturn loads the boot loader stage 1.5 and 2 , default boot loader for linux is GRUB
UEFI-based x86 systems mount an EFI System Partition that contains a version of the GRUB boot loader. The EFI boot manager loads and runs GRUB as an EFI application.
Power Systems servers mount a PPC PReP partition that contains the Yaboot boot loader. The System Management Services (SMS) boot manager loads and runs yaboot.
IBM System z runs the z/IPL boot loader from a DASD or FCP-connected device that you specify when you IPL the partition that contains Linux Operating System
Note : BIOS and UEFI are both available in VMWare products as well as Oracle VirtualBox for latest configurations.

BIOS-based x86 Systems Details

BIOS (Basic input / output system) is a firmware interface in IBM compatible PCs and lately is also adopted by Virtual Software companies like VMWare and Virtualbox to be available in Virtual machines.
It is embedded on a chip in the motherboards for physical hardware and helps to scan and test all the devices in the system and selects the device to boot. Boot options is the list of devices in BIOS that provides list of bootable devices and the sequence to test bootable devices for the Operating system availability.
Usually, it checks any optical drives or USB storage devices present for bootable media, then, failing that, looks to the system’s hard drives. The BIOS then loads into memory whatever program is residing in the first sector of this device, called the Master Boot Record (MBR).
The MBR is only 512 bytes in size and contains machine code instructions for booting the machine, called a boot loader, along with the partition table. Once the BIOS finds and loads the boot loader program into memory, it gives control of the boot process to it.

UEFI based X86 Systems

UEFI is designed similar to BIOS with some great additions , unlike BIOS it run on its own architecture independ of the CPU and its own device driver. UEFI can mount partitions and read certain file systems. Although it has unique features its main tasks include searching for the bootable file system and passing on the control to the Operating system kernel. UEFI system identifies the partition with the GUID (globally unique identifier) which marks it as the EFI system partition. This partition contains applications compiled for the EFI architecture, which might include bootloaders for operating systems and utility software.
UEFI system includes an EFI boot manager that can boot the system from a default configuration or allow the user to choose from list of detected Operating systems. Once selected UEFI reads it into memory and gives control to the boot process.

super user setup in Ubuntu Debian distribution

super user

sudo Command is an important command in Linux user commands list. It is a safe way to execute privilege tasks , as well all commands executed with sudo are logged for audit purposes.

Running sudo command does not require root credentials , it is also possible to set minute details of sudo access in /etc/sudoers file.

Syntax

The /etc/sudoers file gets read in one pass , multiple entries might match but the last one has the highest precedence. It is advised to set the aliases before using them.
Comments can be inserted with # , with an exception that uid are also prefixed with an # symbol

Aliases

There are 4 type of aliases in sudoer file that can be used to assign permission

  • User Aliases
  • Runas Aliases
  • Command Aliases
  • Host Aliases

Aliases are the name for a user or group of users , host or group of hosts , a command or a group of commands.
Syntax: Alias_type NAME = value1,value2 ...

User Aliases
 # Everyone in the system group is covered under alias ADMINS
 User_Alias ADMINS = %admin
 # The users "tom", "james", are covered by the WEBDEV alias
 User_Alias WEBDEV = tom, james

In case you want to exclude a user or group of user from permission use !

 # This matches anybody in the USERS alias who isn't in WEBMASTERS or ADMINS aliases
 User_Alias LIMITED_USERS = USERS, !WEBMASTERS, !ADMINS
Runas Aliases

It is similar to User Alias except for the the fact it does allow user to be mentioned by UID’s this helps to match both usernames of a single UID as practiced in certain cases.
Basically UID’s are used for root user Runas_Alias ROOT = #0

# ROOT alias for uid 0 , Note #0 is not a comment
Runas_Alias ROOT = #0
#ADMINS alias for the group admin + user root
Runas_Alias ADMINS = %admin, root
Command Aliases

Command aliases are lists of commands and directories. You can use this to specify a group of commands. If you specify a directory it will include any file within that directory but not in any subdirectories.

# All the power options commands
 Cmnd_Alias POWER_CMDS = /sbin/poweroff, /sbin/reboot, /sbin/halt
# Admin commands
 Cmnd_Alias ADMIN_CMDS = /usr/sbin/passwd, 
# User Management Commands 
Cmnd_Alias USERMAN_CMDS = /usr/sbin/useradd, /usr/sbin/userdel, /usr/sbin/usermod, /usr/sbin/visudo
Host Aliases

A host alias is a list of hostname, ip address , networks , netgroups prefixed with a + plus symbol.
A host alias is a list of hostname, ip addresses, networks and netgroups (prefixed with a +).
Note: If you do not specify a netmask with a network the netmask of the hosts ethernet interface(s) will be used when matching, but it is a good practice to use netmask while configuring.

 # This is all the servers
 Host_Alias IAM_SERVERS = 10.10.2.5, 10.10.2.7, serverA
 # This is the whole network
 Host_Alias PUB_NET = 10.10.2.0/255.255.255.128
 # And this is every machine in the network that is not a server
 Host_Alias WORKSTATIONS = NETWORK, !SERVER
 # putting is all together
 # Host_Alias WORKSTATIONS = 10.10.2.0/255.255.255.128, !SERVERS
User Specifications

To make it all sense joining above declared aliases is the main part , this is where it is set WHO can run WHAT as WHO

  =   
 # LAMP Admins can run there commands provided they give password
 LAMPMIN LAMPSERVER= LAMP_CMDS
 # This lets run admin commands on all host under SERVER alias 
 ADMINS SERVERS= ADMIN_CMDS
 # This lets all the USERS run admin commands on the workstations provided 
# they give the root password or and admin password (using "sudo -u ")
 USERS WORKSTATIONS=(ADMINS) ADMIN_CMDS
 # This lets "patrick" run lamp commands without password on his local machine workstation10
 patrick workstation10= NOPASSWD: LAMP_CMDS
 # And this lets everybody print without requiring a password
 ALL ALL=(ALL) NOPASSWD: PRINTING_CMDS

 

Examples from Man Pages
 root            ALL = (ALL) ALL
 %wheel          ALL = (ALL) ALL
We let root and any user in group wheel run any command on any host as any user.
FULLTIMERS      ALL = NOPASSWD: ALL
Full time sysadmins may run any command on any host without authenticating.
WEBMASTERS  www = (www) ALL, (root) /usr/bin/su www
On the host www, any user in the WEBMASTERS User_Alias and may run any command
as user www (which owns the web pages) or simply su to www.
Important SUDO Commands

sudo -k

This command will remove the cached credential for the user and ask for the password in the next run sudo command.

sudo -l

Lists the current user permitted commands

sudo -Ul <user>

Lists the specified user permitted commands

sudo -v

Validates the user and increases the default cache for another default 15 min if that is set in configuration file.

sudo -V

Lists sudo version details and features

sudo -e

To edit the sudoers file , note export the preferred editor variable in bash before running this command.

export EDITOR=/bin/nano ;sudo visudo

In short sudo is a great feature in Nix operating system and it is a must known for system administrators.

Why Ubuntu Linux a choice of smart business people

ubuntu choice

ubuntu choice

Ubuntu has a very humble background and its base is clearly defined by its name “Ubuntu” meaning humanity toward others. It is truly an Operating System that has challenged more richer alternatives namely Microsoft Windows and Mac OS and as majority of humans are not rich this OS stands the test of times , with its all unique and shining qualities it is free of cost and an enterprise standard OS adopted by big enterprise like Dell computers.

Some of the qualities that attract more and more IT savvy businessman in Ubuntu are

Time is Money

We hear this phrase many times , if you compare Ubuntu to its competitors like Windows and Mac OS it is not behind in terms of its performance , infact is it much faster when it comes to high computation tasks such as programming tasks , testing and development tasks and hardware requirement are much low as well.

Homogeneous in nature

Like that of Microsoft OS’s where the client and server operating systems are way apart in there usage , Ubuntu Desktop and Server edition are much natural and can be used for both client server model , desktop computer , and now more recently a choice for cloud computing.

Support is available Free as well as Commercial

Though Enterprise businesses require commercial support , SME’s and startup love to get free support and that is where there is no other competitor to Ubuntu distribution , it is one of the most popular Linux distribution with a huge community support that you can find almost all solution free of cost online, one of the best resource for this purpose is askubuntu.com website. If commercial support is the requirement it is directly supported by Canonical as well as some other vendors that stand by your business to help you out in hard times, and your own hardware vendor might be one of those , example Dell does support Ubuntu Linux installed on there hardware.

Software is Free

Majority of software available on Ubuntu is free of cost including office application and other utilities , many companies which ignored Linux previously have support of there software on Ubuntu these days and it is growing.

Zip , Games , Office application , Editors , and even Microsoft products are not porting with Linux packages for there application.

Compatibility with Microsoft products

With more and more system migrating to Linux OS’s Microsoft has also come to the terms and accepted the reality that Linux is the future of Desktop OS , infact it has the greatest share in Mobile OS (Android) and Server OS (in super computers)  , as for Desktop version Linux is growing fast. Microsoft products have are now cloud ready and possible to run on Linux such as there Office Application, MS Windows is also boosting compatibility and allowing to share file systems with Linux File systems as an addon. Most importantly the future of Microsoft company Powershell is freely available for Linux and can be readily used in Ubuntu to manage Windows Servers from Linux console.

Security

As a business person more then anything your data is the value , with just a default install Ubuntu is much more strong and secure as compared to the paid counterparts. Furthermore the security patches for LTS version are available for 5 years and 3 years for the Desktop version.

Future Technology Trends and Ubuntu Usage

As Ubuntu is free of cost , it is an OS of choice for both Developers and users , many famous projects have used Ubuntu as there base OS just because the OS is portable and easy to install and manage. Some famous projects include

Android (mobile OS)

Rasberry PI (robotics)

Openstack (Cloud )

Ubuntu Linux ( Server and Desktop )

There are few other famous derivatives of Ubuntu such as Edubuntu etc which are used for specific purposes.

ubuntu share in cloud

Conclusion

Ubuntu is slowly but surely taking up the market share leaving behind old traditional rivals like Microsoft OS which had a much greater share in market during Windows XP era , as time passes by and new technologies are produces using Linux and specifically Ubuntu the share of OS is expected to grow and those business that choose Ubuntu at an earlier stage will benefit much greatly with there choice to move to Open Source Operating System and saving much more in terms of cost and features.

Configuring Basic System Settings RHEL 8 web console part II

user management

User Management with Web Console

RHEL web console allows to perform below user management tasks:

    • Create new users accounts.
    • Change their parameters.
    • Lock accounts.
    • Terminate the user session.
Adding New account in Web Console
Step  1: Click Account
Step  2: Click Create new account
Step 3: In the create account dialog box add the Real Name
Step 4: Enter a unique username
Step 5: Enter a password
Step 6: Confirm the entered password

(Note: it is always advised to keep a strong password)

Step 7: Click Create

Once created User Name will be available in the list of users. In case you want to give it Administrator rights click the newly created user and click Server Administrator Role , that will add the newly created user to the wheel group used for sudo users.

Setting Expiration for an user

Expiration by default is set to never expire but it is possible to change the value by following below steps

Step 1 : Click Account
Step 2 : Click Account name you want to set the expiration
Step 3 : Add the required password change days
Step 4 : Click Change
Terminating User session
Step 1 : Click Account
Step 2 : Click Terminate Session

If button is not active that means the user is not login to the system

Lock Accounts
Step 1 : Click Account
Step 2 : Click Select the account to lock
Step 3: Click Lock Account

In the next part we will understand how to manage storage using the Web Console.

Configuring Basic System Settings RHEL 8 web console Part 1

cockpit

In this and subsequent part series some basic tasks a system administrator might need to perform which are optionally performed during installation.

RHEL 8 Web Console

Common task list a system admin performs via web console include 

  • Monitoring basic system features 
  • Inspect log files 
  • Managing docker files 
  • User management 
  • Service management 
  • Creating reports 
  • Package / Software management 
  • Network management 
  • SElinux / Security management 
  • Advance configuration task with the help of virtual terminal.

If your system does not have a RHEL 8 web console install follow the link to install before reading further. 

Restarting a system from web console
Step 1 : Click System
Step 2 : Power Option (dropdown)
Step 3 : Restart
Step 4 : write reason for restart (optional) -> 
Step 5 : select time interval before restart will take place (optional) or no delay in case of immediate restart
Step 6 : click Restart
Shutdown the system from web console
Step 1 : Click System
Step 2 : Power Option (dropdown)
Step 3 : Shutdown 
Step 4 : write reason for shutdown (optional) -> 
Step 5 : select time interval 
Step 6 : click Shutdown
Naming / Renaming Server from web console

Host name consist of two parts host + domain name. By default hostname is localhost.localdomain but you can change it during installation or from the web console.
For example:
rhel8server.testdom.it
You can configure also a pretty host name in the RHEL web console. This is specific to web console and is not considered a real hostname of the server. Capital letters , spaces are accepted characters for a pretty hostname.

Step 1 : Click System
Step 2 : Click Current Hostname
Step 3 : Enter Pretty Hostname
Step 4 : Enter Real Hostname
Step 5 : Click Change

Configuring NTP setting from web console
Step 1 : Click System
Step 2 : Click Current System Time
Step 3 : In the change time dialog box select correct timezone
Step 4 : In the change time dialog box Select "Set Time" drop down.

From the drop down you can select

Manual : for setting time manually

Automatic Using NTP : This is recommended option

Automatically Using specific NTP server : In case your company has there own NTP server select this option.

Step 5 : Click Change

 

Using web console for selecting performance profile

Performance profile are created and managed by the Tuned service.

Tuned is a service that monitors your system and optimizes the performance under certain workloads.

The core of Tuned are profiles, which tune your system for different use cases.
Tuned is distributed with a number of predefined profiles for use cases such as:
High throughput
Low latency
Saving power

Click the link to get full details about Configuring System Performance with Tuned in RHEL8

Steps to Change a profile with Web Console
Step 1 : Click System
Step 2 : Click current Performance Profile 
Step 3 : In the change current profile dialog box select the new profile
Step 4 : Click Change 

In part two of Configuring Basic System Settings RHEL 8 web console we will discuss about User account management with Web Console in RHEL8

Copyright © 2021 | SaitCare Hub SDN BHD