Announcement

Collapse
No announcement yet.

Count mount drive after failed upgrade (solved)

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

    Count mount drive after failed upgrade (solved)

    Hi, after an unsuccessful upgrade, I installed Kubuntu Intrepid on another drive on my system. The other drive has the old data before the bad install. I had a grup error (error 16 I think), so I just installed kubuntu intrepd on another drive (sdb) . I'm trying to get the data off the 1st drive (sda), but I can't mount the drive. Here's my sudo fdisk -l output

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

    Disk /dev/sda: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000c7ddd

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 24415 196113456 83 Linux
    /dev/sda2 24416 24792 3028252+ f W95 Ext'd (LBA)
    /dev/sda5 24416 24792 3028221 82 Linux swap / Solaris

    Disk /dev/sdb: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x000da0be

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 24416 196121488+ 83 Linux
    /dev/sdb2 24417 24792 3020220 5 Extended
    /dev/sdb5 24417 247


    Here's what happens when I try to mount sda1...

    mpstump@maisie-desktop:~$ sudo mount /dev/sda1 /mnt/old
    mount: wrong fs type, bad option, bad superblock on /dev/sda1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    mpstump@maisie-desktop:~$


    “sudo mount -t ext3 /dev/sda1 /mnt/old “ produces same result as above.

    Here's what testdisk tells me...

    sudo testdisk

    TestDisk 6.9, Data Recovery Utility, February 2008
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    Disk /dev/sda - 203 GB / 189 GiB - CHS 24792 255 63
    Partition Start End Size in sectors
    * Linux 0 1 1 24414 254 63 392226912
    L Linux Swap 24415 1 1 24791 254 63 6056442

    Structure: Ok. Use Up/Down Arrow keys to select partition.
    Use Left/Right Arrow keys to CHANGE partition characteristics:
    *=Primary bootable P=Primary L=Logical E=Extended D=Deleted
    Keys A: add partition, L: load backup, T: change type, P: list files,
    Enter: to continue
    EXT3 Large file Sparse superblock Recover, 200 GB / 187 GiB


    Test disk is able to read the filesystem that I want to recover...

    TestDisk 6.9, Data Recovery Utility, February 2008
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org

    * Linux 0 1 1 24414 254 63 392226912
    Use Right arrow to change directory, q to quit
    Directory /

    drwxr-xr-x 0 0 4096 13-Nov-2008 15:52 .
    drwxr-xr-x 0 0 4096 13-Nov-2008 15:52 ..
    drwx------ 0 0 16384 21-Jul-2008 21:29 lost+found
    drwxr-xr-x 0 0 4096 2-Jul-2008 03:34 var
    drwxr-xr-x 0 0 12288 13-Nov-2008 15:52 etc
    drwxr-xr-x 0 0 4096 13-Nov-2008 13:37 media
    lrwxrwxrwx 0 0 11 21-Jul-2008 21:29 cdrom
    drwxr-xr-x 0 0 4096 13-Nov-2008 15:48 bin
    drwxr-xr-x 0 0 4096 13-Nov-2008 15:48 boot
    drwxr-xr-x 0 0 4096 13-Nov-2008 15:23 dev
    drwxr-xr-x 0 0 4096 21-Jul-2008 21:38 home
    drwxr-xr-x 0 0 4096 2-Jul-2008 03:16 initrd
    drwxr-xr-x 0 0 12288 13-Nov-2008 15:52 lib
    drwxr-xr-x 0 0 4096 14-Apr-2008 22:53 mnt
    drwxr-xr-x 0 0 4096 26-Sep-2008 17:55 opt
    drwxr-xr-x 0 0 4096 14-Apr-2008 22:53 proc
    Next

    So where do I go from here? Testdisk sees my data so it should be easy to copy, but how do I get to it? I think I'm missing something with Testdisk. How do I restore data with it?


    Stumper

    #2
    Re: Count mount drive after failed upgrade

    Have you attempted to check the filesystem on the drive?
    Code:
    sudo fsck /dev/sda1
    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


      #3
      Re: Count mount drive after failed upgrade

      This is the ouput of sudo fsck /dev/sda1

      mpstump@maisie-desktop:~$ sudo fsck /dev/sda1
      [sudo] password for mpstump:
      fsck 1.41.3 (12-Oct-2008)
      e2fsck 1.41.3 (12-Oct-2008)
      fsck.ext3: Device or resource busy while trying to open /dev/sda1
      Filesystem mounted or opened exclusively by another program?


      Should I try to install a file system? How do I do that? I think it should have ext3.

      modified...

      I don't know why it's giving me that error message. Nothing is mounted to that drive. In dolphin, it shows up under "places" as volume(ext3), but when I click on it, nothing happens.
      Stumper

      Comment


        #4
        Re: Count mount drive after failed upgrade

        Is /dev/sda1 identified in your current /etc/fstab file? If it is, then I'd attempt two things:

        1) try unmounting the devise: sudo umount /dev/sda1 and then running sudo fsck /dev/sda1
        If that doesn't work, then
        2) edit /etc/fstab (as root) and comment out the entry (put a # space in front of the line), save, and reboot the system. This ensures that the drive isn't mounted. Then run sudo fsck /dev/sda1
        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


          #5
          Re: Count mount drive after failed upgrade

          It's says it's not mounted

          mpstump@maisie-desktop:~$ sudo umount /dev/sda1
          [sudo] password for mpstump:
          umount: /dev/sda1: not mounted


          I've even booted from the kubuntu live cd, and tried to mount, with the same result.

          my fstab

          # /etc/fstab: static file system information.
          #
          # <file system> <mount point> <type> <options> <dump> <pass>
          proc /proc proc defaults 0 0
          # /dev/sdb1
          UUID=73a5484e-1770-4d8e-92e2-47527892c1c6 / ext3 relatime,errors=remount-ro 0 1
          # /dev/sdb5
          UUID=10eb9bd1-b68a-4c2c-9e46-6d3ede91f936 none swap sw 0 0
          /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0


          no sda drive even listed... This Stump is Stumped!
          Stumper

          Comment


            #6
            Re: Count mount drive after failed upgrade

            Do you have a Knoppix LiveCD you can boot from? If not, download from here. Every Linux user should have this in their toolkit. See if you can access the drive from Knoppix.
            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


              #7
              Re: Count mount drive after failed upgrade

              Nope, Knoppix basically gave me the same thing. Knoppix labeled the drive hda1, otherwise, the same. Could this be as simple as a permission thing? I'm thinking it's something bonehead like that, which I'm overlooking. I tried "sudo chmod 777 /dev/sda1" , it didn't give me an error, but it still won't mount either.

              I do like the Knoppix distro, though.
              Stumper

              Comment


                #8
                Re: Count mount drive after failed upgrade

                So, I think I have a solution by using either dd or testdisk. The problem I ran across is my current drive isn't big enough to backup the whole thing. So, one Bestbuy trip and a Maxtor usb drive later, I'm almost ready to give it a try. The big questions now are a) should I keep the usb drive as a ntfs drive, or reformat, and b) how do I turn the *.dd file back into the directory structure it once was. When I figure this out I'll repost, unless anybody has some advice now.

                Thanks,

                Matt
                Stumper

                Comment


                  #9
                  Re: Count mount drive after failed upgrade

                  Well, I went down the wrong path a few times, but I finally got it.&#160;

                  I was able to make a complete backup to work with on my newly acquired usb drive using testdisk, as opposed to monkeying around with the original, with the threat of mass data loss.

                  Then I tried photorec, which gave me all of my files, with no directory structure, missing filenames, etc. That wasn't going to do me a lot of good either.

                  Finally I used fsck to restore the filesystem on that backup (pretty neat).&#160;
                  Code:
                  sudo fsck /path to backup image.../image.dd
                  ...image.dd is the name of the newly created backup file...There were a lot more problems with this disk than I thought. After hitting y for yes about a million times, the directory was restored, and the files recovered by using mount like this
                  Code:
                  sudo mount -o loop -t ext2 image.dd /mnt/rec
                  where image.dd again was the backup image, and /mnt/rec was a new mount point.&#160; Life is good again.
                  Stumper

                  Comment


                    #10
                    Re: Count mount drive after failed upgrade

                    Outstanding! Very good. Please return to your initial post in this thread and click on the modify button and put SOLVED in the subject line.
                    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

                    Working...
                    X