docs/177431: Handbook & Announcements recommend poor dd options for memstick images

Ronald F.Guilmette rfg at tristatelogic.com
Thu Mar 28 03:50:01 UTC 2013


>Number:         177431
>Category:       docs
>Synopsis:       Handbook & Announcements recommend poor dd options for memstick images
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 28 03:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
entr0py
>Environment:

FreeBSD 9.1-RELEASE amd64

>Description:

The Handbook, as shown on this web page:

  http://www.freebsd.org/doc/en/books/handbook/bsdinstall-pre.html

recommends  dd'ing the desired (?) memstick.img file to a USB memory stick
using the following command:

	# dd if=FreeBSD-9.0-RELEASE-i386-memstick.img of=/dev/da0 bs=64k

(Please note that the specific filename mentioned here is now out-of-date
relative to the most recent -RELEASE.)

So anyway, there appear to be two things wrong with the above recommended
dd command, to wit:

     (1) the recommended dd block size of 64k is probably highly sub-optimal
         for many/most/all modern USB flash drives.  It is apparently difficult
         to find a single (minimal) block size that will provide best per-
         formance for all USB flash drives, however online sources suggest
         that a 1 MiB block size should provide excelent performance for
         most such drives (and with relatively little waste of space).

     (2) The dd command should probably also include the conv=sync option,
         just as shown in the 9.1 RELEASE Announcement.  (Otherwise it is
	 not 100% clear what will happen to the last few blocks of the
	 memstick.img file, i.e. the ones that don't fix neatly into exactly
	 `N' of the dd blocks.)

Separately and additionally, various versions of the official FreeBSD Release
Announcements, for example the version found here:

   http://www.freebsd.org/releases/9.1R/announce.html

recommend using bs=10240 when dd'ing a memstick.img file to a USB flash
device.  As noted above, this value is also probably highly sub-optimal,
and should probably be replaced (in *all* current and past Release
Announcement pages) to the value "bs=1M".

>How-To-Repeat:

Visit the two URLs mentioned above.

>Fix:

See above.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-doc mailing list