From owner-freebsd-fs@FreeBSD.ORG Mon Jul 14 09:43:48 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12CCB693 for ; Mon, 14 Jul 2014 09:43:48 +0000 (UTC) Received: from nm13-vm4.bullet.mail.ne1.yahoo.com (nm13-vm4.bullet.mail.ne1.yahoo.com [98.138.91.173]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA15E23DF for ; Mon, 14 Jul 2014 09:43:47 +0000 (UTC) Received: from [98.138.100.103] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 14 Jul 2014 09:40:07 -0000 Received: from [98.138.101.179] by tm102.bullet.mail.ne1.yahoo.com with NNFMP; 14 Jul 2014 09:40:07 -0000 Received: from [127.0.0.1] by omp1090.mail.ne1.yahoo.com with NNFMP; 14 Jul 2014 09:40:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 312048.88479.bm@omp1090.mail.ne1.yahoo.com Received: (qmail 52069 invoked by uid 60001); 14 Jul 2014 09:40:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1405330807; bh=hczx8qQ4PY+JU/4bdJd+bJgJAvDM3Ol2MuVPFZUDQBQ=; h=References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IFGzNV59R4xM+04ZgwaRc4kE83pUZ3Bphcc9Yq9Q4VVQKpoPsIKAcV65CcFyKPpAorDE9OwRnSCfwgiUWRrvk4uqDqeka8hQbbURtwHGk4qYhuVp9yIf72vYid80lQFJ6wQrk9t33+tLqoNEtQuJdpTnN4ndx2l2KUmXCimv/b0= X-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yYmxvY2sBMAEBAQE- X-Mailer: YahooMailWebService/0.8.194.680 References: <1403926549.37922.YahooMailNeo@web120905.mail.ne1.yahoo.com> <20140628224020.GB68178@neutralgood.org> Message-ID: <1405330807.92885.YahooMailNeo@web120906.mail.ne1.yahoo.com> Date: Mon, 14 Jul 2014 02:40:07 -0700 From: Duckbreath Reply-To: Duckbreath Subject: Re: Mounting a file system with superblock 32 To: "kpneal@pobox.com" In-Reply-To: <20140628224020.GB68178@neutralgood.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-fs@freebsd.org" X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 09:43:48 -0000 =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" =0ATo: Duckb= reath =0ACc: "freebsd-fs@freebsd.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"