Recently I had a problem on my Torrent box (an old PC that I use as dedicated torrent client) that runs Ubuntu. For some reason my root partition was being mounted as read-only. Everything else seemed to work (all other partitions were mounted properly), but I couldn’t change any of my config or do anything on root partition.

I did the usual stuff:

  • Run fsck checks and it said that everything is fine
  • Used Ubuntu’s live CD to boot, which got me read-write access to root partition. I changed some things in fstab, tried to get it to be rw permanently. No matter what I did as soon as I rebooted the root partition was once again read-only.
  • I tried booting from some repair disks I have, but all checks passed and no problem was detected. :-(

Finally, I read somewhere that a similar problem was caused by faulty superblock on hard drive. Fortunately Ubuntu stores superblock backups in different places around disk, so I decided to try to restore it from one of those backups.

It turned out that all I needed was a single command (this Ubuntu forum post helped) to restore superblock:

e2fsck -b 32768 /dev/hdc1

After that my root partition was back to read-write mode. :-)

Before you do stuff like that to your computer I suggest that you read man pages for mke2fs and e2fsck. It will prevent you from doing something foolish like deleting your whole hard drive. :-)

Tags: linux, ubuntu


comments powered by Disqus