From owner-freebsd-questions@freebsd.org Tue Dec 27 19:32:10 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7669C93C74 for ; Tue, 27 Dec 2016 19:32:10 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: from cosmo.uchicago.edu (cosmo.uchicago.edu [128.135.20.71]) by mx1.freebsd.org (Postfix) with ESMTP id B6F3E146E for ; Tue, 27 Dec 2016 19:32:10 +0000 (UTC) (envelope-from galtsev@kicp.uchicago.edu) Received: by cosmo.uchicago.edu (Postfix, from userid 48) id 8D8B3CB8CA6; Tue, 27 Dec 2016 13:32:09 -0600 (CST) Received: from 128.135.52.6 (SquirrelMail authenticated user valeri) by cosmo.uchicago.edu with HTTP; Tue, 27 Dec 2016 13:32:09 -0600 (CST) Message-ID: <25327.128.135.52.6.1482867129.squirrel@cosmo.uchicago.edu> In-Reply-To: <20161227190844.fdc2390f.freebsd@edvax.de> References: <1482841113.1239624.830388025.494E966F@webmail.messagingengine.com> <20161227190844.fdc2390f.freebsd@edvax.de> Date: Tue, 27 Dec 2016 13:32:09 -0600 (CST) Subject: Re: Fwd: dd -bs=BYTES read and write up to BYTES at a time system -invalid number 1m #### dd if=FreeBSD-11-RELEASE-amd64-memstick.img of=/dev/sdb1 bs=1M conv=sync From: "Valeri Galtsev" To: "Polytropon" Cc: "swjatoslaw gerus" , freebsd-questions@freebsd.org Reply-To: galtsev@kicp.uchicago.edu User-Agent: SquirrelMail/1.4.8-5.el5.centos.7 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2016 19:32:10 -0000 On Tue, December 27, 2016 12:08 pm, Polytropon wrote: > On Tue, 27 Dec 2016 13:18:33 +0100, swjatoslaw gerus wrote: >> >> >> >> dd help ....dd -bs=BYTES read and write up to BYTES at a time >> >> system -invalid number 1m #### > > On systems that do not support size suffixes (such as > Linux dd might), you need to "manually multiply", for > example: > > dd if= of= bs=1024k > > Or, if the "k" suffix isn't supported, > > dd if= of= bs=1048576 > > Note that this unit has to be converted as 2^10 = 2014 > (instead of 10^3 = 1000). See "man dd" to check what > your version of dd implements. > To add to that: note that power of 2 is always a good idea. With block devices matching _some_ number of blocks is always beneficial as, if bs= "number of block + some fraction of block", then beginning from second "count" there will be extra transfers to block device (even though the result of dd will be OK, you are making it slower). The vital where you _should_ use "bs=2048" is when you dump a track of CD/DVD. (especially when doing recovery of badly damaged CD, then few extra options are a must to make exact sector for sector copy or bit for bit, even though in some unreadable areas they are are filled with zeroes). The last is due to fact fact that data sector size it equal to 2048 on CD or DVD (think in the terms of 12 bit integer, they probably expected poor programming, thus likely used 12 bit integer (11 bit value + 1 bit sign) as opposed to 12 bit unsigned integer; but note, I'm just guessing here). I'm sure someone will add more details or correct me if I got something wrong here. Valeri > > >> fdisk -l >> system dev/sdb1 (new Sandisk ultrafit 16 gb) >> >> dd if=FreeBSD-11-RELEASE-amd64-memstick.img of=/dev/sdb1 bs=1M >> conv=sync >> system -invalid number 1m #### > > The command is correct, just adjust the bs= parameter accordingly. > > > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > ++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++