From owner-freebsd-questions@FreeBSD.ORG Thu Oct 6 21:24:10 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53A9316A420 for ; Thu, 6 Oct 2005 21:24:10 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from bristolsystems.com (h-68-167-239-98.lsanca54.covad.net [68.167.239.98]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4736743D55 for ; Thu, 6 Oct 2005 21:24:07 +0000 (GMT) (envelope-from gayn.winters@bristolsystems.com) Received: from workdog ([192.168.1.201]) by bristolsystems.com (8.11.6/8.11.6) with ESMTP id j96LO7n22242; Thu, 6 Oct 2005 14:24:07 -0700 From: "Gayn Winters" To: "'Bill Schmitt \(SW\)'" Date: Thu, 6 Oct 2005 14:23:10 -0700 Message-ID: <003501c5cabc$46575c80$c901a8c0@workdog> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <43458612.9040809@schmittnet.com> Cc: questions@freebsd.org Subject: RE: Restoring Data from a DD image X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gayn.winters@bristolsystems.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 21:24:10 -0000 > -----Original Message----- > From: Bill Schmitt (SW) [mailto:software@schmittnet.com] > Sent: Thursday, October 06, 2005 1:16 PM > To: gayn.winters@bristolsystems.com > Cc: questions@freebsd.org > Subject: Re: Restoring Data from a DD image > > > Gayn Winters wrote: > > >>-----Original Message----- > >>From: owner-freebsd-questions@freebsd.org > >>[mailto:owner-freebsd-questions@freebsd.org] On Behalf Of > >>Bill Schmitt (SW) > >>Sent: Thursday, October 06, 2005 11:11 AM > >>To: questions@freebsd.org > >>Subject: Restoring Data from a DD image > >> > >> > >>I've just replaced a hard disk that was dying fast. I've > done a full > >>installation of 4.9 (later releases won't install, which I've > >>submitted > >>a problem report on already). The old disk is connected but > >>not mounted. > >>Searching around, I found some suggestions to try to read the > >>old disk > >>to restore what I can and I used dd to copy what could be found (dd > >>-if=/dev/ad0s1e of=/usr/olddsk/oldimag.dmg > conv=noerror,sync) and it > >>seems to have copied the file. Now, I'm a little stuck. Can > >>someone help > >>me understand how do I mount that image somewhere to browse > >>it and copy > >>what I can from it? If I'm not going about this the right way, I'd > >>appreciate other suggestions > >> > >> > >> > > > >I'm a little confused: > > > >Did you try to copy (dd) the old disk before you did a new install? > >If so, to where? > > > >Is /dev/ad0 your new disk with the fresh 4.9 installation on > ad0s1? Or > >did you just add a new disk as /dev/ad1 and did the fresh install on > >ad1s1? > > > >Is your unmounted old disk /dev/ad0 or /dev/ad1 now? > > > >I'm guessing that ad1 is your new install, ad0 is not > mounted, and you > >were able to copy ad0s1e to oldimag.dmg with the above dd > command. If > >so, continue. If not, send a correction. > > > >Why not try > > mount -r -t ufs /usr/olddsk/oldimag.dmg /mnt > > cd /mnt > > ls > > > >I ***think*** mount will do this. If not, try dd'ing > oldimag.dmg to a > >spare slice, e.g. if you created /tmp as /dev/ad1s1e, then you could > > dd if=/usr/olddsk/oldimag.dmg of=/dev/ad1s1e > > cd /tmp > > ls > > > >Good luck! > > > >-gayn > > > Sorry, when I first decided to try FreeBSD, I had a 4.7GB as > the primary > on ad0 and moved usr to ad1 when I added the drive that > ultimately went > bad (a 60GB) as ad1. When I had to do a full installation > again, I put a > new drive (80GB) into place where the 4.7GB drive was and > started from > scratch with ad1 disabled. So, now I'm booting from the new drive and > have used dd to copy whatever is found on the damaged ad1 to > an image on > ad0. It's after that I get stuck. I've looked at the man page > for mount, > but I haven't seen anything specific to an image. I tried your > suggested mount command, but it responded "Block device required". I > suppose I can try to dd back to the 4.7GB drive that I would > now mount > as ad1. We'll see what happens. > > Thanks, > > Bill > As Joe S suggests, use mdconfig or vnconfig to create the block device, then mount works. (I tried it with mdconfig using 5.4.) Dd'ing to a spare slice or partition will surely work as well. -gayn