Date: Mon, 14 Jul 2014 02:40:07 -0700 From: Duckbreath <duckbreath@yahoo.com> To: "kpneal@pobox.com" <kpneal@pobox.com> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Re: Mounting a file system with superblock 32 Message-ID: <1405330807.92885.YahooMailNeo@web120906.mail.ne1.yahoo.com> In-Reply-To: <20140628224020.GB68178@neutralgood.org> References: <1403926549.37922.YahooMailNeo@web120905.mail.ne1.yahoo.com> <20140628224020.GB68178@neutralgood.org>
next in thread | previous in thread | raw e-mail | index | archive | help
=0A=0AThanks for the helpful responses.=0A=0AI tried the dumpfs utility-=0A= # dumpfs /dev/da0a=0Adumpfs: /dev/da0a: could not read superblock to fill o= ut disk=0A# dumpfs /dev/da0b=0Adumpfs: /dev/da0b: could not read superblock= to fill out disk=0A# dumpfs /dev/da0e=0Adumpfs: /dev/da0e: could not read = superblock to fill out disk=0A# dumpfs /dev/da0f=0Adumpfs: /dev/da0f: could= not read superblock to fill out disk=0A# dumpfs /dev/da0=0Adumpfs: /dev/da= 0: could not read superblock to fill out disk=0A=0A=0AI'm somewhat perplexe= d that fsck_ffs -b 32 thinks the disk is fine.=0A=0A=0ASo, I decided to pay= the sourcecode of dumpfs.c a visit!The error message I get is probably the= product of ufserr(name);=0A=0A=0A=A0=A0=A0=A0=A0=A0 while ((name =3D *argv= ++) !=3D NULL) {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ufs= _disk_fillout(&disk, name) =3D=3D -1) {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ufserr(name);=0A=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 eval |=3D 1;=0A=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 conti= nue;=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A=0A=0AThe funct= ion ufs_disk_fillout() is a a core/system function with a manpage, essentia= lly an attempt to fill out a structure so it can print the disk information= within it for the dumpfs utility.=0A=0ASo my journey continues to where th= is onerous function which DARES (sorry, some list humor...) not to see my s= uperblock as defined, =0A=0A/usr/src/lib/libufs/type.c and I see this defin= ition:=0A=0A=A0int ufs_disk_fillout(struct uufsd *disk, const char *name)= =0A=A0 {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (ufs_disk_fillout_blank(disk, nam= e) =3D=3D -1) {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 retur= n (-1);=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 }=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 if (s= bread(disk) =3D=3D -1) {=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 ERROR(disk, "could not read superblock to fill out disk");=0A=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return (-1);=0A=A0=A0=A0=A0=A0= =A0=A0=A0=A0 }=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0 return (0);=0A=A0 }=0A=0A=0AOk= , so there is my error message.=A0 sbread(disk) is returning -1.=A0 If you = have a crafty eye, you'll see some really bad error handling practices comi= ng up next, because sbread() already has more meaningful errors and they ar= e overwritten by ufs_disk_fillout's generic error of "could not read".=A0 T= hose error messages should not be overwrriten!=0A=0AAnyway, sbread() is a b= it long, so it would be inappropriate to post it in its entirety, but it re= turns -1 upon tripping the following error messages defined within it on th= e respective line numbers:=0A=0A=A066=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ERROR(disk, "non-existent or truncated= superblock");=0A=A087=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ERRO= R(disk, "no usable known superblock found");=0A111=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ERROR(disk, "Failed to rea= d sb summary information");=0A=0A=0ASo unfortunately I don't know which of = the three my disk is falling in.=A0 I could try to write a stub and see?=0A= =0AI find it odd though that fsck_ff -b 32 does not have a problem with thi= s, but the code that attempts to seek the super block.... well... it looks = valid.=A0 But it could be failing on the other two?=A0 Who knows. :)=0A=0A= =0AThe drive AFAIK is good, or always was.=A0 It's file system is a bit dat= ed, heralding back to the FreeBSD 5.0 days...=0A=0A=0A=0A=0A_______________= _________________=0AFrom: "kpneal@pobox.com" <kpneal@pobox.com>=0ATo: Duckb= reath <duckbreath@yahoo.com> =0ACc: "freebsd-fs@freebsd.org" <freebsd-fs@fr= eebsd.org> =0ASent: Saturday, June 28, 2014 3:40 PM=0ASubject: Re: Mounting= a file system with superblock 32=0A=0A=0AOn Fri, Jun 27, 2014 at 08:35:49P= M -0700, Duckbreath via freebsd-fs wrote:=0A> =0A> =0A> Hello all, I have a= hard drive that represents an older installation of FreeBSD and I would li= ke to access it.=A0 Using a USB -> IDE connection device the drive appears = as:=0A> =0A> /dev/da0[x*]=A0=A0 where x* is various letters 'a', 'e', 'f', = which no doubt represent the partitions from the previous installation.=0A>= =0A> =0A> A simple mount doesn't work though, returning an error message a= bout unrecognized device.=0A=0ACan you cut-n-paste the exact command you us= ed and the exact error message?=0A=0AOh, and can you run "gpart show da0" (= or whatever the entire disk appears as)?=0A=0AAre you trying to mount the e= xact same partition as the one that fsck says=0Ais fine?=0A=0A> A simple us= age of fsck_ff however shows the file system clear,=0A> fsck_ff -b 32 /dev/= da0a returns system clean, and newfs -N will give me various facts about th= e drive (blocksize, fragment size, cylinder groups, blocks, indoes, and sec= tors).=0A=0AI don't think newfs -N is what you want. Rather, try dumpfs or = ffsinfo to=0Aget info on what is actually on the disk.=0A=0AWith newfs -N y= ou are getting what newfs would put if it hadn't been given=0Athe "-N" opti= on. Meaning, that's the "dry run" option for when creating a=0Anew filesyst= em.=0A=0A> Googling around has shown that perhaps the mdmfs utility is what= I need.=0A=0ADoubtful. I'm guessing a typo when using the mount command.= =0A=0A=0A=0A=0A> This fits my definition of non-trivial.=A0 Any of you know= how to mount a UFS1 drive?=0A=0AIt should work. Show us the command that f= ails and the message it prints=0Aif you would. That might give the clue nee= ded.=0A-- =0A"A method for inducing cats to exercise consists of directing = a beam of=0Ainvisible light produced by a hand-held laser apparatus onto th= e floor ...=0Ain the vicinity of the cat, then moving the laser ... in an i= rregular way=0Afascinating to cats,..." -- US patent 5443036, "Method of ex= ercising a cat"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1405330807.92885.YahooMailNeo>