6

I'm using ubuntu 16.04LTS on intel Core i3-6006U, 2.0GHz Asus pc.When I boot the pc I realized that there are some hard drive problems and it's not able to boot on ubuntu. I tried the answer mentioned in this question: fsck error on boot: /dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY and I run this command:

fsck -fy /dev/sda2 

After that I rebooted the pc and it's able to boot on ubuntu successfully.However when I run :

apt-get update

I got many warnings and errors mentioned that the file system is read-only.

I tried different propositions mentioned in this question: How to fix “sudo: unable to open … Read-only file system”? such as:

  1. sudo fsck -Af -M
  2. mount -o remount / it returns : mount: cannot remount /dev/sda2 read-write, is write-protected

and the other solutions mentioned in the question but no vain.How can I fix this? Should I reinstall ubuntu or does this due to a hardware problem?

Xetra
  • 121
Slim
  • 245
  • sudo apt install smartmontools then a sudo smartctl --all /dev/sda What's the output? Please [edit] your answer and put the output there. – Fabby Apr 22 '18 at 22:39
  • @Fabby I'm not able to install smartmontools – Slim Apr 22 '18 at 23:01
  • What's the error message? – Fabby Apr 22 '18 at 23:06
  • `E: failed to fetch http://tn.archive.ubuntu.com/ubuntu/pool/main/s/smartmontools/smartmontools_6.4+svn4214-1_amd64.deb Could not open file /var/cache/apt/archives/partial/smartmontools_6.4+svn4214-1_amd64.deb - open (30: Read-only file system) [IP: 91.189.88.162 80] – Slim Apr 22 '18 at 23:10
  • Sorry, I should have said: Boot from a live USB and do that there... – Fabby Apr 22 '18 at 23:12
  • @Fabby I'm using another pc to ask my question because I'm not able to open neither a browser neither to plug a usb key to copy the error into a file and paste it in my question. – Slim Apr 22 '18 at 23:12
  • @para008 -- he means, boot up to a live USB version of Ubuntu, and run the commands there. Your disk has the possibility of being damaged, and that is what @Fabby is wanting you to check with smartmontools. This page may also be interesting... https://help.ubuntu.com/community/DataRecovery – dpb Apr 23 '18 at 00:54
  • You don't need to install smartmontools to check SMART status. Just start the Disks application, select the disk, select SMART Data & Tests. – heynnema Apr 23 '18 at 01:06
  • @heynnema I selected Smart Data & Tests and I try the tests – Slim Apr 23 '18 at 21:49
  • in the Overall Assessment I have Disk is OK, 5776 bad sectors – Slim Apr 23 '18 at 21:52
  • With that many bad sectors, it could well be your hard drive which is causing you problems. – anonymous2 Apr 25 '18 at 11:47

1 Answers1

3

From the comments...


You don't need to install smartmontools to check SMART status. Just start the Disks application, select the disk, select SMART Data & Tests.

@heynnema I selected Smart Data & Tests and I try the tests

in the Overall Assessment I have Disk is OK, 5776 bad sectors


Because of the number of bad sectors, your hard disk may be defective.

Be prepared to backup your data, if possible.

However, lets try the following test.

To check the file system on your Ubuntu partition...

  • boot to the GRUB menu
  • choose Advanced Options
  • choose Recovery mode
  • choose Root access
  • at the # prompt, type sudo fsck -f /
  • repeat the fsck command if there were errors
  • type reboot

If for some reason you can't do the above...

  • boot to a Ubuntu Live DVD/USB
  • start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
  • quit gparted
  • open a terminal window
  • type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
  • repeat the fsck command if there were errors
  • type reboot
heynnema
  • 70,711
  • I tried this but it does not work and I'm not able to reinstall ubuntu from a bootable usb key.I think that the hard disk was defected. – Slim Apr 24 '18 at 23:09
  • I didn't ask you to reinstall Ubuntu. Which of the above methods in my answer did you try, and how far did you get? Did you receive any error messages? – heynnema Apr 24 '18 at 23:21
  • 1
    I tried the second and I didn't get any errors – Slim Apr 24 '18 at 23:23
  • It sounds like your hard disk is bad. Connect an external USB hard disk drive or flash key, boot to a Ubuntu Live DVD/USB, and backup your important files to the external. – heynnema Apr 24 '18 at 23:25