0

I logged on to my debian box and tried running some commands and I was presented with the following message.

sudo: Can't open /var/lib/sudo/username/0: Read-only file system

After doing some digging I discovered that the fstab had an option on the root partition that would remount it as read only: errors=remount-ro

I suspect it remount the error in case of a file system consistency issue.

Now I have come across a tool fsck and some say it may resolve the issue using the command

sudo  fsck -t ext3 /dev/sda[n] 

according to this article.

I suspect i could remount it and change the read only restriction however if the debian changed it to avoid further damage or loss of information i think it wouldn't be a good idea.

However there is no guarantee it would work for mine and it may even cause more issues.

Does anyone have any advice on what steps to take?

EDIT

Below is the first section of the FSTAB

UUID=e2887ae1-xxxx-xxx-xxx-xxxxxxxx / ext3 errors=remount-ro 0 1

sqwale
  • 141
  • 1
  • 8

1 Answers1

1

You should boot a different Linux installation (thus you should always have a small service Linux on the same disk), from CD/DVD/USB if there is no other one on the disk and do the fsck from there.

Hauke Laging
  • 5,157
  • 2
  • 23
  • 40
  • This is my dilemma, it is a remote machine i do not have physical access to it. However I do have the 3 debian iso mounted on the machine but i'm not sure I can boot it from this. – sqwale Apr 26 '13 at 09:57
  • @KyaleMwendwa If you find the kernel file and its initrd on that iso then you can boot from there via `kexec`. – Hauke Laging Apr 26 '13 at 10:04