From owner-freebsd-questions@FreeBSD.ORG Mon Jul 9 03:27:29 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 CC6A81065670 for ; Mon, 9 Jul 2012 03:27:29 +0000 (UTC) (envelope-from mueller23@insightbb.com) Received: from mail.insightbb.com (smtp.insight.synacor.com [208.47.185.22]) by mx1.freebsd.org (Postfix) with ESMTP id 805388FC19 for ; Mon, 9 Jul 2012 03:27:29 +0000 (UTC) X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=1.1 cv=z5JnbuUV59w9XxpMO3Yhc9aVbWy8YmjdXuO1Tcff/LU= c=1 sm=0 a=rIqdQNP2logA:10 a=jLN7EqiLvroA:10 a=Fr8x0r-PAAAA:8 a=iD2x9U8v5eneN-rfmlUA:9 a=p91V9-deMQsA:10 a=Q/oqmR4JO1zR3vNQamCQeQ==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp02.insight.synacor.com smtp.mail=mueller23@insightbb.com; spf=softfail; sender-id=softfail Authentication-Results: smtp02.insight.synacor.com header.from=mueller23@insightbb.com; sender-id=softfail Received-SPF: softfail (smtp02.insight.synacor.com: transitional domain insightbb.com does not designate 74.134.26.53 as permitted sender) Received: from [74.134.26.53] ([74.134.26.53:60802] helo=localhost) by mail.insightbb.com (envelope-from ) (ecelerity 2.2.2.40 r(29895/29896)) with ESMTP id 47/B3-06836-B9F4AFF4; Sun, 08 Jul 2012 23:27:23 -0400 Date: Sun, 08 Jul 2012 23:27:23 -0400 Message-ID: <47.B3.06836.B9F4AFF4@smtp02.insight.synacor.com> From: "Thomas Mueller" To: freebsd-questions@freebsd.org Cc: Carmel , Polytropon 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 03:27:29 -0000 On Sat, 07 Jul 2012 17:45:17 -0400, Thomas Mueller wrote: > Does a USB flash drive also work as a giant floppy, no partitions? > Can you make a flash drive bootable when nonpartitioned and > formatted that way? Polytropon responded: > Yes, that's exactly what my advice was aiming to, but let's > try to keep the terminology clean: You cannot do without > partitions. A partition carries a file system. > You _can_ do without slices. A slice holds one or more partitions. > A slice is a "DOS primary partition". Omitting it is called > "dedicated mode". There may be some circumstances where a > dedicated disk doesn't boot. Personally I haven't met one, > but it's still possible due to BIOSes expecting MS-DOS-alike > structures. > For the file system side, it's just a matter of having > created one partition covering the whole disk, newfs and > tunefs it, and install the boot code. Wojciech Puchar did > already explain how this works and which tools are involved. > However, there _is_ a way to make a "giant floppy without a > file system" (as you said without partitions, and I'll take > that literally): You can use tar, "the universal file system > that isn't a file system" to write data to the USB stick. > Writing stuff: > # tar cf /dev/da0 /my/files > Reading stuff: > # tar xf /dev/da0 > This works, but it may appear that no other system can read it. > If you consider using it for FreeBSD only, no problem. The big > advantage: You don't need to mount and umount the stick. > I'm assume _that_ construct cannot be booted. You mean the non-subdivided 1.44 MB or other capacity of a floppy is called a partition? Same question for CDs? One does not usually think of something that can't be created by subdividing as a partition. Also, a file system can be contained in an image file. Or is this a virtual partition? Might # tar xf /dev/da0 work in other BSDs or even other (quasi-)Unixes including Linux, using the appropriate device name where applicable in place of da0? While that particular construst could probably not be booted, it is possible to boot from a floppy or image file that does not contain a file system. Some of the disk images on the System Rescue CD (sysresccd.org) are not viewable/mountable as file systems. Tom