From owner-freebsd-questions@FreeBSD.ORG Mon Jul 9 10:26:26 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 306681065670 for ; Mon, 9 Jul 2012 10:26:26 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [89.206.35.99]) by mx1.freebsd.org (Postfix) with ESMTP id 76A3B8FC19 for ; Mon, 9 Jul 2012 10:26:25 +0000 (UTC) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5) with ESMTP id q69AQLp6041416; Mon, 9 Jul 2012 12:26:21 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.5/8.14.5/Submit) with ESMTP id q69AQKSR041413; Mon, 9 Jul 2012 12:26:20 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Mon, 9 Jul 2012 12:26:20 +0200 (CEST) From: Wojciech Puchar To: Polytropon In-Reply-To: <20120709121608.1bce238e.freebsd@edvax.de> Message-ID: References: <47.B3.06836.B9F4AFF4@smtp02.insight.synacor.com> <20120709121608.1bce238e.freebsd@edvax.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (wojtek.tensor.gdynia.pl [127.0.0.1]); Mon, 09 Jul 2012 12:26:21 +0200 (CEST) Cc: Carmel , Thomas Mueller , freebsd-questions@freebsd.org Subject: Re: Format a USB flash drive using gpart X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 10:26:26 -0000 > If you're talking about an MS-DOS disk, then yes, it contains > a DOS partition which is formatted. In FreeBSD, we would call > it a slice (slice == "DOS primary partition"). In this case, > there is no (sub)partitioning, the _slice_ carries the MS-DOS unless you need windows 98 support partitionless USB drives works absolutely fine clear it out dd if=/dev/zero of=/dev/da0 bs=64k count=1 format newfs_msdos /dev/da0 >> Same question for CDs? > > Not sure. A CD contains an ISO-9660 file system without an > enclosing partition per se. > In FreeBSD (as well as NetBSD, OpenBSD, maybe linux) CD is just block device. You may make disklabel on it, and whatever you like. In excuse of OS (windows) CD/DVD MUST BE CD9660 or UDF formatted without partitions. You may record NTFS formatted DVD, perfectly readable on FReeBSD, unreadable under windows in spite it is windows native filesystem. ------ You may actually make "hybrid" DVD that will show whatever you want under windoze, and have real data in tar format. below the recipe: 1) prepare windows-vizible layout, all needed viruses and autorun.inf in some directory and do mkisofs -J -q .|dd of=/path/to/tempfile bs=512 skip=1 2) tar cf - /path/to/tempfile ...list of what you want to be tarred...|growisofs -dvd-compat -Z /dev/cd0=- now use tar to read files from that DVD, while in windows it will run viruses properly. >> a virtual partition? > > As devices and "real files" are "quite the same", you can mount > a file system that is contained in a file. You typically do this > when doing data recovery and forensic analysis, where your starting > point is an image file of a disk, a slice or a partition. You > then "connect" it to a virtual node (vnconfig - e. g. md0) and vnconfig is quite in old FreeBSD today it is mdconfig