Operations 17 min read

How to Diagnose and Fix Common Linux Boot, Network, and File‑System Failures

This guide walks through typical Linux operational problems—including boot failures caused by fstab errors, root‑filesystem corruption, missing kernel files, MBR or GRUB issues, network hardware and configuration faults, DNS mis‑settings, service port problems, forgotten root passwords, and read‑only file‑system errors—providing step‑by‑step troubleshooting methods and command‑line fixes.

Efficient Ops
Efficient Ops
Efficient Ops
How to Diagnose and Fix Common Linux Boot, Network, and File‑System Failures

Linux System Boot Failure

Common boot problems stem from four main causes:

Incorrect or missing /etc/fstab – mis‑configured file‑system entries prevent the system from mounting partitions. Recover the file by booting into rescue mode and rebuilding it.

Root‑filesystem corruption after illegal shutdown – sudden power loss can leave the ext3/ext4 file system inconsistent. The system drops to a maintenance shell showing messages such as

checking root filesystem

and

UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

. Run

fsck -y /dev/sdX

after unmounting the affected partition.

Missing kernel or initramfs files – the boot loader cannot find

vmlinuz

or

initrd.img

in the

/boot

partition. Restore the files from installation media or a backup and update

grub.cfg

.

Hardware failure – defective motherboard, power supply, or disk can also stop booting; replace the faulty component.

<code># umount /dev/sdb5
# fsck.ext3 -y /dev/sdb5</code>

Always unmount the partition before running

fsck

.

Linux Network Failure

Network issues are tackled in four steps:

Verify physical hardware (NIC, cables, switch, router) and replace if defective.

Check that the NIC driver is loaded using

ifconfig

or

ip a

. Use

ethtool

to inspect link speed and status.

Confirm correct IP configuration and ensure no address conflicts.

Inspect the routing table; a wrong default route (e.g., pointing to a LAN‑only subnet) can block external access. Adjust with

route delete default

and

route add default gw 10.10.1.254

.

<code># route delete default
# route add default gw 10.10.1.254</code>

Check DNS resolution by reviewing

/etc/host.conf

and

/etc/nsswitch.conf

(e.g.,

hosts: files dns

).

MBR Sector Failure

Symptoms include “Operating system not found” and boot interruption. Recovery steps:

Add a new virtual disk, partition it (e.g.,

fdisk -l

,

fdisk /dev/sdb

), format, and mount it.

Backup the MBR with

dd if=/dev/sda of=~/mbr.backup bs=512 count=1

.

In rescue mode, restore the MBR using the backup file.

GRUB Boot Failure

Two typical causes:

Incorrect

grub.cfg

entries – the kernel or initramfs paths are wrong, leading to “error: you need to load the kernel first”. Fix by editing

/boot/grub2/grub.cfg

to point to the correct files.

Missing GRUB files – the boot loader cannot locate its modules. Reinstall GRUB with

grub2-install /dev/sda

and regenerate the config.

<code># grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub2/grub.cfg</code>

Forgot Linux Root Password

Two recovery methods:

Rescue mode reset – boot from rescue media, chroot into the system (

chroot /mnt/sysimage

) and run

passwd root

to set a new password.

Single‑user mode – at the GRUB menu press

e

, append

single

to the kernel line, boot, then change the password with

passwd

.

<code># chroot /mnt/sysimage
# passwd root
# exit
# reboot</code>

Read‑Only File System Error

When commands such as

cp

,

mv

, or

chmod

fail with “Read‑only file system”, possible causes are file‑system damage, disk errors, or a wrong

/etc/fstab

entry.

Remount the filesystem read‑write:

mount -o rw,remount /system

.

If the FS is corrupted, run

fsck

on the unmounted device.

Hardware failure may require disk replacement.

<code># mount -o rw,remount /system
# fsck -y /dev/VolGroup00/LogVol00</code>
Network TroubleshootingLinuxGRUBboot failurefsckroot password reset
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.