creating filesystem images

David Kelly dkelly at hiwaay.net
Wed Aug 24 20:27:31 GMT 2005


On Wed, Aug 24, 2005 at 10:47:06AM -0700, Gary W. Swearingen wrote:
> David Kelly <dkelly at hiwaay.net> writes:
> 
> > The advantage of dump/restore is that only the necessary data is
> > written. With dd all the unused blocks on the media are also written,
> > including the filesystem, which will probably work on the larger card.
> 
> If you don't mind educating me further for no particular need...
> 
> I've long known about the UNIX concept of everything being a string of
> bytes, but came to the conclusion early in my Linux days that disks
> couldn't be used as a filesystem after a "dd" unless their cylinders
> were the same size (or maybe it was just tracks).  Has this all gone
> away with FreeBSD's removal of "block devices" and/or with LBA disks?

When I last did any significant amount of FreeBSD-on-CF, FreeBSD was at
4.6 and I think the CF card hooked in on the SCSI drivers.

In any case, back then I had no problems block copying a 32MB CF onto a
256MB CF, boot blocks, partition table, and everything so long as one
didn't mind losing everything over 32MB. What I did have problems with
is a few 256MB CF's in a lot which were externally identical to the
others but a handful of blocks shorter. Thats when I nuked the dd
procedure I had inherited and replaced with a script which started with
newfs. Newfs was smart enough to detect the size and do the right thing.

Yes, tar and/or pax are not able to copy/restore the special BSD flags
which dump/restore does. I think I used mtree to beat my final CF image
into the desired shape, permissions, owner/group, and BSD flags.

-- 
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.


More information about the freebsd-questions mailing list