<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: EXT2/EXT3 filesystem recovery in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277056#M12150</link>
    <description>the first kb's of the fs are destroyed, i think when you run fsck you should use an alternative superblock (fsck normally takes the first one).&lt;BR /&gt;&lt;BR /&gt;also, if your boot fs is damaged, is that /boot or /. if you can still access /etc i guess it should be possible to boot from cd and rerun lilo.&lt;BR /&gt;&lt;BR /&gt;if you have a dump image, why don't you just reformat the fs and put the dump back?&lt;BR /&gt;</description>
    <pubDate>Mon, 17 May 2004 01:13:23 GMT</pubDate>
    <dc:creator>dirk dierickx</dc:creator>
    <dc:date>2004-05-17T01:13:23Z</dc:date>
    <item>
      <title>EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277050#M12144</link>
      <description>I don't suppose anybody has any experience with restoring an ext[23] filesystem that has had it's boot sector corrupted (badly) ?&lt;BR /&gt;&lt;BR /&gt;One partition of one of my HDD's using ext3 did this.  File system is completely inaccessable.&lt;BR /&gt;&lt;BR /&gt;I've dumped a backup (19GB) to another machine so I can play with it, and have tried restoring the filesystem parameters manually, but this was mostly unsuccessful (inode table after an e2fsck was still mostly fried).&lt;BR /&gt;&lt;BR /&gt;I can't tell how bad the corruption is as I have nothing to compare it too.&lt;BR /&gt;&lt;BR /&gt;I guess I'm asking if anybody knows how much filesystem header there is before the inode table data.</description>
      <pubDate>Fri, 14 May 2004 18:51:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277050#M12144</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-05-14T18:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277051#M12145</link>
      <description>You might find something here; docs on ext2; not sure how close to ext3 it is.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.nongnu.org/ext2-doc/ext2.html" target="_blank"&gt;http://www.nongnu.org/ext2-doc/ext2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Good luck !!&lt;BR /&gt;&lt;BR /&gt;Vern</description>
      <pubDate>Sat, 15 May 2004 11:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277051#M12145</guid>
      <dc:creator>Vernon Brown_4</dc:creator>
      <dc:date>2004-05-15T11:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277052#M12146</link>
      <description>This happened to me back in the red hat 6.2 ext2 days.&lt;BR /&gt;&lt;BR /&gt;My recovery method was to rebuild the system from scratch with empty filesystms and then restore files as needed.  &lt;BR /&gt;&lt;BR /&gt;To bad Ignite hasn't been ported to Linux. That would make things easy for you.&lt;BR /&gt;&lt;BR /&gt;Good Luck.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sat, 15 May 2004 23:40:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277052#M12146</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-05-15T23:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277053#M12147</link>
      <description>FYI, ext3 provides journaling. You can mount an ext3 filesystem as ext2 (ie journaling disabled). Its just a change to the mount options.&lt;BR /&gt;&lt;BR /&gt;What error do you get when you try and mount this filesystem? I guess maybe that if your attempts at restoring have failed so far, there might not be much hope. What steps did you try, and what were the results?&lt;BR /&gt;&lt;BR /&gt;Col.</description>
      <pubDate>Sun, 16 May 2004 17:32:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277053#M12147</guid>
      <dc:creator>Colin Topliss</dc:creator>
      <dc:date>2004-05-16T17:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277054#M12148</link>
      <description>Oh, there was something else I just remembered.&lt;BR /&gt;&lt;BR /&gt;You don't actually say what version of Linux you're running. There were issues with 6.0 and 7.2 where, if you had a partition that required an fsck, there were occascions where you had to fsck several times before all errors were corrected. I had one system that ran through the fsck OK, marked the filesystem as clean, then went on to produce multiple I/O errors! Manually unmounting and fsck'ing several times finally cured the problem.&lt;BR /&gt;&lt;BR /&gt;This happened on an ext2 filesystem.&lt;BR /&gt;&lt;BR /&gt;Col.</description>
      <pubDate>Sun, 16 May 2004 17:36:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277054#M12148</guid>
      <dc:creator>Colin Topliss</dc:creator>
      <dc:date>2004-05-16T17:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277055#M12149</link>
      <description>Things that are known:&lt;BR /&gt;&lt;BR /&gt;The first 2-10k of the filesystem is destroyed.&lt;BR /&gt;&lt;BR /&gt;'file -s /dev/hda5' returns just 'data'.&lt;BR /&gt;&lt;BR /&gt;After some mucking around..&lt;BR /&gt;&lt;BR /&gt;e2retrieve: failed to do anything useful, inode tables too corrupt for it.&lt;BR /&gt;e2recover: had a good go at it.  was able to find superblocks and some of the inode data, but was unable to list any of the details.&lt;BR /&gt;&lt;BR /&gt;With the image dump I took as a starting point (yay 20gb file!), I tried re-making the fielsystem over the top to get the correct filesystem header, restoring the filesystem, then incrementally writing the 'good' filesystem headers back.&lt;BR /&gt;&lt;BR /&gt;This was close to successful, however it appears as if the inode table was too destroyed for it to make much sense of the data, or I was a few byts off in my restoring information for 'fsck' to make sense of it.&lt;BR /&gt;&lt;BR /&gt;Vernon, with the info you provided, I'll try this attack again, as I can work out where the segment boundaries are.  Hopefully with a bit of patience and time, I can reconstruct it.&lt;BR /&gt;&lt;BR /&gt;For the moment however, I've been manually extracting configuration files etc. with the help of 150+ split-files, and 'grep -ab'.  Painful, and very slow, but it's gotten most of the system into working shape again.&lt;BR /&gt;&lt;BR /&gt;Just a few monitoring databases missing now.&lt;BR /&gt;&lt;BR /&gt;I'll keep posting back..</description>
      <pubDate>Sun, 16 May 2004 22:49:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277055#M12149</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-05-16T22:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277056#M12150</link>
      <description>the first kb's of the fs are destroyed, i think when you run fsck you should use an alternative superblock (fsck normally takes the first one).&lt;BR /&gt;&lt;BR /&gt;also, if your boot fs is damaged, is that /boot or /. if you can still access /etc i guess it should be possible to boot from cd and rerun lilo.&lt;BR /&gt;&lt;BR /&gt;if you have a dump image, why don't you just reformat the fs and put the dump back?&lt;BR /&gt;</description>
      <pubDate>Mon, 17 May 2004 01:13:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277056#M12150</guid>
      <dc:creator>dirk dierickx</dc:creator>
      <dc:date>2004-05-17T01:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277057#M12151</link>
      <description>did you try to replace the superblock with a right one?&lt;BR /&gt;&lt;BR /&gt;fsck -b GOOD_BLOCK /dev/hda5&lt;BR /&gt;&lt;BR /&gt;did you check /dev/hda5 has correct major,minor number?&lt;BR /&gt;&lt;BR /&gt;To get a list of good sb you can use numbers resulting from fsck'ing another hd.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Peace, R&amp;gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 May 2004 02:20:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277057#M12151</guid>
      <dc:creator>Roberto Polli</dc:creator>
      <dc:date>2004-05-17T02:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277058#M12152</link>
      <description>Dirk, the image dump is after the corruption.&lt;BR /&gt;&lt;BR /&gt;Roberto, yes, major and minor are fine, it was a real corruption of the filesystem.&lt;BR /&gt;&lt;BR /&gt;As for both, yes.  I tried using an alternate superblock, this still failed.&lt;BR /&gt;&lt;BR /&gt;After a few hours of analysis, and wading through the first 872kb of the filesystem here's what I found.&lt;BR /&gt;&lt;BR /&gt;The boot record + superblock (0) are destroyed.&lt;BR /&gt;The group descriptors (0) table is destroyed.&lt;BR /&gt;The first roughly 241664 bytes of the first inode table are also destroyed.&lt;BR /&gt;&lt;BR /&gt;So, *wheee!*&lt;BR /&gt;&lt;BR /&gt;This leaves me doing some rather nasty stuff in an attempt to recover what I can..&lt;BR /&gt;&lt;BR /&gt;Piece together the first 1024 bytes from the re-made dummy filsystem.  Pull the 2nd superblock and group descriptors, blank out the block bitmap/inode bitmp and inode table in the first section, and run an fsck, and see what can be recovered!&lt;BR /&gt;&lt;BR /&gt;Yowser!  Talk about ugly!&lt;BR /&gt;&lt;BR /&gt;Anyway, off I go to attempt this.  Go 'Manual Filesystem Recovery'! :)&lt;BR /&gt;&lt;BR /&gt;If worst comes to worse, perhaps I'll be able to use one of the other rescue tools after this.</description>
      <pubDate>Mon, 17 May 2004 03:12:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277058#M12152</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-05-17T03:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277059#M12153</link>
      <description>Attempt number 1: failed.&lt;BR /&gt;&lt;BR /&gt;Incorrectly made up header :P&lt;BR /&gt;&lt;BR /&gt;'dd' work is confusing.  Combine that with not being 100% sure of some of these values (for confusion's sake), and you've got alot of fun!&lt;BR /&gt;&lt;BR /&gt;Confusion which caused failure:&lt;BR /&gt;&lt;BR /&gt;Root partition meta-data layout, offset in filesystem 'blocks' (not disk sectors or standard 512 byte blocks):&lt;BR /&gt;&lt;BR /&gt;(taken from &lt;A href="http://www.nongnu.org/ext2-doc/ext2.html)." target="_blank"&gt;http://www.nongnu.org/ext2-doc/ext2.html).&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;offset   # of blocks description&lt;BR /&gt;-------- ----------- -----------&lt;BR /&gt;       0           1 boot record&lt;BR /&gt;         -- block group 0 --&lt;BR /&gt;(1024 bytes)       1 superblock&lt;BR /&gt;       2           1 group descriptors&lt;BR /&gt;       3           1 block bitmap&lt;BR /&gt;       4           1 inode bitmap&lt;BR /&gt;       5         214 inode table&lt;BR /&gt;     219        7974 data blocks&lt;BR /&gt;&lt;BR /&gt;Ok, fine.&lt;BR /&gt;&lt;BR /&gt;         -- block group 1 --&lt;BR /&gt;    8193           1 superblock backup&lt;BR /&gt;    8194           1 group descriptors backup&lt;BR /&gt;    8195           1 block bitmap&lt;BR /&gt;    8196           1 inode bitmap&lt;BR /&gt;    8197         214 inode table&lt;BR /&gt;    8408        7974 data blocks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ahh..&lt;BR /&gt;&lt;BR /&gt;Now, this states that it allocates an entire 'block for the superblock backup.  Whilst it might do this, it also fills the remainder of the block with 'garbage'.  This garbage doesn't like living in the root subset of data.&lt;BR /&gt;&lt;BR /&gt;So, with my file system, 4096 byte blocks, it turns out like this:&lt;BR /&gt;&lt;BR /&gt;bytes&lt;BR /&gt;0-1024  boot_record (from dummy fs)&lt;BR /&gt;1025-2048 superblock (1, from bad fs)&lt;BR /&gt;2049-8192 chr 0's (/dev/zero)&lt;BR /&gt;8193-12288 group_descriptors (1, from bad fs)&lt;BR /&gt;12289-884736 from dummy fs (zero'd inodes basically).&lt;BR /&gt;&lt;BR /&gt;I was thinking of trying to grab the good-half of the root inode table, but that's just pushing it.&lt;BR /&gt;&lt;BR /&gt;Currently restoring a backup of the bad fs image, and will re-try.  'conv=notrunc' is my friend now *nod* :)&lt;BR /&gt;&lt;BR /&gt;Will report back later.</description>
      <pubDate>Mon, 17 May 2004 05:01:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277059#M12153</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-05-17T05:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: EXT2/EXT3 filesystem recovery</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277060#M12154</link>
      <description>blech.. numbering off-by-one :P</description>
      <pubDate>Mon, 17 May 2004 05:03:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ext2-ext3-filesystem-recovery/m-p/3277060#M12154</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2004-05-17T05:03:23Z</dc:date>
    </item>
  </channel>
</rss>

