For the last few days, my Ubuntu 12.10 has been going to read-only mode randomly, making me unable to save any edited files, and forcing me to restart my computer, which is a pain because this is the platform on which I do all my programming work. When I do restart into Ubuntu (I have a dual-boot with Windows 7), it tells me that it detected a disk error, and that I have to press
f to fix it, after which it will restart successfully.
My Windows 7 doesn't have any problems with it, so it can't be the hard disk. I also saw on a forum that I should run these commands to fix the issue:
mount --options remount,rw / and
mount --all, but these just say that I cannot mount the device on a read-only system. I'm a Linux newbie (and a newbie with computers in general) so any help would be greatly appreciated!
Okay, so I ran fsck from the boot CD... is it supposed to only take two seconds? 'Cuz mine did. Anyway, it came back with two errors:
Superblock last mount time is in the future (hardware clock incorrect)
Superblock last write time is in the future (hardware clock incorrect)
It fixed both of them, apparently.
I just ran
sudo fsck -Cf /dev/sda5. Found a lot more this time, it seems:
fsck supposed to take only a few seconds?
I just ran
sudo badblocks -v /dev/sda5 and badblocks found four bad sectors:
What do I do with this knowledge? The guide bodhi linked says to write them to a file, but I'm in LiveCD - I can't write anything to the hard disk.