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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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> > > [-- Attachment #2 --] <div dir="auto">It writes zeros to the partition table.<div dir="auto"><br></div><div dir="auto">Warner</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 11, 2023, 7:13 AM Graham Perrin <<a href="mailto:grahamperrin@freebsd.org">grahamperrin@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin: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 <br> hard disk in an iMac that will be disposed of. I booted from a USB drive <br> 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' worth of important emails.<br> <br> I don't intend to attempt recovery, or recreation of the partition <br> table, but I'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> <<a href="https://github.com/freebsd/freebsd-src/blob/main/lib/geom/part/geom_part.c" rel="noreferrer noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/blob/main/lib/geom/part/geom_part.c</a>><br> <br> <<a href="https://github.com/freebsd/freebsd-src/blob/main/sys/geom/part/g_part.c" rel="noreferrer noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/blob/main/sys/geom/part/g_part.c</a>><br> <br> </blockquote></div>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoZexT2ddX_YocTW9u-qhaD6nWoTtFd5xMWqNTbdtwWSA>
