Monday, 26 October 2026

How to Fix Ubuntu Emergency Mode: systemd-fsck-root Failed on LVM Root

Symptom: your Ubuntu machine boots to a black screen that says "Entering emergency mode. Exit the shell to continue.", followed by red errors about the system bus and /bin/bash. This guide explains what those messages actually mean, how to find the real cause, and how to repair the most common one: a failed root filesystem check on an LVM volume.



Tested scenario: Ubuntu 26.04 LTS, ext4 root on LVM (/dev/mapper/ubuntu--vg-ubuntu--lv). The same steps apply to Ubuntu 25.10 and other dracut-based distributions such as Fedora.

Quick fix (TL;DR)

If your boot log shows [FAILED] Failed to start systemd-fsck-root.service, the root filesystem check failed and Ubuntu refused to mount it. At the # prompt:

journalctl -u systemd-fsck-root.service --no-pager | tail -40
blkid /dev/mapper/ubuntu--vg-ubuntu--lv
fsck.ext4 -f /dev/mapper/ubuntu--vg-ubuntu--lv
reboot

Back up first if the data matters. If the disk is physically failing, running a repair can make things worse. Details below.

The error messages

On screen you will typically see some combination of these lines:

Failed to connect to system scope bus via local transport: No such file or directory
Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
Press Enter for system maintenance
(or press Control-D to continue):
sulogin: failed to execute /bin/bash: No such file or directory
#

Scrolling further up (or rebooting and watching closely) reveals the line that matters:

[FAILED] Failed to start systemd-fsck-root.service - File System Check on /dev/mapper/ubuntu--vg-ubuntu--lv
[DEPEND] Dependency failed for sysroot.mount - /sysroot.
[DEPEND] Dependency failed for initrd-root-fs.target - Initrd Root File System.
[DEPEND] Dependency failed for initrd-parse-etc.service - Mountpoints Configured in the Real Root.

Why the red errors are not the real problem

You are not in your installed Ubuntu system yet. You are inside the initramfs, a tiny temporary system that loads before your real root filesystem. Since Ubuntu 25.10, Ubuntu desktop builds this initramfs with dracut instead of initramfs-tools (OMG! Ubuntu). The rdsosreport.txt message is dracut's signature.

That minimal environment does not include D-Bus or Bash, so:

  • "Failed to connect to system scope bus" just means there is no D-Bus in the initramfs. It is a side effect, not the cause.
  • "sulogin: failed to execute /bin/bash" means Bash is not in the initramfs. The emergency shell falls back to a basic sh, which is the # prompt you see. It works fine for repairs.

Pressing Ctrl+D will only retry the same boot and land you back here. The fix is to deal with whatever stopped the root filesystem from mounting.

Finding the real cause

Emergency mode means the root filesystem could not be mounted. The usual causes are:

What the log showsLikely cause
Failed to start systemd-fsck-root.serviceFilesystem errors (often after a power cut or forced shutdown), or a failing disk
Timed out waiting for deviceDisk not detected, missing storage driver in initramfs, or wrong UUID in GRUB/fstab
No password prompt on an encrypted diskMissing LUKS/cryptsetup support in the initramfs

This guide covers the first row, which is the one shown in the screenshots above.

Step-by-step fix: repair the root filesystem

Step 1: Read the actual fsck error

The emergency shell may not include less, so pipe through tail instead:

journalctl -u systemd-fsck-root.service --no-pager | tail -40

Messages such as "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY" confirm filesystem corruption. I/O errors or "Buffer I/O error on device" suggest the disk itself is failing. If you see I/O errors, skip ahead to the backup warning in Step 3.

Step 2: Confirm the LVM volume is active and check its filesystem type

lvm lvscan
blkid /dev/mapper/ubuntu--vg-ubuntu--lv

