2

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?

  • 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 tn.archive.ubuntu.com/ubuntu/pool/main/s/smartmontools/… 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
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
  • 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.