From owner-freebsd-mobile@FreeBSD.ORG Sun Jun 29 18:14:58 2014 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D063B13 for ; Sun, 29 Jun 2014 18:14:58 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0020F2D81 for ; Sun, 29 Jun 2014 18:14:57 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s5TIEtCj060553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 29 Jun 2014 12:14:55 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s5TIEtIS060550; Sun, 29 Jun 2014 12:14:55 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sun, 29 Jun 2014 12:14:55 -0600 (MDT) From: Warren Block To: Ian Smith Subject: Re: bootable CD-ROM image to memstick image? In-Reply-To: <20140630015422.M50382@sola.nimnet.asn.au> Message-ID: References: <20140629205303.L50382@sola.nimnet.asn.au> <20140630015422.M50382@sola.nimnet.asn.au> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sun, 29 Jun 2014 12:14:55 -0600 (MDT) Cc: freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2014 18:14:58 -0000 On Mon, 30 Jun 2014, Ian Smith wrote: > On Sun, 29 Jun 2014 08:03:45 -0600, Warren Block wrote: > > > > > > Possibly the update program and data is in the El Torito floppy image. I've > > > converted floppy images to boot CDs, but not the other way. This might > > > help: http://arstechnica.com/civis/viewtopic.php?f=16&t=308491 > > Indeed, based on that and finding isoinfo already installed, I just ran > it and was about ready to come back with more questions, when .. ding: > > > And based on that: > > > > % isoinfo -d -i 6duj48us.iso > > Setting input-charset to 'ISO8859-1' from locale. > > CD-ROM is in ISO 9660 format ... > > Eltorito defaultboot header: > > Bootid 88 (bootable) > > Boot media 4 (Hard Disk Emulation) > > Load segment 7C0 > > Sys type 6 > > Nsect 1 > > Bootoff 1B 27 > > Well that matches my copy. Did you just have one lying around? :) First result on a search for 6duj48us.iso. Turns out using unique, unreadable filenames has benefits! And I was curious how they fit a multi-megabyte firmware update onto a floppy image. Apparently El Torito allows for either floppy or hard drive image. > > % dd if=6duj48us.iso of=zoot.img bs=2048 skip=27 count=75744 > > 19126+0 records in > > 19126+0 records out > > 39170048 bytes transferred in 0.063829 secs (613672181 bytes/sec) > > > > That file is a 37M MBR hard drive image. Copying it straight to a memory > > stick ought to work. > > Using skip=27 does indeed start at the loader, with the DOS 6.0 MBR at > 0x4000 after 16KiB zeroes. > > I was confused by count=75744, some 148MiB at 2K sectors, but count is > ignored unless less than filesize anyway, so any larger value - or no > value at all - works, great, but then our record counts don't agree: I did that once for real and then again to document it, and probably forgot the skip the second time. > Pressing on, plugging in a spare stick: > > root@x200:~ # dd if=6duj48us.img of=/dev/da0 bs=2048 conv=sync > 19099+0 records in > 19099+0 records out > 39114752 bytes transferred in 24.952938 secs (1567541 bytes/sec) No need to stick to 2K block sizes after the image has been read off CD. Using 64K or 128K there will usually give a faster write than smaller sizes. > Cool! I'll have to backup some stuff before trying it, manyana. Good luck!