Learning About Linux Server

 

Understanding BIOS/UEFI and Boot Loaders

BIOS vs. UEFI:

  • BIOS: The Basic Input Output System, the traditional firmware interface for booting a computer.
  • UEFI: The Unified Extensible Firmware Interface, a modern replacement for BIOS with enhanced features and security.

GRUB/GRUB2:

  • GRUB: The Grand Unified Bootloader, responsible for loading the kernel and initiating the boot process.
  • GRUB2: An updated version of GRUB, offering more features and flexibility.

The Linux Boot Process

  1. BIOS/UEFI Initialization:
    • First step in booting, initializing hardware and finding the bootloader.
  2. GRUB/GRUB2:
    • Loads the kernel, either vmlinux or vmlinuz, and passes control to it.
  3. Kernel Initialization:
    • Kernel is loaded along with initrd (initial RAM disk), which contains necessary drivers and modules for accessing the file system.
  4. Kernel Panic:
    • If an issue arises, Linux keeps the previous kernel as a fallback. Causes can include updates or hardware failures.

Managing Linux Boot Modules

  • Loading Modules:
    • Managed through /etc/modules, listing the names of required modules.
  • Blacklisting Modules:
    • Prevent modules from loading by adding them to /etc/modprobe.d/blacklist.conf.
  • Manipulating Modules:
    • insmod: Loads modules without dependencies but requires the full path.
    • modprobe: Handles dependencies automatically.
    • rmmod: Removes modules.
    • depmod: Updates dependency information for modules.

Network Troubleshooting

Testing Network Connectivity:

  • Ping:
    • Use ping name.com/ip to check connectivity.
  • Network Info:
    • Use ip addr for IP configuration details.
    • Use ip route for routing information.

Testing DNS:

  • Ping:
    • Test by pinging the hostname.
  • Dig:
    • Use dig @(server_ip) hostname for detailed DNS information.
  • Nslookup:
    • Use nslookup hostname servername.
  • Host:
    • Use host hostname servername for DNS resolution.

Locating Common Network Configuration Files

  • /etc/hosts:
    • Used for DNS lookup, precedes domain IPs.
  • /etc/nsswitch.conf:
    • Configures lookup order for DNS and other resources.
  • /etc/resolv.conf:
    • Specifies nameservers, usually not manually edited.

Network Configuration in Ubuntu/Debian

  • Network Manager:
    • A tool to manage network configurations.
  • Config Files:
    • /etc/network/interfaces.d/* or /etc/netplan/* (YAML format).
    • nmtui: Network Manager Text UI.

Network Configuration in CentOS

  • Network Config Files:
    • Located in /etc/sysconfig/network-scripts/.
    • Manage interfaces with ifconfig-eth0.

Network Bonding Modes

  • Purpose:
    • Combine multiple network interfaces for increased bandwidth or redundancy.
  • Modes:
    • balance-rr (Round Robin): Load balancing.
    • active-backup: Redundancy, no load balancing.
    • balance-xor: Load balancing with XOR.
    • broadcast: Sends traffic on all interfaces.
    • 802.3ad: Dynamic link aggregation.
    • balance-tlb: Adaptive transmit load balancing.
    • balance-alb: Adaptive load balancing.

Configuring Network Bonds

Ubuntu:

  • Edit /etc/netplan/*.yaml to set up bonds with specific parameters.
  • Check bond status with ip addr or cat /proc/net/bonding/bondname.

CentOS:

  • Edit /etc/sysconfig/network-scripts/ files to configure bonds.
  • Check bond status similarly with ip addr.

Comments

Popular posts from this blog

Exploring Event Handling in JavaScript: From Basics to Async Projects

learning linux 3