From owner-freebsd-questions@freebsd.org Mon Jul 10 09:42:05 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 68F40DA25F4 for ; Mon, 10 Jul 2017 09:42:05 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EF6D682A9E for ; Mon, 10 Jul 2017 09:42:04 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from zero-gravitas.local (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 47950CF96 for ; Mon, 10 Jul 2017 09:42:03 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk Authentication-Results: smtp.infracaninophile.co.uk/47950CF96; dkim=none; dkim-atps=neutral Subject: Re: Unusual Question To: freebsd-questions@freebsd.org References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> From: Matthew Seaman Message-ID: Date: Mon, 10 Jul 2017 10:42:08 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ed7MQaNtSWjSnRCL6HjF2vEtoBmqdvLTC" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2017 09:42:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ed7MQaNtSWjSnRCL6HjF2vEtoBmqdvLTC Content-Type: multipart/mixed; boundary="jA5AC8MJ2iOVC1E4bTQkMm6wf1GcbDUME"; protected-headers="v1" From: Matthew Seaman To: freebsd-questions@freebsd.org Message-ID: Subject: Re: Unusual Question References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> In-Reply-To: --jA5AC8MJ2iOVC1E4bTQkMm6wf1GcbDUME Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2017/07/10 10:34, Matthew Seaman wrote: > On 2017/07/09 10:57, Doug Hardie wrote: >> I have a FreeBSD 9.3 remote server that needs to be purged. I know >> that rm -rf / will remove all the directory entries, but I need to >> write over the drive. I thought that dd if=3D/dev/zero of=3D/dev/ada0= >> might do the trick, but it gives an not permitted error. The whole >> thing can crash and burn at the end. This is an unmanned site so >> moving drives is not viable. >=20 > I'd do this by usinf dd(1) but slightly more carefully. You need a > small, temporary, bootable partition that contains dd(8). This could b= e > either by booting from install media -- although as you say, the machin= e > is in an unmanned location so that may not be feasible -- or you could > possibly re-purpose an existing swap partition. You can then zero out > each of the other partitions /dev/ada0p1 etc on your drive -- the idea > being not to try and delete the OS you're running from, as that will > likely crash in the middle and leave things half deleted. >=20 Um.. to clarify. The temporary partition should contain /not only/ dd(8) but also at minimum /all the other basic stuff the system needs to boot into a single user shell/ -- given you haven't got a remote console, then you'ld all the stuff so you could configure it with networking and bring it up multiuser. Cheers, Matthew --jA5AC8MJ2iOVC1E4bTQkMm6wf1GcbDUME-- --ed7MQaNtSWjSnRCL6HjF2vEtoBmqdvLTC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJZY0vwXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnpY8P/jNrYIeDMapXdGMFIjXKYRen ETFJn8knt8075Oa7QSJupuG6qKvI7cAavcQNf1c5Z0Zg2ukSH21DHBOMD8CAg9M8 /u5/k+wdnzev48OWg+DkqZ9lLOy3tmeocM1T2MYIX8rx57kl7fagnEUknc8YszOR tGjbxDXhD9Pn14Atov4aOUYmquuk6rxkf0jPZGzDLkQI/Iq9yx332DgcB/6EnTpu 4RTM+wvAdX5lqi6Eyr1bV2ayiyUDz6EVn8ySW1+ku/AVcNq5bibMIUVkZqLdWjrO wemxUCYCxUPWbB81K17yFTKNn5Ku+YHUK0X7x+luK38pFcuIPMi6hg76v7rr55Tx zPdsBZUD5vfGx37FUHiykXz5IwI3rLKvR6mIqOtDWzg4gy2u0rDWtEowUR3OUSDL ctQkNMLily1iTw7qsjioPPl9usYz401vCQDbaAxJDF6oRpLTfWtWa2avkc8IezYR OhYwnIq3VLz0QfqpTcKRfaod5pA4HSc+8jeB1QcHQMiMpPEB6HtgjcRKahA/kRXa 5dnSrgW0DeJrO9ugHZbturawTEtMyqjXUV//QgOqK763dSiJiAQQiLyQCKO7PN9u 7+ZucdnHVgcUuotDud7p7IsXEpgpzmOYlq//plAg6bHWXidzmyUvGW+e96ux3Vpa qEEdkc9nBQWbrfUOmRyh =5b2H -----END PGP SIGNATURE----- --ed7MQaNtSWjSnRCL6HjF2vEtoBmqdvLTC--