Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2012 12:26:20 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Polytropon <freebsd@edvax.de>
Cc:        Carmel <carmel_ny@hotmail.com>, Thomas Mueller <mueller23@insightbb.com>, freebsd-questions@freebsd.org
Subject:   Re: Format a USB flash drive using gpart
Message-ID:  <alpine.BSF.2.00.1207091218260.41391@wojtek.tensor.gdynia.pl>
In-Reply-To: <20120709121608.1bce238e.freebsd@edvax.de>
References:  <47.B3.06836.B9F4AFF4@smtp02.insight.synacor.com> <20120709121608.1bce238e.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1207091218260.41391>