LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2009, 05:55 PM   #1
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Rep: Reputation: 0
Red face Ext3 partition unreadable in OpenSuse 11


Hi,
A customer of mine loaded his entire music collection (200+GB) on a Maxtor external drive/network attached storage device. After he moved all the files over, the device stopped responding, with the only copy of his music stranded on it. The NAS was Linux based, so the drive was in ext3 format. He hired me to recover it.

The NAS was no longer under warranty, so I took out the hard drive and put it in an external USB hard drive enclosure. I installed OpenSUSE 11 on an old Pentium 3 PC, and was able to get in and find his files. My customer had another network attached storage box, a buffalo Terastation, that he wanted his music collection transferred to.

Here's where it all went wrong:

I only recently started using Linux, and after spending all morning trying and failing to get the OpenSuse machine to see the terastation on the local network with Samba, I decided to try things from the other side and installed a program called Ext2 IFS 1.11 on my windows XP laptop that in theory would allow it to read ext2 and ext3 partitions.

When it didn't work, I took my USB enclosure back over to the Linux machine. This time I couldn't get dolphin to mount any of the four partitions on the hard drive. I rebooted, and afterward I was able to get into 3 of the partitions, but the last one (the one with the music collection on it) gave me the following error code when I tried to access it:

"an error occurred while accessing 'Volume (ext3)' the system said: org.freedesktop.hal.device.volume.unknownfailure: mount: wrong fs type, bad option, bad superblock on /dev/sdc6, missing codepage or helper program, or other error"

Occasionally when I unmount, disconnect and reconnect the hard drive the partition will be accessible, it appears empty, but the free space indicates that it's half full.

I tried connecting the hard drive to another machine also running Opensuse 11, and got the same error message and weird behavior.

Is there anything that I can use to recover the partition?

Thanks in advance
-DLH

Last edited by DarwinsLittleHelper; 06-26-2009 at 06:14 PM.
 
Old 06-26-2009, 06:33 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,541

Rep: Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496Reputation: 2496
You could try TestDisk which is part of the SystemRescueCD to recover data. Google it, small download.
 
Old 06-26-2009, 06:48 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I would try mounting the partition manually from the terminal instead of using a GUI program. The feedback might be more instructive. Open up another terminal and run "sudo tail -f /var/log/messages". This will follow the kernel messages. If you try to mount a partition, and it fails there should be a kernel message printed. That may provide more information.
In the first terminal, try "sudo mount -t ext3 /dev/sdc6 /mnt/ -o ro"

There is a program "fsck.ext3" that you can use to repair the ext3 filesystem.
Use it when the partition is not mounted, which I guess will be no problem!
"sudo -n /sbin/fsck.ext3 /dev/sdc6" will run a check but not make any changes.

"sudo -p /sbin/fsck.ext3 /dev/sdc6" will run a check and repair items automatically that can be done safely without intervention.

"sudo -y /sbin/fsck.ext3 /dev/sdc6" will run a check and assume a "y" response to all questions.

Your best bet may be the -p option.

Please scan through the manpages for "fsck.ext3" and "mount".
There are some other options you may need. For example, if the superblock is bad, you can try using a backup instead when running fsck.ext3.
 
Old 06-26-2009, 08:52 PM   #4
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Original Poster
Rep: Reputation: 0
jschiwal,
I tried sudo -p /sbin/fsck.ext3 /dev/sdc6, it ran for a few minutes, then ended with this error:
sudo: pam_authenticate: Conversation error

The tail information is as follows:
Jun 26 21:30:16 linux-e4lg sudo: pam_unix2(sudo:auth): conversation failed
Jun 26 21:30:16 linux-e4lg sudo: chris : pam_authenticate: Conversation error ; TTY=pts/2 ; PWD=/home/chris ; USER=root ; COMMAND=/dev/sdc6

yancek,
I've downloaded and burned SystemRescueCD, thanks for the recommendation, I'm a little bit nervous about running the software until I know a little bit more about what the problem is, but I may use it.

Last edited by DarwinsLittleHelper; 06-26-2009 at 08:55 PM.
 
