After a sudden power failure, my machine(Lubuntu 16.04) is facing the same issue described here.
My machine is booting into a terminal.
And when i execute startx command, it gives :
(EE) Could not create lock file in /tmp/.tX0-lock
So in order to execute sudo X -configure i ran the below command and got error described below.
sudo mount -o remount,rw /
[2112.489077] EXT4-fs error (device sda1): ext4_remount:4667: Abort forced by user
mount: cannot remount /dev/sda1 read-write, is write-protected
So I boot into a live system and chose rescue a broken system and in a shell with /dev/sda1 mounted to / and executed the following commands
sudo mount -o remount,rw /
And it executes without any errors.
After I executed the following
sudo fsck /dev/sda1
The result was clean with no errors.
After that, i executed the following command.
sudo X -configure
then the machine restarted itself and got the same they which I described in the first part of this question.
Update
I tried another live image of Ubuntu 16.04.
Now when i run fsck.ext4 -f /dev/sda5 from the live image, it says /dev/sda5 is mounted.
But when i run umount /dev/sda5 it says /dev/sda5 is not mounted.
I believe the issue is with my /dev/sda5 partition. Am i correct?
How can I fix my machine? Any small help would be appreciated