LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-27-2010, 04:38 AM   #1
0p3r4t4
LQ Newbie
 
Registered: Oct 2008
Posts: 8

Rep: Reputation: 0
Mounting an ext3 file system destroys superblocks


Perhaps is as simple as that's the way it works and I misunderstand some basic knowlegde.

The situation is that I have an image of an ext3 file system done with dd. I know that the file system is corrupted but I want to try to recover some files. Whatever I dd it again to the original partition or assign the dd image to a loop device, that's what happens:

- dumpe2fs -h gives me a valid ext3 superblock.
- as I try to mount the device read only, it fails with a bad magic number error.
- executing dumpe2fs -h again gives bad magic number error.
- trying debugfs or fsck with backup superblocks fails the same way.

For me it seems that in spite of mounting the device as read-only, mount command do something wrong with the superblock as before the mount the superblock is correct and it's there.

¿What I'm missing?

Last edited by 0p3r4t4; 06-27-2010 at 04:39 AM.
 
Old 06-27-2010, 09:22 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,280

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
Your backup must have been "dirty" - on mount this will be recognised, and the journal will be run, regardless of the mount options. No way to stop it that I've been able to find.
 
Old 06-28-2010, 01:18 AM   #3
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by syg00 View Post
Your backup must have been "dirty" - on mount this will be recognised, and the journal will be run, regardless of the mount options. No way to stop it that I've been able to find.
May be mounting as ext2 will avoid running journal ?
 
Old 06-28-2010, 01:34 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,280

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
You can't - I tried that too. I saw a discussion somewhere where Ted basically said he wouldn't allow a non-validated filesystem to be handed over to userspace.
 
Old 06-28-2010, 03:10 AM   #5
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 666

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by syg00 View Post
You can't - I tried that too. I saw a discussion somewhere where Ted basically said he wouldn't allow a non-validated filesystem to be handed over to userspace.
OK, in this case file in question can be copied to some really old distribution with support for ext2 but without support for ext3.
No way ext2 will try to run journal
 
  


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
mounting ext3 file system as ext2 on slackware with custom build kernel robertjinx Linux - Server 2 05-16-2010 10:28 AM
ext4 new file system mounting compatibility with the older ext3 type james2b Linux - Newbie 6 09-08-2009 05:57 PM
Datarecovery on encrypted LVM ext3 with bad superblocks lkk Linux - General 2 07-17-2009 09:05 AM
Mounting a new ext3 on LVM system by a co-existing older system's ext2 /etc/fstab JZL240I-U Linux - Software 2 11-28-2005 07:44 AM
Recovering data from an ext3 fs with no superblocks UncleTaz Linux - General 2 03-07-2004 01:22 PM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration