Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Jan 2008 10:20:01 +0100
From:      michael.grunewald@laposte.net (=?iso-8859-15?Q?Micha=EBl_Gr=FCnewald?=)
To:        "Kelly Jones" <kelly.terry.jones@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Recovering data from a newfs filesystem
Message-ID:  <86abn0j1ku.fsf@Llea.celt.neu>
In-Reply-To: <26face530801191541i60740ba3g5dd5ba24dbaadf39@mail.gmail.com> (Kelly Jones's message of "Sat\, 19 Jan 2008 16\:41\:26 -0700")
References:  <26face530801191541i60740ba3g5dd5ba24dbaadf39@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Kelly Jones" <kelly.terry.jones@gmail.com> writes:

> Months ago, I got a new USB drive for my Mac OS X, did "newfs
> /dev/disk1" on it, and it's been working fine.
>
> I then foolishly did "disklabel -create /dev/disk1", which broke
> it. How can I recover my data? I've tried fsck w/ alternate
> superblocks to no avail.

Create a disk image with dd(1), connect the image to a md device with
mdconfig(8) and run a disk image analysis tool on it, like testdisk
(available from the ports). If testdisk manages to recover disk
structure and you're happy with it, you can use the corrected image
back to the USB drive with dd(1).

Creating the disk image is optional, but since you'll allow testdisk
to modifiy the data it works on, it's bet to do a copy.

You may want to test integrity of the image with sha256(1) and/or
md5(1), before running disk analysis software on it.

Notes: 1/I do not know if mdconfig(8) is available for OS-X, although
 something is likely to provide the same functionality;
       2/On Mac OS-X you may use PKGSRC (see NetBSD website) or Fink to
 install disk analysis software.
--=20
Best wishes,
Micha=EBl



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86abn0j1ku.fsf>