Announcement

Collapse
No announcement yet.

[Files possibly damaged] Question about "fsck" command...

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

    [Files possibly damaged] Question about "fsck" command...

    I have separate partitions for windows & Kubuntu on my system.

    I have ran out of room on my Kubuntu Partition. There was some space on my windows partition. After moving all the data files possible to make room over the last couple of months. I got the idea that I would move my (usr/share) directory over to my windows partition, and create a "link file" in place of the old (usr/share) folder in Kubuntu.

    After the move....problems with my filesystem during boot.

    ****I know that I should have come to the forums before attempting any of this.

    I did not, & it cost me....during boot, my system forced me to do a manual "fsck". I accepted every change that "fsck" wanted to make. Now, I can't boot into anything. Get a black screen with a distorted window and some unreadable characters.

    The system is seriously messed up now. My question is, is there anyway to find out the changes that were made in "fsck"? I can still access my files using the live CD that I have.

    I got so brave to make this mess because I have a new Hard Drive(with plenty of space) on the way where I will be doing a clean install. However, for good learning, I am wanting to see if we can get my system restored.

    System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

    #2
    Re: Question about &quot;fsck&quot; command...

    Originally posted by bhamm77

    Now, I can't boot into anything. Get a black screen with a distorted window and some unreadable characters.
    That's an odd result from what you did.

    First (always) question: Is there any chance that some bit of hardware decided to choose this moment to fail? You know hardware likes to fail between upgrades and things, just to make your life interesting, right?

    You should definitely boot the Live CD, and play around to see if you can find a hardware issue -- install flashplugin-nonfree, run youtube videos, use the "memtest86" memory tester, etc.

    If you convince yourself that the hardware is still solid, then I would run fsck on the Linux filesystem (from the Live CD), and then if it still won't boot, I think you're going to have to reinstall grub (from the Live CD) as per Qqmike's instruction here:

    http://kubuntuforums.net/forums/inde...opic=3081671.0

    assuming you have the legacy grub (9.04 and earlier versions).

    Good luck!

    Comment


      #3
      Re: Question about &quot;fsck&quot; command...

      Originally posted by bhamm77
      I have ran out of room on my Kubuntu Partition. There was some space on my windows partition. After moving all the data files possible to make room over the last couple of months. I got the idea that I would move my (usr/share) directory over to my windows partition, and create a "link file" in place of the old (usr/share) folder in Kubuntu.
      Err...do you mean that you have your /usr/share on a windows filesystem (ntfs?)?.

      I have no idea what happens if you do that...but I'm quite certain it doesn't work in more ways than one. In attempting to fix, moving it back to your linux partition is a good place to start (though I can't tell what your fsck has done).

      Comment


        #4
        Re: Question about &quot;fsck&quot; command...

        Originally posted by kubicle
        Err...do you mean that you have your /usr/share on a windows filesystem (ntfs?)?.
        That is indeed what I did. Had plenty of space on my windows partition, so I thought it would help out to move the large /usr/share file there to get some space freed up. I was completely out of space on my Kubuntu partition.

        Like I said, I should have come to the Forum before attempting this. I now understand that NTFS & ext3 "don't play together"! I didn't check into this until after my troubles!
        System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

        Comment


          #5
          Re: Question about &quot;fsck&quot; command...

          just for the lerning of it would you mind trying what the kubicle sugjested and use the livecd to put /usr/share back whare it belongs then run e2fschk on that drive...like

          Code:
          sudo e2fsck /dev/sda3
          hear /dev/sda3 is an exampel you nead to use the /dev/sd of the drive in Q

          if your not shure do a

          Code:
          sudo fdisk -l
          thats a lower case L not i

          and youl get somthing like this

          vinny@desktop:~$ sudo fdisk -l
          [sudo] password for vinny:

          Disk /dev/sda: 200.0 GB, 200049647616 bytes
          255 heads, 63 sectors/track, 24321 cylinders
          Units = cylinders of 16065 * 512 = 8225280 bytes
          Disk identifier: 0x4b36bdea

          Device Boot Start End Blocks Id System
          /dev/sda1 * 570 4496 31543627+ 7 HPFS/NTFS
          /dev/sda2 1 569 4570461 b W95 FAT32
          /dev/sda3 4497 7073 20699752+ 83 Linux
          /dev/sda4 7074 24321 138544560 5 Extended
          /dev/sda5 7074 24183 137436043+ 83 Linux
          /dev/sda6 24184 24321 1108453+ 82 Linux swap / Solaris

          Partition table entries are not in disk order
          vinny@desktop:~$
          as we see /dev/sda1 is NTFS or windows
          /dev/sda2 fat32 allso windows...(acualey a rescu partition)

          aaaa /dev/sda3 and /dev/sda5 linux thats what I want to run the e2fsck on

          then after you/v don this see if you can boot up agin.
          and let us know what hapend.

          VINNY
          i7 4core HT 8MB L3 2.9GHz
          16GB RAM
          Nvidia GTX 860M 4GB RAM 1152 cuda cores

          Comment


            #6
            Re: Question about &quot;fsck&quot; command...

            will try the suggestions tonight & let you know what happens
            System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

            Comment


              #7
              Re: Question about &quot;fsck&quot; command...

              Originally posted by bhamm77
              let you know what happens
              Please do, I'd like to "hear" how it goes.

              I'll have to add that even if you can get the system back up, parts of /usr/share will be borked (ntfs does not support POSIX file ownerships/permissions or symbolic links, so moving /usr/share to ntfs and back will mess those up).

              You may still be able to get your system running since most of /usr/share is -rw-r--r-- (drwxr-xr-x) root:root, but there is going to be issues...so eventually a reinstallation is probably the easiest solution (which you have planned already I gather).

              But it'll be interesting and educational to see what happens.

              Comment


                #8
                Re: Question about &quot;fsck&quot; command...

                I am currently running my live CD. Just performed the suggestions by Kubicle & vinnywright.

                Here's the output.

                1. I have moved the /usr/share directory back to the Kubuntu partition.

                2.
                Code:
                root@ubuntu:/media/disk# sudo fdisk -l
                
                Disk /dev/sda: 80.0 GB, 80026361856 bytes
                240 heads, 63 sectors/track, 10337 cylinders
                Units = cylinders of 15120 * 512 = 7741440 bytes
                Disk identifier: 0x0282bece           
                
                  Device Boot   Start     End   Blocks  Id System
                /dev/sda1        1    1017   7688488+  b W95 FAT32
                /dev/sda2  *    1018    9027  60555600  7 HPFS/NTFS
                /dev/sda3      10079    10337   1958040  5 Extended 
                /dev/sda4      9028    10078   7945560  83 Linux  
                /dev/sda5      10080    10337   1950480  82 Linux swap / Solaris
                
                Partition table entries are not in disk order
                3.
                Code:
                root@ubuntu:/# sudo e2fsck /dev/sda4
                e2fsck 1.41.4 (27-Jan-2009)     
                /dev/sda4 is mounted.        
                
                WARNING!!! Running e2fsck on a mounted filesystem may cause
                SEVERE filesystem damage.                  
                
                Do you really want to continue (y/n)? yes
                
                /dev/sda4 was not cleanly unmounted, check forced.
                Pass 1: Checking inodes, blocks, and sizes
                Pass 2: Checking directory structure
                Pass 3: Checking directory connectivity
                Pass 4: Checking reference counts
                Pass 5: Checking group summary information
                /dev/sda4: 194295/993568 files (2.3% non-contiguous), 1741101/1986390 blocks
                root@ubuntu:/#
                4. About to boot to /dev/sda4....we'll see what happens...

                Good news. I'm able to successfully boot into the login screen. From there it just keeps sending me back to the login screen. But I am able to login to console ctl+alt+F1. This gives hope that the system is not totally gone.

                System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

                Comment


                  #9
                  Re: Question about &quot;fsck&quot; command...

                  Tried dibl's FAQ #10 suggestions...under dibl's signature.

                  1. mv /home/<user>/.kde /home/<user>/kdebackup

                  2. --- Remove / reinstall kdm and see if that works.
                  sudo aptitude remove kdm; then: sudo aptitude update&&sudo aptitude install kdm
                  Neither of these worked.


                  I did alot (175 pkgs) of upgrades on my system just before moving my usr/share/ folder to my NTFS partition. This is when I ran out of space.

                  I somehow lost my plasma desktop after the upgrades. (seemed that my NVIDIA driver was disabled) I was actually successfully logging in at that point, could run GUI programs, just had no plasma desktop. So I reinstalled the driver, and it did not help.

                  Thanks for the help so far. Let me know of any suggestions.
                  System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

                  Comment


                    #10
                    Re: Question about &quot;fsck&quot; command...

                    if you still have net you could try
                    Code:
                    sudo apt-get update
                    then
                    Code:
                    sudo apt-get dist-upgrade
                    then
                    Code:
                    sudo apt-get -f install
                    and a
                    Code:
                    dpkg --configure -a
                    couldent hurt eather.

                    or/and pop the cd back in and copy the /usr/share from it to /usr/share overwriting it all.

                    then pray the new hard drive you were wating for gets thar quickley and you can start fresh ..........LOL

                    VINNY

                    i7 4core HT 8MB L3 2.9GHz
                    16GB RAM
                    Nvidia GTX 860M 4GB RAM 1152 cuda cores

                    Comment


                      #11
                      Re: Question about &quot;fsck&quot; command...

                      tried all suggestions so far. I am able to do a console login, but GUI keeps looping back to the login screen.

                      From Live CD...

                      copied the /user/share folder from Live CD, into the one previously moved /usr/share folder. Did this to possibly overwrite damaged files & folders.

                      then....

                      Code:
                      ubuntu@ubuntu:~$ sudo e2fsck /dev/sda4
                      e2fsck 1.41.4 (27-Jan-2009)
                      /dev/sda4: clean, 198475/993568 files, 1780928/1986390 blocks
                      still looping at the GUI login. Anyone else

                      System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

                      Comment


                        #12
                        Re: Question about &quot;fsck&quot; command...

                        try fsck -yfv -C 0 /your/disk/here

                        -y = answer any prompts "yes" automatically
                        -f = force fsck to run, even if teh filesystem look sclean. usually, fsck looks at the journal first, and if the journal is OK, it assumes the rest of the filesystem is OK too
                        -v = be verbose (this'll show you what fsck is doing in teh background)
                        -C 0 = this prints out a progress bar in the terminal. (that's a cap. C and a zero)
                        # make install --not-war

                        Comment


                          #13
                          Re: Question about &quot;fsck&quot; command...


                          Thanks for the suggestion russlar. Here's the outcome...

                          Code:
                          ubuntu@ubuntu:~$ sudo fsck -yfv -C0 /dev/sda4
                          fsck 1.41.4 (27-Jan-2009)
                          e2fsck 1.41.4 (27-Jan-2009)
                          Pass 1: Checking inodes, blocks, and sizes
                          Pass 2: Checking directory structure
                          Pass 3: Checking directory connectivity
                          Pass 4: Checking reference counts
                          Pass 5: Checking group summary information
                          
                           198475 inodes used (19.98%)
                            6362 non-contiguous files (3.2%)
                             177 non-contiguous directories (0.1%)
                               # of inodes with ind/dind/tind blocks: 12482/191/0
                           1780928 blocks used (89.66%)
                              0 bad blocks
                              0 large files
                          
                           165009 regular files
                            19531 directories
                             69 character device files
                             26 block device files
                              2 fifos
                             27 links
                            13827 symbolic links (12624 fast symbolic links)
                              2 sockets
                          --------
                           198493 files
                          ubuntu@ubuntu:~$
                          Still looping back to login screen though. Later, I will try some more of the suggestions found under dibl's FAQ's about the login loop issue.
                          System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

                          Comment


                            #14
                            Re: Question about &quot;fsck&quot; command...

                            You can get to a CLI. So, from there, type:
                            Code:
                            df -hTxtmpfs
                            Copy the output and paste it in your reply. This will show us the actual space stats on your system.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Re: Question about &quot;fsck&quot; command...


                              (/dev/sda4) is my kubuntu file system.
                              (/dev/sda2) is my windows file system.

                              from the live cd, I get the following outcome. Do I need to do this while booted to hd? I did this from the Live CD so I could paste the results on the forum.

                              Code:
                              root@ubuntu:~# df -hTxtmpfs
                              Filesystem  Type  Size Used Avail Use% Mounted on
                              rootfs   rootfs  619M  22M 597M  4% /
                              /dev/sr0  iso9660  695M 695M   0 100% /cdrom
                              /dev/loop0
                                   squashfs  678M 678M   0 100% /rofs
                              /dev/sda4   ext2  7.5G 6.7G 415M 95% /media/disk
                              /dev/sda2 fuseblk   58G  53G 5.3G 91% /media/HP_PAVILION
                              System<br />HP Pavilion 061 with dual boot,&nbsp; Kubuntu Lucid 10.04 &amp; Windows XP Professional SP3<br />model#: PU061AV<br />X-86 based PC<br />AMD Athlon 64 processor 3200+1.79GHz<br />2 GB of RAM<br />Video:NVIDIA GeForce FX 5200 (dedicated)<br />hard drive: Maxtor 6Y080M0, 60GB

                              Comment

                              Working...
                              X