From owner-freebsd-questions@FreeBSD.ORG Sat May 2 05:50:37 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36D31A32 for ; Sat, 2 May 2015 05:50:37 +0000 (UTC) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE1A11075 for ; Sat, 2 May 2015 05:50:36 +0000 (UTC) Received: from r56.edvax.de (port-92-195-64-237.dynamic.qsc.de [92.195.64.237]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id D2CB624D39; Sat, 2 May 2015 07:44:09 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t425i8O2002046; Sat, 2 May 2015 07:44:08 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 2 May 2015 07:44:08 +0200 From: Polytropon To: "William A. Mahaffey III" Cc: "FreeBSD Questions !!!!" Subject: Re: How to restore a USB drive converted to bootable Message-Id: <20150502074408.75b91059.freebsd@edvax.de> In-Reply-To: <5543FAA3.7050907@hiwaay.net> References: <5543FAA3.7050907@hiwaay.net> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 May 2015 05:50:37 -0000 On Fri, 01 May 2015 17:20:10 -0453, William A. Mahaffey III wrote: > I am about to do some OS installs (NetBSD & OpenBSD, as it happens) on > boxen under construction. I would also like to use UBCD on a flash drive > to memcheck those boxen prior to installation. If I prep a USB thumb > drive as either a bootable UBCD drive or an over-the-WWW installer, I > wipe out the drive for its original use. Is there a way to restore the > drive back to its original functionality if I wanted to ? This is quite simple: Just erase the first few MBs (which is already overkill) of the USB drive. You can do this with on-board means (no need to install anything): # dd if=/dev/zero of=/dev/da0 bs=1m count=1 Make _definitely_ sure that da0 is your USB drive before you enter the command. This will wipe the partition table and boot sector, so the drive appears as non-formatted. If you wish, you can then add a FAT partition, bsdlabel-style partitions, a UFS file system, or "raw" tar data, whatever you need. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...