Format a USB flash drive using gpart
Thomas Mueller
mueller23 at insightbb.com
Mon Jul 9 03:27:29 UTC 2012
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
More information about the freebsd-questions
mailing list