[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ext3-users
Subject:    Re: Overwriting ext2 Partition with ext3
From:       Matt Stegman <matts () ksu ! edu>
Date:       2004-07-07 19:29:51
Message-ID: Pine.GSO.4.44L.0407071420560.11129-100000 () unix2 ! cc ! ksu ! edu
[Download RAW message or body]

On Wed, 7 Jul 2004, evilninja wrote:
> Niki Hammler schrieb:
> > mke2fs -j /device
> >
> > Important is the "-j" switch.
> >
> > What happens without the "-j" switch? All superblocks and inodes
> > are overwritten. Is this true??
>
> i don't think, that all inodes are overwritten. mkfs.?fs is pretty fast,
> so it's creating the superblock and the journal (-j) only.

It looks to me like the manpage says default options will overwrite
superblocks, group descriptors, block & inode bitmaps, and inode table.

If it didn't overwrite inodes, an fsck run immediately after mkfs would
find old inode data.  Maybe disconnected inodes if you had a filesystem on
the device previously, maybe random data.

There is a -S switch for mke2fs.  It tells it not to overwrite the bitmaps
and inode table.

Data blocks should have been left alone, assuming you haven't written
anything new to the filesystem (except wherever the journal is written; I
believe it's a regular file, and debugfs should be able provide you with a
block map).  So pretty much I think the only way you'll be able to recover
your data is grepping through the block device.

--
Matt Stegman


_______________________________________________
Ext3-users mailing list
Ext3-users@redhat.com
https://www.redhat.com/mailman/listinfo/ext3-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic