manjaro linux wont boot, lsblk in chroot returns ‘failed to access sysfs directory: /sys/dev/block: no such file or directory’

Resolving Boot Issues in Manjaro Linux: Troubleshooting ‘failed to access sysfs directory’ Errors During Chroot Operations

Introduction

Encountering boot problems in Linux distributions can be a daunting experience, especially when the system becomes unresponsive after the POST (Power-On Self Test). This article explores a common scenario involving Manjaro Linux, where after attempting to repair the system from a live USB environment, users encounter errors such as ‘failed to access sysfs directory’ during chroot operations. We will analyze this issue and provide a structured approach to troubleshooting and resolving the problem.

Scenario Overview

A user reports that their Linux laptop running Manjaro fails to boot, hanging on a black screen after the POST. Using a live USB, they boot into a live environment and attempt to chroot into the installed system to repair GRUB. However, during this process, they encounter errors:

  • When attempting to reinstall GRUB, the command fails to resolve the canonical path of the root partition (/dev/nvme0n1p1).
  • Running lsblk within the chroot environment yields:
    shell
    failed to access sysfs directory: /sys/dev/block: no such file or directory

Understanding the Issue

The error indicates that the sysfs virtual filesystem, which provides a mechanism for the kernel to expose information about devices and system components, is inaccessible within the chroot environment. This often occurs when the chroot environment is not properly set up with the necessary filesystems mounted.

Key points include:

  • The failure to access /sys/dev/block suggests that the sysfs mount point is missing or not mounted correctly.
  • The inability to resolve device paths like /dev/nvme0n1p1 may stem from insufficient device nodes or improper setup within the chroot.

Recommended Troubleshooting Steps

  1. Verify Live Environment Compatibility

Ensure you are booting into a live USB session using a Linux variant compatible with your installed system. Use a live environment that includes all necessary tools and drivers.

  1. Mount the Necessary Filesystems

Before chrooting, essential filesystems must be mounted properly:

“`bash

Identify your root partition

lsblk

Mount the root partition to /mnt

sudo mount /dev/nvme0n1p1 /mnt

Mount boot partition if applicable

sudo mount /dev/nvme0n1pX /mnt/boot

Mount virtual

Share this content:

Leave a Reply

Your email address will not be published. Required fields are marked *