lvscan should list the volume as ACTIVE. If it shows inactive, activate it with lvm vgchange -ay. The blkid output includes TYPE="ext4" (Ubuntu's default), xfs, or btrfs.

The double hyphens in ubuntu--vg-ubuntu--lv are not a typo. Device-mapper escapes a hyphen inside a name by doubling it. The same volume is also reachable as /dev/ubuntu-vg/ubuntu-lv.

Step 3: Back up before repairing, if you can

fsck changes the filesystem in place. On a healthy disk with minor corruption it is safe and routine. On a physically failing disk, the extra reads and writes can turn a recoverable situation into lost data. If anything on the machine is not backed up, boot from an Ubuntu live USB first and copy your important files off. For badly damaged disks, clone the drive with ddrescue first.

Step 4: Run the repair

For ext4, the volume is not mounted at this point, so it is safe to check:

fsck.ext4 -f /dev/mapper/ubuntu--vg-ubuntu--lv

Answer y to the proposed fixes. If there are hundreds of prompts, re-run with -y to accept them all:

fsck.ext4 -fy /dev/mapper/ubuntu--vg-ubuntu--lv

Run it again until it reports the filesystem as clean with no further changes. fsck's exit code tells you the outcome:

  • 0: no errors.
  • 1: errors were corrected.
  • 4 or higher: errors remain uncorrected. Do not reboot and hope; investigate further.

You can check the code with echo $? right after fsck finishes.

Step 5: Reboot

reboot

If the filesystem is now clean, Ubuntu should boot normally.

If fsck.ext4 is not found

If the shell replies fsck.ext4: not found, the initramfs was built without the filesystem checker. That is why the automatic check failed, and your disk may be perfectly healthy. Repair from a live USB instead:

  1. Boot an Ubuntu 26.04 live USB and choose Try Ubuntu.
  2. Open a terminal and activate LVM, then run the check:
    sudo vgchange -ay
    sudo fsck.ext4 -f /dev/mapper/ubuntu--vg-ubuntu--lv
  3. Reboot into your installed system and regenerate the initramfs so the checker is included next time:
    sudo dracut --force --regenerate-all

After you boot: checks you should not skip

Getting back to the desktop does not mean the problem is solved. Find out why the filesystem broke.

Check disk health

sudo apt install smartmontools
lsblk -d -o NAME,MODEL,SIZE
sudo smartctl -a /dev/nvme0n1   # or /dev/sda for SATA disks

Warning signs include reallocated sectors, pending sectors, media errors, or a health assessment other than PASSED. If you see any of these, replace the drive soon and keep backups current.

Review errors from the failed boot

journalctl --list-boots
journalctl -b -1 -p err --no-pager

Logs from inside the initramfs are not always kept in the persistent journal, so the previous boot may show little.

Prevent it happening again

  • Avoid holding the power button to shut down, especially during updates.
  • On desktops in areas with unreliable power, a small UPS is cheap insurance.
  • Keep regular backups. deja-dup or restic are both fine starting points.

FAQ

Is "sulogin: failed to execute /bin/bash" a sign that Bash was deleted?

No. It refers to the initramfs, which does not ship Bash. Your installed system's /bin/bash is untouched.

Will fsck delete my files?

fsck fixes filesystem structures. Fragments of files it cannot reattach are placed in /lost+found. On mild corruption you typically lose nothing, but there is no guarantee on a damaged disk, hence the backup advice.

My root filesystem is XFS or Btrfs. What do I run?

For XFS, use xfs_repair on the unmounted device. For Btrfs, start with the read-only btrfs check. Do not use btrfs check --repair without a backup; the Btrfs developers themselves warn it can cause further damage.

Can I just boot an older kernel from GRUB?

That helps when a kernel or initramfs update is the cause. It does not help with filesystem corruption, because every kernel mounts the same broken filesystem.

Summary: in a dracut emergency shell, ignore the D-Bus and Bash messages and look for the first [FAILED] line. For a failed systemd-fsck-root.service, read the fsck error, back up if the disk looks unhealthy, run fsck on the unmounted root volume until it is clean, then check the drive's SMART health once you are back in.

Tuesday, 20 October 2026

What Can You Build with Hermes Agent? 5 Production-Grade Workflows

Unlike standard, single-session chat interfaces, Hermes Agent operates as a persistent, self-improving AI runtime. By combining disk state, local terminal access, background job scheduling, and Model Context Protocol (MCP) integrations, Hermes transforms LLMs from reactive text generators into fully autonomous system operators.

 

Monday, 12 October 2026

A local Al agent builds a $2.2M business in 60 minutes. Here is the full system.

 


For $3 a month in electricity, any student or freelancer can run an AI agent 24/7 without a single subscription. Founders are already making $15,000- $ 30,000 per month by selling privacy-first AI to enterprise clients who care that their data never leaves their office.

Gemma 3n from Google runs directly on a phone. Llama 3.3 and Mistral run on a MacBook from one command through Ollama. Kimi K3 with one million token context connects when the local model cannot handle the task. Together they give an architecture that costs $0 in API fees while guaranteeing clients what no cloud model can - full control over their data.

Here is the full system and how to build it in 60 minutes.

Why local AI is not a compromise but a competitive advantage 

Most people think local AI is a worse ChatGPT for people who do not want to pay. It is actually a different product that solves a different problem and sells to different clients.


A law firm cannot send client cases to OpenAI. A medical clinic cannot send patient data to the cloud. A financial company cannot share internal strategy with a model that trains on user data. For these clients, local AI is not a cheap alternative. It is the only option.

Cloud AI:
Data → API → OpenAI/Google/Anthropic servers
Someone else holds your data
$20-300 per month subscription
Depends on provider uptime

Local AI:
Data → your computer
Nobody else sees anything
$0 in API costs after setup
Works without internet
Microsoft blocked Copilot for some of its internal teams over data leak concerns. Hundreds of enterprise companies are looking for AI solutions they can control. That is your market.

Hardware and models: what you actually need
The most common mistake is thinking local AI requires expensive servers. It does not.

Minimum setup:
MacBook Air M2 16GB RAM     - $1,299 one time
or Mac Mini M4 16GB RAM     - $699 one time
or any laptop with 16GB     - from $500

Runs:
Gemma 3n 4B    - phone, any laptop
Llama 3.3 8B   - 8GB RAM, fast
Mistral 7B     - 8GB RAM, great for code
Llama 3.3 70B  - 32GB RAM, frontier quality
Gemma 3 27B    - 16GB RAM, excellent balance
For a serious production business:


Mac Mini M4 Pro 48GB RAM    - $1,399 one time
Runs Llama 3.3 70B fully in memory
Speed: 30-50 tokens per second
Electricity: $3-8 per month
API costs: $0
One Mac Mini replaces a $300 per month OpenAI subscription in five months and then runs for free. For a business with 10 clients the ROI is obvious from month one.

Gemma 3n from Google is a special case - a new architecture that delivers large model quality in a small model size through MatFormer design with native multimodal:


Gemma 3n E2B   - runs on a phone
Gemma 3n E4B   - runs on any laptop
Audio input    - understands voice without extra models
Image input    - sees documents and photos
Video frames   - analyzes video
For a product that clients need on their phone without internet Gemma 3n is the only real option right now.

The stack: five tools that turn this into a business
Ollama - inference engine
One line and the model runs locally:

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.3
ollama pull gemma3n
ollama run llama3.3
Ollama gives an OpenAI-compatible API on localhost:11434, which means any code written for the OpenAI API works with a local model after changing one line:

python
from openai import OpenAI

# Before:
client = OpenAI(api_key="sk-...")

# After:
client = OpenAI(
    base_url="http://localhost:11434/v1",
    api_key="ollama"
)
All your existing code, all integrations, all existing products - unchanged. Just a different endpoint.

Open WebUI - interface
A ChatGPT interface on top of local models. One Docker command:
python
docker run -d -p 3000:80 \
  -v open-webui:/app/backend/data \
  --name open-webui \
  ghcr.io/open-webui/open-webui:main
Open localhost:3000 and you have a full ChatGPT but locally. The client gets a familiar interface and knows their data never leaves their computer.

AnythingLLM - memory and documents
If Open WebUI is the interface AnythingLLM is the memory. Upload company documents - contracts, procedures, product documentation - and the agent answers questions based on those documents without sending them to the cloud.

Client uploads:
500 internal documents
Legal contracts
Financial reports
HR procedures

Agent answers:
"What is our policy on X?"
"What does the contract with client Y say?"
"What are the terms with supplier Z?"
All local. Zero data leak.

For an enterprise client this is the killer feature. They are not paying for AI. They are paying for AI that knows their business and does not tell anyone about it.

n8n - automation
Local-first automation platform. Self-hosted version that connects local AI with real business tools - CRM, email, Slack, Google Sheets, databases - without sending workflow logic to the cloud.

bash
docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  n8nio/n8n
Real automation example:
New email from client
↓
n8n intercepts
↓
Sends to local Llama 3.3
↓
Model classifies and prepares draft reply
↓
Draft goes to manager for approval
↓
Manager clicks send
↓
Everything happened locally
Kimi K3 - for tasks that need more
Local models handle 80% of tasks well. For the other 20% you need frontier reasoning and a million token context window.
Kimi K3 has 2.8T total parameters, 1,048,576 token context and Agent Swarm that runs up to 300 parallel agents on a single task. It is OpenAI-compatible, which means switching from local to Kimi K3 is the same one-line change as switching to any other provider.

The smart architecture does not choose between local and cloud - it routes tasks correctly:

Classification     → Gemma 3n, free
Summarization      → Llama 3.3, free
Document Q&A       → Mistral, free
Contract analysis  → Kimi K3, cents per task
Complex decision   → Kimi K3 MAX, cents per task
The client gets privacy for the 80% of work where it matters most and frontier quality for the 20% where maximum accuracy is critical. You pay API costs only where the local model genuinely cannot handle the task.

Three businesses you can build right now
A law firm cannot send cases to OpenAI. But they can have a local AI agent that knows all their cases, precedents and procedures and answers lawyer questions in seconds.

What you deploy:
Mac Mini M4 Pro in client office
Llama 3.3 70B or Gemma 3 27B
AnythingLLM with all firm documents
Open WebUI for lawyers
n8n for workflow automation
Kimi K3 for complex multi-document analysis

What client gets:
AI assistant that knows all firm cases
Search across thousands of documents in seconds
Brief preparation and summarization
Full confidentiality - nothing in the cloud

Price: €2,000 per month per firm
Setup: one day
Support: 2 hours per month
30 clients = €60,000 per month
Local AI for medical clinics
Medical data is the most regulated category. Cloud AI here is either blocked or requires expensive compliance agreements. Local AI solves this completely.
What you deploy: Secured server inside the clinic Mistral or Llama with medical prompting AnythingLLM with medical protocols Integration with existing EMR via n8n What client gets: AI that helps with documentation Patient record summarization Medical protocol search HIPAA compliant by default Price: €3,000 per month per clinic 20 clients = €60,000 per month
Gemma 3n runs directly on iPhone or Android without internet. This opens products that were impossible before.

Product ideas: Field inspector app - photo analysis without internet Offline translator - translation in areas without signal Private voice notes - transcription without cloud Industrial QA system - quality control in factories Medical triage app - for areas without internet What you need: Gemma 3n E4B via Google AI Edge SDK React Native or Flutter One backend for sync when internet is available Price: $99 per month subscription 1,000 users = $99,000 per month
How to build it in 60 minutes
0:00 - 0:10 Install Ollama and download models curl -fsSL | sh ollama pull llama3.3 ollama pull gemma3n Verify models respond correctly 0:10 - 0:20 Launch Open WebUI docker run -d -p 3000:80 \ Open localhost:3000 Connect to Ollama 0:20 - 0:30 Configure AnythingLLM Upload your first client's documents Set up RAG pipeline Test Q&A on real questions 0:30 - 0:40 Launch n8n docker run -it -p 5678:5678 n8nio/n8n Build first workflow Email or Slack → local AI → response 0:40 - 0:50 Add Kimi K3 for complex tasks Set up routing logic Simple tasks → local model Complex tasks → Kimi K3 API 0:50 - 1:00 Find your first client Law firm, clinic or any business where privacy is a real problem not just nice-to-have Show the system on their actual documents Send the invoice
The math behind the $2.2M number
Privacy AI for law firms: 30 clients × €2,000 = €60,000 per month Local AI for medical clinics: 20 clients × €3,000 = €60,000 per month Mobile AI product: 1,000 users × $99 = €99,000 per month ───────────────────────────────────────── Total €219,000 per month Per year €2,628,000 Infrastructure: Hardware $5,000 one time Electricity $50 per month Kimi K3 API $200 per month ───────────────────────────────────────── Margin ~99%
You are not selling access to a model. You are selling privacy, compliance and data control - and that is what enterprise clients pay significantly more for than regular AI access.

The honest part
Local models fall behind frontier models on complex tasks that require deep reasoning. Llama 3.3 70B is very close to GPT-4 level but does not beat Kimi K3 or GPT-6 Astra on the hardest reasoning tasks. The hybrid routing approach in this system addresses this directly - local handles volume, frontier handles complexity.

Setup and maintenance require technical knowledge. The client cannot just click a button like with ChatGPT. That is either your ongoing service or you train their IT team - and both are billable. Models update and new versions require redeployment. This is ongoing technical work that needs to be included in your service price from day one.

For simple tasks like summarisation and Q&A, local models work excellently and the client feels no difference. For complex analysis, the hybrid approach - 80% local and 20% through Kimi K3 API - gives the best result at the lowest cost.

The winner will not be the one with the best local model. The winner will be the one who builds the best privacy-first product around a good enough local model and reaches clients for whom privacy is a real blocker not just a nice-to-have.

$3 per month in electricity. The right system around it. Clients who actually need it. $2.2M per year.

Most people will keep paying for cloud AI subscriptions and wonder why they cannot build something defensible. A few will build local AI products for clients who cannot use the cloud and discover that privacy is worth far more than convenience. / If this was useful - follow, the next one drops here first.

You build your own life - so choose the right path.
/ If this was useful - follow /

How to Fix Ubuntu Emergency Mode: systemd-fsck-root Failed on LVM Root

Symptom: your Ubuntu machine boots to a black screen that says "Entering emergency mode. Exit the shell to continue." , fo...