TechBuzzPro

Fix Ubuntu Stuck at Clean Files Blocks During Boot

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

If your Ubuntu system hangs on a black screen with a message like /dev/sda1: clean, 123456/789012 files, 234567/345678 blocks, it usually means the boot process is waiting on a service or a graphics driver that is failing to start. This guide walks you through the most effective fixes, from simple recovery mode options to reinstalling graphics drivers, so you can get back to your desktop quickly.

What You'll Need

  • A working internet connection (for driver reinstallation steps).
  • Access to the GRUB boot menu (usually by holding Shift or pressing Esc during boot).
  • Basic familiarity with the command line (you'll be typing a few commands).
  • If you have an NVIDIA or AMD GPU, know your graphics card model.

Step-by-Step

  1. Boot into Recovery Mode. Restart your computer. When the GRUB menu appears, select the entry that says Advanced options for Ubuntu, then choose the kernel with (recovery mode) at the end. If you don't see GRUB, hold Shift (BIOS) or press Esc (UEFI) repeatedly right after the manufacturer logo.
  2. Choose "root" from the Recovery Menu. This drops you to a root shell. If it asks to remount the filesystem as read-write, select Yes or run mount -o remount,rw /.
  3. Check for disk errors. Run fsck -f / (or fsck -f /dev/sda1 if your root partition is different). Answer y to any prompts. This checks and repairs filesystem errors that could cause the hang.
  4. Reboot and test. Type reboot. If the system boots normally, you're done. If not, continue.
  5. Disable the graphical interface temporarily. Boot back into recovery mode, go to root, and run systemctl set-default multi-user.target. This makes Ubuntu boot to a text console instead of the GUI. Reboot. If you reach a login prompt, the problem is graphics-related.
  6. Reinstall or reconfigure graphics drivers. At the text login, log in with your username and password. Then run:
    • For NVIDIA: sudo apt purge nvidia-* && sudo apt install nvidia-driver-535 (replace 535 with your driver version).
    • For AMD: sudo apt install mesa-utils xserver-xorg-video-amdgpu
    • For Intel: sudo apt install xserver-xorg-video-intel
    If unsure, run ubuntu-drivers devices to see recommended drivers.
  7. Re-enable the GUI. After installing drivers, run sudo systemctl set-default graphical.target and reboot.
  8. If still stuck, check for problematic services. Boot to recovery, go to root, and run systemctl list-units --failed. Note any failed services. Disable them with systemctl disable .

Common Mistakes

  • Skipping fsck. Many hangs are caused by filesystem corruption; checking and repairing is the first thing to try.
  • Purging all nvidia packages blindly. If you have an Intel/AMD hybrid setup, removing all NVIDIA drivers can break other things. Use ubuntu-drivers devices first.
  • Forgetting to re-enable graphical.target. If you disable the GUI and reboot without re-enabling it, you'll be stuck at a text console and think the fix failed.
  • Not waiting long enough. Sometimes the system is not actually stuck, just slow (especially after a crash). Wait 2-3 minutes before assuming it's hung.

Tips

  • Use journalctl -b -1 (from a working boot) to see logs from the previous boot. Look for lines with ERROR or FAILED near the end.
  • If you recently installed a new kernel, try booting an older one from the GRUB Advanced options menu. If that works, the problem is the new kernel.
  • Keep a live USB of Ubuntu around. You can chroot into your system and run fixes if recovery mode fails.
  • Disable secure boot if you're using proprietary NVIDIA drivers; they often fail to load with secure boot enabled.

Troubleshooting

Recovery mode doesn't appear. If GRUB doesn't show, try pressing Shift repeatedly during boot (for BIOS) or Esc (for UEFI). If that fails, use a live USB to edit /etc/default/grub and set GRUB_TIMEOUT=10, then run sudo update-grub.

fsck reports errors but can't fix them. If fsck fails, boot from a live USB and run fsck on the partition from there. The partition must be unmounted.

You can't log in at the text console. If you get a login prompt but your password isn't accepted, you may need to reset it from recovery mode using passwd username.

Disabling a service didn't help. If you disabled a failed service and still hang, try systemctl list-units --state=failed again after reboot. There may be multiple failed services.

Graphics driver reinstall didn't work. Try installing the linux-firmware package: sudo apt install linux-firmware. Also, update your kernel: sudo apt install linux-generic.

If all else fails. Back up your data and reinstall Ubuntu. This is a last resort, but it's often faster than debugging a broken system for days.

Frequently Asked Questions

Q: What does "clean, files, blocks" actually mean?
A: It's a filesystem check message. It means your filesystem is clean (no corruption), and it's telling you how many files and blocks are present. It appears during normal boot, but if it stays there, the system is stuck on a later step.

Q: Is this caused by a power failure?
A: Often yes. An unclean shutdown can leave the filesystem in a state that causes the boot to hang. That's why running fsck is the first step.

Q: Can I fix this without a live USB?
A: Yes, if you can get to recovery mode. If not, a live USB is the easiest way to access your files and run repairs.

Q: Will I lose my files?
A: No, these fixes are designed to preserve your data. However, if you have to reinstall, your files will be lost unless you back them up first.

Q: How long should I wait before assuming it's stuck?
A: Wait at least 2-3 minutes. Some systems take a while after a crash. If you see the message and nothing changes for 5+ minutes, it's likely stuck.

Q: Is this a hardware problem?
A: Rarely. It's almost always software-related (drivers, services, or filesystem). If you've tried everything and it still hangs, test your RAM with Memtest86+ from the GRUB menu.