LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-07-2009, 01:26 PM   #1
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Rep: Reputation: 16
Question mount disk - corrupted file EXT3 file system


Hi

I have hidden data in the file 'mdisk' which is mounted like this:
Code:
losetup /dev/loop0 mdisk
cryptsetup luksOpen /dev/loop0 mdisk
mount /dev/mapper/mdisk /dane/partycja
Today when I started to mount hidden disk as /dane/partycja
I get this error:

Code:
linux-ugu6:/dane/tmp # mount /dev/mapper/mdisk /dane/partycja
mount: you must specify the filesystem type
When I try to specify fs I get this:
Code:
linux-ugu6:/dane/tmp # mount -t ext3 /dev/mapper/devel /dane/partycja
mount: wrong fs type, bad option, bad superblock on /dev/mapper/devel,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

I have tried with etx3 and ext2 (though I know it is ext3, I simply followed this instructions:
http://www.usenet-forums.com/linux-g...partition.html

My 'fdisk -l' command shows:

Code:
Disk /dev/dm-0: 10.4 GB, 10485231616 bytes
255 heads, 63 sectors/track, 1274 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table
What can I do to restore my data???

Please advise, because the data are important to me

regards
Rafal
 
Old 04-07-2009, 02:18 PM   #2
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Original Poster
Rep: Reputation: 16
Solved!

SOLVED ;-))))
Guys!
Hard to believe, but for the first time entries on my blog helped me in unexpected way!
Here is why:
Around one year ago I described how to create hidden disk:
http://rafal.drezek.info/2008/02/26/szyfrowanie-danych/

Searching the solution for my problem I found this:
http://blog.edseek.com/archives/2004...lock-recovery/

Its very good advise, so I wanted to follow it, when I just realized that I can check entry on my block...and here it is! :
Code:
Kopie zapasowe superbloku zapisane w blokach:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
...I simply executed this:
Code:
 /sbin/fsck.ext3 -b 98304 /dev/dm-0
... and now everything works fine!

Sure I could test 'dd' option, but was quicker to check how my file was created.

The next time, whenever I format a disk I write down where superblocks copies are stored

cheers
Rafal

Last edited by RAFAL; 04-07-2009 at 02:20 PM.
 
Old 04-07-2009, 04:45 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,099

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
"fsck.ext2 -n /dev/..." will tell you where the alternate superblocks are. I suspect almost everybody accepts the default blocksize so running it just like that should work most of the time.
 
Old 04-08-2009, 03:27 PM   #4
RAFAL
Member
 
Registered: Feb 2006
Location: Warsaw, Poland
Distribution: Archlinux, Debian
Posts: 139

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by syg00 View Post
"fsck.ext2 -n /dev/..." will tell you where the alternate superblocks are. I suspect almost everybody accepts the default blocksize so running it just like that should work most of the time.

thanks for suggestions.
will test it next time (though hope it will not happen again ;-) )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to know my current hard disk partition file system ext2,ext3... hocheetiong Linux - Newbie 2 09-09-2007 07:42 AM
Mount error, file system (ext3) on raid device g_johnsonsamuel Linux - Hardware 1 08-14-2007 07:11 AM
the on-disk structure of the ext3 file system SeRGeiSarov Linux - Software 1 06-04-2007 01:00 PM
can't mount file system when trying to set up disk quotas rob_xx17 Linux - General 2 04-13-2006 07:16 AM
Large tar file taking huge disk space in ext3 file system pcwulf Linux - General 2 10-20-2003 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:08 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