From owner-freebsd-small@FreeBSD.ORG Tue Mar 22 23:53:19 2005 Return-Path: Delivered-To: freebsd-small@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC13016A4CE for ; Tue, 22 Mar 2005 23:53:19 +0000 (GMT) Received: from phuket.psconsult.nl (ps226.psconsult.nl [213.222.19.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 536CA43D4C for ; Tue, 22 Mar 2005 23:53:17 +0000 (GMT) (envelope-from fb-small@psconsult.nl) Received: from phuket.psconsult.nl (localhost [127.0.0.1]) by phuket.psconsult.nl (8.12.8p2/8.12.8) with ESMTP id j2LKOsxk040068; Mon, 21 Mar 2005 21:24:54 +0100 (CET) (envelope-from fb-small@psconsult.nl) Received: (from paul@localhost) by phuket.psconsult.nl (8.12.8p2/8.12.8/Submit) id j2LKOr6M040067; Mon, 21 Mar 2005 21:24:53 +0100 (CET) Date: Mon, 21 Mar 2005 21:24:53 +0100 From: Paul Schenkeveld To: freebsd-small@freebsd.org Message-ID: <20050321202453.GA39780@psconsult.nl> Mail-Followup-To: freebsd-small@freebsd.org, "Michael W. Lucas" References: <20050317165107.GA29364@bewilderbeast.blackhelicopters.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050317165107.GA29364@bewilderbeast.blackhelicopters.org> User-Agent: Mutt/1.5.6i cc: "Michael W. Lucas" Subject: Re: nanobsd disk info X-BeenThere: freebsd-small@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2005 23:53:19 -0000 Hi, On Thu, Mar 17, 2005 at 11:51:07AM -0500, Michael W. Lucas wrote: > Hi, > > I'm obviously missing something here. > > I'm trying to get nanobsd on a 512Mb flash card. The only changes > I've made are to set kernconf = net4801 in make.conf and to set the > Makefile disk geometry variables. "make" chokes on the disk geometry, > so I'm assuming I've set it wrong. > > My diskinfo shows as: > > mwl-crash2~;sudo diskinfo -v da0 > da0 > 512 # sectorsize > 512483840 # mediasize in bytes (489M) > 1000945 # mediasize in sectors > 488 # Cylinders according to firmware. > 64 # Heads according to firmware. > 32 # Sectors according to firmware. Somehow these numbers are not consistent: 488 cyls * 64 heads * 32 secs = 999424 secs What does dmesg show about da0? > I tried to put this into the nanobsd/Makefile as: > > from Makefile: > > # Physical disk paramters. Use diskinfo(8) on the target platform > # to find the correct numbers. We assume 512 bytes sectors. > HD?=64 > SC?=32 > SECTS?=1000945 >... > + awk > { > cs = $2 * $3 > cyl = $1 / cs > print "g c" cyl " h" $3 " s" $2 > dsl = int (($4 + cs - 1) / cs) > csl = int ((cyl - dsl) / 2) > dsl = cyl - csl * 2 > print "p 1 165 " $2, csl * cs - $2 > print "p 2 165 " $2 + csl * cs, csl * cs - $2 > print "p 3 165 " 2 * csl * cs, dsl * cs > } > > + cat /tmp/nanobsd.PaEr1DcL > g c488.743 h64 s32 > p 1 165 32 493536 > p 2 165 493600 493536 > p 3 165 987136 13809 > + fdisk -i -f /tmp/nanobsd.PaEr1DcL md0 > fdisk: invalid fdisk partition table found > fdisk: ERROR line 1: incorrect number of geometry args > ******* Working on device /dev/md0 ******* Sure, the cylinder count as computed above must be an integer, that's why fdisk complains. > Any thoughts? > > ==ml Regards, Paul Schenkeveld, Consultant PSconsult ICT Services BV