Filesystem mounted as read-only during boot

Today I had a case where a server mounted the root filesystem as read-only during boot. To make a short story shorter, check /dev/null.

After doing some searching in the logs I found a few lines complaining about /dev/null also being read-only filesystem. So I checked the permission with ls -al /dev/null, and it turned out this had been changed into a regular file rather then the special file it’s supposed to be.

The fix is easy. Delete the file called /dev/null and re-create the special device with the command mknod -m 666 /dev/null c 1 3.

You can also read about how to create this special file by reading the man-pages. Command: man 4 null.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.