df shows no file systems processed

recently we were booting up a system in rescue mode but after doing chroot to that system I was not able to see any filesystem there as running df -h was giving error no file system processed.  As there was no proc system we have mounted the proc system in the chroot environment using below commands first.

mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/

Once the proc filesystem was mounted we have have access to file called /proc/mounts I have checked its output using cat command

cat /proc/mounts

Now to fix the issue of df no file systems processed I have copied the content of /proc/mounts to the file /etc/mtab

cat /proc/mounts > /etc/mtab

After adding those entries in mtab file I was able to access the filesystem fine and df command was working perfectly fine.

Leave a Comment