From owner-freebsd-stable@FreeBSD.ORG Fri Sep 12 16:53:42 2008 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 3642C1065676; Fri, 12 Sep 2008 16:53:42 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id EB89D8FC22; Fri, 12 Sep 2008 16:53:41 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 76D0D16060C; Fri, 12 Sep 2008 12:53:41 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 12 Sep 2008 12:53:41 -0400 X-Sasl-enc: Qek8mJgTVU11/jCtp1c12zNSO0hJBaW1kHzcVZ/FUuSk 1221238421 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id B685E2A094; Fri, 12 Sep 2008 12:53:40 -0400 (EDT) Message-ID: <48CA9E93.3060306@FreeBSD.org> Date: Fri, 12 Sep 2008 17:53:39 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Eugene Grosbein References: <48C91525.10806@incunabulum.net> <20080911162956.GA15152@svzserv.kemerovo.su> <48C9A907.8000000@incunabulum.net> <48C9AAAE.1030909@FreeBSD.org> In-Reply-To: <48C9AAAE.1030909@FreeBSD.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , FreeBSD stable , John Baldwin Subject: Re: Long delays for USB realbtx boot 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: Fri, 12 Sep 2008 16:53:42 -0000 Bruce M. Simpson wrote: > Woops, I noticed right after I sent this message, that there was an > I/O error writing to the USB key from dd in my shell -- I think I was > using a 32768 block size instead of 16384 which might account for the > problem. > I'll be sure to try this all again after I've had some sleep. Sure enough, this was my screwup. In short: I found the problem. The "active" flag wasn't set on any MBR slices. Tried booting from USB on 3 machines, and it all works perfectly. Thanks to kib@ and jhb@ for all their hard work on real mode BTX. For details of the bug bashing, read on. There is a thread here on the SYSLINUX list about USB long boot times: http://syslinux.zytor.com/archives/files/2005-January/004592.html Unrelated, as USB-HDD mode appears OK here. I tried this again with the EDD stuff disabled in mbr and boot1 as per your suggestion. Didn't make any difference. The boot delay (up to a minute) is still present. I note that the access light on the flash device DOES NOT flicker during this period, so I'm not sure that we're seeing sector-by-sector access. Of course without a POST card who can tell -- I didn't get one of those involved yet. After the delay I decided to interrupt loader(8) and do 'lsdev'. According to loader(8), the USB key is seen as BIOS drive C: (number 1) when 'mbr' is used as the mbr bootstrap. Turns out the AMI BIOS v2.58 on the ASUS Vintage AH-1 lets you force the boot mode for attached USB mass storage devices. This option is buried under Advanced->Chipset->SouthBridge Configuration->USB Configuration->USB Mass Storage Device Configuration->Emulation Type. It only appears if a USB mass storage device is plugged in at boot time. Choosing "Hard Disk" made no difference. Presumably this is because "Hard Disk" mode is chosen anyway if "Auto" is selected (the default) as the device is larger than 530MB. I re-examined the MBR on the key and it looks like it is using USB-HDD style geometry. Choosing "Forced FDD" mode seems to break boot completely, no change after 2m 40s. I'd expect this because there is an MBR on the disk, instead of a huge FAT filesystem. So USB-HDD mode appears to be chosen by the BIOS for this device as a default. So I tried reinstalling boot0 which lets me change packet/setdrv modes, as well as giving me some visual feedback about the boot stage. ...after much tweaking... So it appears the "active" flag was not being set for the first partition, it seems NanoBSD's fdisk script didn't set it; that should probably get patched, as this was the root cause of the USB booting delay. PS If there are any other drives present, then the boot menu does get displayed, regardless of the "mask" setting in boot0cfg. cheers BMS