From owner-freebsd-questions@freebsd.org Fri Jul 14 07:45:32 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 C4F68D999D8 for ; Fri, 14 Jul 2017 07:45:32 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.home.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fileserver.home.qeng-ho.org", Issuer "fileserver.home.qeng-ho.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 45DDF804F1 for ; Fri, 14 Jul 2017 07:45:31 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.home.qeng-ho.org (8.15.2/8.15.2) with ESMTP id v6E7QoG1023264; Fri, 14 Jul 2017 08:26:50 +0100 (BST) (envelope-from freebsd@qeng-ho.org) Subject: Re: Unusual Question To: Doug Hardie , David Christensen Cc: freebsd-questions@freebsd.org References: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> From: Arthur Chance Message-ID: <0ccfaae9-6fdb-adfa-71b2-5dd3978f41b3@qeng-ho.org> Date: Fri, 14 Jul 2017 08:26:50 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit 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: Fri, 14 Jul 2017 07:45:32 -0000 On 14/07/2017 07:11, Doug Hardie wrote: > >> On 13 July 2017, at 21:44, David Christensen wrote: >> >> On 07/09/17 02: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=/dev/zero of=/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. >> >> If the machine has BIOS and the system drive isn't too large, write an assembly program that fits into the MBR bootstrap code area to wipe the rest of the drive, assemble the program, write it into the MBR, and reboot. >> >> >> Bonus: the program deletes the MBR when done wiping the rest of the drive. > > Neat idea, but I have a number of these systems and they all use different disk drives. That would be a lot of work writing drivers for each type. How about using the BIOS extended write sector call (INT 13h, AH=43h) in your code? That should be portable. -- An amusing coincidence: log2(58) = 5.858 (to 0.0003% accuracy).