How to Install Python and Pip on Ubuntu 24.04 LTS
Python is one of the most popular, versatile, and widely-used programming languages today, underpinning everything from web development and automation to data science and artificial intelligence. Pip is Python’s official package manager, al...

6 min read
Python is one of the most popular, versatile, and widely-used programming languages today, underpinning everything from web development and automation to data science and artificial intelligence. Pip is Python’s official package manager, al...
- Understanding Why Ubuntu Server Not Booting
- Step-by-Step Boot Recovery Checklist
- Repairing GRUB Bootloader (GRUB Repair Guide)
Ubuntu Server Not Booting? It can halt your entire infrastructure—web apps, databases, or business-critical processes. Thankfully, most boot failures are reversible with the right debugging approach. This in-depth guide covers the most common causes and fixes, including GRUB repair, disk check, initramfs shell fixes, and systemd debug logs.
Whether your Ubuntu Server is hosted on bare metal, VMware, Hyper-V, AWS EC2, DigitalOcean, or Proxmox, the recovery steps remain largely the same.
1. Understanding Why Ubuntu Server Not Booting
Before jumping into fixes, identify typical boot failure scenarios:
- GRUB missing or corrupted
- Filesystem errors (EXT4 corruption, disk failure, inode issues)
- Dropping into initramfs busybox shell
- Kernel panic or missing kernel modules
- Failed systemd services looping the boot process
- Misconfigured fstab causing root filesystem not to mount
Each of these scenarios presents different symptoms—let’s fix them one by one.
2. Step-by-Step Boot Recovery Checklist
Step 1: Boot into Recovery Mode or Live CD
To diagnose boot failure, you need access to the server environment.
Option A: Using GRUB Recovery Menu
If GRUB is partially working:
- Reboot the server.
- Hold Shift (BIOS) or press Esc repeatedly (UEFI).
- Select:
Advanced Options → Recovery Mode → Root Shell
Option B: Using Ubuntu Live ISO (recommended for major failures)
- Boot from Ubuntu Server/Desktop ISO
- Choose Try Ubuntu (not Install)
- Open a terminal
- Mount your server disk:
sudo mount /dev/sda1 /mnt # Replace partition as required
You now have full access to the server filesystem and can run GRUB repair, disk checks, or chroot operations.
3. Repairing GRUB Bootloader (GRUB Repair Guide)
Corrupted GRUB is the most common cause of Ubuntu not booting. Symptoms include:
- “grub rescue>” prompt
- “Minimal BASH-like line editing supported”
- Black screen with blinking cursor
- Missing operating system
Method 1: Auto-Reinstall GRUB Using Live ISO
Boot into a Live ISO and find the root partition:
sudo fdisk -l
Mount the Linux root partition:
sudo mount /dev/sda1 /mnt
sudo mount /dev/sda2 /mnt/boot # If separate /boot partition exists
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
Chroot into the installed system:
sudo chroot /mnt
Reinstall GRUB:
grub-install /dev/sda
update-grub
Exit and reboot:
exit
sudo reboot
Method 2: GRUB Rescue Mode Fix
If you see:
grub rescue>
Find your Linux partition:
ls
ls (hd0,msdos1)
ls (hd0,msdos2)
Set boot parameters:
set prefix=(hd0,msdos1)/boot/grub
set root=(hd0,msdos1)
insmod normal
normal
This boots the system temporarily—once inside Ubuntu, reinstall GRUB normally:
sudo grub-install /dev/sda
sudo update-grub
4. Running Disk Checks (fsck) | Fix EXT4 Errors
Many boot failures come from filesystem corruption, visible as:
- Dropping into initramfs
- “UNEXPECTED INCONSISTENCY”
- “You must manually run fsck”
- “EXT4-fs error: Inode …”
Run fsck from Recovery Mode
- Choose Root Shell in recovery mode.
- Check root filesystem:
fsck -fy /
If root is mounted read-only, remount it:
mount -o remount,rw /
fsck -f /dev/sda1
Run fsck from Live ISO (safer)
sudo fsck -f /dev/sda1
It may fix:
- superblock corruption
- orphaned inodes
- journal errors
- missing file tables
Bad Disk? Test for Disk Health
sudo smartctl -a /dev/sda
Look for:
- Reallocated sectors
- Pending sectors
- Read/write errors
If disk health is failing → replace disk immediately.
5. Fixing Initramfs Shell Errors (BusyBox)
If Ubuntu drops into initramfs, you’ll see:
(initramfs) _
or
ALERT! /dev/sda1 does not exist
or
Cannot find root filesystem
Common causes:
- Wrong fstab entries
- Missing disk drivers
- Disk UUID changed
- Filesystem corruption
- NVMe or RAID mapping changed
Fix 1: Check Available Disks
From initramfs:
lsblk
blkid
Check if root partition exists.
Compare against /etc/fstab (mount it manually if needed):
cat /mnt/etc/fstab
Fix 2: Update fstab UUID
If UUID changed, update it:
blkid
nano /etc/fstab
Replace incorrect UUID → Save → Reboot.
Fix 3: Regenerate Initramfs
From Live ISO:
sudo mount /dev/sda1 /mnt
sudo chroot /mnt
update-initramfs -c -k all
exit
sudo reboot
This recreates:
- drivers
- hardware modules
- boot scripts
Fix 4: Reinstall Kernel (if kernel modules missing)
sudo apt-get update
sudo apt-get install --reinstall linux-image-generic linux-headers-generic
update-initramfs -u
Then reboot:
reboot
6. Debugging with Systemd Logs (systemd-analyze, journalctl)
If boot hangs at:
- “A start job is running…”
- “Failed to start…”
- “Dependency failed…”
- Long wait on network or disk mounting
Systemd debugging gives the root cause.
Boot into Systemd Emergency Shell
At GRUB menu:
- Press e
- Add
systemd.unit=rescue.targetafter thelinuxline - Press Ctrl+X to boot
View Boot Errors:
journalctl -xb
Check failed units:
systemctl --failed
Restart specific services:
systemctl restart networking systemctl restart mysql systemctl restart nginx
Analyze Boot Performance:
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
This helps identify slow boot components.
7. Fixing fstab Errors That Prevent Boot
A single wrong line in /etc/fstab can prevent Ubuntu from booting.
Typical error:
A start job is running for /mnt/data
Boot into Recovery Mode → Root Shell
Open fstab:
nano /etc/fstab
Comment out problematic mounts
Add # to disable:
# /dev/sdb1 /mnt/data ext4 defaults 0 2
Safe mount options to prevent future failures
Use nofail:
/dev/sdb1 /mnt/data ext4 defaults,nofail 0 2
- System will boot even if the disk is missing.
8. Kernel Panic Recovery
If boot shows:
kernel panic - not syncing
or
VFS: Unable to mount root fs
Quick fixes:
A. Reinstall kernel
sudo apt install --reinstall linux-image-generic
sudo update-initramfs -u
B. Update GRUB
sudo update-grub
C. Rollback to older kernel
At GRUB → Advanced options → choose older kernel.
9. Reinstalling Ubuntu Without Losing Data (Last Resort)
If nothing works:
- Boot from Ubuntu ISO
- Start installer
- Choose “Something Else”
- Select root partition → Do not format
- Install only system files
Home directories and data remain safe.
10. Preventing Future Boot Failures
To ensure Ubuntu Server remains stable:
A. Enable Automatic fsck
sudo tune2fs -c 30 -i 30d /dev/sda1
B. Keep Kernel & GRUB Updated
sudo apt update && sudo apt upgrade -y
C. Monitor disk health
sudo smartctl -H /dev/sda
Set automatic checks with smartd.
D. Avoid manual editing of fstab unless necessary
Always verify UUIDs using:
blkid
You may also like:
Conclusion
When Ubuntu Server not booting, systematic troubleshooting helps avoid unnecessary downtime. This guide covered detailed step-by-step solutions:
- GRUB repair for bootloader corruption
- Disk check (fsck) for EXT4 filesystem errors
- Initramfs shell fixes for missing disks and fstab issues
- Systemd debug logs to trace service-level boot failures
By following these methods, you can recover nearly any unbootable Ubuntu Server and restore full functionality without data loss.
Website Vidya Team
Technology educator and researcher at Website Vidya.
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides











Discussion
0No comments on this guide yet. Be the first to share your thoughts or ask a question!