From owner-freebsd-stable@FreeBSD.ORG Thu Aug 23 16:56:42 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9FB016A46B for ; Thu, 23 Aug 2007 16:56:42 +0000 (UTC) (envelope-from mike@jellydonut.org) Received: from mail2.secureworks.net (mail2.secureworks.net [65.114.32.154]) by mx1.freebsd.org (Postfix) with ESMTP id C1FD213C461 for ; Thu, 23 Aug 2007 16:56:40 +0000 (UTC) (envelope-from mike@jellydonut.org) Received: from localhost (localhost [127.0.0.1]) by mail2.secureworks.net (Postfix) with ESMTP id C3F5F170DA for ; Thu, 23 Aug 2007 12:56:39 -0400 (EDT) X-Virus-Scanned: amavisd-new at secureworks.net Received: from mail2.secureworks.net ([127.0.0.1]) by localhost (mail2.secureworks.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 73V-sTFO6-zg for ; Thu, 23 Aug 2007 12:56:39 -0400 (EDT) Received: from descartes.internal.secureworks.net (mole1.secureworks.net [63.239.86.3]) by mail2.secureworks.net (Postfix) with ESMTP id 50AA5170C9 for ; Thu, 23 Aug 2007 12:56:39 -0400 (EDT) Message-ID: <46CDBC47.8060507@jellydonut.org> Date: Thu, 23 Aug 2007 12:56:39 -0400 From: Michael Proto User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.6) Gecko/20070806 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: FreeBSD stable References: <46C488EC.5090609@jellydonut.org> In-Reply-To: <46C488EC.5090609@jellydonut.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: update from RELEASE to STABLE changed /dev/ad or geom behavior? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2007 16:56:43 -0000 Michael Proto wrote: > Hello all, > > To fix a bug in PF I recently updated my home firewall platform (a > shrunk-down install of FreeBSD 6 on a CompactFlash card mounted > read-only as /dev/ad0a) from the RELENG_6_2 to the RELENG_6 branch. All > went very well there and the PF problem is resolved, but now I've run > across a new issue. > > Previously, when updating my CompactFlash image "in the field", I would > boot the system into single-user mode via serial console, setup a small > memory filesystem big enough to hold gzip, dd, and reboot (and their > required libraries, with LD_LIBRARY_FLAGS set appropriately), copy the > new flash image to the mfs, and run (from the MFS) "gzip -dc | dd of=/dev/ad0 bs=8k" and then run "reboot -lnq" to reboot into the > new image. > > This all worked well and good until the update to RELENG_6, and now I > see the following when I try to dd the new image: > > # sysctl kern.geom.debugflags=16 > kern.geom.debugflags: 0 -> 16 > > # gzip -dc dd: /dev/ad0: Invalid argument > 298+1 records in > 298+0 records out > 1220608 bytes transferred in 1.330433 secs (917452 bytes/sec) > > > With the above kern.geom.debugflags sysctl, I thought I would have the > ability to directly write to /dev/ad0 via dd, and this was the case with > RELENG_6_2. Is this no longer the case? Didn't see anything in > /usr/src/UPDATING to indicate any sort of change, and I'm not sure where > in the RELENG_6 code this would exist (GEOM perhaps)? > > Anyone have any ideas or suggestions as to why this doesn't work anymore? > I found a solution to this problem that I'd like to share with the list. Here's my problem: # gzip -dc