From owner-freebsd-embedded@FreeBSD.ORG Sun Dec 9 18:14:16 2007 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B5BD16A418 for ; Sun, 9 Dec 2007 18:14:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0112913C448 for ; Sun, 9 Dec 2007 18:14:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id lB9ICI0q010082; Sun, 9 Dec 2007 11:12:19 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 09 Dec 2007 11:12:24 -0700 (MST) Message-Id: <20071209.111224.1649778303.imp@bsdimp.com> To: portcitycs@gmail.com From: "M. Warner Losh" In-Reply-To: <5a1835cd0712090959g2bad2bfbq4720f95d490872ba@mail.gmail.com> References: <5a1835cd0712090859r94e8375yb254ae193ee6d9f7@mail.gmail.com> <20071209.103433.-432829159.imp@bsdimp.com> <5a1835cd0712090959g2bad2bfbq4720f95d490872ba@mail.gmail.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Can't boot NanoBSD on an Alix board X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Dec 2007 18:14:16 -0000 In message: <5a1835cd0712090959g2bad2bfbq4720f95d490872ba@mail.gmail.com> "Lyle Scott III" writes: : On Dec 9, 2007 12:34 PM, M. Warner Losh wrote: : : > In message: <5a1835cd0712090859r94e8375yb254ae193ee6d9f7@mail.gmail.com> : > "Lyle Scott III" writes: : > : and how might i do that on my flash card? I read a little about : > boot0cfg : > : (man pages) and see the option -o packet .. is this what i need? : > : > Yes. : > : > : how would i go about setting this in my flashcard that is mounted in : > another : > : freebsd system? : > : > There's two supported ways. First, you can plug it into a PC Card <-> : > CF adapter and use that in a PC Card slot. Second, you can plug it : > into a USB flash reader. In the first case, you'll get a device : > that's adX, and in the latter you'll get one that's daX. : > : > boot0cfg -o packet /dev/adX : > or : > boot0cfg -o packet /dev/daX : > : > should then do the trick (where X is the actual device). : > : > : i read that packet mode == LBA mode BIOS setting? is this true? : > : ( : > http://lists.freebsd.org/pipermail/freebsd-current/2004-January/018907.html : > : ) : > : if so, LBA does not work either. The same result happens. : > : : > : i nudge in the right direction would be much appreciated :) : > : > If LBA mode doesn't work, then you have to figure out what the exact : > geometry is for the device. You'll need to set this geometry on the : > flash by having the partition end exactly on a cylinder boundary so : > that the BIOS and FreeBSD will be in sync as to the geometry of the : > device. This may mean you'll need to recreate it after : > repartitioning. If you used a usb flash reader, you will almost : > certainly get the wrong geometry (I've never had one that got it : > right, due to the fictious geometry used by CAM or umass for the : > device, I think). : > : > Warner : > : > : On Dec 8, 2007 10:48 PM, M. Warner Losh wrote: : > : : > : > In message: < : > 5a1835cd0712081917i17f55b5cy59b396cb1cd7f4da@mail.gmail.com> : > : > "Lyle Scott III" writes: : > : > : ok, i just upgraded the BIOS and now it hands after choosing 1 for : > the : > : > : bootloader: : > : > : : > : > : 640 KB Base Memory : > : > : 261120 KB Extended Memory : > : > : : > : > : 01F0 Master 848A SanDisk SDCFB-512 : > : > : Phys C/H/S 993/16/63 Log C/H/S 993/16/63 : > : > : : > : > : 1 FreeBSD : > : > : : > : > : Default: 1 : > : > : [FREEZE] : > : > : > : > Try using the packet mode of boot0 : > : > : > : > Warner : > : > : > : : Hm, well i am using a usb flash card reader... but the ALIX board works : great when i put in the diskinfo information into the tinybsd setup : script... but i guess this is different. : I tried 'boot0cfg -o packet /dev/da0' but with no luck. With that setting i : tried CHS and LBA mode on the alix board, both with the same result. : : So i guess this is the GEOMETRY problem you were talking about (and have : since read quite a few pages about). : : I'm afraid i don't exactly understand the part about : "You'll need to set this geometry on the flash by having the partition end : exactly on a cylinder boundary so that the BIOS and FreeBSD will be in sync : as to the geometry of the : device." : : I get what you are saying, but i'm not quite sure i understand how to do : that. I specified the info from diskinfo -v /dev/da0 and put it in a : myconf.conf file for NanoBSD... i thought that would take care of it. : : hostname# diskinfo -v /dev/da0 : /dev/da0 : 512 # sectorsize : 512483328 # mediasize in bytes (489M) : 1000944 # mediasize in sectors : 488 # Cylinders according to firmware. : 64 # Heads according to firmware. : 32 # Sectors according to firmware. This geometry is the fake geometry that I was talking about. You can't trust it any more than you can a used car salesman... : > : > : Phys C/H/S 993/16/63 Log C/H/S 993/16/63 This is the geometry that you must use. To do that, you'll need to set the start of the FreeBSD partition to 63 and the end to 940463 (which is 993 * 16 * 63 - 1). You'll need to make sure that the start chs is: beg: cyl 0/ head 1/ sector 1; and the end should be end: cyl 992/ head 15/ sector 63 once you have that, you can then newfs, etc. You'll also need to make sure that you've done both fdisk -B and bsdlabel -B to make sure the MBR and FreeBSD boot loader is on the new partition. Warner : hehe sorry never had to deal with such a lowlevel problem! i'm learning.. : i guess i can go pick up a pccard adapter of some sort. I am trying to keep : this off my laptop, so would a PCI flash card reader work properly with : writing the proper geometry?