From owner-freebsd-questions@FreeBSD.ORG Fri Aug 20 14:32:33 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC8E716A4CE for ; Fri, 20 Aug 2004 14:32:32 +0000 (GMT) Received: from mail.u4eatech.com (blackhole.u4eatech.com [195.188.241.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28A3943D1D for ; Fri, 20 Aug 2004 14:32:32 +0000 (GMT) (envelope-from richard.williamson@u4eatech.com) Received: by mail.u4eatech.com (Postfix, from userid 503) id 1A1DD360331; Fri, 20 Aug 2004 15:32:31 +0100 (BST) Received: from apus.u4eatech.com (apus.degree2.com [172.30.40.129]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by mail.u4eatech.com (Postfix) with ESMTP id A6EDF3602F3; Fri, 20 Aug 2004 15:32:27 +0100 (BST) Message-Id: <6.1.2.0.2.20040820150157.027c7920@cygnus> X-Sender: richard@cygnus X-Mailer: QUALCOMM Windows Eudora Version 6.1.2.0 Date: Fri, 20 Aug 2004 15:36:54 +0100 To: Warren Block , freebsd-questions@freebsd.org From: "Richard P. Williamson" In-Reply-To: <20040820074543.E1899@wonkity.com> References: <6.1.2.0.2.20040820135438.027c77d8@cygnus> <20040820074543.E1899@wonkity.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on mail X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.64 Subject: Re: vnconfig and a compact flash disk image X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 14:32:33 -0000 At 14:49 20/08/2004. Warren Block had this to say: >On Fri, 20 Aug 2004, Richard P. Williamson wrote: > >>But how can I mount it? The format is a 28Mb slice (a) and a 4Mb >>slice (e). I've tried >>vnconfig vn0 sanDisk.32Mb.image >>and >>vnconfig vn0a sanDisk.32Mb.image >>but fdisk tells me 'invalid superblock' when pointed at /dev/vn0[a]. > >See the example of how to mount an ISO CD image in the examples section of the vnconfig man page; it should be the same, except the filesystem type will be msdos. > >How to deal with the two partitions, I'm not sure. If you do the math just right, you should be able to dd each to a different file. msdos? Ok, that confuses me. The flash card isn't msdos compatible (or shouldn't be). According to fdisk, it is 165, which is the way it was created: venus# vnconfig vn0 san32.img venus# fdisk /dev/vn0 fdisk: can't get disk parameters on /dev/vn0; supplying dummy ones ******* Working on device /dev/vn0 ******* parameters extracted from in-core disklabel are: cylinders=1 heads=1 sectors/track=1 (1 blks/cyl) parameters to be used for BIOS calculations are: cylinders=1 heads=1 sectors/track=1 (1 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165,(FreeBSD/NetBSD/386BSD) start 32, size 62688 (30 Meg), flag 80 (active) beg: cyl 0/ head 1/ sector 1; end: cyl 489/ head 3/ sector 32 The data for partition 2 is: The data for partition 3 is: The data for partition 4 is: venus# The output is the same regardless if it is an image created by dd'ing /dev/ad8 or /dev/rad8 (which is how I'm getting the "san32.img" off the flash card in the first place). The 'can't get disk parameters' worries me. Does dd if=/dev/rad8 of=san32.img not do what I think? If I fsck -b 16 /dev/rvn0, I get something that is almost sane: venus# fsck -b 16 /dev/rvn0a Alternate super block location: 16 ** /dev/rvn0a ** Last Mounted on /flashb <-- that is correct! ** Phase 1 - Check Blocks and Sizes 1179403647 BAD I=10 UNEXPECTED SOFT UPDATE INCONSISTENCY 151060737 BAD I=10 etc, ad nauseum. I'm hoping I won't need to disassemble the file, because it is possible that we'll be moving to a different flash card, size or manufacturer at some point in the future (like when you can't buy 32Mb flash cards, any more, hrmph). I'd really like to have a way to mount both slices without having to 'do the math' more than once for each card type, rather than for each card image. And if I do need to disassemble the card image, how to put it back together again? Tricksy. Thanks for your answer, rip