On Thu, 4 Dec 2003 21:07:20 -0800 (PST) "Scott I. Remick" <[EMAIL PROTECTED]> probably wrote:
> > --- Sergey 'DoubleF' Zaharchenko <[EMAIL PROTECTED]> wrote: > > I've got a (probably bad) idea. If you say that the partition was > > mounted as /data, then you could do a > > > > # hd /dev/ad6s1 |grep /data > > > > It should come up soon (the superblock should be close to the beginning > > of the drive, right?). This way you can at least figure out where your > > superblock lies (rounding the address of `/data' to 8K). Considering the > > above discussion, you can calculate the *correct* address of the `e' > > partition by subtracting 8K or 64K or 256K. See if it matches the one in > > the disklabel. > > > > Of course, this is all possible only if your superblock isn't screwed > > enough to NOT contain `/data'. > > Been running about a minute so far... nada. So I guess your assumption is > correct: the 1st superblock is destroyed (as fsck suggested when it barfed). I wonder what did destroy it. Of course, system crashes can do wonders, but... > > Just a minute. Are you sure that the filesystem was newfs'd with the > > default parameters? If it were for me to newfs it, I would probably > > choose larger block&fragment sizes, as I would probably be storing large > > files. The superblock copy positions depend on the block/frag size. If > > you specify parameters different from those used for actually newfs'ing > > it the very first time, newfs -N will give you *incorrect* copy > > addresses! > > Well, specifying custom block/frag sizes is a bit out of my customization > forte at the moment, and certainly at the time this drive went in. I'm 99% > positive I used sysinstall to set it up. I remember some quirks about the > sysinstall method, and also deciding that the by-hand method was > unnecessarily complicated for my needs. > > This has taught me that, should I ever choose to do that, that writing down > these custom values is CRITICAL. > > Is there any way to positively identify a superblock location (say, using hd > | grep ) using known information? Just a random thought. In fact, there should be a way, because a valid superblock copy has a correct checksum. Perhaps I'll hack up a program to do that taking information from the /usr/src/sys/ufs/... There's also a magic number for a superblock, mentioned in fs.h (in 4.8 it's 0x011954). So, for me, grepping gives $ hd </dev/ad2s2 | grep "54 19 01 00" 00002550 01 00 00 00 00 00 00 00 00 00 00 00 54 19 01 00 |............T...| 00004550 01 00 00 00 00 00 00 00 00 00 00 00 54 19 01 00 |............T...| 001e9150 11 00 07 00 54 19 01 00 a4 b2 3a c0 00 00 00 00 |....T...╓╡:ю....| 00a97570 8b 48 60 81 b9 5c 05 00 00 54 19 01 00 75 13 8b |H`╧\...T...u.| 00a98900 05 00 00 54 19 01 00 74 0b 68 54 5f 2d c0 e8 91 |...T...t.hT_-юХ| 00efb150 11 00 07 00 54 19 01 00 a4 b2 3a c0 00 00 00 00 |....T...╓╡:ю....| 013b3f50 00 54 19 01 00 75 13 8b 51 30 81 fa 00 00 01 00 |.T...u.Q0З....| 013b52d0 00 00 8b 70 0c 81 be 5c 05 00 00 54 19 01 00 74 |..p.╬\...T...t| 01705760 8b 48 60 81 b9 5c 05 00 00 54 19 01 00 75 13 8b |H`╧\...T...u.| 01706af0 05 00 00 54 19 01 00 74 0b 68 34 89 2a c0 e8 91 |...T...t.h4*юХ| 01831f50 00 54 19 01 00 75 13 8b 51 30 81 fa 00 00 01 00 |.T...u.Q0З....| 018332d0 00 00 8b 70 0c 81 be 5c 05 00 00 54 19 01 00 74 |..p.╬\...T...t| . . . Only the first two are real --- the superblock and the first copy (I'm on UFS1). The rest are false positives. You might want to try using $ hd </dev/ad2s2 | grep "54 19 01 00 |" to filter out most of them. Have fun. If the disk is that screwed, you might also want to try out tct (/usr/ports/sysutils/tct). I'm not sure, but it might be helpful later(?) > Although I'm treating this as a learning experience, I also REALLY REALLY > don't want to loose all that data. I do appreciate the help you've been > giving me. Thanks again. I'm choosing to remain optimistic. I used to > salvage lots of data from DOS/Windows partitions (still do) so learning the > tricks of the trade in my new OS of choice is important to me. > > (PS: already pricing out external USB hard drive enclosures for making > backups of this drive in the future) A good idea would also be to print out the hd of the superblock contents on a sheet of paper when you find it and put it in a cool dry place:) > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > -- DoubleF New Year's Eve is the time of year when a man most feels his age, and his wife most often reminds him to act it. -- Webster's Unafraid Dictionary
pgp00000.pgp
Description: PGP signature