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
- BIOS/UEFI Initialization:
- First step in booting, initializing hardware and finding the bootloader.
- GRUB/GRUB2:
- Loads the kernel, either
vmlinuxorvmlinuz, and passes control to it.
- Loads the kernel, either
- Kernel Initialization:
- Kernel is loaded along with
initrd(initial RAM disk), which contains necessary drivers and modules for accessing the file system.
- Kernel is loaded along with
- 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.
- Managed through
- Blacklisting Modules:
- Prevent modules from loading by adding them to
/etc/modprobe.d/blacklist.conf.
- Prevent modules from loading by adding them to
- 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/ipto check connectivity.
- Use
- Network Info:
- Use
ip addrfor IP configuration details. - Use
ip routefor routing information.
- Use
Testing DNS:
- Ping:
- Test by pinging the hostname.
- Dig:
- Use
dig @(server_ip) hostnamefor detailed DNS information.
- Use
- Nslookup:
- Use
nslookup hostname servername.
- Use
- Host:
- Use
host hostname servernamefor DNS resolution.
- Use
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.
- Located in
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/*.yamlto set up bonds with specific parameters. - Check bond status with
ip addrorcat /proc/net/bonding/bondname.
CentOS:
- Edit
/etc/sysconfig/network-scripts/files to configure bonds. - Check bond status similarly with
ip addr.
Comments
Post a Comment