Announcement

Collapse
No announcement yet.

fsck, harddisk errors SOLVED

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    fsck, harddisk errors SOLVED

    Today the harddisk check ubuntu does did fail.

    I was told I should run fsck and that the filesystem was mounted for me in read-only mode.
    Strange thing was that I got some error about bash : groups command not found. Can somebody explain what this was please. Was that disk so corrupted bash couldn't find something?

    Second time around and I was put at the shell I just entered 'fsck' and it told me it found 1 error and if I wanted to ignore that. I typed y (yes) and the check continued and now I am back typing in kubuntu.

    Please could somebody tell me the steps I need to do to check / repair that drive again?

    Thanks.
    Greetings from Groningen Netherlands

    #2
    Re: fsck, harddisk errors

    You could start here:

    http://linux.die.net/man/8/fsck

    because of this:
    http://www.minix3.org/previous-versi...n1/fsck.1.html

    I would suggest doing a check/repair from a live cd, have to love those things
    HP Pavilion dv6 core i7 (Main)
    4 GB Ram
    Kubuntu 18.10

    Comment


      #3
      Re: fsck, harddisk errors

      Disk check (ext partition)

      Cheking the first partion of sda:
      Code:
      sudo fsck -v -f /dev/sda1
      man fsck, man e2fsck:
      In actuality, fsck is simply a front-end for the various file system checkers available under Linux.
      e2fsck - check a Linux ext2/ext3 file system
      -v Verbose mode
      -f Force checking even if the file system seems clean.
      Note
      Unmounted partition !
      With mounted partition:
      WARNING!!! Running e2fsck on a mounted filesystem may cause
      SEVERE filesystem damage.

      Do you really want to continue (y/n)?
      Force fsck on the next boot:
      Code:
      sudo touch /forcefsck
      Link:
      Fsck on Shutdown
      http://kubuntuforums.net/forums/inde...opic=3088866.0


      Partition list:

      Code:
      sudo fdisk -l
      or
      Code:
      sudo fdisk -l /dev/sda
      man fdisk:
      NAME
      fdisk - Partition table manipulator for Linux

      -l List the partition tables for the specified devices and then
      exit. If no devices are given, those mentioned in /proc/parti‐
      tions (if that exists) are used.

      Also :
      smartmontools - control and monitor storage systems using S.M.A.R.T.
      The smartmontools package contains two utility programs (smartctl and smartd)
      to control and monitor storage systems using the Self-Monitoring, Analysis and
      Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI
      hard disks. It is derived from the smartsuite package, and includes support
      for ATA/ATAPI-5 disks. It should run on any modern Linux system.
      Smart info of hdx (hda):
      Code:
      sudo smartctl -a /dev/hda
      Smart info of sdx (sda):
      Code:
      sudo smartctl -d ata -a /dev/sda
      More:
      Monitoring Hard Disks with SMART
      http://www.linuxjournal.com/article/6983
      Before you edit, BACKUP !

      Why there are dead links ?
      1. Thread: Please explain how to access old kubuntu forum posts
      2. Thread: Lost Information

      Comment


        #4
        Re: fsck, harddisk errors

        Thanks people.

        Fintan, I just tried the Live Cd, there is an option 'repair broken system', but if I choose that it seems it wants to do an install. Ask me for my language and stuff. Is this the right option?
        Waht is the way to check a disk from the live cd?

        Rog, I looked up the info you gave thanks. I already found a way to influence fsck checks so I can force them. Further I understand that it is a bad idea to run fsck on a mounted disk. I assume I can just sudo unmount -a before I do a manual check.

        It seems I dont' have smartcontrol installed, sudo smartctl -a /dev/hda said command not found, I did not go searching for it because I don't like to install things when I'm not sure about that harddisk unless you tell me it's safe to do so.

        I'm rather new at ubuntu and this is not what I wanted to be learning at this stage. That harddisk is rather new, bought it just for ubuntu 3 months ago.
        Greetings from Groningen Netherlands

        Comment


          #5
          Re: fsck, harddisk errors

          Fintan, I just tried the Live Cd, there is an option 'repair broken system', but if I choose that it seems it wants to do an install. Ask me for my language and stuff. Is this the right option?
          Waht is the way to check a disk from the live cd?
          No that is not the option you want. Just load the live cd and when you get to the desktop open up a terminal and follow the instructions given in my links or by rog.

          Please read those links carefully!

          The reason why you want to do this from a live cd is the problem with running fsck on a mounted partition.
          From a live cd you will not have this problem
          HP Pavilion dv6 core i7 (Main)
          4 GB Ram
          Kubuntu 18.10

          Comment


            #6
            Re: fsck, harddisk errors

            Thanks Fintan,

            When I got in the terminal a from the live cd nd typed 'sudo -v -f /ev/sdc'
            I got:
            fsck.ext2: Device or resource busy while trying to open /dev/sdc

            Then I tried 'sudo umount -a' and got:
            /tmp device is busy
            /dev device is busy
            /var/run device is busy
            tmps not found
            /lib/modules/2.6.22-14-generic/volatile: not mounted.

            However then I booted back into the normal ubuntu, gave 'sudo touch /forcefsck', let it reboot and it came through the scan clean. Yess.

            Thanks both. I'm gonna invest the smartmontools.
            Greetings from Groningen Netherlands

            Comment


              #7
              Re: fsck, harddisk errors

              Glad to be of help
              HP Pavilion dv6 core i7 (Main)
              4 GB Ram
              Kubuntu 18.10

              Comment


                #8
                Re: fsck, harddisk errors SOLVED

                It's often worth starting live CDs with the "noswap" kernel option when you're doing things like this - at least using Knoppix, it stops it using any swap partitions it finds on your hard drive(s) that might cause the device to be labelled "busy".

                Comment

                Working...
                X