From owner-freebsd-hackers Fri Jan 17 12: 9:15 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 43E4D37B401 for ; Fri, 17 Jan 2003 12:09:12 -0800 (PST) Received: from foem.leiden.webweaving.org (fia224-72.dsl.hccnet.nl [62.251.72.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 21A7943E4A for ; Fri, 17 Jan 2003 12:09:07 -0800 (PST) (envelope-from dirkx@webweaving.org) Received: from foem (foem [10.11.0.2]) by foem.leiden.webweaving.org (8.12.6/8.12.6) with ESMTP id h0HK94fh036863 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 17 Jan 2003 21:09:04 +0100 (CET) (envelope-from dirkx@webweaving.org) Date: Fri, 17 Jan 2003 21:09:04 +0100 (CET) From: Dirk-Willem van Gulik X-X-Sender: dirkx@foem.leiden.webweaving.org To: freebsd-hackers@FreeBSD.ORG Cc: soekris-tech@lists.soekris.com Subject: FreeBSD 5-Current/RC en boot0cfg Message-ID: <20030117204341.E93563-100000@foem.leiden.webweaving.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In short: A working procedure for making an ATA disk bootable does not work reliably with CF cards/with a Soekris. On FreeBSD with a normal IDE/ATA hard disk the following sequence: fdisk -BI ad0 disklabel -w -B ad0s1 auto disklabel -e ad0s1 ... newfs what is needed boot0cfg -v -B ad0 will reliably turn an IDE disk into something bootable (followed after a make install-world DESTDIR=..) Is this the correct sequence ? And though I can boot from CF cards; things are bit hit&miss; and it is not clear to me exactly what the right procedure is. The issue is that I seemingly get random results. And simply re-running the script or rebooting changes behavour. Issues seen are: -> Flashcards simply do not want to be 'seen' anymore with /stand/sysinstall; it will bail out wit no disk detected. -> The flashcard show *different results* on successive run with disklabel after an init iwth fdisk -BI ad0: c: 249824 0 unused 0 0 # (Cyl. 0 - 247*) or c: 249824 0 unsued 1024 8192 16 # (Cyl. 0 - 247*) quite random; with the same card and may change with a reboot. Then after a disklabel edit once sees either one of the following three: a: 249824 0 4.2BSD 0 0 # (Cyl. 0 - 247*) c: 249824 0 unused 0 0 # (Cyl. 0 - 247*) or a: 249824 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 247*) c: 249824 0 unsued 0 0 16 # (Cyl. 0 - 247*) or a: 249824 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 247*) c: 249824 0 unsued 1024 8192 16 # (Cyl. 0 - 247*) Again; mixed across cycles and boots. Is there anything in the new GEOM or BIOS which can be remembered across reboots, including power cycles. Right now the following commands : boot soekris diskless with GENERIC kernel using usual /var and /tmp on mfs. setenv TERM vt100 fdisk -BI ad0 disklabel -w -B ad0s1 auto disklabel -e ad0s1 -> add 'a: 4.2BSD line' -> remove fsize/bsize a: 249824 0 4.2BSD a: 249824 0 untitled disklabel ad0s1 will output 8 out of 11 times: a: 249824 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 247*) c: 249824 0 unsued 0 0 16 # (Cyl. 0 - 247*) boot0cfg -v -B ad0 9-10 cases will give GEOM: new disk ad0 ar: FreeBSD check1 failed ad0: ATA-0 disk at ata0-master ad0: 122MB (250368 sectors), 978 C, 8 H, 32 S, 512 B ad0: 1 secs/int, 1 depth queue, BIOSPIO ad0: piomode=1 dmamode=-1 udmamode=-1 cblid=0 GEOM: Configure ad0s1, start 16384 length 127909888 end 127926271 GEOM: Add ad0s1 hot[0] start 512 length 276 end 787 GEOM: Configure ad0s1a, start 0 length 127909888 end 127909887 GEOM: Configure ad0s1c, start 0 length 127909888 end 127909887 Manual root filesystem specification: : Mount using filesystem eg. ufs:da0s1a ? List valid disk boot devices Abort manual input mountroot> ufs:ad0s1a panic: Root mount failed, startup aborted. Debugger("panic") Stopped at Debugger+0x54: xchgl %ebx,in_Debugger.0 and sometimes: mountroot> ufs:ad0s1a Mounting root from ufs:ad0s1a start_init: trying /sbin/init ..hang... and then again, 1 in 50 times it will boot just fine. What am I doing wrong. How can I make this more reliable ? Dw To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message