Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Oct 2005 12:05:03 -0700
From:      "Gayn Winters" <gayn.winters@bristolsystems.com>
To:        "'Bill Schmitt \(SW\)'" <software@schmittnet.com>, <questions@freebsd.org>
Subject:   RE: Restoring Data from a DD image
Message-ID:  <002101c5caa8$e0b39870$c901a8c0@workdog>
In-Reply-To: <434568BB.9090904@schmittnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> -----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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002101c5caa8$e0b39870$c901a8c0>