From owner-freebsd-current@FreeBSD.ORG Thu Jun 25 07:28:30 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B749A1065672 for ; Thu, 25 Jun 2009 07:28:30 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swipnet.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 12D958FC1F for ; Thu, 25 Jun 2009 07:28:29 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=0wpJl8fJdqQA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=g1cHJkNK3DbceNnKypYA:9 a=BI_SGnX_RhFRJLYoIEUA:7 a=qE6iHKCGlgRAIw3vVJaRGuFBZdoA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 523885069; Thu, 25 Jun 2009 09:28:27 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Thu, 25 Jun 2009 09:27:54 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-CURRENT; KDE/4.2.4; i386; ; ) References: <86y6rh1dkh.fsf@ra333.heimat.gr.jp> In-Reply-To: <86y6rh1dkh.fsf@ra333.heimat.gr.jp> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200906250927.55432.hselasky@c2i.net> Cc: NAKAJI Hiroyuki Subject: Re: USB HDD is not detected before /etc/rc starts, and fsck fails X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 07:28:31 -0000 On Thursday 25 June 2009 00:17:50 NAKAJI Hiroyuki wrote: > Hi, > > Recent CURRENT kernel do not detect USB HDDs before /sbin/init. I > noticed this behavior some months ago, by typing "shutdown -r now" on > the console. > > Because of this detection delay, boottime (automatic) fsck always fails. > Here is a boot log from a serial console. > > /boot/kernel/kernel text=0x8d3608 data=0xe12e0+0xaf9f8 > syms=[0x4+0x9ba50+0x4+0xd4dde] /boot/kernel/linprocfs.ko text=0x641c > data=0x2c0+0x4 syms=[0x4+0xc10+0x4+0xc93] loading required module 'linux' > /boot/kernel/linux.ko text=0x222b4 data=0x2d54+0x16c > syms=[0x4+0x3d10+0x4+0x3c9f] /boot/kernel/mga.ko text=0x89ac data=0x6fbc > syms=[0x4+0xd70+0x4+0xd48] loading required module 'drm' > /boot/kernel/drm.ko text=0x110b8 data=0x1124+0xc > syms=[0x4+0x1b30+0x4+0x2161] /boot/kernel/atapicam.ko text=0x2cbc > data=0x1b4+0x4 syms=[0x4+0x800+0x4+0x89b] - > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel]... > GDB: no debug ports present > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2009 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 8.0-CURRENT #188: Wed Jun 3 12:53:09 JST 2009 > root@roddy.4407.kankyo-u.ac.jp:/usr/obj/usr/src/sys/RODDY > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: Intel(R) Xeon(TM) CPU 2.40GHz (2392.04-MHz 686-class CPU) > Origin = "GenuineIntel" Id = 0xf25 Stepping = 5 > > Features=0xbfebfbffA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> > Features2=0x4400 > real memory = 1073741824 (1024 MB) > avail memory = 1032613888 (984 MB) > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 2 package(s) x 1 core(s) x 2 HTT threads > [snip] > uhub0: 2 ports with 2 removable, self powered > uhub1: 2 ports with 2 removable, self powered > uhub3: 2 ports with 2 removable, self powered > GEOM: ad0s1: geometry does not match label (255h,63s != 16h,63s). > Root mount waiting for: usbus3 > Root mount waiting for: usbus3 > uhub2: 6 ports with 6 removable, self powered > acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 > Root mount waiting for: usbus3 > Trying to mount root from ufs:/dev/ad0s1a > (probe0:ata1:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > (probe0:ata1:0:0:0): CAM Status: SCSI Status Error > (probe0:ata1:0:0:0): SCSI Status: Check Condition > (probe0:ata1:0:0:0): NOT READY asc:3a,1 > (probe0:ata1:0:0:0): Medium not present - tray closed > (probe0:ata1:0:0:0): Unretryable error > cd0 at ata1 bus 0 target 0 lun 0 > cd0: Removable CD-ROM SCSI-0 device > cd0: 33.000MB/s transfers > cd0: Attempt to query device size failed: NOT READY, Medium not present - > tray closed Entropy harvesting: interrupts ethernet point_to_pointugen1.2: > at usbus1 uhid0: > on usbus1 > kickstart. > /dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad0s1a: clean, 21323 free (1627 frags, 2462 blocks, 1.3% > fragmentation) /dev/ad6s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad6s1d: clean, 761004 free (6932 frags, 942Jun 25 15:38:12 init: > /bin/sh on /etc/rc terminated abnormally, going to single user mode Enter > full pathname of shell or RETURN for /bin/sh: ugen3.2: at usbus3 > umass0: on usbus3 > umass0: SCSI over Bulk-Only; quirks = 0x0000 > umass0:3:0:-1: Attached to scbus3 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Fixed Direct Access SCSI-0 device > da0: 40.000MB/s transfers > da0: 286188MB (586114703 512 byte sectors: 255H 63S/T 36483C) > > Of cource, I can run "fsck -p" manually in the single user mode. But it > is not useful. > > # fsck -p > /dev/ad0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad0s1a: clean, 21323 free (1627 frags, 2462 blocks, 1.3% > fragmentation) /dev/ad6s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad6s1d: clean, 761004 free (6932 frags, 94259 blocks, 0.7% > fragmentation) /dev/ad6s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad6s1e: clean, 253588 free (396 frags, 31649 blocks, 0.2% > fragmentation) /dev/ad6s1f: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad6s1f: clean, 62063972 free (340516 frags, 7715432 blocks, 0.5% > fragmentation) /dev/ad1s1d: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad1s1d: clean, 38715020 free (397372 frags, 4789706 blocks, 0.4% > fragmentation) /dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/da0s1a: clean, 15606839 free (178983 frags, 1928482 blocks, 0.1% > fragmentation) # > > Are there any fixes or tips about this, for example > > o umass/da devices can be detected much earlier, in other words, > /sbin/init runs much later > o wait options for fsck or fstab for umass/da > o etc It's not USB's fault. We are already waiting for devices to enumerate (See Root Mount waiting for messages), but obviously your device is not ready at the moment the USB is probed. --HPS