Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2023 07:24:57 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Graham Perrin <grahamperrin@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: gpart destroy, in depth
Message-ID:  <CANCZdfoZexT2ddX_YocTW9u-qhaD6nWoTtFd5xMWqNTbdtwWSA@mail.gmail.com>
In-Reply-To: <64e88636-1e03-7ff5-7d3f-e8a36117cdbe@freebsd.org>
References:  <64e88636-1e03-7ff5-7d3f-e8a36117cdbe@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000095986605f90f6be8
Content-Type: text/plain; charset="UTF-8"

It writes zeros to the partition table.

Warner

On Tue, Apr 11, 2023, 7:13 AM Graham Perrin <grahamperrin@freebsd.org>
wrote:

> Please: what, exactly, occurs when a partition table is destroyed by
> gpart(8)?
>
> Background: a customer was 100% certain that no data was required from a
> hard disk in an iMac that will be disposed of. I booted from a USB drive
> with FreeBSD 14.0-CURRENT, then lazily ran gpart destroy for the
> internal disk (probably ada0). A few hours later, the customer realised
> that the disk probably held a few years' worth of important emails.
>
> I don't intend to attempt recovery, or recreation of the partition
> table, but I'd like to provide enough technical information for a third
> party to advise the customer whether doing so will be economically viable.
>
> (I see files such as lib/geom/part/geom_part.c and
> sys/geom/part/g_part.c, but I have no idea how to interpret them.)
>
> Thanks
>
> <
> https://github.com/freebsd/freebsd-src/blob/main/lib/geom/part/geom_part.c
> >
>
> <https://github.com/freebsd/freebsd-src/blob/main/sys/geom/part/g_part.c>;
>
>

--00000000000095986605f90f6be8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto">It writes zeros to the partition table.<div dir=3D"auto">=
<br></div><div dir=3D"auto">Warner</div></div><br><div class=3D"gmail_quote=
"><div dir=3D"ltr" class=3D"gmail_attr">On Tue, Apr 11, 2023, 7:13 AM Graha=
m Perrin &lt;<a href=3D"mailto:grahamperrin@freebsd.org">grahamperrin@freeb=
sd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Please: what,=
 exactly, occurs when a partition table is destroyed by <br>
gpart(8)?<br>
<br>
Background: a customer was 100% certain that no data was required from a <b=
r>
hard disk in an iMac that will be disposed of. I booted from a USB drive <b=
r>
with FreeBSD 14.0-CURRENT, then lazily ran gpart destroy for the <br>
internal disk (probably ada0). A few hours later, the customer realised <br=
>
that the disk probably held a few years&#39; worth of important emails.<br>
<br>
I don&#39;t intend to attempt recovery, or recreation of the partition <br>
table, but I&#39;d like to provide enough technical information for a third=
 <br>
party to advise the customer whether doing so will be economically viable.<=
br>
<br>
(I see files such as lib/geom/part/geom_part.c and <br>
sys/geom/part/g_part.c, but I have no idea how to interpret them.)<br>
<br>
Thanks<br>
<br>
&lt;<a href=3D"https://github.com/freebsd/freebsd-src/blob/main/lib/geom/pa=
rt/geom_part.c" rel=3D"noreferrer noreferrer" target=3D"_blank">https://git=
hub.com/freebsd/freebsd-src/blob/main/lib/geom/part/geom_part.c</a>&gt;<br>
<br>
&lt;<a href=3D"https://github.com/freebsd/freebsd-src/blob/main/sys/geom/pa=
rt/g_part.c" rel=3D"noreferrer noreferrer" target=3D"_blank">https://github=
.com/freebsd/freebsd-src/blob/main/sys/geom/part/g_part.c</a>&gt;<br>
<br>
</blockquote></div>

--00000000000095986605f90f6be8--



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