Old 06-26-2009, 09:03 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm not quite sure why the sudo -p suggestion (just because I've never used it), but I'd simply try su'ing to the root account and trying fsck form there, so

su -
<enter root password>
/sbin/fsck.ext3 /dev/sdc6

since it looks like an authentication issue rather than a fsck issue.

I may be wrong here in that Suse changed their root policy IIRC.

If the above doesn't work, perhaps a simple

sudo /sbin/fsck.ext3 /dev/sdc6
 
Old 06-26-2009, 09:12 PM   #6
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Original Poster
Rep: Reputation: 0
I tried SU'ing into the root account. It seems to have gotten past the authentication issue, but it threw up another error message:

"linux-e4lg:~ # /sbin/fsck.ext3 /dev/sdc6
e2fsck 1.40.8 (13-Mar-2008)
/sbin/fsck.ext3: Superblock invalid, trying backup blocks...
/sbin/fsck.ext3: Bad magic number in super-block while trying to open /dev/sdc6

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>"

Will e2fsck work with ext3?
 
Old 06-26-2009, 09:36 PM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
From man e2fsck
Quote:
E2fsck also supports ext2 filesystems containing a journal, which are also sometimes known as ext3 filesystems
So yes is the answer.
 
Old 06-26-2009, 10:44 PM   #8
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Original Poster
Rep: Reputation: 0
e2fsck -b 8193 /dev/sdc6 gives me the same error:

linux-e4lg:~ # e2fsck -b 8193 /dev/sdc6
e2fsck 1.40.8 (13-Mar-2008)
e2fsck: No such file or directory while trying to open /dev/sdc6

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

It mentions an alternate superblock. Can I use any number or does it have to be specific?

Thanks for the help so far by the way, I would have never gotten this far on my own.
 
Old 06-26-2009, 10:48 PM   #9
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
On my Fedora system there are distinct fsck tools available:
$ ls /sbin/fsck*
/sbin/fsck /sbin/fsck.cramfs /sbin/fsck.ext2 /sbin/fsck.ext3 /sbin/fsck.ext4 /sbin/fsck.ext4dev /sbin/fsck.msdos /sbin/fsck.vfat

Some of these are symlinks (/sbin/fsck.msdos -> dosfsck and /sbin/fsck.vfat -> dosfsck)

Linux

Last edited by jeromeNP7; 09-04-2009 at 09:00 PM.
 
Old 06-26-2009, 11:18 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'd get friendly with "man e2fsck"

Code:
       -b superblock
              Instead  of  using the normal superblock, use an alternative superblock specified by superblock.  This option is
              normally used when the primary superblock has been corrupted.  The location of the backup superblock  is  depen-
              dent  on  the  filesystem's  blocksize.  For filesystems with 1k blocksizes, a backup superblock can be found at
              block 8193; for filesystems with 2k blocksizes, at block 16384; and for 4k blocksizes, at block 32768.

              Additional backup superblocks can be determined by using the mke2fs program using the -n  option  to  print  out
              where  the superblocks were created.   The -b option to mke2fs, which specifies blocksize of the filesystem must
              be specified in order for the superblock locations that are printed out to be accurate.

              If an alternative superblock is specified and the filesystem is not opened read-only, e2fsck will make sure that
              the primary superblock is updated appropriately upon completion of the filesystem check.
 
Old 06-27-2009, 03:01 PM   #11
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Original Poster
Rep: Reputation: 0
Ok, so I've read up on e2fsck and mke2fs -n. I managed to find a list of alternate superblocks, and after trying a few with e2fsck, I found one that appears to work, it didnt give me an error message at the least.

I entered e2fsck -b 163840 -p dev\sdc6\ and got a new line that only displayed ">"
When I highlighted the command above to copy it, I pressed ctrl+c out of habit, and it brought back the normal prompt.

I re-ran e2fsck along with sudo tail -f /var/log/messages, but it doesn't show anything happening. is there anything it's expecting me to enter at the >?
 
Old 06-27-2009, 03:12 PM   #12
DarwinsLittleHelper
LQ Newbie
 
Registered: May 2009
Location: Palm Bay FL
Distribution: Open Suse 11
Posts: 6

Original Poster
Rep: Reputation: 0
I tried mounting the partition again and got the same error as before. the tail information gave me the following error:

Jun 27 16:09:02 linux-e4lg kernel: VFS: Can't find ext3 filesystem on dev sdc6.

fdisk -l /dev/sdc6 returns the following information:

Disk /dev/sdc6: 998.8 GB, 998894421504 bytes
255 heads, 63 sectors/track, 121441 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xc011de0c

Disk /dev/sdc6 doesn't contain a valid partition table

Last edited by DarwinsLittleHelper; 06-27-2009 at 03:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition Table Unreadable ibshar Linux - General 3 05-15-2008 02:34 AM
Display unreadable - new openSuse 10.3 install jsl112 Linux - Newbie 6 12-07-2007 09:59 PM
colinux access to ext3 partition (opensuse root partition) billtracy1957 Linux - General 0 05-03-2007 10:29 PM
FDisk - Unreadable partition tabl scottie Linux - Hardware 7 01-31-2004 11:45 PM
Oh NO, Partition table unreadable? ababurko Linux - Newbie 2 03-12-2003 07:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration